summaryrefslogtreecommitdiff
path: root/doc/classes
diff options
context:
space:
mode:
Diffstat (limited to 'doc/classes')
-rw-r--r--doc/classes/@GlobalScope.xml997
-rw-r--r--doc/classes/AABB.xml31
-rw-r--r--doc/classes/AESContext.xml7
-rw-r--r--doc/classes/AStar2D.xml34
-rw-r--r--doc/classes/AStar3D.xml34
-rw-r--r--doc/classes/AStarGrid2D.xml188
-rw-r--r--doc/classes/AcceptDialog.xml15
-rw-r--r--doc/classes/AnimatedSprite2D.xml11
-rw-r--r--doc/classes/AnimatedSprite3D.xml23
-rw-r--r--doc/classes/AnimatedTexture.xml29
-rw-r--r--doc/classes/Animation.xml114
-rw-r--r--doc/classes/AnimationLibrary.xml12
-rw-r--r--doc/classes/AnimationNode.xml18
-rw-r--r--doc/classes/AnimationNodeBlendSpace1D.xml12
-rw-r--r--doc/classes/AnimationNodeBlendSpace2D.xml18
-rw-r--r--doc/classes/AnimationNodeBlendTree.xml18
-rw-r--r--doc/classes/AnimationNodeStateMachine.xml2
-rw-r--r--doc/classes/AnimationNodeStateMachineTransition.xml8
-rw-r--r--doc/classes/AnimationNodeTransition.xml8
-rw-r--r--doc/classes/AnimationPlayer.xml52
-rw-r--r--doc/classes/AnimationTree.xml7
-rw-r--r--doc/classes/Area2D.xml62
-rw-r--r--doc/classes/Area3D.xml66
-rw-r--r--doc/classes/Array.xml118
-rw-r--r--doc/classes/ArrayMesh.xml18
-rw-r--r--doc/classes/AtlasTexture.xml16
-rw-r--r--doc/classes/AudioEffectCapture.xml10
-rw-r--r--doc/classes/AudioEffectChorus.xml2
-rw-r--r--doc/classes/AudioEffectDelay.xml24
-rw-r--r--doc/classes/AudioServer.xml60
-rw-r--r--doc/classes/AudioStreamGeneratorPlayback.xml4
-rw-r--r--doc/classes/AudioStreamMicrophone.xml4
-rw-r--r--doc/classes/AudioStreamPlayer.xml2
-rw-r--r--doc/classes/AudioStreamPlayer2D.xml2
-rw-r--r--doc/classes/AudioStreamPlayer3D.xml10
-rw-r--r--doc/classes/AudioStreamWAV.xml4
-rw-r--r--doc/classes/BaseButton.xml21
-rw-r--r--doc/classes/BaseMaterial3D.xml52
-rw-r--r--doc/classes/Basis.xml37
-rw-r--r--doc/classes/BitMap.xml49
-rw-r--r--doc/classes/BoneAttachment3D.xml10
-rw-r--r--doc/classes/BoneMap.xml7
-rw-r--r--doc/classes/BoxContainer.xml14
-rw-r--r--doc/classes/Button.xml10
-rw-r--r--doc/classes/ButtonGroup.xml2
-rw-r--r--doc/classes/CPUParticles2D.xml38
-rw-r--r--doc/classes/CPUParticles3D.xml16
-rw-r--r--doc/classes/Callable.xml13
-rw-r--r--doc/classes/CallbackTweener.xml3
-rw-r--r--doc/classes/Camera2D.xml55
-rw-r--r--doc/classes/Camera3D.xml24
-rw-r--r--doc/classes/CameraAttributes.xml31
-rw-r--r--doc/classes/CameraAttributesPhysical.xml49
-rw-r--r--doc/classes/CameraAttributesPractical.xml41
-rw-r--r--doc/classes/CameraEffects.xml41
-rw-r--r--doc/classes/CameraServer.xml8
-rw-r--r--doc/classes/CameraTexture.xml1
-rw-r--r--doc/classes/CanvasItem.xml135
-rw-r--r--doc/classes/CanvasItemMaterial.xml2
-rw-r--r--doc/classes/CanvasLayer.xml8
-rw-r--r--doc/classes/CanvasTexture.xml12
-rw-r--r--doc/classes/CharacterBody2D.xml36
-rw-r--r--doc/classes/CharacterBody3D.xml34
-rw-r--r--doc/classes/CheckBox.xml6
-rw-r--r--doc/classes/CheckButton.xml38
-rw-r--r--doc/classes/ClassDB.xml50
-rw-r--r--doc/classes/CodeEdit.xml54
-rw-r--r--doc/classes/CollisionObject2D.xml51
-rw-r--r--doc/classes/CollisionObject3D.xml29
-rw-r--r--doc/classes/CollisionShape2D.xml7
-rw-r--r--doc/classes/CollisionShape3D.xml3
-rw-r--r--doc/classes/Color.xml54
-rw-r--r--doc/classes/ColorPicker.xml66
-rw-r--r--doc/classes/CompressedCubemap.xml9
-rw-r--r--doc/classes/CompressedCubemapArray.xml9
-rw-r--r--doc/classes/CompressedTexture2D.xml15
-rw-r--r--doc/classes/CompressedTexture2DArray.xml9
-rw-r--r--doc/classes/CompressedTexture3D.xml6
-rw-r--r--doc/classes/CompressedTextureLayered.xml10
-rw-r--r--doc/classes/ConcavePolygonShape2D.xml3
-rw-r--r--doc/classes/ConcavePolygonShape3D.xml3
-rw-r--r--doc/classes/ConeTwistJoint3D.xml4
-rw-r--r--doc/classes/ConfigFile.xml30
-rw-r--r--doc/classes/ConfirmationDialog.xml4
-rw-r--r--doc/classes/Container.xml4
-rw-r--r--doc/classes/Control.xml227
-rw-r--r--doc/classes/Crypto.xml16
-rw-r--r--doc/classes/CryptoKey.xml14
-rw-r--r--doc/classes/Cubemap.xml7
-rw-r--r--doc/classes/CubemapArray.xml6
-rw-r--r--doc/classes/Curve.xml42
-rw-r--r--doc/classes/Curve2D.xml74
-rw-r--r--doc/classes/Curve3D.xml77
-rw-r--r--doc/classes/CurveTexture.xml1
-rw-r--r--doc/classes/CurveXYZTexture.xml1
-rw-r--r--doc/classes/CylinderShape3D.xml1
-rw-r--r--doc/classes/DTLSServer.xml4
-rw-r--r--doc/classes/Dictionary.xml17
-rw-r--r--doc/classes/DirAccess.xml (renamed from doc/classes/Directory.xml)147
-rw-r--r--doc/classes/DirectionalLight2D.xml3
-rw-r--r--doc/classes/DisplayServer.xml630
-rw-r--r--doc/classes/EditorCommandPalette.xml12
-rw-r--r--doc/classes/EditorDebuggerPlugin.xml116
-rw-r--r--doc/classes/EditorDebuggerSession.xml86
-rw-r--r--doc/classes/EditorExportPlatform.xml9
-rw-r--r--doc/classes/EditorExportPlugin.xml71
-rw-r--r--doc/classes/EditorFeatureProfile.xml23
-rw-r--r--doc/classes/EditorFileDialog.xml9
-rw-r--r--doc/classes/EditorFileSystem.xml2
-rw-r--r--doc/classes/EditorFileSystemDirectory.xml18
-rw-r--r--doc/classes/EditorImportPlugin.xml14
-rw-r--r--doc/classes/EditorInspector.xml14
-rw-r--r--doc/classes/EditorInspectorPlugin.xml16
-rw-r--r--doc/classes/EditorInterface.xml58
-rw-r--r--doc/classes/EditorNode3DGizmo.xml50
-rw-r--r--doc/classes/EditorNode3DGizmoPlugin.xml30
-rw-r--r--doc/classes/EditorPlugin.xml112
-rw-r--r--doc/classes/EditorProperty.xml22
-rw-r--r--doc/classes/EditorResourcePicker.xml6
-rw-r--r--doc/classes/EditorResourcePreview.xml10
-rw-r--r--doc/classes/EditorResourcePreviewGenerator.xml2
-rw-r--r--doc/classes/EditorScenePostImport.xml2
-rw-r--r--doc/classes/EditorScript.xml5
-rw-r--r--doc/classes/EditorSelection.xml2
-rw-r--r--doc/classes/EditorSettings.xml106
-rw-r--r--doc/classes/EditorSpinSlider.xml6
-rw-r--r--doc/classes/EditorSyntaxHighlighter.xml2
-rw-r--r--doc/classes/EditorTranslationParserPlugin.xml8
-rw-r--r--doc/classes/EditorUndoRedoManager.xml130
-rw-r--r--doc/classes/EditorVCSInterface.xml263
-rw-r--r--doc/classes/Engine.xml88
-rw-r--r--doc/classes/EngineDebugger.xml14
-rw-r--r--doc/classes/EngineProfiler.xml2
-rw-r--r--doc/classes/Environment.xml55
-rw-r--r--doc/classes/Expression.xml6
-rw-r--r--doc/classes/FileAccess.xml (renamed from doc/classes/File.xml)124
-rw-r--r--doc/classes/FileDialog.xml18
-rw-r--r--doc/classes/FileSystemDock.xml4
-rw-r--r--doc/classes/FlowContainer.xml28
-rw-r--r--doc/classes/FogMaterial.xml14
-rw-r--r--doc/classes/FogVolume.xml9
-rw-r--r--doc/classes/Font.xml24
-rw-r--r--doc/classes/FontFile.xml27
-rw-r--r--doc/classes/FontVariation.xml3
-rw-r--r--doc/classes/GPUParticles2D.xml18
-rw-r--r--doc/classes/GPUParticles3D.xml18
-rw-r--r--doc/classes/GPUParticlesAttractor3D.xml2
-rw-r--r--doc/classes/GPUParticlesCollision3D.xml6
-rw-r--r--doc/classes/GPUParticlesCollisionBox3D.xml2
-rw-r--r--doc/classes/GPUParticlesCollisionHeightField3D.xml2
-rw-r--r--doc/classes/GPUParticlesCollisionSDF3D.xml6
-rw-r--r--doc/classes/GPUParticlesCollisionSphere3D.xml2
-rw-r--r--doc/classes/Generic6DOFJoint3D.xml12
-rw-r--r--doc/classes/Geometry2D.xml73
-rw-r--r--doc/classes/Geometry3D.xml30
-rw-r--r--doc/classes/GeometryInstance3D.xml37
-rw-r--r--doc/classes/Gradient.xml24
-rw-r--r--doc/classes/GradientTexture1D.xml1
-rw-r--r--doc/classes/GradientTexture2D.xml1
-rw-r--r--doc/classes/GraphEdit.xml143
-rw-r--r--doc/classes/GraphNode.xml176
-rw-r--r--doc/classes/HMACContext.xml20
-rw-r--r--doc/classes/HSlider.xml3
-rw-r--r--doc/classes/HSplitContainer.xml3
-rw-r--r--doc/classes/HTTPClient.xml28
-rw-r--r--doc/classes/HTTPRequest.xml24
-rw-r--r--doc/classes/HashingContext.xml4
-rw-r--r--doc/classes/HingeJoint3D.xml4
-rw-r--r--doc/classes/IP.xml20
-rw-r--r--doc/classes/Image.xml78
-rw-r--r--doc/classes/ImageFormatLoader.xml19
-rw-r--r--doc/classes/ImageFormatLoaderExtension.xml42
-rw-r--r--doc/classes/ImageTexture.xml9
-rw-r--r--doc/classes/ImageTexture3D.xml5
-rw-r--r--doc/classes/ImageTextureLayered.xml10
-rw-r--r--doc/classes/ImporterMesh.xml17
-rw-r--r--doc/classes/Input.xml24
-rw-r--r--doc/classes/InputEvent.xml16
-rw-r--r--doc/classes/InputEventMIDI.xml10
-rw-r--r--doc/classes/InputEventScreenTouch.xml3
-rw-r--r--doc/classes/InputEventWithModifiers.xml19
-rw-r--r--doc/classes/InputMap.xml8
-rw-r--r--doc/classes/InstancePlaceholder.xml2
-rw-r--r--doc/classes/ItemList.xml32
-rw-r--r--doc/classes/JSON.xml46
-rw-r--r--doc/classes/JSONRPC.xml22
-rw-r--r--doc/classes/JavaScriptBridge.xml (renamed from doc/classes/JavaScript.xml)20
-rw-r--r--doc/classes/JavaScriptObject.xml20
-rw-r--r--doc/classes/Joint3D.xml8
-rw-r--r--doc/classes/KinematicCollision2D.xml2
-rw-r--r--doc/classes/KinematicCollision3D.xml2
-rw-r--r--doc/classes/Label.xml24
-rw-r--r--doc/classes/Label3D.xml9
-rw-r--r--doc/classes/Light3D.xml70
-rw-r--r--doc/classes/LightmapGI.xml9
-rw-r--r--doc/classes/LightmapGIData.xml4
-rw-r--r--doc/classes/Line2D.xml20
-rw-r--r--doc/classes/LineEdit.xml23
-rw-r--r--doc/classes/LinkButton.xml2
-rw-r--r--doc/classes/MainLoop.xml2
-rw-r--r--doc/classes/Marker2D.xml (renamed from doc/classes/Position2D.xml)2
-rw-r--r--doc/classes/Marker3D.xml16
-rw-r--r--doc/classes/Marshalls.xml10
-rw-r--r--doc/classes/MenuBar.xml169
-rw-r--r--doc/classes/MenuButton.xml8
-rw-r--r--doc/classes/Mesh.xml14
-rw-r--r--doc/classes/MeshInstance3D.xml4
-rw-r--r--doc/classes/MeshTexture.xml1
-rw-r--r--doc/classes/MissingNode.xml2
-rw-r--r--doc/classes/MissingResource.xml2
-rw-r--r--doc/classes/MovieWriter.xml8
-rw-r--r--doc/classes/MultiMesh.xml24
-rw-r--r--doc/classes/MultiMeshInstance3D.xml2
-rw-r--r--doc/classes/MultiplayerAPI.xml6
-rw-r--r--doc/classes/MultiplayerAPIExtension.xml2
-rw-r--r--doc/classes/MultiplayerPeer.xml73
-rw-r--r--doc/classes/MultiplayerPeerExtension.xml32
-rw-r--r--doc/classes/NavigationAgent2D.xml38
-rw-r--r--doc/classes/NavigationAgent3D.xml36
-rw-r--r--doc/classes/NavigationLink2D.xml55
-rw-r--r--doc/classes/NavigationLink3D.xml55
-rw-r--r--doc/classes/NavigationMesh.xml6
-rw-r--r--doc/classes/NavigationMeshGenerator.xml6
-rw-r--r--doc/classes/NavigationObstacle2D.xml15
-rw-r--r--doc/classes/NavigationObstacle3D.xml15
-rw-r--r--doc/classes/NavigationPathQueryParameters2D.xml42
-rw-r--r--doc/classes/NavigationPathQueryParameters3D.xml42
-rw-r--r--doc/classes/NavigationPathQueryResult2D.xml24
-rw-r--r--doc/classes/NavigationPathQueryResult3D.xml24
-rw-r--r--doc/classes/NavigationRegion2D.xml5
-rw-r--r--doc/classes/NavigationRegion3D.xml7
-rw-r--r--doc/classes/NavigationServer2D.xml187
-rw-r--r--doc/classes/NavigationServer3D.xml187
-rw-r--r--doc/classes/NinePatchRect.xml2
-rw-r--r--doc/classes/Node.xml135
-rw-r--r--doc/classes/Node2D.xml16
-rw-r--r--doc/classes/Node3D.xml53
-rw-r--r--doc/classes/NodePath.xml6
-rw-r--r--doc/classes/OS.xml171
-rw-r--r--doc/classes/Object.xml103
-rw-r--r--doc/classes/OccluderInstance3D.xml6
-rw-r--r--doc/classes/OfflineMultiplayerPeer.xml12
-rw-r--r--doc/classes/OmniLight3D.xml1
-rw-r--r--doc/classes/OptionButton.xml46
-rw-r--r--doc/classes/PCKPacker.xml6
-rw-r--r--doc/classes/PackedByteArray.xml50
-rw-r--r--doc/classes/PackedColorArray.xml15
-rw-r--r--doc/classes/PackedFloat32Array.xml17
-rw-r--r--doc/classes/PackedFloat64Array.xml16
-rw-r--r--doc/classes/PackedInt32Array.xml15
-rw-r--r--doc/classes/PackedInt64Array.xml14
-rw-r--r--doc/classes/PackedScene.xml12
-rw-r--r--doc/classes/PackedStringArray.xml15
-rw-r--r--doc/classes/PackedVector2Array.xml16
-rw-r--r--doc/classes/PackedVector3Array.xml16
-rw-r--r--doc/classes/PacketPeer.xml4
-rw-r--r--doc/classes/PacketPeerDTLS.xml4
-rw-r--r--doc/classes/PacketPeerExtension.xml4
-rw-r--r--doc/classes/PacketPeerUDP.xml16
-rw-r--r--doc/classes/Panel.xml2
-rw-r--r--doc/classes/PanoramaSkyMaterial.xml4
-rw-r--r--doc/classes/ParallaxLayer.xml1
-rw-r--r--doc/classes/ParticleProcessMaterial.xml (renamed from doc/classes/ParticlesMaterial.xml)61
-rw-r--r--doc/classes/PathFollow2D.xml12
-rw-r--r--doc/classes/PathFollow3D.xml23
-rw-r--r--doc/classes/Performance.xml14
-rw-r--r--doc/classes/PhysicalBone2D.xml4
-rw-r--r--doc/classes/PhysicalSkyMaterial.xml3
-rw-r--r--doc/classes/PhysicsBody2D.xml22
-rw-r--r--doc/classes/PhysicsBody3D.xml34
-rw-r--r--doc/classes/PhysicsDirectBodyState2D.xml12
-rw-r--r--doc/classes/PhysicsDirectBodyState2DExtension.xml249
-rw-r--r--doc/classes/PhysicsDirectBodyState3D.xml15
-rw-r--r--doc/classes/PhysicsDirectBodyState3DExtension.xml5
-rw-r--r--doc/classes/PhysicsDirectSpaceState2D.xml12
-rw-r--r--doc/classes/PhysicsDirectSpaceState2DExtension.xml91
-rw-r--r--doc/classes/PhysicsDirectSpaceState3D.xml12
-rw-r--r--doc/classes/PhysicsPointQueryParameters2D.xml2
-rw-r--r--doc/classes/PhysicsRayQueryParameters2D.xml4
-rw-r--r--doc/classes/PhysicsServer2D.xml53
-rw-r--r--doc/classes/PhysicsServer2DExtension.xml937
-rw-r--r--doc/classes/PhysicsServer2DManager.xml30
-rw-r--r--doc/classes/PhysicsServer3D.xml49
-rw-r--r--doc/classes/PhysicsServer3DExtension.xml378
-rw-r--r--doc/classes/PhysicsServer3DManager.xml30
-rw-r--r--doc/classes/PhysicsShapeQueryParameters2D.xml2
-rw-r--r--doc/classes/PhysicsTestMotionParameters2D.xml6
-rw-r--r--doc/classes/PhysicsTestMotionParameters3D.xml4
-rw-r--r--doc/classes/PlaceholderCubemap.xml4
-rw-r--r--doc/classes/PlaceholderCubemapArray.xml4
-rw-r--r--doc/classes/PlaceholderMaterial.xml4
-rw-r--r--doc/classes/PlaceholderMesh.xml5
-rw-r--r--doc/classes/PlaceholderTexture2D.xml6
-rw-r--r--doc/classes/PlaceholderTexture2DArray.xml4
-rw-r--r--doc/classes/PlaceholderTexture3D.xml5
-rw-r--r--doc/classes/PlaceholderTextureLayered.xml6
-rw-r--r--doc/classes/Plane.xml24
-rw-r--r--doc/classes/PlaneMesh.xml16
-rw-r--r--doc/classes/Polygon2D.xml9
-rw-r--r--doc/classes/Popup.xml2
-rw-r--r--doc/classes/PopupMenu.xml167
-rw-r--r--doc/classes/PopupPanel.xml1
-rw-r--r--doc/classes/PortableCompressedTexture2D.xml5
-rw-r--r--doc/classes/Position3D.xml11
-rw-r--r--doc/classes/PrimitiveMesh.xml12
-rw-r--r--doc/classes/ProceduralSkyMaterial.xml10
-rw-r--r--doc/classes/ProgressBar.xml10
-rw-r--r--doc/classes/ProjectSettings.xml647
-rw-r--r--doc/classes/Projection.xml72
-rw-r--r--doc/classes/PropertyTweener.xml8
-rw-r--r--doc/classes/ProxyTexture.xml13
-rw-r--r--doc/classes/QuadMesh.xml14
-rw-r--r--doc/classes/Quaternion.xml48
-rw-r--r--doc/classes/RDPipelineRasterizationState.xml2
-rw-r--r--doc/classes/RDUniform.xml2
-rw-r--r--doc/classes/RandomNumberGenerator.xml9
-rw-r--r--doc/classes/Range.xml30
-rw-r--r--doc/classes/RayCast2D.xml10
-rw-r--r--doc/classes/RayCast3D.xml10
-rw-r--r--doc/classes/Rect2.xml29
-rw-r--r--doc/classes/Rect2i.xml17
-rw-r--r--doc/classes/RefCounted.xml6
-rw-r--r--doc/classes/ReflectionProbe.xml2
-rw-r--r--doc/classes/RenderingDevice.xml64
-rw-r--r--doc/classes/RenderingServer.xml328
-rw-r--r--doc/classes/Resource.xml58
-rw-r--r--doc/classes/ResourceFormatLoader.xml17
-rw-r--r--doc/classes/ResourceFormatSaver.xml15
-rw-r--r--doc/classes/ResourceLoader.xml22
-rw-r--r--doc/classes/ResourcePreloader.xml10
-rw-r--r--doc/classes/ResourceSaver.xml8
-rw-r--r--doc/classes/RichTextEffect.xml2
-rw-r--r--doc/classes/RichTextLabel.xml53
-rw-r--r--doc/classes/RigidBody2D.xml (renamed from doc/classes/RigidDynamicBody2D.xml)72
-rw-r--r--doc/classes/RigidBody3D.xml (renamed from doc/classes/RigidDynamicBody3D.xml)78
-rw-r--r--doc/classes/SceneState.xml40
-rw-r--r--doc/classes/SceneTree.xml50
-rw-r--r--doc/classes/Script.xml10
-rw-r--r--doc/classes/ScriptEditor.xml6
-rw-r--r--doc/classes/ScriptEditorBase.xml19
-rw-r--r--doc/classes/ScriptExtension.xml6
-rw-r--r--doc/classes/ScrollBar.xml1
-rw-r--r--doc/classes/ScrollContainer.xml6
-rw-r--r--doc/classes/Shader.xml20
-rw-r--r--doc/classes/ShaderMaterial.xml20
-rw-r--r--doc/classes/Shape2D.xml24
-rw-r--r--doc/classes/ShapeCast2D.xml19
-rw-r--r--doc/classes/ShapeCast3D.xml19
-rw-r--r--doc/classes/Shortcut.xml2
-rw-r--r--doc/classes/Signal.xml2
-rw-r--r--doc/classes/Skeleton2D.xml10
-rw-r--r--doc/classes/Skeleton3D.xml107
-rw-r--r--doc/classes/SkeletonIK3D.xml37
-rw-r--r--doc/classes/SkeletonModification2D.xml4
-rw-r--r--doc/classes/SkeletonModification2DCCDIK.xml32
-rw-r--r--doc/classes/SkeletonModification2DFABRIK.xml18
-rw-r--r--doc/classes/SkeletonModification2DJiggle.xml34
-rw-r--r--doc/classes/SkeletonModification2DLookAt.xml2
-rw-r--r--doc/classes/SkeletonModification2DPhysicalBones.xml9
-rw-r--r--doc/classes/SkeletonModification2DStackHolder.xml2
-rw-r--r--doc/classes/SkeletonModification2DTwoBoneIK.xml2
-rw-r--r--doc/classes/SkeletonModification3D.xml4
-rw-r--r--doc/classes/SkeletonModification3DCCDIK.xml32
-rw-r--r--doc/classes/SkeletonModification3DFABRIK.xml34
-rw-r--r--doc/classes/SkeletonModification3DJiggle.xml34
-rw-r--r--doc/classes/SkeletonModification3DLookAt.xml2
-rw-r--r--doc/classes/SkeletonModification3DStackHolder.xml2
-rw-r--r--doc/classes/SkeletonModification3DTwoBoneIK.xml10
-rw-r--r--doc/classes/SkeletonModificationStack2D.xml10
-rw-r--r--doc/classes/SkeletonModificationStack3D.xml12
-rw-r--r--doc/classes/SkeletonProfile.xml39
-rw-r--r--doc/classes/SkeletonProfileHumanoid.xml1
-rw-r--r--doc/classes/Slider.xml4
-rw-r--r--doc/classes/SliderJoint3D.xml4
-rw-r--r--doc/classes/SoftBody3D.xml (renamed from doc/classes/SoftDynamicBody3D.xml)30
-rw-r--r--doc/classes/SpinBox.xml5
-rw-r--r--doc/classes/SplitContainer.xml21
-rw-r--r--doc/classes/SpotLight3D.xml2
-rw-r--r--doc/classes/Sprite2D.xml3
-rw-r--r--doc/classes/SpriteFrames.xml2
-rw-r--r--doc/classes/StandardMaterial3D.xml2
-rw-r--r--doc/classes/StaticBody2D.xml2
-rw-r--r--doc/classes/StaticBody3D.xml2
-rw-r--r--doc/classes/StreamPeer.xml18
-rw-r--r--doc/classes/StreamPeerBuffer.xml4
-rw-r--r--doc/classes/StreamPeerExtension.xml8
-rw-r--r--doc/classes/StreamPeerGZIP.xml42
-rw-r--r--doc/classes/StreamPeerTCP.xml4
-rw-r--r--doc/classes/StreamPeerTLS.xml (renamed from doc/classes/StreamPeerSSL.xml)26
-rw-r--r--doc/classes/String.xml132
-rw-r--r--doc/classes/StyleBox.xml17
-rw-r--r--doc/classes/StyleBoxFlat.xml37
-rw-r--r--doc/classes/StyleBoxTexture.xml23
-rw-r--r--doc/classes/SubViewport.xml2
-rw-r--r--doc/classes/SurfaceTool.xml35
-rw-r--r--doc/classes/SystemFont.xml9
-rw-r--r--doc/classes/TCPServer.xml8
-rw-r--r--doc/classes/TabBar.xml26
-rw-r--r--doc/classes/TabContainer.xml31
-rw-r--r--doc/classes/TextEdit.xml236
-rw-r--r--doc/classes/TextLine.xml7
-rw-r--r--doc/classes/TextMesh.xml12
-rw-r--r--doc/classes/TextParagraph.xml14
-rw-r--r--doc/classes/TextServer.xml139
-rw-r--r--doc/classes/TextServerExtension.xml611
-rw-r--r--doc/classes/TextServerManager.xml2
-rw-r--r--doc/classes/Texture.xml2
-rw-r--r--doc/classes/Texture2D.xml20
-rw-r--r--doc/classes/Texture2DArray.xml4
-rw-r--r--doc/classes/Texture3D.xml16
-rw-r--r--doc/classes/TextureButton.xml10
-rw-r--r--doc/classes/TextureLayered.xml27
-rw-r--r--doc/classes/TextureProgressBar.xml3
-rw-r--r--doc/classes/Theme.xml125
-rw-r--r--doc/classes/ThemeDB.xml54
-rw-r--r--doc/classes/Thread.xml4
-rw-r--r--doc/classes/TileData.xml38
-rw-r--r--doc/classes/TileMap.xml101
-rw-r--r--doc/classes/TileMapPattern.xml8
-rw-r--r--doc/classes/TileSet.xml47
-rw-r--r--doc/classes/TileSetAtlasSource.xml56
-rw-r--r--doc/classes/TileSetScenesCollectionSource.xml16
-rw-r--r--doc/classes/TileSetSource.xml11
-rw-r--r--doc/classes/Time.xml22
-rw-r--r--doc/classes/Timer.xml2
-rw-r--r--doc/classes/Transform2D.xml22
-rw-r--r--doc/classes/Transform3D.xml36
-rw-r--r--doc/classes/Translation.xml8
-rw-r--r--doc/classes/TranslationServer.xml20
-rw-r--r--doc/classes/Tree.xml46
-rw-r--r--doc/classes/TreeItem.xml112
-rw-r--r--doc/classes/Tween.xml212
-rw-r--r--doc/classes/UndoRedo.xml14
-rw-r--r--doc/classes/VSlider.xml4
-rw-r--r--doc/classes/VSplitContainer.xml3
-rw-r--r--doc/classes/Variant.xml1
-rw-r--r--doc/classes/Vector2.xml32
-rw-r--r--doc/classes/Vector2i.xml2
-rw-r--r--doc/classes/Vector3.xml38
-rw-r--r--doc/classes/Vector3i.xml2
-rw-r--r--doc/classes/Vector4.xml34
-rw-r--r--doc/classes/Vector4i.xml69
-rw-r--r--doc/classes/VehicleBody3D.xml8
-rw-r--r--doc/classes/VehicleWheel3D.xml6
-rw-r--r--doc/classes/VelocityTracker3D.xml32
-rw-r--r--doc/classes/VideoStreamPlayer.xml2
-rw-r--r--doc/classes/Viewport.xml62
-rw-r--r--doc/classes/ViewportTexture.xml1
-rw-r--r--doc/classes/VisibleOnScreenEnabler2D.xml7
-rw-r--r--doc/classes/VisibleOnScreenEnabler3D.xml2
-rw-r--r--doc/classes/VisualInstance3D.xml11
-rw-r--r--doc/classes/VisualShader.xml16
-rw-r--r--doc/classes/VisualShaderNodeBooleanParameter.xml (renamed from doc/classes/VisualShaderNodeBooleanUniform.xml)4
-rw-r--r--doc/classes/VisualShaderNodeColorParameter.xml (renamed from doc/classes/VisualShaderNodeColorUniform.xml)4
-rw-r--r--doc/classes/VisualShaderNodeCubemapParameter.xml (renamed from doc/classes/VisualShaderNodeCubemapUniform.xml)4
-rw-r--r--doc/classes/VisualShaderNodeCustom.xml4
-rw-r--r--doc/classes/VisualShaderNodeDistanceFade.xml9
-rw-r--r--doc/classes/VisualShaderNodeExpression.xml2
-rw-r--r--doc/classes/VisualShaderNodeFloatParameter.xml (renamed from doc/classes/VisualShaderNodeFloatUniform.xml)8
-rw-r--r--doc/classes/VisualShaderNodeGroupBase.xml2
-rw-r--r--doc/classes/VisualShaderNodeInput.xml2
-rw-r--r--doc/classes/VisualShaderNodeIntParameter.xml33
-rw-r--r--doc/classes/VisualShaderNodeIntUniform.xml45
-rw-r--r--doc/classes/VisualShaderNodeLinearSceneDepth.xml9
-rw-r--r--doc/classes/VisualShaderNodeParameter.xml29
-rw-r--r--doc/classes/VisualShaderNodeParameterRef.xml16
-rw-r--r--doc/classes/VisualShaderNodeProximityFade.xml9
-rw-r--r--doc/classes/VisualShaderNodeRandomRange.xml9
-rw-r--r--doc/classes/VisualShaderNodeRemap.xml9
-rw-r--r--doc/classes/VisualShaderNodeTexture2DArrayParameter.xml9
-rw-r--r--doc/classes/VisualShaderNodeTexture2DArrayUniform.xml9
-rw-r--r--doc/classes/VisualShaderNodeTexture2DParameter.xml11
-rw-r--r--doc/classes/VisualShaderNodeTexture3DParameter.xml11
-rw-r--r--doc/classes/VisualShaderNodeTexture3DUniform.xml11
-rw-r--r--doc/classes/VisualShaderNodeTextureParameter.xml (renamed from doc/classes/VisualShaderNodeTextureUniform.xml)10
-rw-r--r--doc/classes/VisualShaderNodeTextureParameterTriplanar.xml (renamed from doc/classes/VisualShaderNodeTextureUniformTriplanar.xml)2
-rw-r--r--doc/classes/VisualShaderNodeTransformParameter.xml (renamed from doc/classes/VisualShaderNodeTransformUniform.xml)4
-rw-r--r--doc/classes/VisualShaderNodeUVFunc.xml2
-rw-r--r--doc/classes/VisualShaderNodeUVPolarCoord.xml9
-rw-r--r--doc/classes/VisualShaderNodeUniform.xml29
-rw-r--r--doc/classes/VisualShaderNodeUniformRef.xml16
-rw-r--r--doc/classes/VisualShaderNodeVec2Parameter.xml (renamed from doc/classes/VisualShaderNodeVec2Uniform.xml)4
-rw-r--r--doc/classes/VisualShaderNodeVec3Parameter.xml (renamed from doc/classes/VisualShaderNodeVec3Uniform.xml)4
-rw-r--r--doc/classes/VisualShaderNodeVec4Constant.xml4
-rw-r--r--doc/classes/VisualShaderNodeVec4Parameter.xml (renamed from doc/classes/VisualShaderNodeVec4Uniform.xml)6
-rw-r--r--doc/classes/VoxelGI.xml3
-rw-r--r--doc/classes/VoxelGIData.xml2
-rw-r--r--doc/classes/Window.xml62
-rw-r--r--doc/classes/World2D.xml2
-rw-r--r--doc/classes/World3D.xml5
-rw-r--r--doc/classes/WorldEnvironment.xml4
-rw-r--r--doc/classes/X509Certificate.xml4
-rw-r--r--doc/classes/XMLParser.xml2
-rw-r--r--doc/classes/XRInterface.xml49
-rw-r--r--doc/classes/XRInterfaceExtension.xml42
-rw-r--r--doc/classes/XROrigin3D.xml3
-rw-r--r--doc/classes/XRPose.xml4
-rw-r--r--doc/classes/XRServer.xml8
-rw-r--r--doc/classes/float.xml28
-rw-r--r--doc/classes/int.xml38
500 files changed, 11815 insertions, 5637 deletions
diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml
index 05e4e209d1..09713bce2f 100644
--- a/doc/classes/@GlobalScope.xml
+++ b/doc/classes/@GlobalScope.xml
@@ -16,7 +16,7 @@
<return type="Variant" />
<param index="0" name="x" type="Variant" />
<description>
- Returns the absolute value of a [Variant] parameter [code]x[/code] (i.e. non-negative value). Variant types [int], [float] (real), [Vector2], [Vector2i], [Vector3] and [Vector3i] are supported.
+ Returns the absolute value of a [Variant] parameter [param x] (i.e. non-negative value). Variant types [int], [float], [Vector2], [Vector2i], [Vector3] and [Vector3i] are supported.
[codeblock]
var a = abs(-1)
# a is 1
@@ -42,7 +42,7 @@
<return type="float" />
<param index="0" name="x" type="float" />
<description>
- Returns the absolute value of float parameter [code]x[/code] (i.e. positive value).
+ Returns the absolute value of float parameter [param x] (i.e. positive value).
[codeblock]
# a is 1.2
var a = absf(-1.2)
@@ -53,7 +53,7 @@
<return type="int" />
<param index="0" name="x" type="int" />
<description>
- Returns the absolute value of int parameter [code]x[/code] (i.e. positive value).
+ Returns the absolute value of int parameter [param x] (i.e. positive value).
[codeblock]
# a is 1
var a = absi(-1)
@@ -64,9 +64,9 @@
<return type="float" />
<param index="0" name="x" type="float" />
<description>
- Returns the arc cosine of [code]x[/code] in radians. Use to get the angle of cosine [code]x[/code]. [code]x[/code] must be between [code]-1.0[/code] and [code]1.0[/code] (inclusive), otherwise, [method acos] will return [constant @GDScript.NAN].
+ Returns the arc cosine of [param x] in radians. Use to get the angle of cosine [param x]. [param x] must be between [code]-1.0[/code] and [code]1.0[/code] (inclusive), otherwise, [method acos] will return [constant @GDScript.NAN].
[codeblock]
- # c is 0.523599 or 30 degrees if converted with rad2deg(c)
+ # c is 0.523599 or 30 degrees if converted with rad_to_deg(c)
var c = acos(0.866025)
[/codeblock]
</description>
@@ -75,9 +75,9 @@
<return type="float" />
<param index="0" name="x" type="float" />
<description>
- Returns the arc sine of [code]x[/code] in radians. Use to get the angle of sine [code]x[/code]. [code]x[/code] must be between [code]-1.0[/code] and [code]1.0[/code] (inclusive), otherwise, [method asin] will return [constant @GDScript.NAN].
+ Returns the arc sine of [param x] in radians. Use to get the angle of sine [param x]. [param x] must be between [code]-1.0[/code] and [code]1.0[/code] (inclusive), otherwise, [method asin] will return [constant @GDScript.NAN].
[codeblock]
- # s is 0.523599 or 30 degrees if converted with rad2deg(s)
+ # s is 0.523599 or 30 degrees if converted with rad_to_deg(s)
var s = asin(0.5)
[/codeblock]
</description>
@@ -86,12 +86,12 @@
<return type="float" />
<param index="0" name="x" type="float" />
<description>
- Returns the arc tangent of [code]x[/code] in radians. Use it to get the angle from an angle's tangent in trigonometry.
+ Returns the arc tangent of [param x] in radians. Use it to get the angle from an angle's tangent in trigonometry.
The method cannot know in which quadrant the angle should fall. See [method atan2] if you have both [code]y[/code] and [code]x[/code].
[codeblock]
var a = atan(0.5) # a is 0.463648
[/codeblock]
- If [code]x[/code] is between [code]-PI / 2[/code] and [code]PI / 2[/code] (inclusive), [code]atan(tan(x))[/code] is equal to [code]x[/code].
+ If [param x] is between [code]-PI / 2[/code] and [code]PI / 2[/code] (inclusive), [code]atan(tan(x))[/code] is equal to [param x].
</description>
</method>
<method name="atan2">
@@ -114,18 +114,18 @@
<param index="3" name="end" type="float" />
<param index="4" name="t" type="float" />
<description>
- Returns the point at the given [code]t[/code] on a one-dimnesional [url=https://en.wikipedia.org/wiki/B%C3%A9zier_curve]Bezier curve[/url] defined by the given [code]control_1[/code], [code]control_2[/code], and [code]end[/code] points.
+ Returns the point at the given [param t] on a one-dimensional [url=https://en.wikipedia.org/wiki/B%C3%A9zier_curve]Bezier curve[/url] defined by the given [param control_1], [param control_2], and [param end] points.
</description>
</method>
- <method name="bytes2var">
+ <method name="bytes_to_var">
<return type="Variant" />
<param index="0" name="bytes" type="PackedByteArray" />
<description>
Decodes a byte array back to a [Variant] value, without decoding objects.
- [b]Note:[/b] If you need object deserialization, see [method bytes2var_with_objects].
+ [b]Note:[/b] If you need object deserialization, see [method bytes_to_var_with_objects].
</description>
</method>
- <method name="bytes2var_with_objects">
+ <method name="bytes_to_var_with_objects">
<return type="Variant" />
<param index="0" name="bytes" type="PackedByteArray" />
<description>
@@ -137,29 +137,29 @@
<return type="Variant" />
<param index="0" name="x" type="Variant" />
<description>
- Rounds [code]x[/code] upward (towards positive infinity), returning the smallest whole number that is not less than [code]x[/code]. Supported types: [int], [float], [Vector2], [Vector3], [Vector4].
+ Rounds [param x] upward (towards positive infinity), returning the smallest whole number that is not less than [param x]. Supported types: [int], [float], [Vector2], [Vector3], [Vector4].
[codeblock]
var i = ceil(1.45) # i is 2.0
i = ceil(1.001) # i is 2.0
[/codeblock]
See also [method floor], [method round], and [method snapped].
- [b]Note:[/b] For better type safety, you can use [method ceilf], [method ceili], [method Vector2.ceil], [method Vector3.ceil] or [method Vector4.ceil] instead.
+ [b]Note:[/b] For better type safety, see [method ceilf], [method ceili], [method Vector2.ceil], [method Vector3.ceil] and [method Vector4.ceil].
</description>
</method>
<method name="ceilf">
<return type="float" />
<param index="0" name="x" type="float" />
<description>
- Rounds [code]x[/code] upward (towards positive infinity), returning the smallest whole number that is not less than [code]x[/code].
- A type-safe version of [method ceil], specialzied in floats.
+ Rounds [param x] upward (towards positive infinity), returning the smallest whole number that is not less than [param x].
+ A type-safe version of [method ceil], returning a [float].
</description>
</method>
<method name="ceili">
<return type="int" />
<param index="0" name="x" type="float" />
<description>
- Rounds [code]x[/code] upward (towards positive infinity), returning the smallest whole number that is not less than [code]x[/code].
- A type-safe version of [method ceil] that returns integer.
+ Rounds [param x] upward (towards positive infinity), returning the smallest whole number that is not less than [param x].
+ A type-safe version of [method ceil], returning an [int].
</description>
</method>
<method name="clamp">
@@ -168,7 +168,7 @@
<param index="1" name="min" type="Variant" />
<param index="2" name="max" type="Variant" />
<description>
- Clamps the [Variant] [code]value[/code] and returns a value not less than [code]min[/code] and not more than [code]max[/code]. Variant types [int], [float] (real), [Vector2], [Vector2i], [Vector3] and [Vector3i] are supported.
+ Clamps the [param value], returning a [Variant] not less than [param min] and not more than [param max]. Variant types [int], [float], [Vector2], [Vector2i], [Vector3] and [Vector3i] are supported.
[codeblock]
var a = clamp(-10, -1, 5)
# a is -1
@@ -196,15 +196,13 @@
<param index="1" name="min" type="float" />
<param index="2" name="max" type="float" />
<description>
- Clamps the float [code]value[/code] and returns a value not less than [code]min[/code] and not more than [code]max[/code].
+ Clamps the [param value], returning a [float] not less than [param min] and not more than [param max].
[codeblock]
var speed = 42.1
- # a is 20.0
- var a = clampf(speed, 1.0, 20.0)
+ var a = clampf(speed, 1.0, 20.5) # a is 20.5
speed = -10.0
- # a is -1.0
- a = clampf(speed, -1.0, 1.0)
+ var b = clampf(speed, -1.0, 1.0) # b is -1.0
[/codeblock]
</description>
</method>
@@ -214,15 +212,13 @@
<param index="1" name="min" type="int" />
<param index="2" name="max" type="int" />
<description>
- Clamps the integer [code]value[/code] and returns a value not less than [code]min[/code] and not more than [code]max[/code].
+ Clamps the [param value], returning an [int] not less than [param min] and not more than [param max].
[codeblock]
var speed = 42
- # a is 20
- var a = clampi(speed, 1, 20)
+ var a = clampi(speed, 1, 20) # a is 20
speed = -10
- # a is -1
- a = clampi(speed, -1, 1)
+ var b = clampi(speed, -1, 1) # b is -1
[/codeblock]
</description>
</method>
@@ -230,11 +226,11 @@
<return type="float" />
<param index="0" name="angle_rad" type="float" />
<description>
- Returns the cosine of angle [code]angle_rad[/code] in radians.
+ Returns the cosine of angle [param angle_rad] in radians.
[codeblock]
- cos(PI * 2) # Returns 1.0
- cos(PI) # Returns -1.0
- cos(deg2rad(90)) # Returns 0.0
+ cos(PI * 2) # Returns 1.0
+ cos(PI) # Returns -1.0
+ cos(deg_to_rad(90)) # Returns 0.0
[/codeblock]
</description>
</method>
@@ -242,10 +238,9 @@
<return type="float" />
<param index="0" name="x" type="float" />
<description>
- Returns the hyperbolic cosine of [code]x[/code] in radians.
+ Returns the hyperbolic cosine of [param x] in radians.
[codeblock]
- # Prints 1.543081
- print(cosh(1))
+ print(cosh(1)) # Prints 1.543081
[/codeblock]
</description>
</method>
@@ -257,24 +252,64 @@
<param index="3" name="post" type="float" />
<param index="4" name="weight" type="float" />
<description>
- Cubic interpolates between two values by the factor defined in [code]weight[/code] with pre and post values.
+ Cubic interpolates between two values by the factor defined in [param weight] with [param pre] and [param post] values.
</description>
</method>
- <method name="db2linear">
+ <method name="cubic_interpolate_angle">
+ <return type="float" />
+ <param index="0" name="from" type="float" />
+ <param index="1" name="to" type="float" />
+ <param index="2" name="pre" type="float" />
+ <param index="3" name="post" type="float" />
+ <param index="4" name="weight" type="float" />
+ <description>
+ Cubic interpolates between two rotation values with shortest path by the factor defined in [param weight] with [param pre] and [param post] values. See also [method lerp_angle].
+ </description>
+ </method>
+ <method name="cubic_interpolate_angle_in_time">
+ <return type="float" />
+ <param index="0" name="from" type="float" />
+ <param index="1" name="to" type="float" />
+ <param index="2" name="pre" type="float" />
+ <param index="3" name="post" type="float" />
+ <param index="4" name="weight" type="float" />
+ <param index="5" name="to_t" type="float" />
+ <param index="6" name="pre_t" type="float" />
+ <param index="7" name="post_t" type="float" />
+ <description>
+ Cubic interpolates between two rotation values with shortest path by the factor defined in [param weight] with [param pre] and [param post] values. See also [method lerp_angle].
+ It can perform smoother interpolation than [code]cubic_interpolate()[/code] by the time values.
+ </description>
+ </method>
+ <method name="cubic_interpolate_in_time">
+ <return type="float" />
+ <param index="0" name="from" type="float" />
+ <param index="1" name="to" type="float" />
+ <param index="2" name="pre" type="float" />
+ <param index="3" name="post" type="float" />
+ <param index="4" name="weight" type="float" />
+ <param index="5" name="to_t" type="float" />
+ <param index="6" name="pre_t" type="float" />
+ <param index="7" name="post_t" type="float" />
+ <description>
+ Cubic interpolates between two values by the factor defined in [param weight] with [param pre] and [param post] values.
+ It can perform smoother interpolation than [method cubic_interpolate] by the time values.
+ </description>
+ </method>
+ <method name="db_to_linear">
<return type="float" />
<param index="0" name="db" type="float" />
<description>
Converts from decibels to linear energy (audio).
</description>
</method>
- <method name="deg2rad">
+ <method name="deg_to_rad">
<return type="float" />
<param index="0" name="deg" type="float" />
<description>
Converts an angle expressed in degrees to radians.
[codeblock]
- # r is 3.141593
- var r = deg2rad(180)
+ var r = deg_to_rad(180) # r is 3.141593
[/codeblock]
</description>
</method>
@@ -283,7 +318,7 @@
<param index="0" name="x" type="float" />
<param index="1" name="curve" type="float" />
<description>
- Returns an "eased" value of [code]x[/code] based on an easing function defined with [code]curve[/code]. This easing function is based on an exponent. The [code]curve[/code] can be any floating-point number, with specific values leading to the following behaviors:
+ Returns an "eased" value of [param x] based on an easing function defined with [param curve]. This easing function is based on an exponent. The [param curve] can be any floating-point number, with specific values leading to the following behaviors:
[codeblock]
- Lower than -1.0 (exclusive): Ease in-out
- 1.0: Linear
@@ -301,14 +336,20 @@
<return type="String" />
<param index="0" name="error" type="int" />
<description>
- Returns a human-readable name for the given error code.
+ Returns a human-readable name for the given [enum Error] code.
+ [codeblock]
+ print(OK) # Prints 0
+ print(error_string(OK)) # Prints OK
+ print(error_string(ERR_BUSY)) # Prints Busy
+ print(error_string(ERR_OUT_OF_MEMORY)) # Prints Out of memory
+ [/codeblock]
</description>
</method>
<method name="exp">
<return type="float" />
<param index="0" name="x" type="float" />
<description>
- The natural exponential function. It raises the mathematical constant [b]e[/b] to the power of [code]x[/code] and returns it.
+ The natural exponential function. It raises the mathematical constant [b]e[/b] to the power of [param x] and returns it.
[b]e[/b] has an approximate value of 2.71828, and can be obtained with [code]exp(1)[/code].
For exponents to other bases use the method [method pow].
[codeblock]
@@ -320,31 +361,30 @@
<return type="Variant" />
<param index="0" name="x" type="Variant" />
<description>
- Rounds [code]x[/code] downward (towards negative infinity), returning the largest whole number that is not more than [code]x[/code]. Supported types: [int], [float], [Vector2], [Vector3], [Vector4].
+ Rounds [param x] downward (towards negative infinity), returning the largest whole number that is not more than [param x]. Supported types: [int], [float], [Vector2], [Vector3], [Vector4].
[codeblock]
- # a is 2.0
- var a = floor(2.99)
- # a is -3.0
- a = floor(-2.99)
+ var a = floor(2.99) # a is 2.0
+ a = floor(-2.99) # a is -3.0
[/codeblock]
See also [method ceil], [method round], and [method snapped].
- [b]Note:[/b] For better type safety, you can use [method floorf], [method floori], [method Vector2.floor], [method Vector3.floor] or [method Vector4.floor] instead.
+ [b]Note:[/b] For better type safety, see [method floorf], [method floori], [method Vector2.floor], [method Vector3.floor] and [method Vector4.floor].
</description>
</method>
<method name="floorf">
<return type="float" />
<param index="0" name="x" type="float" />
<description>
- Rounds [code]x[/code] downward (towards negative infinity), returning the largest whole number that is not more than [code]x[/code].
- A type-safe version of [method floor], specialzied in floats.
+ Rounds [param x] downward (towards negative infinity), returning the largest whole number that is not more than [param x].
+ A type-safe version of [method floor], returning a [float].
</description>
</method>
<method name="floori">
<return type="int" />
<param index="0" name="x" type="float" />
<description>
- Rounds [code]x[/code] downward (towards negative infinity), returning the largest whole number that is not more than [code]x[/code].
- Equivalent of doing [code]int(x)[/code].
+ Rounds [param x] downward (towards negative infinity), returning the largest whole number that is not more than [param x].
+ A type-safe version of [method floor], returning an [int].
+ [b]Note:[/b] This function is [i]not[/i] the same as [code]int(x)[/code], which rounds towards 0.
</description>
</method>
<method name="fmod">
@@ -352,10 +392,9 @@
<param index="0" name="x" type="float" />
<param index="1" name="y" type="float" />
<description>
- Returns the floating-point remainder of [code]x/y[/code], keeping the sign of [code]x[/code].
+ Returns the floating-point remainder of [param x] divided by [param y], keeping the sign of [param x].
[codeblock]
- # Remainder is 1.5
- var remainder = fmod(7, 5.5)
+ var remainder = fmod(7, 5.5) # remainder is 1.5
[/codeblock]
For the integer remainder operation, use the [code]%[/code] operator.
</description>
@@ -365,21 +404,23 @@
<param index="0" name="x" type="float" />
<param index="1" name="y" type="float" />
<description>
- Returns the floating-point modulus of [code]x/y[/code] that wraps equally in positive and negative.
+ Returns the floating-point modulus of [param x] divided by [param y], wrapping equally in positive and negative.
[codeblock]
+ print(" (x) (fmod(x, 1.5)) (fposmod(x, 1.5))")
for i in 7:
- var x = 0.5 * i - 1.5
- print("%4.1f %4.1f %4.1f" % [x, fmod(x, 1.5), fposmod(x, 1.5)])
+ var x = i * 0.5 - 1.5
+ print("%4.1f %4.1f | %4.1f" % [x, fmod(x, 1.5), fposmod(x, 1.5)])
[/codeblock]
Produces:
[codeblock]
- -1.5 -0.0 0.0
- -1.0 -1.0 0.5
- -0.5 -0.5 1.0
- 0.0 0.0 0.0
- 0.5 0.5 0.5
- 1.0 1.0 1.0
- 1.5 0.0 0.0
+ (x) (fmod(x, 1.5)) (fposmod(x, 1.5))
+ -1.5 -0.0 | 0.0
+ -1.0 -1.0 | 0.5
+ -0.5 -0.5 | 1.0
+ 0.0 0.0 | 0.0
+ 0.5 0.5 | 0.5
+ 1.0 1.0 | 1.0
+ 1.5 0.0 | 0.0
[/codeblock]
</description>
</method>
@@ -387,7 +428,7 @@
<return type="int" />
<param index="0" name="variable" type="Variant" />
<description>
- Returns the integer hash of the variable passed.
+ Returns the integer hash of the passed [param variable].
[codeblock]
print(hash("a")) # Prints 177670
[/codeblock]
@@ -397,7 +438,7 @@
<return type="Object" />
<param index="0" name="instance_id" type="int" />
<description>
- Returns the Object that corresponds to [code]instance_id[/code]. All Objects have a unique instance ID.
+ Returns the [Object] that corresponds to [param instance_id]. All Objects have a unique instance ID. See also [method Object.get_instance_id].
[codeblock]
var foo = "bar"
func _ready():
@@ -413,16 +454,17 @@
<param index="1" name="to" type="float" />
<param index="2" name="weight" type="float" />
<description>
- Returns an interpolation or extrapolation factor considering the range specified in [code]from[/code] and [code]to[/code], and the interpolated value specified in [code]weight[/code]. The returned value will be between [code]0.0[/code] and [code]1.0[/code] if [code]weight[/code] is between [code]from[/code] and [code]to[/code] (inclusive). If [code]weight[/code] is located outside this range, then an extrapolation factor will be returned (return value lower than [code]0.0[/code] or greater than [code]1.0[/code]). Use [method clamp] on the result of [method inverse_lerp] if this is not desired.
+ Returns an interpolation or extrapolation factor considering the range specified in [param from] and [param to], and the interpolated value specified in [param weight]. The returned value will be between [code]0.0[/code] and [code]1.0[/code] if [param weight] is between [param from] and [param to] (inclusive). If [param weight] is located outside this range, then an extrapolation factor will be returned (return value lower than [code]0.0[/code] or greater than [code]1.0[/code]). Use [method clamp] on the result of [method inverse_lerp] if this is not desired.
[codeblock]
# The interpolation ratio in the `lerp()` call below is 0.75.
var middle = lerp(20, 30, 0.75)
- # `middle` is now 27.5.
+ # middle is now 27.5.
+
# Now, we pretend to have forgotten the original ratio and want to get it back.
var ratio = inverse_lerp(20, 30, 27.5)
- # `ratio` is now 0.75.
+ # ratio is now 0.75.
[/codeblock]
- See also [method lerp] which performs the reverse of this operation, and [method range_lerp] to map a continuous series of values to another.
+ See also [method lerp], which performs the reverse of this operation, and [method remap] to map a continuous series of values to another.
</description>
</method>
<method name="is_equal_approx">
@@ -430,45 +472,52 @@
<param index="0" name="a" type="float" />
<param index="1" name="b" type="float" />
<description>
- Returns [code]true[/code] if [code]a[/code] and [code]b[/code] are approximately equal to each other.
- Here, approximately equal means that [code]a[/code] and [code]b[/code] are within a small internal epsilon of each other, which scales with the magnitude of the numbers.
+ Returns [code]true[/code] if [param a] and [param b] are approximately equal to each other.
+ Here, "approximately equal" means that [param a] and [param b] are within a small internal epsilon of each other, which scales with the magnitude of the numbers.
Infinity values of the same sign are considered equal.
</description>
</method>
+ <method name="is_finite">
+ <return type="bool" />
+ <param index="0" name="x" type="float" />
+ <description>
+ Returns whether [code]x[/code] is a finite value, i.e. it is not [constant @GDScript.NAN], positive infinity, or negative infinity.
+ </description>
+ </method>
<method name="is_inf">
<return type="bool" />
<param index="0" name="x" type="float" />
<description>
- Returns whether [code]x[/code] is an infinity value (either positive infinity or negative infinity).
+ Returns [code]true[/code] if [param x] is either positive infinity or negative infinity.
</description>
</method>
<method name="is_instance_id_valid">
<return type="bool" />
<param index="0" name="id" type="int" />
<description>
- Returns [code]true[/code] if the Object that corresponds to [code]instance_id[/code] is a valid object (e.g. has not been deleted from memory). All Objects have a unique instance ID.
+ Returns [code]true[/code] if the Object that corresponds to [param id] is a valid object (e.g. has not been deleted from memory). All Objects have a unique instance ID.
</description>
</method>
<method name="is_instance_valid">
<return type="bool" />
<param index="0" name="instance" type="Variant" />
<description>
- Returns whether [code]instance[/code] is a valid object (e.g. has not been deleted from memory).
+ Returns [code]true[/code] if [param instance] is a valid Object (e.g. has not been deleted from memory).
</description>
</method>
<method name="is_nan">
<return type="bool" />
<param index="0" name="x" type="float" />
<description>
- Returns whether [code]x[/code] is a NaN ("Not a Number" or invalid) value.
+ Returns [code]true[/code] if [param x] is a NaN ("Not a Number" or invalid) value.
</description>
</method>
<method name="is_zero_approx">
<return type="bool" />
<param index="0" name="x" type="float" />
<description>
- Returns [code]true[/code] if [code]x[/code] is zero or almost zero.
- This method is faster than using [method is_equal_approx] with one value as zero.
+ Returns [code]true[/code] if [param x] is zero or almost zero.
+ This function is faster than using [method is_equal_approx] with one value as zero.
</description>
</method>
<method name="lerp">
@@ -477,13 +526,13 @@
<param index="1" name="to" type="Variant" />
<param index="2" name="weight" type="Variant" />
<description>
- Linearly interpolates between two values by the factor defined in [code]weight[/code]. To perform interpolation, [code]weight[/code] should be between [code]0.0[/code] and [code]1.0[/code] (inclusive). However, values outside this range are allowed and can be used to perform [i]extrapolation[/i]. Use [method clamp] on the result of [method lerp] if this is not desired.
- Both [code]from[/code] and [code]to[/code] must have matching types. Supported types: [float], [Vector2], [Vector3], [Vector4], [Color], [Quaternion], [Basis].
+ Linearly interpolates between two values by the factor defined in [param weight]. To perform interpolation, [param weight] should be between [code]0.0[/code] and [code]1.0[/code] (inclusive). However, values outside this range are allowed and can be used to perform [i]extrapolation[/i]. If this is not desired, use [method clamp] on the result of this function.
+ Both [param from] and [param to] must be the same type. Supported types: [float], [Vector2], [Vector3], [Vector4], [Color], [Quaternion], [Basis].
[codeblock]
lerp(0, 4, 0.75) # Returns 3.0
[/codeblock]
- See also [method inverse_lerp] which performs the reverse of this operation. To perform eased interpolation with [method lerp], combine it with [method ease] or [method smoothstep]. See also [method range_lerp] to map a continuous series of values to another.
- [b]Note:[/b] For better type safety, you can use [method lerpf], [method Vector2.lerp], [method Vector3.lerp], [method Vector4.lerp], [method Color.lerp], [method Quaternion.slerp] or [method Basis.slerp] instead.
+ See also [method inverse_lerp] which performs the reverse of this operation. To perform eased interpolation with [method lerp], combine it with [method ease] or [method smoothstep]. See also [method remap] to map a continuous series of values to another.
+ [b]Note:[/b] For better type safety, use [method lerpf], [method Vector2.lerp], [method Vector3.lerp], [method Vector4.lerp], [method Color.lerp], [method Quaternion.slerp] or [method Basis.slerp].
</description>
</method>
<method name="lerp_angle">
@@ -492,18 +541,18 @@
<param index="1" name="to" type="float" />
<param index="2" name="weight" type="float" />
<description>
- Linearly interpolates between two angles (in radians) by a normalized value.
+ Linearly interpolates between two angles (in radians) by a [param weight] value between 0.0 and 1.0.
Similar to [method lerp], but interpolates correctly when the angles wrap around [constant @GDScript.TAU]. To perform eased interpolation with [method lerp_angle], combine it with [method ease] or [method smoothstep].
[codeblock]
extends Sprite
var elapsed = 0.0
func _process(delta):
- var min_angle = deg2rad(0.0)
- var max_angle = deg2rad(90.0)
+ var min_angle = deg_to_rad(0.0)
+ var max_angle = deg_to_rad(90.0)
rotation = lerp_angle(min_angle, max_angle, elapsed)
elapsed += delta
[/codeblock]
- [b]Note:[/b] This method lerps through the shortest path between [code]from[/code] and [code]to[/code]. However, when these two angles are approximately [code]PI + k * TAU[/code] apart for any integer [code]k[/code], it's not obvious which way they lerp due to floating-point precision errors. For example, [code]lerp_angle(0, PI, weight)[/code] lerps counter-clockwise, while [code]lerp_angle(0, PI + 5 * TAU, weight)[/code] lerps clockwise.
+ [b]Note:[/b] This function lerps through the shortest path between [param from] and [param to]. However, when these two angles are approximately [code]PI + k * TAU[/code] apart for any integer [code]k[/code], it's not obvious which way they lerp due to floating-point precision errors. For example, [code]lerp_angle(0, PI, weight)[/code] lerps counter-clockwise, while [code]lerp_angle(0, PI + 5 * TAU, weight)[/code] lerps clockwise.
</description>
</method>
<method name="lerpf">
@@ -512,23 +561,24 @@
<param index="1" name="to" type="float" />
<param index="2" name="weight" type="float" />
<description>
- Linearly interpolates between two values by the factor defined in [code]weight[/code]. To perform interpolation, [code]weight[/code] should be between [code]0.0[/code] and [code]1.0[/code] (inclusive). However, values outside this range are allowed and can be used to perform [i]extrapolation[/i].
+ Linearly interpolates between two values by the factor defined in [param weight]. To perform interpolation, [param weight] should be between [code]0.0[/code] and [code]1.0[/code] (inclusive). However, values outside this range are allowed and can be used to perform [i]extrapolation[/i]. If this is not desired, use [method clampf] on the result of this function.
[codeblock]
lerp(0, 4, 0.75) # Returns 3.0
[/codeblock]
See also [method inverse_lerp] which performs the reverse of this operation. To perform eased interpolation with [method lerp], combine it with [method ease] or [method smoothstep].
</description>
</method>
- <method name="linear2db">
+ <method name="linear_to_db">
<return type="float" />
<param index="0" name="lin" type="float" />
<description>
- Converts from linear energy to decibels (audio). This can be used to implement volume sliders that behave as expected (since volume isn't linear). Example:
+ Converts from linear energy to decibels (audio). This can be used to implement volume sliders that behave as expected (since volume isn't linear).
+ [b]Example:[/b]
[codeblock]
# "Slider" refers to a node that inherits Range such as HSlider or VSlider.
# Its range must be configured to go from 0 to 1.
# Change the bus name if you'd like to change the volume of a specific bus only.
- AudioServer.set_bus_volume_db(AudioServer.get_bus_index("Master"), linear2db($Slider.value))
+ AudioServer.set_bus_volume_db(AudioServer.get_bus_index("Master"), linear_to_db($Slider.value))
[/codeblock]
</description>
</method>
@@ -536,7 +586,7 @@
<return type="float" />
<param index="0" name="x" type="float" />
<description>
- Natural logarithm. The amount of time needed to reach a certain level of continuous growth.
+ Returns the natural logarithm of [param x]. This is the amount of time needed to reach a certain level of continuous growth.
[b]Note:[/b] This is not the same as the "log" function on most calculators, which uses a base 10 logarithm.
[codeblock]
log(10) # Returns 2.302585
@@ -547,7 +597,7 @@
<method name="max" qualifiers="vararg">
<return type="Variant" />
<description>
- Returns the maximum of the given values. This method can take any number of arguments.
+ Returns the maximum of the given values. This function can take any number of arguments.
[codeblock]
max(1, 7, 3, -6, 5) # Returns 7
[/codeblock]
@@ -558,9 +608,9 @@
<param index="0" name="a" type="float" />
<param index="1" name="b" type="float" />
<description>
- Returns the maximum of two float values.
+ Returns the maximum of two [float] values.
[codeblock]
- maxf(3.6, 24) # Returns 24.0
+ maxf(3.6, 24) # Returns 24.0
maxf(-3.99, -4) # Returns -3.99
[/codeblock]
</description>
@@ -570,9 +620,9 @@
<param index="0" name="a" type="int" />
<param index="1" name="b" type="int" />
<description>
- Returns the maximum of two int values.
+ Returns the maximum of two [int] values.
[codeblock]
- maxi(1, 2) # Returns 2
+ maxi(1, 2) # Returns 2
maxi(-3, -4) # Returns -3
[/codeblock]
</description>
@@ -580,7 +630,7 @@
<method name="min" qualifiers="vararg">
<return type="Variant" />
<description>
- Returns the minimum of the given values. This method can take any number of arguments.
+ Returns the minimum of the given values. This function can take any number of arguments.
[codeblock]
min(1, 7, 3, -6, 5) # Returns -6
[/codeblock]
@@ -591,9 +641,9 @@
<param index="0" name="a" type="float" />
<param index="1" name="b" type="float" />
<description>
- Returns the minimum of two float values.
+ Returns the minimum of two [float] values.
[codeblock]
- minf(3.6, 24) # Returns 3.6
+ minf(3.6, 24) # Returns 3.6
minf(-3.99, -4) # Returns -4.0
[/codeblock]
</description>
@@ -603,9 +653,9 @@
<param index="0" name="a" type="int" />
<param index="1" name="b" type="int" />
<description>
- Returns the minimum of two int values.
+ Returns the minimum of two [int] values.
[codeblock]
- mini(1, 2) # Returns 1
+ mini(1, 2) # Returns 1
mini(-3, -4) # Returns -4
[/codeblock]
</description>
@@ -616,11 +666,11 @@
<param index="1" name="to" type="float" />
<param index="2" name="delta" type="float" />
<description>
- Moves [code]from[/code] toward [code]to[/code] by the [code]delta[/code] value.
- Use a negative [code]delta[/code] value to move away.
+ Moves [param from] toward [param to] by the [param delta] value.
+ Use a negative [param delta] value to move away.
[codeblock]
- move_toward(5, 10, 4) # Returns 9
- move_toward(10, 5, 4) # Returns 6
+ move_toward(5, 10, 4) # Returns 9
+ move_toward(10, 5, 4) # Returns 6
move_toward(10, 5, -1.5) # Returns 11.5
[/codeblock]
</description>
@@ -629,17 +679,17 @@
<return type="int" />
<param index="0" name="value" type="int" />
<description>
- Returns the nearest equal or larger power of 2 for integer [code]value[/code].
+ Returns the nearest equal or larger power of 2 for the integer [param value].
In other words, returns the smallest value [code]a[/code] where [code]a = pow(2, n)[/code] such that [code]value &lt;= a[/code] for some non-negative integer [code]n[/code].
[codeblock]
nearest_po2(3) # Returns 4
nearest_po2(4) # Returns 4
nearest_po2(5) # Returns 8
- nearest_po2(0) # Returns 0 (this may not be what you expect)
- nearest_po2(-1) # Returns 0 (this may not be what you expect)
+ nearest_po2(0) # Returns 0 (this may not be expected)
+ nearest_po2(-1) # Returns 0 (this may not be expected)
[/codeblock]
- [b]Warning:[/b] Due to the way it is implemented, this function returns [code]0[/code] rather than [code]1[/code] for non-positive values of [code]value[/code] (in reality, 1 is the smallest integer power of 2).
+ [b]Warning:[/b] Due to the way it is implemented, this function returns [code]0[/code] rather than [code]1[/code] for negative values of [param value] (in reality, 1 is the smallest integer power of 2).
</description>
</method>
<method name="pingpong">
@@ -647,18 +697,18 @@
<param index="0" name="value" type="float" />
<param index="1" name="length" type="float" />
<description>
- Returns the [code]value[/code] wrapped between [code]0[/code] and the [code]length[/code]. If the limit is reached, the next value the function returned is decreased to the [code]0[/code] side or increased to the [code]length[/code] side (like a triangle wave). If [code]length[/code] is less than zero, it becomes positive.
+ Wraps [param value] between [code]0[/code] and the [param length]. If the limit is reached, the next value the function returns is decreased to the [code]0[/code] side or increased to the [param length] side (like a triangle wave). If [param length] is less than zero, it becomes positive.
[codeblock]
- pingpong(-3.0, 3.0) # Returns 3
- pingpong(-2.0, 3.0) # Returns 2
- pingpong(-1.0, 3.0) # Returns 1
- pingpong(0.0, 3.0) # Returns 0
- pingpong(1.0, 3.0) # Returns 1
- pingpong(2.0, 3.0) # Returns 2
- pingpong(3.0, 3.0) # Returns 3
- pingpong(4.0, 3.0) # Returns 2
- pingpong(5.0, 3.0) # Returns 1
- pingpong(6.0, 3.0) # Returns 0
+ pingpong(-3.0, 3.0) # Returns 3.0
+ pingpong(-2.0, 3.0) # Returns 2.0
+ pingpong(-1.0, 3.0) # Returns 1.0
+ pingpong(0.0, 3.0) # Returns 0.0
+ pingpong(1.0, 3.0) # Returns 1.0
+ pingpong(2.0, 3.0) # Returns 2.0
+ pingpong(3.0, 3.0) # Returns 3.0
+ pingpong(4.0, 3.0) # Returns 2.0
+ pingpong(5.0, 3.0) # Returns 1.0
+ pingpong(6.0, 3.0) # Returns 0.0
[/codeblock]
</description>
</method>
@@ -667,20 +717,22 @@
<param index="0" name="x" type="int" />
<param index="1" name="y" type="int" />
<description>
- Returns the integer modulus of [code]x/y[/code] that wraps equally in positive and negative.
+ Returns the integer modulus of [param x] divided by [param y] that wraps equally in positive and negative.
[codeblock]
+ print("#(i) (i % 3) (posmod(i, 3))")
for i in range(-3, 4):
- print("%2d %2d %2d" % [i, i % 3, posmod(i, 3)])
+ 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
+ (i) (i % 3) (posmod(i, 3))
+ -3 0 | 0
+ -2 -2 | 1
+ -1 -1 | 2
+ 0 0 | 0
+ 1 1 | 1
+ 2 2 | 2
+ 3 0 | 0
[/codeblock]
</description>
</method>
@@ -689,7 +741,8 @@
<param index="0" name="base" type="float" />
<param index="1" name="exp" type="float" />
<description>
- Returns the result of [code]base[/code] raised to the power of [code]exp[/code].
+ Returns the result of [param base] raised to the power of [param exp].
+ In GDScript, this is the equivalent of the [code]**[/code] operator.
[codeblock]
pow(2, 5) # Returns 32
[/codeblock]
@@ -702,7 +755,7 @@
var a = [1, 2, 3]
print("a", "b", a) # Prints ab[1, 2, 3]
[/codeblock]
- [b]Note:[/b] Consider using [method push_error] and [method push_warning] to print error and warning messages instead of [method print]. This distinguishes them from print messages used for debugging purposes, while also displaying a stack trace when an error or warning is printed.
+ [b]Note:[/b] Consider using [method push_error] and [method push_warning] to print error and warning messages instead of [method print] or [method print_rich]. This distinguishes them from print messages used for debugging purposes, while also displaying a stack trace when an error or warning is printed.
</description>
</method>
<method name="print_rich" qualifiers="vararg">
@@ -730,11 +783,12 @@
</method>
<method name="printraw" qualifiers="vararg">
<description>
- Prints one or more arguments to strings in the best way possible to console. No newline is added at the end.
+ Prints one or more arguments to strings in the best way possible to console. Unlike [method print], no newline is automatically added at the end.
[codeblock]
printraw("A")
printraw("B")
- # Prints AB
+ printraw("C")
+ # Prints ABC
[/codeblock]
[b]Note:[/b] Due to limitations with Godot's built-in console, this only prints to the terminal. If you need to print in the editor, use another method, such as [method print].
</description>
@@ -761,7 +815,7 @@
[codeblock]
push_error("test error") # Prints "test error" to debugger and terminal as error call
[/codeblock]
- [b]Note:[/b] Errors printed this way will not pause project execution. To print an error message and pause project execution in debug builds, use [code]assert(false, "test error")[/code] instead.
+ [b]Note:[/b] This function does not pause project execution. To print an error message and pause project execution in debug builds, use [code]assert(false, "test error")[/code] instead.
</description>
</method>
<method name="push_warning" qualifiers="vararg">
@@ -772,13 +826,15 @@
[/codeblock]
</description>
</method>
- <method name="rad2deg">
+ <method name="rad_to_deg">
<return type="float" />
<param index="0" name="rad" type="float" />
<description>
Converts an angle expressed in radians to degrees.
[codeblock]
- rad2deg(0.523599) # Returns 30
+ rad_to_deg(0.523599) # Returns 30
+ rad_to_deg(PI) # Returns 180
+ rad_to_deg(PI * 2) # Returns 360
[/codeblock]
</description>
</method>
@@ -786,7 +842,14 @@
<return type="PackedInt64Array" />
<param index="0" name="seed" type="int" />
<description>
- Random from seed: pass a [code]seed[/code], and an array with both number and new seed is returned. "Seed" here refers to the internal state of the pseudo random number generator. The internal state of the current implementation is 64 bits.
+ Given a [param seed], returns a [PackedInt64Array] of size [code]2[/code], where its first element is the randomized [int] value, and the second element is the same as [param seed]. Passing the same [param seed] consistently returns the same array.
+ [b]Note:[/b] "Seed" here refers to the internal state of the pseudo random number generator, currently implemented as a 64 bit integer.
+ [codeblock]
+ var a = rand_from_seed(4)
+
+ print(a[0]) # Prints 2879024997
+ print(a[1]) # Prints 4
+ [/codeblock]
</description>
</method>
<method name="randf">
@@ -803,9 +866,10 @@
<param index="0" name="from" type="float" />
<param index="1" name="to" type="float" />
<description>
- Returns a random floating point value on the interval between [code]from[/code] and [code]to[/code] (inclusive).
+ Returns a random floating point value between [param from] and [param to] (inclusive).
[codeblock]
- prints(randf_range(-10, 10), randf_range(-10, 10)) # Prints e.g. -3.844535 7.45315
+ randf_range(0, 20.5) # Returns e.g. 7.45315
+ randf_range(-10, 10) # Returns e.g. -3.844535
[/codeblock]
</description>
</method>
@@ -814,7 +878,7 @@
<param index="0" name="mean" type="float" />
<param index="1" name="deviation" type="float" />
<description>
- Returns a normally-distributed pseudo-random floating point value using Box-Muller transform with the specified [code]mean[/code] and a standard [code]deviation[/code]. This is also called Gaussian distribution.
+ Returns a normally-distributed pseudo-random floating point value using Box-Muller transform with the specified [param mean] and a standard [param deviation]. This is also called Gaussian distribution.
</description>
</method>
<method name="randi">
@@ -834,20 +898,20 @@
<param index="0" name="from" type="int" />
<param index="1" name="to" type="int" />
<description>
- Returns a random signed 32-bit integer between [code]from[/code] and [code]to[/code] (inclusive). If [code]to[/code] is lesser than [code]from[/code], they are swapped.
+ Returns a random signed 32-bit integer between [param from] and [param to] (inclusive). If [param to] is lesser than [param from], they are swapped.
[codeblock]
- print(randi_range(0, 1)) # Prints 0 or 1
- print(randi_range(-10, 1000)) # Prints any number from -10 to 1000
+ randi_range(0, 1) # Returns either 0 or 1
+ randi_range(-10, 1000) # Returns random integer between -10 and 1000
[/codeblock]
</description>
</method>
<method name="randomize">
<description>
- Randomizes the seed (or the internal state) of the random number generator. Current implementation reseeds using a number based on time.
- [b]Note:[/b] This method is called automatically when the project is run. If you need to fix the seed to have reproducible results, use [method seed] to initialize the random number generator.
+ Randomizes the seed (or the internal state) of the random number generator. The current implementation uses a number based on the device's time.
+ [b]Note:[/b] This function is called automatically when the project is run. If you need to fix the seed to have consistent, reproducible results, use [method seed] to initialize the random number generator.
</description>
</method>
- <method name="range_lerp">
+ <method name="remap">
<return type="float" />
<param index="0" name="value" type="float" />
<param index="1" name="istart" type="float" />
@@ -855,63 +919,67 @@
<param index="3" name="ostart" type="float" />
<param index="4" name="ostop" type="float" />
<description>
- Maps a [code]value[/code] from range [code][istart, istop][/code] to [code][ostart, ostop][/code]. See also [method lerp] and [method inverse_lerp]. If [code]value[/code] is outside [code][istart, istop][/code], then the resulting value will also be outside [code][ostart, ostop][/code]. Use [method clamp] on the result of [method range_lerp] if this is not desired.
+ Maps a [param value] from range [code][istart, istop][/code] to [code][ostart, ostop][/code]. See also [method lerp] and [method inverse_lerp]. If [param value] is outside [code][istart, istop][/code], then the resulting value will also be outside [code][ostart, ostop][/code]. If this is not desired, use [method clamp] on the result of this function.
[codeblock]
- range_lerp(75, 0, 100, -1, 1) # Returns 0.5
+ remap(75, 0, 100, -1, 1) # Returns 0.5
[/codeblock]
- For complex use cases where you need multiple ranges, consider using [Curve] or [Gradient] instead.
+ For complex use cases where multiple ranges are needed, consider using [Curve] or [Gradient] instead.
</description>
</method>
<method name="rid_allocate_id">
<return type="int" />
<description>
- Allocate a unique ID which can be used by the implementation to construct a RID. This is used mainly from native extensions to implement servers.
+ Allocates a unique ID which can be used by the implementation to construct a RID. This is used mainly from native extensions to implement servers.
</description>
</method>
<method name="rid_from_int64">
<return type="RID" />
<param index="0" name="base" type="int" />
<description>
- Create a RID from an int64. This is used mainly from native extensions to build servers.
+ Creates a RID from a [param base]. This is used mainly from native extensions to build servers.
</description>
</method>
<method name="round">
<return type="Variant" />
<param index="0" name="x" type="Variant" />
<description>
- Rounds [code]x[/code] to the nearest whole number, with halfway cases rounded away from zero. Supported types: [int], [float], [Vector2], [Vector3], [Vector4].
+ Rounds [param x] to the nearest whole number, with halfway cases rounded away from 0. Supported types: [int], [float], [Vector2], [Vector3], [Vector4].
[codeblock]
round(2.4) # Returns 2
round(2.5) # Returns 3
round(2.6) # Returns 3
[/codeblock]
See also [method floor], [method ceil], and [method snapped].
- [b]Note:[/b] For better type safety, you can use [method roundf], [method roundi], [method Vector2.round], [method Vector3.round] or [method Vector4.round] instead.
+ [b]Note:[/b] For better type safety, use [method roundf], [method roundi], [method Vector2.round], [method Vector3.round] or [method Vector4.round], instead.
</description>
</method>
<method name="roundf">
<return type="float" />
<param index="0" name="x" type="float" />
<description>
- Rounds [code]x[/code] to the nearest whole number, with halfway cases rounded away from zero.
- A type-safe version of [method round], specialzied in floats.
+ Rounds [param x] to the nearest whole number, with halfway cases rounded away from 0.
+ A type-safe version of [method round], returning a [float].
</description>
</method>
<method name="roundi">
<return type="int" />
<param index="0" name="x" type="float" />
<description>
- Rounds [code]x[/code] to the nearest whole number, with halfway cases rounded away from zero.
- A type-safe version of [method round] that returns integer.
+ Rounds [param x] to the nearest whole number, with halfway cases rounded away from 0.
+ A type-safe version of [method round], returning an [int].
</description>
</method>
<method name="seed">
<param index="0" name="base" type="int" />
<description>
- Sets seed for the random number generator.
+ Sets the seed for the random number generator to [param base]. Setting the seed manually can ensure consistent, repeatable results for most random functions.
[codeblock]
- var my_seed = "Godot Rocks"
- seed(my_seed.hash())
+ var my_seed = "Godot Rocks".hash()
+ seed(my_seed)
+ var a = randf() + randi()
+ seed(my_seed)
+ var b = randf() + randi()
+ # a and b are now identical
[/codeblock]
</description>
</method>
@@ -919,7 +987,7 @@
<return type="Variant" />
<param index="0" name="x" type="Variant" />
<description>
- Returns the sign of [code]x[/code] as same type of [Variant] as [code]x[/code] with each component being -1, 0 and 1 for each negative, zero and positive values respectivelu. Variant types [int], [float] (real), [Vector2], [Vector2i], [Vector3] and [Vector3i] are supported.
+ Returns the sign of [param x] as same type of [Variant] as [param x] with each component being -1, 0 and 1 for each negative, zero and positive values respectively. Variant types [int], [float], [Vector2], [Vector2i], [Vector3] and [Vector3i] are supported.
[codeblock]
sign(-6.0) # Returns -1
sign(0.0) # Returns 0
@@ -933,11 +1001,11 @@
<return type="float" />
<param index="0" name="x" type="float" />
<description>
- Returns the sign of [code]x[/code] as a float: -1.0 or 1.0. Returns 0.0 if [code]x[/code] is 0.
+ Returns the sign of [param x] as a [float]: -1.0 or 1.0. Returns 0.0 if [param x] is 0.0.
[codeblock]
- sign(-6.0) # Returns -1.0
+ sign(-6.5) # Returns -1.0
sign(0.0) # Returns 0.0
- sign(6.0) # Returns 1.0
+ sign(6.5) # Returns 1.0
[/codeblock]
</description>
</method>
@@ -945,7 +1013,7 @@
<return type="int" />
<param index="0" name="x" type="int" />
<description>
- Returns the sign of [code]x[/code] as an integer: -1 or 1. Returns 0 if [code]x[/code] is 0.
+ Returns the sign of [param x] as an [int]: -1 or 1. Returns 0 if [param x] is 0.
[codeblock]
sign(-6) # Returns -1
sign(0) # Returns 0
@@ -957,10 +1025,10 @@
<return type="float" />
<param index="0" name="angle_rad" type="float" />
<description>
- Returns the sine of angle [code]angle_rad[/code] in radians.
+ Returns the sine of angle [param angle_rad] in radians.
[codeblock]
- sin(0.523599) # Returns 0.5
- sin(deg2rad(90)) # Returns 1.0
+ sin(0.523599) # Returns 0.5
+ sin(deg_to_rad(90)) # Returns 1.0
[/codeblock]
</description>
</method>
@@ -968,7 +1036,7 @@
<return type="float" />
<param index="0" name="x" type="float" />
<description>
- Returns the hyperbolic sine of [code]x[/code].
+ Returns the hyperbolic sine of [param x].
[codeblock]
var a = log(2.0) # Returns 0.693147
sinh(a) # Returns 0.75
@@ -981,8 +1049,8 @@
<param index="1" name="to" type="float" />
<param index="2" name="x" type="float" />
<description>
- Returns the result of smoothly interpolating the value of [code]x[/code] between [code]0[/code] and [code]1[/code], based on the where [code]x[/code] lies with respect to the edges [code]from[/code] and [code]to[/code].
- The return value is [code]0[/code] if [code]x &lt;= from[/code], and [code]1[/code] if [code]x &gt;= to[/code]. If [code]x[/code] lies between [code]from[/code] and [code]to[/code], the returned value follows an S-shaped curve that maps [code]x[/code] between [code]0[/code] and [code]1[/code].
+ Returns the result of smoothly interpolating the value of [param x] between [code]0[/code] and [code]1[/code], based on the where [param x] lies with respect to the edges [param from] and [param to].
+ The return value is [code]0[/code] if [code]x &lt;= from[/code], and [code]1[/code] if [code]x &gt;= to[/code]. If [param x] lies between [param from] and [param to], the returned value follows an S-shaped curve that maps [param x] between [code]0[/code] and [code]1[/code].
This S-shaped curve is the cubic Hermite interpolator, given by [code]f(y) = 3*y^2 - 2*y^3[/code] where [code]y = (x-from) / (to-from)[/code].
[codeblock]
smoothstep(0, 2, -5.0) # Returns 0.0
@@ -999,7 +1067,7 @@
<param index="0" name="x" type="float" />
<param index="1" name="step" type="float" />
<description>
- Snaps float value [code]x[/code] to a given [code]step[/code]. This can also be used to round a floating point number to an arbitrary number of decimals.
+ Snaps the float value [param x] to a given [param step]. This can also be used to round a floating point number to an arbitrary number of decimals.
[codeblock]
snapped(100, 32) # Returns 96
snapped(3.14159, 0.01) # Returns 3.14
@@ -1011,11 +1079,13 @@
<return type="float" />
<param index="0" name="x" type="float" />
<description>
- Returns the square root of [code]x[/code], where [code]x[/code] is a non-negative number.
+ Returns the square root of [param x], where [param x] is a non-negative number.
[codeblock]
- sqrt(9) # Returns 3
+ sqrt(9) # Returns 3
+ sqrt(10.24) # Returns 3.2
+ sqrt(-1) # Returns NaN
[/codeblock]
- [b]Note:[/b] Negative values of [code]x[/code] return NaN. If you need negative inputs, use [code]System.Numerics.Complex[/code] in C#.
+ [b]Note:[/b] Negative values of [param x] return NaN ("Not a Number"). in C#, if you need negative inputs, use [code]System.Numerics.Complex[/code].
</description>
</method>
<method name="step_decimals">
@@ -1024,30 +1094,27 @@
<description>
Returns the position of the first non-zero digit, after the decimal point. Note that the maximum return value is 10, which is a design decision in the implementation.
[codeblock]
- # n is 0
- var n = step_decimals(5)
- # n is 4
- n = step_decimals(1.0005)
- # n is 9
- n = step_decimals(0.000000005)
+ var n = step_decimals(5) # n is 0
+ n = step_decimals(1.0005) # n is 4
+ n = step_decimals(0.000000005) # n is 9
[/codeblock]
</description>
</method>
<method name="str" qualifiers="vararg">
<return type="String" />
<description>
- Converts one or more arguments of any type to string in the best way possible.
+ Converts one or more arguments of any [Variant] type to [String] in the best way possible.
</description>
</method>
- <method name="str2var">
+ <method name="str_to_var">
<return type="Variant" />
<param index="0" name="string" type="String" />
<description>
- Converts a formatted string that was returned by [method var2str] to the original value.
+ Converts a formatted [param string] that was returned by [method var_to_str] to the original [Variant].
[codeblock]
- var a = '{ "a": 1, "b": 2 }'
- var b = str2var(a)
- print(b["a"]) # Prints 1
+ var a = '{ "a": 1, "b": 2 }' # a is a String
+ var b = str_to_var(a) # b is a Dictionary
+ print(b["a"]) # Prints 1
[/codeblock]
</description>
</method>
@@ -1055,9 +1122,9 @@
<return type="float" />
<param index="0" name="angle_rad" type="float" />
<description>
- Returns the tangent of angle [code]angle_rad[/code] in radians.
+ Returns the tangent of angle [param angle_rad] in radians.
[codeblock]
- tan(deg2rad(45)) # Returns 1
+ tan(deg_to_rad(45)) # Returns 1
[/codeblock]
</description>
</method>
@@ -1065,10 +1132,10 @@
<return type="float" />
<param index="0" name="x" type="float" />
<description>
- Returns the hyperbolic tangent of [code]x[/code].
+ Returns the hyperbolic tangent of [param x].
[codeblock]
var a = log(2.0) # Returns 0.693147
- tanh(a) # Returns 0.6
+ tanh(a) # Returns 0.6
[/codeblock]
</description>
</method>
@@ -1076,7 +1143,7 @@
<return type="int" />
<param index="0" name="variable" type="Variant" />
<description>
- Returns the internal type of the given Variant object, using the [enum Variant.Type] values.
+ Returns the internal type of the given [param variable], using the [enum Variant.Type] values.
[codeblock]
var json = JSON.new()
json.parse('["a", "b", "c"]')
@@ -1088,31 +1155,31 @@
[/codeblock]
</description>
</method>
- <method name="var2bytes">
+ <method name="var_to_bytes">
<return type="PackedByteArray" />
<param index="0" name="variable" type="Variant" />
<description>
- Encodes a [Variant] value to a byte array, without encoding objects. Deserialization can be done with [method bytes2var].
- [b]Note:[/b] If you need object serialization, see [method var2bytes_with_objects].
+ Encodes a [Variant] value to a byte array, without encoding objects. Deserialization can be done with [method bytes_to_var].
+ [b]Note:[/b] If you need object serialization, see [method var_to_bytes_with_objects].
</description>
</method>
- <method name="var2bytes_with_objects">
+ <method name="var_to_bytes_with_objects">
<return type="PackedByteArray" />
<param index="0" name="variable" type="Variant" />
<description>
- Encodes a [Variant] value to a byte array. Encoding objects is allowed (and can potentially include code). Deserialization can be done with [method bytes2var_with_objects].
+ Encodes a [Variant] value to a byte array. Encoding objects is allowed (and can potentially include executable code). Deserialization can be done with [method bytes_to_var_with_objects].
</description>
</method>
- <method name="var2str">
+ <method name="var_to_str">
<return type="String" />
<param index="0" name="variable" type="Variant" />
<description>
- Converts a Variant [code]variable[/code] to a formatted string that can later be parsed using [method str2var].
+ Converts a [Variant] [param variable] to a formatted [String] that can then be parsed using [method str_to_var].
[codeblock]
a = { "a": 1, "b": 2 }
- print(var2str(a))
+ print(var_to_str(a))
[/codeblock]
- prints
+ Prints:
[codeblock]
{
"a": 1,
@@ -1125,7 +1192,7 @@
<return type="Variant" />
<param index="0" name="obj" type="Variant" />
<description>
- Returns a weak reference to an object, or [code]null[/code] if the argument is invalid.
+ Returns a weak reference to an object, or [code]null[/code] if [param obj] is invalid.
A weak reference to an object is not enough to keep the object alive: when the only remaining references to a referent are weak references, garbage collection is free to destroy the referent and reuse its memory for something else. However, until the object is actually destroyed the weak reference may return the object even if there are no strong references to it.
</description>
</method>
@@ -1135,9 +1202,8 @@
<param index="1" name="min" type="Variant" />
<param index="2" name="max" type="Variant" />
<description>
- Wraps the [Variant] [code]value[/code] between [code]min[/code] and [code]max[/code].
- Usable for creating loop-alike behavior or infinite surfaces.
- Variant types [int] and [float] (real) are supported. If any of the argument is [float] the result will be [float], otherwise it is [int].
+ Wraps the [Variant] [param value] between [param min] and [param max]. Can be used for creating loop-alike behavior or infinite surfaces.
+ Variant types [int] and [float] are supported. If any of the arguments is [float] this function returns a [float], otherwise it returns an [int].
[codeblock]
var a = wrap(4, 5, 10)
# a is 9 (int)
@@ -1156,8 +1222,7 @@
<param index="1" name="min" type="float" />
<param index="2" name="max" type="float" />
<description>
- Wraps float [code]value[/code] between [code]min[/code] and [code]max[/code].
- Usable for creating loop-alike behavior or infinite surfaces.
+ Wraps the float [param value] between [param min] and [param max]. Can be used for creating loop-alike behavior or infinite surfaces.
[codeblock]
# Infinite loop between 5.0 and 9.9
value = wrapf(value + 0.1, 5.0, 10.0)
@@ -1170,7 +1235,7 @@
# Infinite rotation (in radians)
angle = wrapf(angle + 0.1, -PI, PI)
[/codeblock]
- [b]Note:[/b] If [code]min[/code] is [code]0[/code], this is equivalent to [method fposmod], so prefer using that instead.
+ [b]Note:[/b] If [param min] is [code]0[/code], this is equivalent to [method fposmod], so prefer using that instead.
[code]wrapf[/code] is more flexible than using the [method fposmod] approach by giving the user control over the minimum value.
</description>
</method>
@@ -1180,8 +1245,7 @@
<param index="1" name="min" type="int" />
<param index="2" name="max" type="int" />
<description>
- Wraps integer [code]value[/code] between [code]min[/code] and [code]max[/code].
- Usable for creating loop-alike behavior or infinite surfaces.
+ Wraps the integer [param value] between [param min] and [param max]. Can be used for creating loop-alike behavior or infinite surfaces.
[codeblock]
# Infinite loop between 5 and 9
frame = wrapi(frame + 1, 5, 10)
@@ -1234,14 +1298,15 @@
The [JavaClassWrapper] singleton.
[b]Note:[/b] Only implemented on Android.
</member>
- <member name="JavaScript" type="JavaScript" setter="" getter="">
- The [JavaScript] singleton.
- [b]Note:[/b] Only implemented on HTML5.
+ <member name="JavaScriptBridge" type="JavaScriptBridge" setter="" getter="">
+ The [JavaScriptBridge] singleton.
+ [b]Note:[/b] Only implemented on the Web platform.
</member>
<member name="Marshalls" type="Marshalls" setter="" getter="">
The [Marshalls] singleton.
</member>
<member name="NativeExtensionManager" type="NativeExtensionManager" setter="" getter="">
+ The [NativeExtensionManager] singleton.
</member>
<member name="NavigationMeshGenerator" type="NavigationMeshGenerator" setter="" getter="">
The [NavigationMeshGenerator] singleton.
@@ -1261,9 +1326,15 @@
<member name="PhysicsServer2D" type="PhysicsServer2D" setter="" getter="">
The [PhysicsServer2D] singleton.
</member>
+ <member name="PhysicsServer2DManager" type="PhysicsServer2DManager" setter="" getter="">
+ The [PhysicsServer2DManager] singleton.
+ </member>
<member name="PhysicsServer3D" type="PhysicsServer3D" setter="" getter="">
The [PhysicsServer3D] singleton.
</member>
+ <member name="PhysicsServer3DManager" type="PhysicsServer3DManager" setter="" getter="">
+ The [PhysicsServer3DManager] singleton.
+ </member>
<member name="ProjectSettings" type="ProjectSettings" setter="" getter="">
The [ProjectSettings] singleton.
</member>
@@ -1282,16 +1353,17 @@
<member name="TextServerManager" type="TextServerManager" setter="" getter="">
The [TextServerManager] singleton.
</member>
+ <member name="ThemeDB" type="ThemeDB" setter="" getter="">
+ The [ThemeDB] singleton.
+ </member>
<member name="Time" type="Time" setter="" getter="">
The [Time] singleton.
</member>
<member name="TranslationServer" type="TranslationServer" setter="" getter="">
The [TranslationServer] singleton.
</member>
- <member name="VisualScriptCustomNodes" type="VisualScriptCustomNodes" setter="" getter="">
- The [VisualScriptCustomNodes] singleton.
- </member>
<member name="WorkerThreadPool" type="WorkerThreadPool" setter="" getter="">
+ The [WorkerThreadPool] singleton.
</member>
<member name="XRServer" type="XRServer" setter="" getter="">
The [XRServer] singleton.
@@ -1329,8 +1401,10 @@
General horizontal alignment, usually used for [Separator], [ScrollBar], [Slider], etc.
</constant>
<constant name="CLOCKWISE" value="0" enum="ClockDirection">
+ Clockwise rotation. Used by some methods (e.g. [method Image.rotate_90]).
</constant>
<constant name="COUNTERCLOCKWISE" value="1" enum="ClockDirection">
+ Counter-clockwise rotation. Used by some methods (e.g. [method Image.rotate_90]).
</constant>
<constant name="HORIZONTAL_ALIGNMENT_LEFT" value="0" enum="HorizontalAlignment">
Horizontal left alignment, usually for text-derived classes.
@@ -1392,388 +1466,406 @@
<constant name="INLINE_ALIGNMENT_TEXT_MASK" value="12" enum="InlineAlignment">
A bit mask for [code]INLINE_ALIGNMENT_TO_*[/code] alignment constants.
</constant>
+ <constant name="EULER_ORDER_XYZ" value="0" enum="EulerOrder">
+ Specifies that Euler angles should be in XYZ order. When composing, the order is X, Y, Z. When decomposing, the order is reversed, first Z, then Y, and X last.
+ </constant>
+ <constant name="EULER_ORDER_XZY" value="1" enum="EulerOrder">
+ Specifies that Euler angles should be in XZY order. When composing, the order is X, Z, Y. When decomposing, the order is reversed, first Y, then Z, and X last.
+ </constant>
+ <constant name="EULER_ORDER_YXZ" value="2" enum="EulerOrder">
+ Specifies that Euler angles should be in YXZ order. When composing, the order is Y, X, Z. When decomposing, the order is reversed, first Z, then X, and Y last.
+ </constant>
+ <constant name="EULER_ORDER_YZX" value="3" enum="EulerOrder">
+ Specifies that Euler angles should be in YZX order. When composing, the order is Y, Z, X. When decomposing, the order is reversed, first X, then Z, and Y last.
+ </constant>
+ <constant name="EULER_ORDER_ZXY" value="4" enum="EulerOrder">
+ Specifies that Euler angles should be in ZXY order. When composing, the order is Z, X, Y. When decomposing, the order is reversed, first Y, then X, and Z last.
+ </constant>
+ <constant name="EULER_ORDER_ZYX" value="5" enum="EulerOrder">
+ Specifies that Euler angles should be in ZYX order. When composing, the order is Z, Y, X. When decomposing, the order is reversed, first X, then Y, and Z last.
+ </constant>
<constant name="KEY_NONE" value="0" enum="Key">
Enum value which doesn't correspond to any key. This is used to initialize [enum Key] properties with a generic state.
</constant>
- <constant name="KEY_SPECIAL" value="16777216" enum="Key">
+ <constant name="KEY_SPECIAL" value="4194304" enum="Key">
Keycodes with this bit applied are non-printable.
</constant>
- <constant name="KEY_ESCAPE" value="16777217" enum="Key">
+ <constant name="KEY_ESCAPE" value="4194305" enum="Key">
Escape key.
</constant>
- <constant name="KEY_TAB" value="16777218" enum="Key">
+ <constant name="KEY_TAB" value="4194306" enum="Key">
Tab key.
</constant>
- <constant name="KEY_BACKTAB" value="16777219" enum="Key">
+ <constant name="KEY_BACKTAB" value="4194307" enum="Key">
Shift + Tab key.
</constant>
- <constant name="KEY_BACKSPACE" value="16777220" enum="Key">
+ <constant name="KEY_BACKSPACE" value="4194308" enum="Key">
Backspace key.
</constant>
- <constant name="KEY_ENTER" value="16777221" enum="Key">
+ <constant name="KEY_ENTER" value="4194309" enum="Key">
Return key (on the main keyboard).
</constant>
- <constant name="KEY_KP_ENTER" value="16777222" enum="Key">
+ <constant name="KEY_KP_ENTER" value="4194310" enum="Key">
Enter key on the numeric keypad.
</constant>
- <constant name="KEY_INSERT" value="16777223" enum="Key">
+ <constant name="KEY_INSERT" value="4194311" enum="Key">
Insert key.
</constant>
- <constant name="KEY_DELETE" value="16777224" enum="Key">
+ <constant name="KEY_DELETE" value="4194312" enum="Key">
Delete key.
</constant>
- <constant name="KEY_PAUSE" value="16777225" enum="Key">
+ <constant name="KEY_PAUSE" value="4194313" enum="Key">
Pause key.
</constant>
- <constant name="KEY_PRINT" value="16777226" enum="Key">
+ <constant name="KEY_PRINT" value="4194314" enum="Key">
Print Screen key.
</constant>
- <constant name="KEY_SYSREQ" value="16777227" enum="Key">
+ <constant name="KEY_SYSREQ" value="4194315" enum="Key">
System Request key.
</constant>
- <constant name="KEY_CLEAR" value="16777228" enum="Key">
+ <constant name="KEY_CLEAR" value="4194316" enum="Key">
Clear key.
</constant>
- <constant name="KEY_HOME" value="16777229" enum="Key">
+ <constant name="KEY_HOME" value="4194317" enum="Key">
Home key.
</constant>
- <constant name="KEY_END" value="16777230" enum="Key">
+ <constant name="KEY_END" value="4194318" enum="Key">
End key.
</constant>
- <constant name="KEY_LEFT" value="16777231" enum="Key">
+ <constant name="KEY_LEFT" value="4194319" enum="Key">
Left arrow key.
</constant>
- <constant name="KEY_UP" value="16777232" enum="Key">
+ <constant name="KEY_UP" value="4194320" enum="Key">
Up arrow key.
</constant>
- <constant name="KEY_RIGHT" value="16777233" enum="Key">
+ <constant name="KEY_RIGHT" value="4194321" enum="Key">
Right arrow key.
</constant>
- <constant name="KEY_DOWN" value="16777234" enum="Key">
+ <constant name="KEY_DOWN" value="4194322" enum="Key">
Down arrow key.
</constant>
- <constant name="KEY_PAGEUP" value="16777235" enum="Key">
+ <constant name="KEY_PAGEUP" value="4194323" enum="Key">
Page Up key.
</constant>
- <constant name="KEY_PAGEDOWN" value="16777236" enum="Key">
+ <constant name="KEY_PAGEDOWN" value="4194324" enum="Key">
Page Down key.
</constant>
- <constant name="KEY_SHIFT" value="16777237" enum="Key">
+ <constant name="KEY_SHIFT" value="4194325" enum="Key">
Shift key.
</constant>
- <constant name="KEY_CTRL" value="16777238" enum="Key">
+ <constant name="KEY_CTRL" value="4194326" enum="Key">
Control key.
</constant>
- <constant name="KEY_META" value="16777239" enum="Key">
+ <constant name="KEY_META" value="4194327" enum="Key">
Meta key.
</constant>
- <constant name="KEY_ALT" value="16777240" enum="Key">
+ <constant name="KEY_ALT" value="4194328" enum="Key">
Alt key.
</constant>
- <constant name="KEY_CAPSLOCK" value="16777241" enum="Key">
+ <constant name="KEY_CAPSLOCK" value="4194329" enum="Key">
Caps Lock key.
</constant>
- <constant name="KEY_NUMLOCK" value="16777242" enum="Key">
+ <constant name="KEY_NUMLOCK" value="4194330" enum="Key">
Num Lock key.
</constant>
- <constant name="KEY_SCROLLLOCK" value="16777243" enum="Key">
+ <constant name="KEY_SCROLLLOCK" value="4194331" enum="Key">
Scroll Lock key.
</constant>
- <constant name="KEY_F1" value="16777244" enum="Key">
+ <constant name="KEY_F1" value="4194332" enum="Key">
F1 key.
</constant>
- <constant name="KEY_F2" value="16777245" enum="Key">
+ <constant name="KEY_F2" value="4194333" enum="Key">
F2 key.
</constant>
- <constant name="KEY_F3" value="16777246" enum="Key">
+ <constant name="KEY_F3" value="4194334" enum="Key">
F3 key.
</constant>
- <constant name="KEY_F4" value="16777247" enum="Key">
+ <constant name="KEY_F4" value="4194335" enum="Key">
F4 key.
</constant>
- <constant name="KEY_F5" value="16777248" enum="Key">
+ <constant name="KEY_F5" value="4194336" enum="Key">
F5 key.
</constant>
- <constant name="KEY_F6" value="16777249" enum="Key">
+ <constant name="KEY_F6" value="4194337" enum="Key">
F6 key.
</constant>
- <constant name="KEY_F7" value="16777250" enum="Key">
+ <constant name="KEY_F7" value="4194338" enum="Key">
F7 key.
</constant>
- <constant name="KEY_F8" value="16777251" enum="Key">
+ <constant name="KEY_F8" value="4194339" enum="Key">
F8 key.
</constant>
- <constant name="KEY_F9" value="16777252" enum="Key">
+ <constant name="KEY_F9" value="4194340" enum="Key">
F9 key.
</constant>
- <constant name="KEY_F10" value="16777253" enum="Key">
+ <constant name="KEY_F10" value="4194341" enum="Key">
F10 key.
</constant>
- <constant name="KEY_F11" value="16777254" enum="Key">
+ <constant name="KEY_F11" value="4194342" enum="Key">
F11 key.
</constant>
- <constant name="KEY_F12" value="16777255" enum="Key">
+ <constant name="KEY_F12" value="4194343" enum="Key">
F12 key.
</constant>
- <constant name="KEY_F13" value="16777256" enum="Key">
+ <constant name="KEY_F13" value="4194344" enum="Key">
F13 key.
</constant>
- <constant name="KEY_F14" value="16777257" enum="Key">
+ <constant name="KEY_F14" value="4194345" enum="Key">
F14 key.
</constant>
- <constant name="KEY_F15" value="16777258" enum="Key">
+ <constant name="KEY_F15" value="4194346" enum="Key">
F15 key.
</constant>
- <constant name="KEY_F16" value="16777259" enum="Key">
+ <constant name="KEY_F16" value="4194347" enum="Key">
F16 key.
</constant>
- <constant name="KEY_F17" value="16777260" enum="Key">
+ <constant name="KEY_F17" value="4194348" enum="Key">
F17 key.
</constant>
- <constant name="KEY_F18" value="16777261" enum="Key">
+ <constant name="KEY_F18" value="4194349" enum="Key">
F18 key.
</constant>
- <constant name="KEY_F19" value="16777262" enum="Key">
+ <constant name="KEY_F19" value="4194350" enum="Key">
F19 key.
</constant>
- <constant name="KEY_F20" value="16777263" enum="Key">
+ <constant name="KEY_F20" value="4194351" enum="Key">
F20 key.
</constant>
- <constant name="KEY_F21" value="16777264" enum="Key">
+ <constant name="KEY_F21" value="4194352" enum="Key">
F21 key.
</constant>
- <constant name="KEY_F22" value="16777265" enum="Key">
+ <constant name="KEY_F22" value="4194353" enum="Key">
F22 key.
</constant>
- <constant name="KEY_F23" value="16777266" enum="Key">
+ <constant name="KEY_F23" value="4194354" enum="Key">
F23 key.
</constant>
- <constant name="KEY_F24" value="16777267" enum="Key">
+ <constant name="KEY_F24" value="4194355" enum="Key">
F24 key.
</constant>
- <constant name="KEY_F25" value="16777268" enum="Key">
+ <constant name="KEY_F25" value="4194356" enum="Key">
F25 key. Only supported on macOS and Linux due to a Windows limitation.
</constant>
- <constant name="KEY_F26" value="16777269" enum="Key">
+ <constant name="KEY_F26" value="4194357" enum="Key">
F26 key. Only supported on macOS and Linux due to a Windows limitation.
</constant>
- <constant name="KEY_F27" value="16777270" enum="Key">
+ <constant name="KEY_F27" value="4194358" enum="Key">
F27 key. Only supported on macOS and Linux due to a Windows limitation.
</constant>
- <constant name="KEY_F28" value="16777271" enum="Key">
+ <constant name="KEY_F28" value="4194359" enum="Key">
F28 key. Only supported on macOS and Linux due to a Windows limitation.
</constant>
- <constant name="KEY_F29" value="16777272" enum="Key">
+ <constant name="KEY_F29" value="4194360" enum="Key">
F29 key. Only supported on macOS and Linux due to a Windows limitation.
</constant>
- <constant name="KEY_F30" value="16777273" enum="Key">
+ <constant name="KEY_F30" value="4194361" enum="Key">
F30 key. Only supported on macOS and Linux due to a Windows limitation.
</constant>
- <constant name="KEY_F31" value="16777274" enum="Key">
+ <constant name="KEY_F31" value="4194362" enum="Key">
F31 key. Only supported on macOS and Linux due to a Windows limitation.
</constant>
- <constant name="KEY_F32" value="16777275" enum="Key">
+ <constant name="KEY_F32" value="4194363" enum="Key">
F32 key. Only supported on macOS and Linux due to a Windows limitation.
</constant>
- <constant name="KEY_F33" value="16777276" enum="Key">
+ <constant name="KEY_F33" value="4194364" enum="Key">
F33 key. Only supported on macOS and Linux due to a Windows limitation.
</constant>
- <constant name="KEY_F34" value="16777277" enum="Key">
+ <constant name="KEY_F34" value="4194365" enum="Key">
F34 key. Only supported on macOS and Linux due to a Windows limitation.
</constant>
- <constant name="KEY_F35" value="16777278" enum="Key">
+ <constant name="KEY_F35" value="4194366" enum="Key">
F35 key. Only supported on macOS and Linux due to a Windows limitation.
</constant>
- <constant name="KEY_KP_MULTIPLY" value="16777345" enum="Key">
+ <constant name="KEY_KP_MULTIPLY" value="4194433" enum="Key">
Multiply (*) key on the numeric keypad.
</constant>
- <constant name="KEY_KP_DIVIDE" value="16777346" enum="Key">
+ <constant name="KEY_KP_DIVIDE" value="4194434" enum="Key">
Divide (/) key on the numeric keypad.
</constant>
- <constant name="KEY_KP_SUBTRACT" value="16777347" enum="Key">
+ <constant name="KEY_KP_SUBTRACT" value="4194435" enum="Key">
Subtract (-) key on the numeric keypad.
</constant>
- <constant name="KEY_KP_PERIOD" value="16777348" enum="Key">
+ <constant name="KEY_KP_PERIOD" value="4194436" enum="Key">
Period (.) key on the numeric keypad.
</constant>
- <constant name="KEY_KP_ADD" value="16777349" enum="Key">
+ <constant name="KEY_KP_ADD" value="4194437" enum="Key">
Add (+) key on the numeric keypad.
</constant>
- <constant name="KEY_KP_0" value="16777350" enum="Key">
+ <constant name="KEY_KP_0" value="4194438" enum="Key">
Number 0 on the numeric keypad.
</constant>
- <constant name="KEY_KP_1" value="16777351" enum="Key">
+ <constant name="KEY_KP_1" value="4194439" enum="Key">
Number 1 on the numeric keypad.
</constant>
- <constant name="KEY_KP_2" value="16777352" enum="Key">
+ <constant name="KEY_KP_2" value="4194440" enum="Key">
Number 2 on the numeric keypad.
</constant>
- <constant name="KEY_KP_3" value="16777353" enum="Key">
+ <constant name="KEY_KP_3" value="4194441" enum="Key">
Number 3 on the numeric keypad.
</constant>
- <constant name="KEY_KP_4" value="16777354" enum="Key">
+ <constant name="KEY_KP_4" value="4194442" enum="Key">
Number 4 on the numeric keypad.
</constant>
- <constant name="KEY_KP_5" value="16777355" enum="Key">
+ <constant name="KEY_KP_5" value="4194443" enum="Key">
Number 5 on the numeric keypad.
</constant>
- <constant name="KEY_KP_6" value="16777356" enum="Key">
+ <constant name="KEY_KP_6" value="4194444" enum="Key">
Number 6 on the numeric keypad.
</constant>
- <constant name="KEY_KP_7" value="16777357" enum="Key">
+ <constant name="KEY_KP_7" value="4194445" enum="Key">
Number 7 on the numeric keypad.
</constant>
- <constant name="KEY_KP_8" value="16777358" enum="Key">
+ <constant name="KEY_KP_8" value="4194446" enum="Key">
Number 8 on the numeric keypad.
</constant>
- <constant name="KEY_KP_9" value="16777359" enum="Key">
+ <constant name="KEY_KP_9" value="4194447" enum="Key">
Number 9 on the numeric keypad.
</constant>
- <constant name="KEY_SUPER_L" value="16777280" enum="Key">
+ <constant name="KEY_SUPER_L" value="4194368" enum="Key">
Left Super key (Windows key).
</constant>
- <constant name="KEY_SUPER_R" value="16777281" enum="Key">
+ <constant name="KEY_SUPER_R" value="4194369" enum="Key">
Right Super key (Windows key).
</constant>
- <constant name="KEY_MENU" value="16777282" enum="Key">
+ <constant name="KEY_MENU" value="4194370" enum="Key">
Context menu key.
</constant>
- <constant name="KEY_HYPER_L" value="16777283" enum="Key">
+ <constant name="KEY_HYPER_L" value="4194371" enum="Key">
Left Hyper key.
</constant>
- <constant name="KEY_HYPER_R" value="16777284" enum="Key">
+ <constant name="KEY_HYPER_R" value="4194372" enum="Key">
Right Hyper key.
</constant>
- <constant name="KEY_HELP" value="16777285" enum="Key">
+ <constant name="KEY_HELP" value="4194373" enum="Key">
Help key.
</constant>
- <constant name="KEY_DIRECTION_L" value="16777286" enum="Key">
+ <constant name="KEY_DIRECTION_L" value="4194374" enum="Key">
Left Direction key.
</constant>
- <constant name="KEY_DIRECTION_R" value="16777287" enum="Key">
+ <constant name="KEY_DIRECTION_R" value="4194375" enum="Key">
Right Direction key.
</constant>
- <constant name="KEY_BACK" value="16777288" enum="Key">
+ <constant name="KEY_BACK" value="4194376" enum="Key">
Media back key. Not to be confused with the Back button on an Android device.
</constant>
- <constant name="KEY_FORWARD" value="16777289" enum="Key">
+ <constant name="KEY_FORWARD" value="4194377" enum="Key">
Media forward key.
</constant>
- <constant name="KEY_STOP" value="16777290" enum="Key">
+ <constant name="KEY_STOP" value="4194378" enum="Key">
Media stop key.
</constant>
- <constant name="KEY_REFRESH" value="16777291" enum="Key">
+ <constant name="KEY_REFRESH" value="4194379" enum="Key">
Media refresh key.
</constant>
- <constant name="KEY_VOLUMEDOWN" value="16777292" enum="Key">
+ <constant name="KEY_VOLUMEDOWN" value="4194380" enum="Key">
Volume down key.
</constant>
- <constant name="KEY_VOLUMEMUTE" value="16777293" enum="Key">
+ <constant name="KEY_VOLUMEMUTE" value="4194381" enum="Key">
Mute volume key.
</constant>
- <constant name="KEY_VOLUMEUP" value="16777294" enum="Key">
+ <constant name="KEY_VOLUMEUP" value="4194382" enum="Key">
Volume up key.
</constant>
- <constant name="KEY_BASSBOOST" value="16777295" enum="Key">
+ <constant name="KEY_BASSBOOST" value="4194383" enum="Key">
Bass Boost key.
</constant>
- <constant name="KEY_BASSUP" value="16777296" enum="Key">
+ <constant name="KEY_BASSUP" value="4194384" enum="Key">
Bass up key.
</constant>
- <constant name="KEY_BASSDOWN" value="16777297" enum="Key">
+ <constant name="KEY_BASSDOWN" value="4194385" enum="Key">
Bass down key.
</constant>
- <constant name="KEY_TREBLEUP" value="16777298" enum="Key">
+ <constant name="KEY_TREBLEUP" value="4194386" enum="Key">
Treble up key.
</constant>
- <constant name="KEY_TREBLEDOWN" value="16777299" enum="Key">
+ <constant name="KEY_TREBLEDOWN" value="4194387" enum="Key">
Treble down key.
</constant>
- <constant name="KEY_MEDIAPLAY" value="16777300" enum="Key">
+ <constant name="KEY_MEDIAPLAY" value="4194388" enum="Key">
Media play key.
</constant>
- <constant name="KEY_MEDIASTOP" value="16777301" enum="Key">
+ <constant name="KEY_MEDIASTOP" value="4194389" enum="Key">
Media stop key.
</constant>
- <constant name="KEY_MEDIAPREVIOUS" value="16777302" enum="Key">
+ <constant name="KEY_MEDIAPREVIOUS" value="4194390" enum="Key">
Previous song key.
</constant>
- <constant name="KEY_MEDIANEXT" value="16777303" enum="Key">
+ <constant name="KEY_MEDIANEXT" value="4194391" enum="Key">
Next song key.
</constant>
- <constant name="KEY_MEDIARECORD" value="16777304" enum="Key">
+ <constant name="KEY_MEDIARECORD" value="4194392" enum="Key">
Media record key.
</constant>
- <constant name="KEY_HOMEPAGE" value="16777305" enum="Key">
+ <constant name="KEY_HOMEPAGE" value="4194393" enum="Key">
Home page key.
</constant>
- <constant name="KEY_FAVORITES" value="16777306" enum="Key">
+ <constant name="KEY_FAVORITES" value="4194394" enum="Key">
Favorites key.
</constant>
- <constant name="KEY_SEARCH" value="16777307" enum="Key">
+ <constant name="KEY_SEARCH" value="4194395" enum="Key">
Search key.
</constant>
- <constant name="KEY_STANDBY" value="16777308" enum="Key">
+ <constant name="KEY_STANDBY" value="4194396" enum="Key">
Standby key.
</constant>
- <constant name="KEY_OPENURL" value="16777309" enum="Key">
+ <constant name="KEY_OPENURL" value="4194397" enum="Key">
Open URL / Launch Browser key.
</constant>
- <constant name="KEY_LAUNCHMAIL" value="16777310" enum="Key">
+ <constant name="KEY_LAUNCHMAIL" value="4194398" enum="Key">
Launch Mail key.
</constant>
- <constant name="KEY_LAUNCHMEDIA" value="16777311" enum="Key">
+ <constant name="KEY_LAUNCHMEDIA" value="4194399" enum="Key">
Launch Media key.
</constant>
- <constant name="KEY_LAUNCH0" value="16777312" enum="Key">
+ <constant name="KEY_LAUNCH0" value="4194400" enum="Key">
Launch Shortcut 0 key.
</constant>
- <constant name="KEY_LAUNCH1" value="16777313" enum="Key">
+ <constant name="KEY_LAUNCH1" value="4194401" enum="Key">
Launch Shortcut 1 key.
</constant>
- <constant name="KEY_LAUNCH2" value="16777314" enum="Key">
+ <constant name="KEY_LAUNCH2" value="4194402" enum="Key">
Launch Shortcut 2 key.
</constant>
- <constant name="KEY_LAUNCH3" value="16777315" enum="Key">
+ <constant name="KEY_LAUNCH3" value="4194403" enum="Key">
Launch Shortcut 3 key.
</constant>
- <constant name="KEY_LAUNCH4" value="16777316" enum="Key">
+ <constant name="KEY_LAUNCH4" value="4194404" enum="Key">
Launch Shortcut 4 key.
</constant>
- <constant name="KEY_LAUNCH5" value="16777317" enum="Key">
+ <constant name="KEY_LAUNCH5" value="4194405" enum="Key">
Launch Shortcut 5 key.
</constant>
- <constant name="KEY_LAUNCH6" value="16777318" enum="Key">
+ <constant name="KEY_LAUNCH6" value="4194406" enum="Key">
Launch Shortcut 6 key.
</constant>
- <constant name="KEY_LAUNCH7" value="16777319" enum="Key">
+ <constant name="KEY_LAUNCH7" value="4194407" enum="Key">
Launch Shortcut 7 key.
</constant>
- <constant name="KEY_LAUNCH8" value="16777320" enum="Key">
+ <constant name="KEY_LAUNCH8" value="4194408" enum="Key">
Launch Shortcut 8 key.
</constant>
- <constant name="KEY_LAUNCH9" value="16777321" enum="Key">
+ <constant name="KEY_LAUNCH9" value="4194409" enum="Key">
Launch Shortcut 9 key.
</constant>
- <constant name="KEY_LAUNCHA" value="16777322" enum="Key">
+ <constant name="KEY_LAUNCHA" value="4194410" enum="Key">
Launch Shortcut A key.
</constant>
- <constant name="KEY_LAUNCHB" value="16777323" enum="Key">
+ <constant name="KEY_LAUNCHB" value="4194411" enum="Key">
Launch Shortcut B key.
</constant>
- <constant name="KEY_LAUNCHC" value="16777324" enum="Key">
+ <constant name="KEY_LAUNCHC" value="4194412" enum="Key">
Launch Shortcut C key.
</constant>
- <constant name="KEY_LAUNCHD" value="16777325" enum="Key">
+ <constant name="KEY_LAUNCHD" value="4194413" enum="Key">
Launch Shortcut D key.
</constant>
- <constant name="KEY_LAUNCHE" value="16777326" enum="Key">
+ <constant name="KEY_LAUNCHE" value="4194414" enum="Key">
Launch Shortcut E key.
</constant>
- <constant name="KEY_LAUNCHF" value="16777327" enum="Key">
+ <constant name="KEY_LAUNCHF" value="4194415" enum="Key">
Launch Shortcut F key.
</constant>
- <constant name="KEY_UNKNOWN" value="33554431" enum="Key">
+ <constant name="KEY_UNKNOWN" value="16777215" enum="Key">
Unknown key.
</constant>
<constant name="KEY_SPACE" value="32" enum="Key">
@@ -1825,34 +1917,34 @@
/ key.
</constant>
<constant name="KEY_0" value="48" enum="Key">
- Number 0.
+ Number 0 key.
</constant>
<constant name="KEY_1" value="49" enum="Key">
- Number 1.
+ Number 1 key.
</constant>
<constant name="KEY_2" value="50" enum="Key">
- Number 2.
+ Number 2 key.
</constant>
<constant name="KEY_3" value="51" enum="Key">
- Number 3.
+ Number 3 key.
</constant>
<constant name="KEY_4" value="52" enum="Key">
- Number 4.
+ Number 4 key.
</constant>
<constant name="KEY_5" value="53" enum="Key">
- Number 5.
+ Number 5 key.
</constant>
<constant name="KEY_6" value="54" enum="Key">
- Number 6.
+ Number 6 key.
</constant>
<constant name="KEY_7" value="55" enum="Key">
- Number 7.
+ Number 7 key.
</constant>
<constant name="KEY_8" value="56" enum="Key">
- Number 8.
+ Number 8 key.
</constant>
<constant name="KEY_9" value="57" enum="Key">
- Number 9.
+ Number 9 key.
</constant>
<constant name="KEY_COLON" value="58" enum="Key">
: key.
@@ -2181,27 +2273,27 @@
<constant name="KEY_YDIAERESIS" value="255" enum="Key">
ÿ key.
</constant>
- <constant name="KEY_CODE_MASK" value="33554431" enum="KeyModifierMask">
+ <constant name="KEY_CODE_MASK" value="8388607" enum="KeyModifierMask">
Key Code mask.
</constant>
- <constant name="KEY_MODIFIER_MASK" value="2130706432" enum="KeyModifierMask">
+ <constant name="KEY_MODIFIER_MASK" value="532676608" enum="KeyModifierMask">
Modifier key mask.
</constant>
+ <constant name="KEY_MASK_CMD_OR_CTRL" value="16777216" enum="KeyModifierMask">
+ Automatically remapped to [constant KEY_META] on macOS and [constant KEY_CTRL] on other platforms, this mask is never set in the actual events, and should be used for key mapping only.
+ </constant>
<constant name="KEY_MASK_SHIFT" value="33554432" enum="KeyModifierMask">
Shift key mask.
</constant>
<constant name="KEY_MASK_ALT" value="67108864" enum="KeyModifierMask">
- Alt key mask.
+ Alt or Option (on macOS) key mask.
</constant>
<constant name="KEY_MASK_META" value="134217728" enum="KeyModifierMask">
- Meta key mask.
+ Command (on macOS) or Meta/Windows key mask.
</constant>
<constant name="KEY_MASK_CTRL" value="268435456" enum="KeyModifierMask">
Ctrl key mask.
</constant>
- <constant name="KEY_MASK_CMD" value="platform-dependent" enum="KeyModifierMask">
- Command key mask. On macOS, this is equivalent to [constant KEY_MASK_META]. On other platforms, this is equivalent to [constant KEY_MASK_CTRL]. This mask should be preferred to [constant KEY_MASK_META] or [constant KEY_MASK_CTRL] for system shortcuts as it handles all platforms correctly.
- </constant>
<constant name="KEY_MASK_KPAD" value="536870912" enum="KeyModifierMask">
Keypad key mask.
</constant>
@@ -2212,10 +2304,10 @@
Enum value which doesn't correspond to any mouse button. This is used to initialize [enum MouseButton] properties with a generic state.
</constant>
<constant name="MOUSE_BUTTON_LEFT" value="1" enum="MouseButton">
- Left mouse button.
+ Primary mouse button, usually assigned to the left button.
</constant>
<constant name="MOUSE_BUTTON_RIGHT" value="2" enum="MouseButton">
- Right mouse button.
+ Secondary mouse button, usually assigned to the right button.
</constant>
<constant name="MOUSE_BUTTON_MIDDLE" value="3" enum="MouseButton">
Middle mouse button.
@@ -2233,16 +2325,16 @@
Mouse wheel right button (only present on some mice).
</constant>
<constant name="MOUSE_BUTTON_XBUTTON1" value="8" enum="MouseButton">
- Extra mouse button 1 (only present on some mice).
+ Extra mouse button 1. This is sometimes present, usually to the sides of the mouse.
</constant>
<constant name="MOUSE_BUTTON_XBUTTON2" value="9" enum="MouseButton">
- Extra mouse button 2 (only present on some mice).
+ Extra mouse button 2. This is sometimes present, usually to the sides of the mouse.
</constant>
<constant name="MOUSE_BUTTON_MASK_LEFT" value="1" enum="MouseButton">
- Left mouse button mask.
+ Primary mouse button mask, usually for the left button.
</constant>
<constant name="MOUSE_BUTTON_MASK_RIGHT" value="2" enum="MouseButton">
- Right mouse button mask.
+ Secondary mouse button mask, usually for the right button.
</constant>
<constant name="MOUSE_BUTTON_MASK_MIDDLE" value="4" enum="MouseButton">
Middle mouse button mask.
@@ -2302,7 +2394,7 @@
Game controller D-pad right button.
</constant>
<constant name="JOY_BUTTON_MISC1" value="15" enum="JoyButton">
- Game controller SDL miscellaneous button. Corresponds to Xbox share button, PS5 microphone button, Nintendo capture button.
+ Game controller SDL miscellaneous button. Corresponds to Xbox share button, PS5 microphone button, Nintendo Switch capture button.
</constant>
<constant name="JOY_BUTTON_PADDLE1" value="16" enum="JoyButton">
Game controller SDL paddle 1 button.
@@ -2324,9 +2416,9 @@
</constant>
<constant name="JOY_BUTTON_MAX" value="128" enum="JoyButton">
The maximum number of game controller buttons supported by the engine. The actual limit may be lower on specific platforms:
- - Android: Up to 36 buttons.
- - Linux: Up to 80 buttons.
- - Windows and macOS: Up to 128 buttons.
+ - [b]Android:[/b] Up to 36 buttons.
+ - [b]Linux:[/b] Up to 80 buttons.
+ - [b]Windows[/b] and [b]macOS:[/b] Up to 128 buttons.
</constant>
<constant name="JOY_AXIS_INVALID" value="-1" enum="JoyAxis">
An invalid game controller axis.
@@ -2413,16 +2505,19 @@
MIDI system reset message. Reset all receivers in the system to power-up status. It should not be sent on power-up itself.
</constant>
<constant name="OK" value="0" enum="Error">
- Methods that return [enum Error] return [constant OK] when no error occurred. Note that many functions don't return an error code but will print error messages to standard output.
- Since [constant OK] has value 0, and all other failure codes are positive integers, it can also be used in boolean checks, e.g.:
+ Methods that return [enum Error] return [constant OK] when no error occurred.
+ Since [constant OK] has value 0, and all other error constants are positive integers, it can also be used in boolean checks.
+ [b]Example:[/b]
[codeblock]
- var err = method_that_returns_error()
- if err != OK:
- print("Failure!")
- # Or, equivalent:
- if err:
- print("Still failing!")
+ var error = method_that_returns_error()
+ if error != OK:
+ printerr("Failure!")
+
+ # Or, alternatively:
+ if error:
+ printerr("Still failing!")
[/codeblock]
+ [b]Note:[/b] Many functions do not return an error code, but will print error messages to standard output.
</constant>
<constant name="FAILED" value="1" enum="Error">
Generic error.
@@ -2560,156 +2655,159 @@
Skip error.
</constant>
<constant name="ERR_HELP" value="46" enum="Error">
- Help error.
+ Help error. Used internally when passing [code]--version[/code] or [code]--help[/code] as executable options.
</constant>
<constant name="ERR_BUG" value="47" enum="Error">
- Bug error.
+ Bug error, caused by an implementation issue in the method.
+ [b]Note:[/b] If a built-in method returns this code, please open an issue on [url=https://github.com/godotengine/godot/issues]the GitHub Issue Tracker[/url].
</constant>
<constant name="ERR_PRINTER_ON_FIRE" value="48" enum="Error">
- Printer on fire error. (This is an easter egg, no engine methods return this error code.)
+ Printer on fire error (This is an easter egg, no built-in methods return this error code).
</constant>
<constant name="PROPERTY_HINT_NONE" value="0" enum="PropertyHint">
- No hint for the edited property.
+ The property has no hint for the editor.
</constant>
<constant name="PROPERTY_HINT_RANGE" value="1" enum="PropertyHint">
- Hints that an integer or float property should be within a range specified via the hint string [code]"min,max"[/code] or [code]"min,max,step"[/code]. The hint string can optionally include [code]"or_greater"[/code] and/or [code]"or_lesser"[/code] to allow manual input going respectively above the max or below the min values. Example: [code]"-360,360,1,or_greater,or_lesser"[/code].
- Additionally, other keywords can be included: "exp" for exponential range editing, "radians" for editing radian angles in degrees, "degrees" to hint at an angle and "no_slider" to hide the slider.
+ Hints that an [int] or [float] property should be within a range specified via the hint string [code]"min,max"[/code] or [code]"min,max,step"[/code]. The hint string can optionally include [code]"or_greater"[/code] and/or [code]"or_less"[/code] to allow manual input going respectively above the max or below the min values.
+ [b]Example:[/b] [code]"-360,360,1,or_greater,or_less"[/code].
+ Additionally, other keywords can be included: [code]"exp"[/code] for exponential range editing, [code]"radians"[/code] for editing radian angles in degrees, [code]"degrees"[/code] to hint at an angle and [code]"hide_slider"[/code] to hide the slider.
</constant>
<constant name="PROPERTY_HINT_ENUM" value="2" enum="PropertyHint">
- Hints that an integer, float or string property is an enumerated value to pick in a list specified via a hint string.
- The hint string is a comma separated list of names such as [code]"Hello,Something,Else"[/code]. For integer and float properties, the first name in the list has value 0, the next 1, and so on. Explicit values can also be specified by appending [code]:integer[/code] to the name, e.g. [code]"Zero,One,Three:3,Four,Six:6"[/code].
+ Hints that an [int], [float], or [String] property is an enumerated value to pick in a list specified via a hint string.
+ The hint string is a comma separated list of names such as [code]"Hello,Something,Else"[/code]. Whitespaces are [b]not[/b] removed from either end of a name. For integer and float properties, the first name in the list has value 0, the next 1, and so on. Explicit values can also be specified by appending [code]:integer[/code] to the name, e.g. [code]"Zero,One,Three:3,Four,Six:6"[/code].
</constant>
<constant name="PROPERTY_HINT_ENUM_SUGGESTION" value="3" enum="PropertyHint">
- Hints that a string property can be an enumerated value to pick in a list specified via a hint string such as [code]"Hello,Something,Else"[/code].
- Unlike [constant PROPERTY_HINT_ENUM] a property with this hint still accepts arbitrary values and can be empty. The list of values serves to suggest possible values.
+ Hints that a [String] property can be an enumerated value to pick in a list specified via a hint string such as [code]"Hello,Something,Else"[/code].
+ Unlike [constant PROPERTY_HINT_ENUM], a property with this hint still accepts arbitrary values and can be empty. The list of values serves to suggest possible values.
</constant>
<constant name="PROPERTY_HINT_EXP_EASING" value="4" enum="PropertyHint">
- Hints that a float property should be edited via an exponential easing function. The hint string can include [code]"attenuation"[/code] to flip the curve horizontally and/or [code]"inout"[/code] to also include in/out easing.
+ Hints that a [float] property should be edited via an exponential easing function. The hint string can include [code]"attenuation"[/code] to flip the curve horizontally and/or [code]"positive_only"[/code] to exclude in/out easing and limit values to be greater than or equal to zero.
</constant>
<constant name="PROPERTY_HINT_LINK" value="5" enum="PropertyHint">
- Hints that a vector property should allow linking values (e.g. to edit both [code]x[/code] and [code]y[/code] together).
+ Hints that a vector property should allow its components to be linked. For example, this allows [member Vector2.x] and [member Vector2.y] to be edited together.
</constant>
<constant name="PROPERTY_HINT_FLAGS" value="6" enum="PropertyHint">
- Hints that an integer property is a bitmask with named bit flags. For example, to allow toggling bits 0, 1, 2 and 4, the hint could be something like [code]"Bit0,Bit1,Bit2,,Bit4"[/code].
+ Hints that an [int] property is a bitmask with named bit flags. For example, to allow toggling bits 0, 1, 2 and 4, the hint could be something like [code]"Bit0,Bit1,Bit2,,Bit4"[/code].
</constant>
<constant name="PROPERTY_HINT_LAYERS_2D_RENDER" value="7" enum="PropertyHint">
- Hints that an integer property is a bitmask using the optionally named 2D render layers.
+ Hints that an [int] property is a bitmask using the optionally named 2D render layers.
</constant>
<constant name="PROPERTY_HINT_LAYERS_2D_PHYSICS" value="8" enum="PropertyHint">
- Hints that an integer property is a bitmask using the optionally named 2D physics layers.
+ Hints that an [int] property is a bitmask using the optionally named 2D physics layers.
</constant>
<constant name="PROPERTY_HINT_LAYERS_2D_NAVIGATION" value="9" enum="PropertyHint">
- Hints that an integer property is a bitmask using the optionally named 2D navigation layers.
+ Hints that an [int] property is a bitmask using the optionally named 2D navigation layers.
</constant>
<constant name="PROPERTY_HINT_LAYERS_3D_RENDER" value="10" enum="PropertyHint">
- Hints that an integer property is a bitmask using the optionally named 3D render layers.
+ Hints that an [int] property is a bitmask using the optionally named 3D render layers.
</constant>
<constant name="PROPERTY_HINT_LAYERS_3D_PHYSICS" value="11" enum="PropertyHint">
- Hints that an integer property is a bitmask using the optionally named 3D physics layers.
+ Hints that an [int] property is a bitmask using the optionally named 3D physics layers.
</constant>
<constant name="PROPERTY_HINT_LAYERS_3D_NAVIGATION" value="12" enum="PropertyHint">
- Hints that an integer property is a bitmask using the optionally named 3D navigation layers.
+ Hints that an [int] property is a bitmask using the optionally named 3D navigation layers.
</constant>
<constant name="PROPERTY_HINT_FILE" value="13" enum="PropertyHint">
- Hints that a string property is a path to a file. Editing it will show a file dialog for picking the path. The hint string can be a set of filters with wildcards like [code]"*.png,*.jpg"[/code].
+ Hints that a [String] property is a path to a file. Editing it will show a file dialog for picking the path. The hint string can be a set of filters with wildcards like [code]"*.png,*.jpg"[/code].
</constant>
<constant name="PROPERTY_HINT_DIR" value="14" enum="PropertyHint">
- Hints that a string property is a path to a directory. Editing it will show a file dialog for picking the path.
+ Hints that a [String] property is a path to a directory. Editing it will show a file dialog for picking the path.
</constant>
<constant name="PROPERTY_HINT_GLOBAL_FILE" value="15" enum="PropertyHint">
- Hints that a string property is an absolute path to a file outside the project folder. Editing it will show a file dialog for picking the path. The hint string can be a set of filters with wildcards like [code]"*.png,*.jpg"[/code].
+ Hints that a [String] property is an absolute path to a file outside the project folder. Editing it will show a file dialog for picking the path. The hint string can be a set of filters with wildcards, like [code]"*.png,*.jpg"[/code].
</constant>
<constant name="PROPERTY_HINT_GLOBAL_DIR" value="16" enum="PropertyHint">
- Hints that a string property is an absolute path to a directory outside the project folder. Editing it will show a file dialog for picking the path.
+ Hints that a [String] property is an absolute path to a directory outside the project folder. Editing it will show a file dialog for picking the path.
</constant>
<constant name="PROPERTY_HINT_RESOURCE_TYPE" value="17" enum="PropertyHint">
Hints that a property is an instance of a [Resource]-derived type, optionally specified via the hint string (e.g. [code]"Texture2D"[/code]). Editing it will show a popup menu of valid resource types to instantiate.
</constant>
<constant name="PROPERTY_HINT_MULTILINE_TEXT" value="18" enum="PropertyHint">
- Hints that a string property is text with line breaks. Editing it will show a text input field where line breaks can be typed.
+ Hints that a [String] property is text with line breaks. Editing it will show a text input field where line breaks can be typed.
</constant>
<constant name="PROPERTY_HINT_EXPRESSION" value="19" enum="PropertyHint">
- Hints that a string property is an [Expression].
+ Hints that a [String] property is an [Expression].
</constant>
<constant name="PROPERTY_HINT_PLACEHOLDER_TEXT" value="20" enum="PropertyHint">
- Hints that a string property should have a placeholder text visible on its input field, whenever the property is empty. The hint string is the placeholder text to use.
+ Hints that a [String] property should show a placeholder text on its input field, if empty. The hint string is the placeholder text to use.
</constant>
<constant name="PROPERTY_HINT_COLOR_NO_ALPHA" value="21" enum="PropertyHint">
- Hints that a color property should be edited without changing its alpha component, i.e. only R, G and B channels are edited.
- </constant>
- <constant name="PROPERTY_HINT_IMAGE_COMPRESS_LOSSY" value="22" enum="PropertyHint">
- Hints that an image is compressed using lossy compression.
- </constant>
- <constant name="PROPERTY_HINT_IMAGE_COMPRESS_LOSSLESS" value="23" enum="PropertyHint">
- Hints that an image is compressed using lossless compression.
+ Hints that a [Color] property should be edited without affecting its transparency ([member Color.a] is not editable).
</constant>
- <constant name="PROPERTY_HINT_OBJECT_ID" value="24" enum="PropertyHint">
+ <constant name="PROPERTY_HINT_OBJECT_ID" value="22" enum="PropertyHint">
</constant>
- <constant name="PROPERTY_HINT_TYPE_STRING" value="25" enum="PropertyHint">
+ <constant name="PROPERTY_HINT_TYPE_STRING" value="23" enum="PropertyHint">
Hint that a property represents a particular type. If a property is [constant TYPE_STRING], allows to set a type from the create dialog. If you need to create an [Array] to contain elements of a specific type, the [code]hint_string[/code] must encode nested types using [code]":"[/code] and [code]"/"[/code] for specifying [Resource] types. For instance:
[codeblock]
- hint_string = "%s:" % [TYPE_INT] # Array of inteters.
+ hint_string = "%s:" % [TYPE_INT] # Array of integers.
hint_string = "%s:%s:" % [TYPE_ARRAY, TYPE_REAL] # Two-dimensional array of floats.
hint_string = "%s/%s:Resource" % [TYPE_OBJECT, TYPE_OBJECT] # Array of resources.
hint_string = "%s:%s/%s:Resource" % [TYPE_ARRAY, TYPE_OBJECT, TYPE_OBJECT] # Two-dimensional array of resources.
[/codeblock]
- [b]Note:[/b] The final colon is required to specify for properly detecting built-in types.
+ [b]Note:[/b] The final colon is required for properly detecting built-in types.
</constant>
- <constant name="PROPERTY_HINT_NODE_PATH_TO_EDITED_NODE" value="26" enum="PropertyHint">
+ <constant name="PROPERTY_HINT_NODE_PATH_TO_EDITED_NODE" value="24" enum="PropertyHint">
</constant>
- <constant name="PROPERTY_HINT_METHOD_OF_VARIANT_TYPE" value="27" enum="PropertyHint">
+ <constant name="PROPERTY_HINT_METHOD_OF_VARIANT_TYPE" value="25" enum="PropertyHint">
</constant>
- <constant name="PROPERTY_HINT_METHOD_OF_BASE_TYPE" value="28" enum="PropertyHint">
+ <constant name="PROPERTY_HINT_METHOD_OF_BASE_TYPE" value="26" enum="PropertyHint">
</constant>
- <constant name="PROPERTY_HINT_METHOD_OF_INSTANCE" value="29" enum="PropertyHint">
+ <constant name="PROPERTY_HINT_METHOD_OF_INSTANCE" value="27" enum="PropertyHint">
</constant>
- <constant name="PROPERTY_HINT_METHOD_OF_SCRIPT" value="30" enum="PropertyHint">
+ <constant name="PROPERTY_HINT_METHOD_OF_SCRIPT" value="28" enum="PropertyHint">
</constant>
- <constant name="PROPERTY_HINT_PROPERTY_OF_VARIANT_TYPE" value="31" enum="PropertyHint">
+ <constant name="PROPERTY_HINT_PROPERTY_OF_VARIANT_TYPE" value="29" enum="PropertyHint">
</constant>
- <constant name="PROPERTY_HINT_PROPERTY_OF_BASE_TYPE" value="32" enum="PropertyHint">
+ <constant name="PROPERTY_HINT_PROPERTY_OF_BASE_TYPE" value="30" enum="PropertyHint">
</constant>
- <constant name="PROPERTY_HINT_PROPERTY_OF_INSTANCE" value="33" enum="PropertyHint">
+ <constant name="PROPERTY_HINT_PROPERTY_OF_INSTANCE" value="31" enum="PropertyHint">
</constant>
- <constant name="PROPERTY_HINT_PROPERTY_OF_SCRIPT" value="34" enum="PropertyHint">
+ <constant name="PROPERTY_HINT_PROPERTY_OF_SCRIPT" value="32" enum="PropertyHint">
</constant>
- <constant name="PROPERTY_HINT_OBJECT_TOO_BIG" value="35" enum="PropertyHint">
+ <constant name="PROPERTY_HINT_OBJECT_TOO_BIG" value="33" enum="PropertyHint">
</constant>
- <constant name="PROPERTY_HINT_NODE_PATH_VALID_TYPES" value="36" enum="PropertyHint">
+ <constant name="PROPERTY_HINT_NODE_PATH_VALID_TYPES" value="34" enum="PropertyHint">
</constant>
- <constant name="PROPERTY_HINT_SAVE_FILE" value="37" enum="PropertyHint">
+ <constant name="PROPERTY_HINT_SAVE_FILE" value="35" enum="PropertyHint">
</constant>
- <constant name="PROPERTY_HINT_GLOBAL_SAVE_FILE" value="38" enum="PropertyHint">
+ <constant name="PROPERTY_HINT_GLOBAL_SAVE_FILE" value="36" enum="PropertyHint">
</constant>
- <constant name="PROPERTY_HINT_INT_IS_OBJECTID" value="39" enum="PropertyHint">
+ <constant name="PROPERTY_HINT_INT_IS_OBJECTID" value="37" enum="PropertyHint">
</constant>
- <constant name="PROPERTY_HINT_INT_IS_POINTER" value="41" enum="PropertyHint">
+ <constant name="PROPERTY_HINT_INT_IS_POINTER" value="38" enum="PropertyHint">
</constant>
- <constant name="PROPERTY_HINT_ARRAY_TYPE" value="40" enum="PropertyHint">
+ <constant name="PROPERTY_HINT_ARRAY_TYPE" value="39" enum="PropertyHint">
</constant>
- <constant name="PROPERTY_HINT_LOCALE_ID" value="42" enum="PropertyHint">
+ <constant name="PROPERTY_HINT_LOCALE_ID" value="40" enum="PropertyHint">
Hints that a string property is a locale code. Editing it will show a locale dialog for picking language and country.
</constant>
- <constant name="PROPERTY_HINT_LOCALIZABLE_STRING" value="43" enum="PropertyHint">
+ <constant name="PROPERTY_HINT_LOCALIZABLE_STRING" value="41" enum="PropertyHint">
Hints that a dictionary property is string translation map. Dictionary keys are locale codes and, values are translated strings.
</constant>
- <constant name="PROPERTY_HINT_NODE_TYPE" value="44" enum="PropertyHint">
+ <constant name="PROPERTY_HINT_NODE_TYPE" value="42" enum="PropertyHint">
+ </constant>
+ <constant name="PROPERTY_HINT_HIDE_QUATERNION_EDIT" value="43" enum="PropertyHint">
+ Hints that a quaternion property should disable the temporary euler editor.
+ </constant>
+ <constant name="PROPERTY_HINT_PASSWORD" value="44" enum="PropertyHint">
+ Hints that a string property is a password, and every character is replaced with the secret character.
</constant>
<constant name="PROPERTY_HINT_MAX" value="45" enum="PropertyHint">
</constant>
<constant name="PROPERTY_USAGE_NONE" value="0" enum="PropertyUsageFlags">
+ The property is not stored, and does not display in the editor. This is the default for non-exported properties.
</constant>
<constant name="PROPERTY_USAGE_STORAGE" value="2" enum="PropertyUsageFlags">
The property is serialized and saved in the scene file (default).
</constant>
<constant name="PROPERTY_USAGE_EDITOR" value="4" enum="PropertyUsageFlags">
- The property is shown in the editor inspector (default).
+ The property is shown in the [EditorInspector] (default).
</constant>
<constant name="PROPERTY_USAGE_CHECKABLE" value="8" enum="PropertyUsageFlags">
- The property can be checked in the editor inspector.
+ The property can be checked in the [EditorInspector].
</constant>
<constant name="PROPERTY_USAGE_CHECKED" value="16" enum="PropertyUsageFlags">
- The property is checked in the editor inspector.
+ The property is checked in the [EditorInspector].
</constant>
<constant name="PROPERTY_USAGE_INTERNATIONALIZED" value="32" enum="PropertyUsageFlags">
The property is a translatable string.
@@ -2749,8 +2847,10 @@
<constant name="PROPERTY_USAGE_INTERNAL" value="524288" enum="PropertyUsageFlags">
</constant>
<constant name="PROPERTY_USAGE_DO_NOT_SHARE_ON_DUPLICATE" value="1048576" enum="PropertyUsageFlags">
+ If the property is a [Resource], a new copy of it is always created when calling [method Node.duplicate] or [method Resource.duplicate].
</constant>
<constant name="PROPERTY_USAGE_HIGH_END_GFX" value="2097152" enum="PropertyUsageFlags">
+ The property is only shown in the editor if modern renderers are supported (GLES3 is excluded).
</constant>
<constant name="PROPERTY_USAGE_NODE_PATH_FROM_SCENE_ROOT" value="4194304" enum="PropertyUsageFlags">
</constant>
@@ -2764,7 +2864,11 @@
</constant>
<constant name="PROPERTY_USAGE_EDITOR_BASIC_SETTING" value="134217728" enum="PropertyUsageFlags">
</constant>
+ <constant name="PROPERTY_USAGE_READ_ONLY" value="268435456" enum="PropertyUsageFlags">
+ The property is read-only in the [EditorInspector].
+ </constant>
<constant name="PROPERTY_USAGE_ARRAY" value="536870912" enum="PropertyUsageFlags">
+ The property is an array.
</constant>
<constant name="PROPERTY_USAGE_DEFAULT" value="6" enum="PropertyUsageFlags">
Default usage (storage, editor and network).
@@ -2788,14 +2892,16 @@
Flag for a virtual method.
</constant>
<constant name="METHOD_FLAG_VARARG" value="16" enum="MethodFlags">
+ Flag for a method with a variable number of arguments.
</constant>
<constant name="METHOD_FLAG_STATIC" value="32" enum="MethodFlags">
+ Flag for a static method.
</constant>
<constant name="METHOD_FLAG_OBJECT_CORE" value="64" enum="MethodFlags">
- Used internally. Allows to not dump core virtuals such as [code]_notification[/code] to the JSON API.
+ Used internally. Allows to not dump core virtual methods (such as [method Object._notification]) to the JSON API.
</constant>
<constant name="METHOD_FLAGS_DEFAULT" value="1" enum="MethodFlags">
- Default method flags.
+ Default method flags (normal).
</constant>
<constant name="TYPE_NIL" value="0" enum="Variant.Type">
Variable is [code]null[/code].
@@ -2807,7 +2913,7 @@
Variable is of type [int].
</constant>
<constant name="TYPE_FLOAT" value="3" enum="Variant.Type">
- Variable is of type [float] (real).
+ Variable is of type [float].
</constant>
<constant name="TYPE_STRING" value="4" enum="Variant.Type">
Variable is of type [String].
@@ -2834,8 +2940,10 @@
Variable is of type [Transform2D].
</constant>
<constant name="TYPE_VECTOR4" value="12" enum="Variant.Type">
+ Variable is of type [Vector4].
</constant>
<constant name="TYPE_VECTOR4I" value="13" enum="Variant.Type">
+ Variable is of type [Vector4i].
</constant>
<constant name="TYPE_PLANE" value="14" enum="Variant.Type">
Variable is of type [Plane].
@@ -2853,6 +2961,7 @@
Variable is of type [Transform3D].
</constant>
<constant name="TYPE_PROJECTION" value="19" enum="Variant.Type">
+ Variable is of type [Projection].
</constant>
<constant name="TYPE_COLOR" value="20" enum="Variant.Type">
Variable is of type [Color].
diff --git a/doc/classes/AABB.xml b/doc/classes/AABB.xml
index 86f0487ea9..ca454cafa3 100644
--- a/doc/classes/AABB.xml
+++ b/doc/classes/AABB.xml
@@ -139,27 +139,27 @@
<return type="AABB" />
<param index="0" name="by" type="float" />
<description>
- Returns a copy of the [AABB] grown a given amount of units towards all the sides.
+ Returns a copy of the [AABB] grown a given number of units towards all the sides.
</description>
</method>
- <method name="has_no_surface" qualifiers="const">
+ <method name="has_point" qualifiers="const">
<return type="bool" />
+ <param index="0" name="point" type="Vector3" />
<description>
- Returns [code]true[/code] if the [AABB] is empty.
+ Returns [code]true[/code] if the [AABB] contains a point. Points on the faces of the AABB are considered included, though float-point precision errors may impact the accuracy of such checks.
+ [b]Note:[/b] This method is not reliable for [AABB] with a [i]negative size[/i]. Use [method abs] to get a positive sized equivalent [AABB] to check for contained points.
</description>
</method>
- <method name="has_no_volume" qualifiers="const">
+ <method name="has_surface" qualifiers="const">
<return type="bool" />
<description>
- Returns [code]true[/code] if the [AABB] is flat or empty.
+ Returns [code]true[/code] if the [AABB] has a surface or a length, and [code]false[/code] if the [AABB] is empty (all components of [member size] are zero or negative).
</description>
</method>
- <method name="has_point" qualifiers="const">
+ <method name="has_volume" qualifiers="const">
<return type="bool" />
- <param index="0" name="point" type="Vector3" />
<description>
- Returns [code]true[/code] if the [AABB] contains a point. Points on the faces of the AABB are considered included, though float-point precision errors may impact the accuracy of such checks.
- [b]Note:[/b] This method is not reliable for [AABB] with a [i]negative size[/i]. Use [method abs] to get a positive sized equivalent [AABB] to check for contained points.
+ Returns [code]true[/code] if the [AABB] has a volume, and [code]false[/code] if the [AABB] is flat, empty, or has a negative [member size].
</description>
</method>
<method name="intersection" qualifiers="const">
@@ -188,6 +188,7 @@
<param index="0" name="from" type="Vector3" />
<param index="1" name="dir" type="Vector3" />
<description>
+ Returns [code]true[/code] if the given ray intersects with this [AABB]. Ray length is infinite.
</description>
</method>
<method name="intersects_segment" qualifiers="const">
@@ -195,21 +196,27 @@
<param index="0" name="from" type="Vector3" />
<param index="1" name="to" type="Vector3" />
<description>
- Returns [code]true[/code] if the [AABB] intersects the line segment between [code]from[/code] and [code]to[/code].
+ Returns [code]true[/code] if the [AABB] intersects the line segment between [param from] and [param to].
</description>
</method>
<method name="is_equal_approx" qualifiers="const">
<return type="bool" />
<param index="0" name="aabb" type="AABB" />
<description>
- Returns [code]true[/code] if this [AABB] and [code]aabb[/code] are approximately equal, by calling [method @GlobalScope.is_equal_approx] on each component.
+ Returns [code]true[/code] if this [AABB] and [param aabb] are approximately equal, by calling [method @GlobalScope.is_equal_approx] on each component.
+ </description>
+ </method>
+ <method name="is_finite" qualifiers="const">
+ <return type="bool" />
+ <description>
+ Returns [code]true[/code] if this [AABB] is finite, by calling [method @GlobalScope.is_finite] on each component.
</description>
</method>
<method name="merge" qualifiers="const">
<return type="AABB" />
<param index="0" name="with" type="AABB" />
<description>
- Returns a larger [AABB] that contains both this [AABB] and [code]with[/code].
+ Returns a larger [AABB] that contains both this [AABB] and [param with].
</description>
</method>
</methods>
diff --git a/doc/classes/AESContext.xml b/doc/classes/AESContext.xml
index fe67f7de54..7f582e4be7 100644
--- a/doc/classes/AESContext.xml
+++ b/doc/classes/AESContext.xml
@@ -45,6 +45,7 @@
public class Example : Node
{
public AESContext Aes = new AESContext();
+
public override void _Ready()
{
string key = "My secret key!!!"; // Key must be either 16 or 32 bytes.
@@ -98,15 +99,15 @@
<param index="1" name="key" type="PackedByteArray" />
<param index="2" name="iv" type="PackedByteArray" default="PackedByteArray()" />
<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].
+ Start the AES context in the given [param mode]. A [param key] of either 16 or 32 bytes must always be provided, while an [param iv] (initialization vector) of exactly 16 bytes, is only needed when [param mode] is either [constant MODE_CBC_ENCRYPT] or [constant MODE_CBC_DECRYPT].
</description>
</method>
<method name="update">
<return type="PackedByteArray" />
<param index="0" name="src" type="PackedByteArray" />
<description>
- Run the desired operation for this AES context. Will return a [PackedByteArray] containing the result of encrypting (or decrypting) the given [code]src[/code]. See [method start] for mode of operation.
- [b]Note:[/b] The size of [code]src[/code] must be a multiple of 16. Apply some padding if needed.
+ Run the desired operation for this AES context. Will return a [PackedByteArray] containing the result of encrypting (or decrypting) the given [param src]. See [method start] for mode of operation.
+ [b]Note:[/b] The size of [param src] must be a multiple of 16. Apply some padding if needed.
</description>
</method>
</methods>
diff --git a/doc/classes/AStar2D.xml b/doc/classes/AStar2D.xml
index eed0dd8688..2414b068e6 100644
--- a/doc/classes/AStar2D.xml
+++ b/doc/classes/AStar2D.xml
@@ -33,8 +33,8 @@
<param index="1" name="position" type="Vector2" />
<param index="2" name="weight_scale" type="float" default="1.0" />
<description>
- Adds a new point at the given position with the given identifier. The [code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must be 0.0 or greater.
- The [code]weight_scale[/code] is multiplied by the result of [method _compute_cost] when determining the overall cost of traveling across a segment from a neighboring point to this point. Thus, all else being equal, the algorithm prefers points with lower [code]weight_scale[/code]s to form a path.
+ Adds a new point at the given position with the given identifier. The [param id] must be 0 or larger, and the [param weight_scale] must be 0.0 or greater.
+ The [param weight_scale] is multiplied by the result of [method _compute_cost] when determining the overall cost of traveling across a segment from a neighboring point to this point. Thus, all else being equal, the algorithm prefers points with lower [param weight_scale]s to form a path.
[codeblocks]
[gdscript]
var astar = AStar2D.new()
@@ -45,7 +45,7 @@
astar.AddPoint(1, new Vector2(1, 0), 4); // Adds the point (1, 0) with weight_scale 4 and id 1
[/csharp]
[/codeblocks]
- If there already exists a point for the given [code]id[/code], its position and weight scale are updated to the given values.
+ If there already exists a point for the given [param id], its position and weight scale are updated to the given values.
</description>
</method>
<method name="are_points_connected" qualifiers="const">
@@ -54,7 +54,7 @@
<param index="1" name="to_id" type="int" />
<param index="2" name="bidirectional" type="bool" default="true" />
<description>
- Returns whether there is a connection/segment between the given points. If [code]bidirectional[/code] is [code]false[/code], returns whether movement from [code]id[/code] to [code]to_id[/code] is possible through this segment.
+ Returns whether there is a connection/segment between the given points. If [param bidirectional] is [code]false[/code], returns whether movement from [param id] to [param to_id] is possible through this segment.
</description>
</method>
<method name="clear">
@@ -69,7 +69,7 @@
<param index="1" name="to_id" type="int" />
<param index="2" name="bidirectional" type="bool" default="true" />
<description>
- Creates a segment between the given points. If [code]bidirectional[/code] is [code]false[/code], only movement from [code]id[/code] to [code]to_id[/code] is allowed, not the reverse direction.
+ Creates a segment between the given points. If [param bidirectional] is [code]false[/code], only movement from [param id] to [param to_id] is allowed, not the reverse direction.
[codeblocks]
[gdscript]
var astar = AStar2D.new()
@@ -92,7 +92,7 @@
<param index="1" name="to_id" type="int" />
<param index="2" name="bidirectional" type="bool" default="true" />
<description>
- Deletes the segment between the given points. If [code]bidirectional[/code] is [code]false[/code], only movement from [code]id[/code] to [code]to_id[/code] is prevented, and a unidirectional segment possibly remains.
+ Deletes the segment between the given points. If [param bidirectional] is [code]false[/code], only movement from [param id] to [param to_id] is prevented, and a unidirectional segment possibly remains.
</description>
</method>
<method name="get_available_point_id" qualifiers="const">
@@ -106,15 +106,15 @@
<param index="0" name="to_position" type="Vector2" />
<param index="1" name="include_disabled" type="bool" default="false" />
<description>
- Returns the ID of the closest point to [code]to_position[/code], optionally taking disabled points into account. Returns [code]-1[/code] if there are no points in the points pool.
- [b]Note:[/b] If several points are the closest to [code]to_position[/code], the one with the smallest ID will be returned, ensuring a deterministic result.
+ Returns the ID of the closest point to [param to_position], optionally taking disabled points into account. Returns [code]-1[/code] if there are no points in the points pool.
+ [b]Note:[/b] If several points are the closest to [param to_position], the one with the smallest ID will be returned, ensuring a deterministic result.
</description>
</method>
<method name="get_closest_position_in_segment" qualifiers="const">
<return type="Vector2" />
<param index="0" name="to_position" type="Vector2" />
<description>
- Returns the closest position to [code]to_position[/code] that resides inside a segment between two connected points.
+ Returns the closest position to [param to_position] that resides inside a segment between two connected points.
[codeblocks]
[gdscript]
var astar = AStar2D.new()
@@ -218,7 +218,7 @@
</description>
</method>
<method name="get_point_ids">
- <return type="Array" />
+ <return type="PackedInt64Array" />
<description>
Returns an array of all point IDs.
</description>
@@ -236,21 +236,21 @@
<return type="Vector2" />
<param index="0" name="id" type="int" />
<description>
- Returns the position of the point associated with the given [code]id[/code].
+ Returns the position of the point associated with the given [param id].
</description>
</method>
<method name="get_point_weight_scale" qualifiers="const">
<return type="float" />
<param index="0" name="id" type="int" />
<description>
- Returns the weight scale of the point associated with the given [code]id[/code].
+ Returns the weight scale of the point associated with the given [param id].
</description>
</method>
<method name="has_point" qualifiers="const">
<return type="bool" />
<param index="0" name="id" type="int" />
<description>
- Returns whether a point associated with the given [code]id[/code] exists.
+ Returns whether a point associated with the given [param id] exists.
</description>
</method>
<method name="is_point_disabled" qualifiers="const">
@@ -264,14 +264,14 @@
<return type="void" />
<param index="0" name="id" type="int" />
<description>
- Removes the point associated with the given [code]id[/code] from the points pool.
+ Removes the point associated with the given [param id] from the points pool.
</description>
</method>
<method name="reserve_space">
<return type="void" />
<param index="0" name="num_nodes" type="int" />
<description>
- Reserves space internally for [code]num_nodes[/code] points, useful if you're adding a known large number of points at once, for a grid for instance. New capacity must be greater or equals to old capacity.
+ Reserves space internally for [param num_nodes] points, useful if you're adding a known large number of points at once, such as points on a grid. New capacity must be greater or equals to old capacity.
</description>
</method>
<method name="set_point_disabled">
@@ -287,7 +287,7 @@
<param index="0" name="id" type="int" />
<param index="1" name="position" type="Vector2" />
<description>
- Sets the [code]position[/code] for the point with the given [code]id[/code].
+ Sets the [param position] for the point with the given [param id].
</description>
</method>
<method name="set_point_weight_scale">
@@ -295,7 +295,7 @@
<param index="0" name="id" type="int" />
<param index="1" name="weight_scale" type="float" />
<description>
- Sets the [code]weight_scale[/code] for the point with the given [code]id[/code]. The [code]weight_scale[/code] is multiplied by the result of [method _compute_cost] when determining the overall cost of traveling across a segment from a neighboring point to this point.
+ Sets the [param weight_scale] for the point with the given [param id]. The [param weight_scale] is multiplied by the result of [method _compute_cost] when determining the overall cost of traveling across a segment from a neighboring point to this point.
</description>
</method>
</methods>
diff --git a/doc/classes/AStar3D.xml b/doc/classes/AStar3D.xml
index dc8c62054b..4e8394195d 100644
--- a/doc/classes/AStar3D.xml
+++ b/doc/classes/AStar3D.xml
@@ -62,8 +62,8 @@
<param index="1" name="position" type="Vector3" />
<param index="2" name="weight_scale" type="float" default="1.0" />
<description>
- Adds a new point at the given position with the given identifier. The [code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must be 0.0 or greater.
- The [code]weight_scale[/code] is multiplied by the result of [method _compute_cost] when determining the overall cost of traveling across a segment from a neighboring point to this point. Thus, all else being equal, the algorithm prefers points with lower [code]weight_scale[/code]s to form a path.
+ Adds a new point at the given position with the given identifier. The [param id] must be 0 or larger, and the [param weight_scale] must be 0.0 or greater.
+ The [param weight_scale] is multiplied by the result of [method _compute_cost] when determining the overall cost of traveling across a segment from a neighboring point to this point. Thus, all else being equal, the algorithm prefers points with lower [param weight_scale]s to form a path.
[codeblocks]
[gdscript]
var astar = AStar3D.new()
@@ -74,7 +74,7 @@
astar.AddPoint(1, new Vector3(1, 0, 0), 4); // Adds the point (1, 0, 0) with weight_scale 4 and id 1
[/csharp]
[/codeblocks]
- If there already exists a point for the given [code]id[/code], its position and weight scale are updated to the given values.
+ If there already exists a point for the given [param id], its position and weight scale are updated to the given values.
</description>
</method>
<method name="are_points_connected" qualifiers="const">
@@ -83,7 +83,7 @@
<param index="1" name="to_id" type="int" />
<param index="2" name="bidirectional" type="bool" default="true" />
<description>
- Returns whether the two given points are directly connected by a segment. If [code]bidirectional[/code] is [code]false[/code], returns whether movement from [code]id[/code] to [code]to_id[/code] is possible through this segment.
+ Returns whether the two given points are directly connected by a segment. If [param bidirectional] is [code]false[/code], returns whether movement from [param id] to [param to_id] is possible through this segment.
</description>
</method>
<method name="clear">
@@ -98,7 +98,7 @@
<param index="1" name="to_id" type="int" />
<param index="2" name="bidirectional" type="bool" default="true" />
<description>
- Creates a segment between the given points. If [code]bidirectional[/code] is [code]false[/code], only movement from [code]id[/code] to [code]to_id[/code] is allowed, not the reverse direction.
+ Creates a segment between the given points. If [param bidirectional] is [code]false[/code], only movement from [param id] to [param to_id] is allowed, not the reverse direction.
[codeblocks]
[gdscript]
var astar = AStar3D.new()
@@ -121,7 +121,7 @@
<param index="1" name="to_id" type="int" />
<param index="2" name="bidirectional" type="bool" default="true" />
<description>
- Deletes the segment between the given points. If [code]bidirectional[/code] is [code]false[/code], only movement from [code]id[/code] to [code]to_id[/code] is prevented, and a unidirectional segment possibly remains.
+ Deletes the segment between the given points. If [param bidirectional] is [code]false[/code], only movement from [param id] to [param to_id] is prevented, and a unidirectional segment possibly remains.
</description>
</method>
<method name="get_available_point_id" qualifiers="const">
@@ -135,15 +135,15 @@
<param index="0" name="to_position" type="Vector3" />
<param index="1" name="include_disabled" type="bool" default="false" />
<description>
- Returns the ID of the closest point to [code]to_position[/code], optionally taking disabled points into account. Returns [code]-1[/code] if there are no points in the points pool.
- [b]Note:[/b] If several points are the closest to [code]to_position[/code], the one with the smallest ID will be returned, ensuring a deterministic result.
+ Returns the ID of the closest point to [param to_position], optionally taking disabled points into account. Returns [code]-1[/code] if there are no points in the points pool.
+ [b]Note:[/b] If several points are the closest to [param to_position], the one with the smallest ID will be returned, ensuring a deterministic result.
</description>
</method>
<method name="get_closest_position_in_segment" qualifiers="const">
<return type="Vector3" />
<param index="0" name="to_position" type="Vector3" />
<description>
- Returns the closest position to [code]to_position[/code] that resides inside a segment between two connected points.
+ Returns the closest position to [param to_position] that resides inside a segment between two connected points.
[codeblocks]
[gdscript]
var astar = AStar3D.new()
@@ -245,7 +245,7 @@
</description>
</method>
<method name="get_point_ids">
- <return type="Array" />
+ <return type="PackedInt64Array" />
<description>
Returns an array of all point IDs.
</description>
@@ -263,21 +263,21 @@
<return type="Vector3" />
<param index="0" name="id" type="int" />
<description>
- Returns the position of the point associated with the given [code]id[/code].
+ Returns the position of the point associated with the given [param id].
</description>
</method>
<method name="get_point_weight_scale" qualifiers="const">
<return type="float" />
<param index="0" name="id" type="int" />
<description>
- Returns the weight scale of the point associated with the given [code]id[/code].
+ Returns the weight scale of the point associated with the given [param id].
</description>
</method>
<method name="has_point" qualifiers="const">
<return type="bool" />
<param index="0" name="id" type="int" />
<description>
- Returns whether a point associated with the given [code]id[/code] exists.
+ Returns whether a point associated with the given [param id] exists.
</description>
</method>
<method name="is_point_disabled" qualifiers="const">
@@ -291,14 +291,14 @@
<return type="void" />
<param index="0" name="id" type="int" />
<description>
- Removes the point associated with the given [code]id[/code] from the points pool.
+ Removes the point associated with the given [param id] from the points pool.
</description>
</method>
<method name="reserve_space">
<return type="void" />
<param index="0" name="num_nodes" type="int" />
<description>
- Reserves space internally for [code]num_nodes[/code] points, useful if you're adding a known large number of points at once, for a grid for instance. New capacity must be greater or equals to old capacity.
+ Reserves space internally for [param num_nodes] points. Useful if you're adding a known large number of points at once, such as points on a grid. New capacity must be greater or equals to old capacity.
</description>
</method>
<method name="set_point_disabled">
@@ -314,7 +314,7 @@
<param index="0" name="id" type="int" />
<param index="1" name="position" type="Vector3" />
<description>
- Sets the [code]position[/code] for the point with the given [code]id[/code].
+ Sets the [param position] for the point with the given [param id].
</description>
</method>
<method name="set_point_weight_scale">
@@ -322,7 +322,7 @@
<param index="0" name="id" type="int" />
<param index="1" name="weight_scale" type="float" />
<description>
- Sets the [code]weight_scale[/code] for the point with the given [code]id[/code]. The [code]weight_scale[/code] is multiplied by the result of [method _compute_cost] when determining the overall cost of traveling across a segment from a neighboring point to this point.
+ Sets the [param weight_scale] for the point with the given [param id]. The [param weight_scale] is multiplied by the result of [method _compute_cost] when determining the overall cost of traveling across a segment from a neighboring point to this point.
</description>
</method>
</methods>
diff --git a/doc/classes/AStarGrid2D.xml b/doc/classes/AStarGrid2D.xml
new file mode 100644
index 0000000000..8dde3748d7
--- /dev/null
+++ b/doc/classes/AStarGrid2D.xml
@@ -0,0 +1,188 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="AStarGrid2D" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ A* (or "A-Star") pathfinding tailored to find the shortest paths on 2D grids.
+ </brief_description>
+ <description>
+ Compared to [AStar2D] you don't need to manually create points or connect them together. It also supports multiple type of heuristics and modes for diagonal movement. This class also provides a jumping mode which is faster to calculate than without it in the [AStar2D] class.
+ In contrast to [AStar2D], you only need set the [member size] of the grid, optionally set the [member cell_size] and then call the [method update] method:
+ [codeblocks]
+ [gdscript]
+ var astar_grid = AStarGrid2D.new()
+ astar_grid.size = Vector2i(32, 32)
+ astar_grid.cell_size = Vector2(16, 16)
+ astar_grid.update()
+ print(astar_grid.get_id_path(Vector2i(0, 0), Vector2i(3, 4))) # prints (0, 0), (1, 1), (2, 2), (3, 3), (3, 4)
+ print(astar_grid.get_point_path(Vector2i(0, 0), Vector2i(3, 4))) # prints (0, 0), (16, 16), (32, 32), (48, 48), (48, 64)
+ [/gdscript]
+ [csharp]
+ AStarGrid2D astarGrid = new AStarGrid2D();
+ astarGrid.Size = new Vector2i(32, 32);
+ astarGrid.CellSize = new Vector2i(16, 16);
+ astarGrid.Update();
+ GD.Print(astarGrid.GetIdPath(Vector2i.Zero, new Vector2i(3, 4))); // prints (0, 0), (1, 1), (2, 2), (3, 3), (3, 4)
+ GD.Print(astarGrid.GetPointPath(Vector2i.Zero, new Vector2i(3, 4))); // prints (0, 0), (16, 16), (32, 32), (48, 48), (48, 64)
+ [/csharp]
+ [/codeblocks]
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="_compute_cost" qualifiers="virtual const">
+ <return type="float" />
+ <param index="0" name="from_id" type="Vector2i" />
+ <param index="1" name="to_id" type="Vector2i" />
+ <description>
+ Called when computing the cost between two connected points.
+ Note that this function is hidden in the default [code]AStarGrid2D[/code] class.
+ </description>
+ </method>
+ <method name="_estimate_cost" qualifiers="virtual const">
+ <return type="float" />
+ <param index="0" name="from_id" type="Vector2i" />
+ <param index="1" name="to_id" type="Vector2i" />
+ <description>
+ Called when estimating the cost between a point and the path's ending point.
+ Note that this function is hidden in the default [code]AStarGrid2D[/code] class.
+ </description>
+ </method>
+ <method name="clear">
+ <return type="void" />
+ <description>
+ Clears the grid and sets the [member size] to [constant Vector2i.ZERO].
+ </description>
+ </method>
+ <method name="get_id_path">
+ <return type="Vector2i[]" />
+ <param index="0" name="from_id" type="Vector2i" />
+ <param index="1" name="to_id" type="Vector2i" />
+ <description>
+ Returns an array with the IDs of the points that form the path found by AStar2D between the given points. The array is ordered from the starting point to the ending point of the path.
+ </description>
+ </method>
+ <method name="get_point_path">
+ <return type="PackedVector2Array" />
+ <param index="0" name="from_id" type="Vector2i" />
+ <param index="1" name="to_id" type="Vector2i" />
+ <description>
+ Returns an array with the points that are in the path found by AStarGrid2D between the given points. The array is ordered from the starting point to the ending point of the path.
+ [b]Note:[/b] This method is not thread-safe. If called from a [Thread], it will return an empty [PackedVector3Array] and will print an error message.
+ </description>
+ </method>
+ <method name="is_dirty" qualifiers="const">
+ <return type="bool" />
+ <description>
+ Indicates that the grid parameters were changed and [method update] needs to be called.
+ </description>
+ </method>
+ <method name="is_in_bounds" qualifiers="const">
+ <return type="bool" />
+ <param index="0" name="x" type="int" />
+ <param index="1" name="y" type="int" />
+ <description>
+ Returns [code]true[/code] if the [param x] and [param y] is a valid grid coordinate (id).
+ </description>
+ </method>
+ <method name="is_in_boundsv" qualifiers="const">
+ <return type="bool" />
+ <param index="0" name="id" type="Vector2i" />
+ <description>
+ Returns [code]true[/code] if the [param id] vector is a valid grid coordinate.
+ </description>
+ </method>
+ <method name="is_point_solid" qualifiers="const">
+ <return type="bool" />
+ <param index="0" name="id" type="Vector2i" />
+ <description>
+ Returns [code]true[/code] if a point is disabled for pathfinding. By default, all points are enabled.
+ </description>
+ </method>
+ <method name="set_point_solid">
+ <return type="void" />
+ <param index="0" name="id" type="Vector2i" />
+ <param index="1" name="solid" type="bool" default="true" />
+ <description>
+ Disables or enables the specified point for pathfinding. Useful for making an obstacle. By default, all points are enabled.
+ </description>
+ </method>
+ <method name="update">
+ <return type="void" />
+ <description>
+ Updates the internal state of the grid according to the parameters to prepare it to search the path. Needs to be called if parameters like [member size], [member cell_size] or [member offset] are changed. [method is_dirty] will return [code]true[/code] if this is the case and this needs to be called.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="cell_size" type="Vector2" setter="set_cell_size" getter="get_cell_size" default="Vector2(1, 1)">
+ The size of the point cell which will be applied to calculate the resulting point position returned by [method get_point_path]. If changed, [method update] needs to be called before finding the next path.
+ </member>
+ <member name="default_heuristic" type="int" setter="set_default_heuristic" getter="get_default_heuristic" enum="AStarGrid2D.Heuristic" default="0">
+ The default [enum Heuristic] which will be used to calculate the path if [method _compute_cost] and/or [method _estimate_cost] were not overridden.
+ </member>
+ <member name="diagonal_mode" type="int" setter="set_diagonal_mode" getter="get_diagonal_mode" enum="AStarGrid2D.DiagonalMode" default="0">
+ A specific [enum DiagonalMode] mode which will force the path to avoid or accept the specified diagonals.
+ </member>
+ <member name="jumping_enabled" type="bool" setter="set_jumping_enabled" getter="is_jumping_enabled" default="false">
+ Enables or disables jumping to skip up the intermediate points and speeds up the searching algorithm.
+ </member>
+ <member name="offset" type="Vector2" setter="set_offset" getter="get_offset" default="Vector2(0, 0)">
+ The offset of the grid which will be applied to calculate the resulting point position returned by [method get_point_path]. If changed, [method update] needs to be called before finding the next path.
+ </member>
+ <member name="size" type="Vector2i" setter="set_size" getter="get_size" default="Vector2i(0, 0)">
+ The size of the grid (number of cells of size [member cell_size] on each axis). If changed, [method update] needs to be called before finding the next path.
+ </member>
+ </members>
+ <constants>
+ <constant name="HEURISTIC_EUCLIDEAN" value="0" enum="Heuristic">
+ The Euclidean heuristic to be used for the pathfinding using the following formula:
+ [codeblock]
+ dx = abs(to_id.x - from_id.x)
+ dy = abs(to_id.y - from_id.y)
+ result = sqrt(dx * dx + dy * dy)
+ [/codeblock]
+ </constant>
+ <constant name="HEURISTIC_MANHATTAN" value="1" enum="Heuristic">
+ The Manhattan heuristic to be used for the pathfinding using the following formula:
+ [codeblock]
+ dx = abs(to_id.x - from_id.x)
+ dy = abs(to_id.y - from_id.y)
+ result = dx + dy
+ [/codeblock]
+ </constant>
+ <constant name="HEURISTIC_OCTILE" value="2" enum="Heuristic">
+ The Octile heuristic to be used for the pathfinding using the following formula:
+ [codeblock]
+ dx = abs(to_id.x - from_id.x)
+ dy = abs(to_id.y - from_id.y)
+ f = sqrt(2) - 1
+ result = (dx &lt; dy) ? f * dx + dy : f * dy + dx;
+ [/codeblock]
+ </constant>
+ <constant name="HEURISTIC_CHEBYSHEV" value="3" enum="Heuristic">
+ The Chebyshev heuristic to be used for the pathfinding using the following formula:
+ [codeblock]
+ dx = abs(to_id.x - from_id.x)
+ dy = abs(to_id.y - from_id.y)
+ result = max(dx, dy)
+ [/codeblock]
+ </constant>
+ <constant name="HEURISTIC_MAX" value="4" enum="Heuristic">
+ Represents the size of the [enum Heuristic] enum.
+ </constant>
+ <constant name="DIAGONAL_MODE_ALWAYS" value="0" enum="DiagonalMode">
+ The pathfinding algorithm will ignore solid neighbors around the target cell and allow passing using diagonals.
+ </constant>
+ <constant name="DIAGONAL_MODE_NEVER" value="1" enum="DiagonalMode">
+ The pathfinding algorithm will ignore all diagonals and the way will be always orthogonal.
+ </constant>
+ <constant name="DIAGONAL_MODE_AT_LEAST_ONE_WALKABLE" value="2" enum="DiagonalMode">
+ The pathfinding algorithm will avoid using diagonals if at least two obstacles have been placed around the neighboring cells of the specific path segment.
+ </constant>
+ <constant name="DIAGONAL_MODE_ONLY_IF_NO_OBSTACLES" value="3" enum="DiagonalMode">
+ The pathfinding algorithm will avoid using diagonals if any obstacle has been placed around the neighboring cells of the specific path segment.
+ </constant>
+ <constant name="DIAGONAL_MODE_MAX" value="4" enum="DiagonalMode">
+ Represents the size of the [enum DiagonalMode] enum.
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/AcceptDialog.xml b/doc/classes/AcceptDialog.xml
index 3dde8664de..4da9e41ca8 100644
--- a/doc/classes/AcceptDialog.xml
+++ b/doc/classes/AcceptDialog.xml
@@ -15,8 +15,8 @@
<param index="1" name="right" type="bool" default="false" />
<param index="2" name="action" type="String" default="&quot;&quot;" />
<description>
- Adds a button with label [code]text[/code] and a custom [code]action[/code] to the dialog and returns the created button. [code]action[/code] will be passed to the [signal custom_action] signal when pressed.
- If [code]true[/code], [code]right[/code] will place the button to the right of any sibling buttons.
+ Adds a button with label [param text] and a custom [param action] to the dialog and returns the created button. [param action] will be passed to the [signal custom_action] signal when pressed.
+ If [code]true[/code], [param right] will place the button to the right of any sibling buttons.
You can use [method remove_button] method to remove a button created with this method from the dialog.
</description>
</method>
@@ -24,7 +24,7 @@
<return type="Button" />
<param index="0" name="name" type="String" />
<description>
- Adds a button with label [code]name[/code] and a cancel action to the dialog and returns the created button.
+ Adds a button with label [param name] and a cancel action to the dialog and returns the created button.
You can use [method remove_button] method to remove a button created with this method from the dialog.
</description>
</method>
@@ -53,7 +53,7 @@
<return type="void" />
<param index="0" name="button" type="Control" />
<description>
- Removes the [code]button[/code] from the dialog. Does NOT free the [code]button[/code]. The [code]button[/code] must be a [Button] added with [method add_button] or [method add_cancel_button] method. After removal, pressing the [code]button[/code] will no longer emit this dialog's [signal custom_action] or [signal cancelled] signals.
+ Removes the [param button] from the dialog. Does NOT free the [param button]. The [param button] must be a [Button] added with [method add_button] or [method add_cancel_button] method. After removal, pressing the [param button] will no longer emit this dialog's [signal custom_action] or [signal cancelled] signals.
</description>
</method>
</methods>
@@ -62,7 +62,7 @@
Sets autowrapping for the text in the dialog.
</member>
<member name="dialog_close_on_escape" type="bool" setter="set_close_on_escape" getter="get_close_on_escape" default="true">
- If [code]true[/code], the dialog will be hidden when the escape key ([constant @GlobalScope.KEY_ESCAPE]) is pressed.
+ If [code]true[/code], the dialog will be hidden when the escape key ([constant KEY_ESCAPE]) is pressed.
</member>
<member name="dialog_hide_on_ok" type="bool" setter="set_hide_on_ok" getter="get_hide_on_ok" default="true">
If [code]true[/code], the dialog is hidden when the OK button is pressed. You can set it to [code]false[/code] if you want to do e.g. input validation when receiving the [signal confirmed] signal, and handle hiding the dialog in your own logic.
@@ -99,8 +99,11 @@
</signal>
</signals>
<theme_items>
+ <theme_item name="buttons_separation" data_type="constant" type="int" default="10">
+ The size of the vertical space between the dialog's content and the button row.
+ </theme_item>
<theme_item name="panel" data_type="style" type="StyleBox">
- Panel that fills up the background of the window.
+ The panel that fills the background of the window.
</theme_item>
</theme_items>
</class>
diff --git a/doc/classes/AnimatedSprite2D.xml b/doc/classes/AnimatedSprite2D.xml
index 39527664ed..afbe34816a 100644
--- a/doc/classes/AnimatedSprite2D.xml
+++ b/doc/classes/AnimatedSprite2D.xml
@@ -5,6 +5,8 @@
</brief_description>
<description>
[AnimatedSprite2D] is similar to the [Sprite2D] node, except it carries multiple textures as animation frames. Animations are created using a [SpriteFrames] resource, which allows you to import image files (or a folder containing said files) to provide the animation frames for the sprite. The [SpriteFrames] resource can be configured in the editor via the SpriteFrames bottom panel.
+ After setting up [member frames], [method play] may be called. It's also possible to select an [member animation] and toggle [member playing], even within the editor.
+ To pause the current animation, call [method stop] or set [member playing] to [code]false[/code]. Alternatively, setting [member speed_scale] to [code]0[/code] also preserves the current frame's elapsed time.
[b]Note:[/b] You can associate a set of normal or specular maps by creating additional [SpriteFrames] resources with a [code]_normal[/code] or [code]_specular[/code] suffix. For example, having 3 [SpriteFrames] resources [code]run[/code], [code]run_normal[/code], and [code]run_specular[/code] will make it so the [code]run[/code] animation uses normal and specular maps.
</description>
<tutorials>
@@ -17,13 +19,14 @@
<param index="0" name="anim" type="StringName" default="&amp;&quot;&quot;" />
<param index="1" name="backwards" type="bool" default="false" />
<description>
- Plays the animation named [code]anim[/code]. If no [code]anim[/code] is provided, the current animation is played. If [code]backwards[/code] is [code]true[/code], the animation will be played in reverse.
+ Plays the animation named [param anim]. If no [param anim] is provided, the current animation is played. If [param backwards] is [code]true[/code], the animation is played in reverse.
</description>
</method>
<method name="stop">
<return type="void" />
<description>
- Stops the current animation (does not reset the frame counter).
+ Stops the current [member animation] at the current [member frame].
+ [b]Note:[/b] This method resets the current frame's elapsed time. If this behavior is undesired, consider setting [member speed_scale] to [code]0[/code], instead.
</description>
</method>
</methods>
@@ -50,10 +53,10 @@
The texture's drawing offset.
</member>
<member name="playing" type="bool" setter="set_playing" getter="is_playing" default="false">
- If [code]true[/code], the [member animation] is currently playing.
+ If [code]true[/code], the [member animation] is currently playing. Setting this property to [code]false[/code] is the equivalent of calling [method stop].
</member>
<member name="speed_scale" type="float" setter="set_speed_scale" getter="get_speed_scale" default="1.0">
- The animation speed is multiplied by this value.
+ The animation speed is multiplied by this value. If set to a negative value, the animation is played in reverse. If set to [code]0[/code], the animation is paused, preserving the current frame's elapsed time.
</member>
</members>
<signals>
diff --git a/doc/classes/AnimatedSprite3D.xml b/doc/classes/AnimatedSprite3D.xml
index aa56e50886..09baf882fb 100644
--- a/doc/classes/AnimatedSprite3D.xml
+++ b/doc/classes/AnimatedSprite3D.xml
@@ -4,29 +4,27 @@
2D sprite node in 3D world, that can use multiple 2D textures for animation.
</brief_description>
<description>
- Animations are created using a [SpriteFrames] resource, which can be configured in the editor via the SpriteFrames panel.
+ [AnimatedSprite3D] is similar to the [Sprite3D] node, except it carries multiple textures as animation [member frames]. Animations are created using a [SpriteFrames] resource, which allows you to import image files (or a folder containing said files) to provide the animation frames for the sprite. The [SpriteFrames] resource can be configured in the editor via the SpriteFrames bottom panel.
+ After setting up [member frames], [method play] may be called. It's also possible to select an [member animation] and toggle [member playing], even within the editor.
+ To pause the current animation, call [method stop] or set [member playing] to [code]false[/code]. Alternatively, setting [member speed_scale] to [code]0[/code] also preserves the current frame's elapsed time.
</description>
<tutorials>
<link title="2D Sprite animation (also applies to 3D)">$DOCS_URL/tutorials/2d/2d_sprite_animation.html</link>
</tutorials>
<methods>
- <method name="is_playing" qualifiers="const">
- <return type="bool" />
- <description>
- Returns [code]true[/code] if an animation is currently being played.
- </description>
- </method>
<method name="play">
<return type="void" />
<param index="0" name="anim" type="StringName" default="&amp;&quot;&quot;" />
+ <param index="1" name="backwards" type="bool" default="false" />
<description>
- Plays the animation named [code]anim[/code]. If no [code]anim[/code] is provided, the current animation is played.
+ Plays the animation named [param anim]. If no [param anim] is provided, the current animation is played. If [param backwards] is [code]true[/code], the animation is played in reverse.
</description>
</method>
<method name="stop">
<return type="void" />
<description>
- Stops the current animation (does not reset the frame counter).
+ Stops the current [member animation] at the current [member frame].
+ [b]Note:[/b] This method resets the current frame's elapsed time. If this behavior is undesired, consider setting [member speed_scale] to [code]0[/code], instead.
</description>
</method>
</methods>
@@ -40,8 +38,11 @@
<member name="frames" type="SpriteFrames" setter="set_sprite_frames" getter="get_sprite_frames">
The [SpriteFrames] resource containing the animation(s).
</member>
- <member name="playing" type="bool" setter="_set_playing" getter="_is_playing" default="false">
- If [code]true[/code], the [member animation] is currently playing.
+ <member name="playing" type="bool" setter="set_playing" getter="is_playing" default="false">
+ If [code]true[/code], the [member animation] is currently playing. Setting this property to [code]false[/code] is the equivalent of calling [method stop].
+ </member>
+ <member name="speed_scale" type="float" setter="set_speed_scale" getter="get_speed_scale" default="1.0">
+ The animation speed is multiplied by this value. If set to a negative value, the animation is played in reverse. If set to [code]0[/code], the animation is paused, preserving the current frame's elapsed time.
</member>
</members>
<signals>
diff --git a/doc/classes/AnimatedTexture.xml b/doc/classes/AnimatedTexture.xml
index 5ad4c4e10a..57a7f86901 100644
--- a/doc/classes/AnimatedTexture.xml
+++ b/doc/classes/AnimatedTexture.xml
@@ -5,18 +5,18 @@
</brief_description>
<description>
[AnimatedTexture] is a resource format for frame-based animations, where multiple textures can be chained automatically with a predefined delay for each frame. Unlike [AnimationPlayer] or [AnimatedSprite2D], it isn't a [Node], but has the advantage of being usable anywhere a [Texture2D] resource can be used, e.g. in a [TileSet].
- The playback of the animation is controlled by the [member fps] property as well as each frame's optional delay (see [method set_frame_delay]). The animation loops, i.e. it will restart at frame 0 automatically after playing the last frame.
+ The playback of the animation is controlled by the [member speed_scale] property, as well as each frame's duration (see [method set_frame_duration]). The animation loops, i.e. it will restart at frame 0 automatically after playing the last frame.
[AnimatedTexture] currently requires all frame textures to have the same size, otherwise the bigger ones will be cropped to match the smallest one.
[b]Note:[/b] AnimatedTexture doesn't support using [AtlasTexture]s. Each frame needs to be a separate [Texture2D].
</description>
<tutorials>
</tutorials>
<methods>
- <method name="get_frame_delay" qualifiers="const">
+ <method name="get_frame_duration" qualifiers="const">
<return type="float" />
<param index="0" name="frame" type="int" />
<description>
- Returns the given frame's delay value.
+ Returns the given [param frame]'s duration, in seconds.
</description>
</method>
<method name="get_frame_texture" qualifiers="const">
@@ -26,19 +26,12 @@
Returns the given frame's [Texture2D].
</description>
</method>
- <method name="set_frame_delay">
+ <method name="set_frame_duration">
<return type="void" />
<param index="0" name="frame" type="int" />
- <param index="1" name="delay" type="float" />
+ <param index="1" name="duration" type="float" />
<description>
- Sets an additional delay (in seconds) between this frame and the next one, that will be added to the time interval defined by [member fps]. By default, frames have no delay defined. If a delay value is defined, the final time interval between this frame and the next will be [code]1.0 / fps + delay[/code].
- For example, for an animation with 3 frames, 2 FPS and a frame delay on the second frame of 1.2, the resulting playback will be:
- [codeblock]
- Frame 0: 0.5 s (1 / fps)
- Frame 1: 1.7 s (1 / fps + 1.2)
- Frame 2: 0.5 s (1 / fps)
- Total duration: 2.7 s
- [/codeblock]
+ Sets the duration of any given [param frame]. The final duration is affected by the [member speed_scale]. If set to [code]0[/code], the frame is skipped during playback.
</description>
</method>
<method name="set_frame_texture">
@@ -55,19 +48,19 @@
<member name="current_frame" type="int" setter="set_current_frame" getter="get_current_frame">
Sets the currently visible frame of the texture.
</member>
- <member name="fps" type="float" setter="set_fps" getter="get_fps" default="4.0">
- Animation speed in frames per second. This value defines the default time interval between two frames of the animation, and thus the overall duration of the animation loop based on the [member frames] property. A value of 0 means no predefined number of frames per second, the animation will play according to each frame's frame delay (see [method set_frame_delay]).
- For example, an animation with 8 frames, no frame delay and a [code]fps[/code] value of 2 will run for 4 seconds, with each frame lasting 0.5 seconds.
- </member>
<member name="frames" type="int" setter="set_frames" getter="get_frames" default="1">
Number of frames to use in the animation. While you can create the frames independently with [method set_frame_texture], you need to set this value for the animation to take new frames into account. The maximum number of frames is [constant MAX_FRAMES].
</member>
- <member name="oneshot" type="bool" setter="set_oneshot" getter="get_oneshot" default="false">
+ <member name="one_shot" type="bool" setter="set_one_shot" getter="get_one_shot" default="false">
If [code]true[/code], the animation will only play once and will not loop back to the first frame after reaching the end. Note that reaching the end will not set [member pause] to [code]true[/code].
</member>
<member name="pause" type="bool" setter="set_pause" getter="get_pause" default="false">
If [code]true[/code], the animation will pause where it currently is (i.e. at [member current_frame]). The animation will continue from where it was paused when changing this property to [code]false[/code].
</member>
+ <member name="resource_local_to_scene" type="bool" setter="set_local_to_scene" getter="is_local_to_scene" overrides="Resource" default="false" />
+ <member name="speed_scale" type="float" setter="set_speed_scale" getter="get_speed_scale" default="1.0">
+ The animation speed is multiplied by this value. If set to a negative value, the animation is played in reverse.
+ </member>
</members>
<constants>
<constant name="MAX_FRAMES" value="256">
diff --git a/doc/classes/Animation.xml b/doc/classes/Animation.xml
index 5186cb2ea1..af8d9c416f 100644
--- a/doc/classes/Animation.xml
+++ b/doc/classes/Animation.xml
@@ -26,6 +26,7 @@
[/csharp]
[/codeblocks]
Animations are just data containers, and must be added to nodes such as an [AnimationPlayer] to be played back. Animation tracks have different types, each with its own set of dedicated methods. Check [enum TrackType] to see available types.
+ [b]Note:[/b] For 3D position/rotation/scale, using the dedicated [constant TYPE_POSITION_3D], [constant TYPE_ROTATION_3D] and [constant TYPE_SCALE_3D] track types instead of [constant TYPE_VALUE] is recommended for performance reasons.
</description>
<tutorials>
<link title="Animation documentation index">$DOCS_URL/tutorials/animation/index.html</link>
@@ -44,7 +45,7 @@
<param index="0" name="track_idx" type="int" />
<param index="1" name="key_idx" type="int" />
<description>
- Returns the animation name at the key identified by [code]key_idx[/code]. The [code]track_idx[/code] must be the index of an Animation Track.
+ Returns the animation name at the key identified by [param key_idx]. The [param track_idx] must be the index of an Animation Track.
</description>
</method>
<method name="animation_track_insert_key">
@@ -53,7 +54,7 @@
<param index="1" name="time" type="float" />
<param index="2" name="animation" type="StringName" />
<description>
- Inserts a key with value [code]animation[/code] at the given [code]time[/code] (in seconds). The [code]track_idx[/code] must be the index of an Animation Track.
+ Inserts a key with value [param animation] at the given [param time] (in seconds). The [param track_idx] must be the index of an Animation Track.
</description>
</method>
<method name="animation_track_set_key_animation">
@@ -62,7 +63,7 @@
<param index="1" name="key_idx" type="int" />
<param index="2" name="animation" type="StringName" />
<description>
- Sets the key identified by [code]key_idx[/code] to value [code]animation[/code]. The [code]track_idx[/code] must be the index of an Animation Track.
+ Sets the key identified by [param key_idx] to value [param animation]. The [param track_idx] must be the index of an Animation Track.
</description>
</method>
<method name="audio_track_get_key_end_offset" qualifiers="const">
@@ -70,7 +71,7 @@
<param index="0" name="track_idx" type="int" />
<param index="1" name="key_idx" type="int" />
<description>
- Returns the end offset of the key identified by [code]key_idx[/code]. The [code]track_idx[/code] must be the index of an Audio Track.
+ Returns the end offset of the key identified by [param key_idx]. The [param track_idx] must be the index of an Audio Track.
End offset is the number of seconds cut off at the ending of the audio stream.
</description>
</method>
@@ -79,7 +80,7 @@
<param index="0" name="track_idx" type="int" />
<param index="1" name="key_idx" type="int" />
<description>
- Returns the start offset of the key identified by [code]key_idx[/code]. The [code]track_idx[/code] must be the index of an Audio Track.
+ Returns the start offset of the key identified by [param key_idx]. The [param track_idx] must be the index of an Audio Track.
Start offset is the number of seconds cut off at the beginning of the audio stream.
</description>
</method>
@@ -88,7 +89,7 @@
<param index="0" name="track_idx" type="int" />
<param index="1" name="key_idx" type="int" />
<description>
- Returns the audio stream of the key identified by [code]key_idx[/code]. The [code]track_idx[/code] must be the index of an Audio Track.
+ Returns the audio stream of the key identified by [param key_idx]. The [param track_idx] must be the index of an Audio Track.
</description>
</method>
<method name="audio_track_insert_key">
@@ -99,8 +100,8 @@
<param index="3" name="start_offset" type="float" default="0" />
<param index="4" name="end_offset" type="float" default="0" />
<description>
- Inserts an Audio Track key at the given [code]time[/code] in seconds. The [code]track_idx[/code] must be the index of an Audio Track.
- [code]stream[/code] is the [AudioStream] resource to play. [code]start_offset[/code] is the number of seconds cut off at the beginning of the audio stream, while [code]end_offset[/code] is at the ending.
+ Inserts an Audio Track key at the given [param time] in seconds. The [param track_idx] must be the index of an Audio Track.
+ [param stream] is the [AudioStream] resource to play. [param start_offset] is the number of seconds cut off at the beginning of the audio stream, while [param end_offset] is at the ending.
</description>
</method>
<method name="audio_track_set_key_end_offset">
@@ -109,7 +110,7 @@
<param index="1" name="key_idx" type="int" />
<param index="2" name="offset" type="float" />
<description>
- Sets the end offset of the key identified by [code]key_idx[/code] to value [code]offset[/code]. The [code]track_idx[/code] must be the index of an Audio Track.
+ Sets the end offset of the key identified by [param key_idx] to value [param offset]. The [param track_idx] must be the index of an Audio Track.
</description>
</method>
<method name="audio_track_set_key_start_offset">
@@ -118,7 +119,7 @@
<param index="1" name="key_idx" type="int" />
<param index="2" name="offset" type="float" />
<description>
- Sets the start offset of the key identified by [code]key_idx[/code] to value [code]offset[/code]. The [code]track_idx[/code] must be the index of an Audio Track.
+ Sets the start offset of the key identified by [param key_idx] to value [param offset]. The [param track_idx] must be the index of an Audio Track.
</description>
</method>
<method name="audio_track_set_key_stream">
@@ -127,15 +128,7 @@
<param index="1" name="key_idx" type="int" />
<param index="2" name="stream" type="Resource" />
<description>
- Sets the stream of the key identified by [code]key_idx[/code] to value [code]stream[/code]. The [code]track_idx[/code] must be the index of an Audio Track.
- </description>
- </method>
- <method name="bezier_track_get_key_handle_mode" qualifiers="const">
- <return type="int" />
- <param index="0" name="track_idx" type="int" />
- <param index="1" name="key_idx" type="int" />
- <description>
- Returns the handle mode of the key identified by [code]index[/code]. See [enum HandleMode] for possible values. The [code]track_idx[/code] must be the index of a Bezier Track.
+ Sets the stream of the key identified by [param key_idx] to value [param stream]. The [param track_idx] must be the index of an Audio Track.
</description>
</method>
<method name="bezier_track_get_key_in_handle" qualifiers="const">
@@ -143,7 +136,7 @@
<param index="0" name="track_idx" type="int" />
<param index="1" name="key_idx" type="int" />
<description>
- Returns the in handle of the key identified by [code]key_idx[/code]. The [code]track_idx[/code] must be the index of a Bezier Track.
+ Returns the in handle of the key identified by [param key_idx]. The [param track_idx] must be the index of a Bezier Track.
</description>
</method>
<method name="bezier_track_get_key_out_handle" qualifiers="const">
@@ -151,7 +144,7 @@
<param index="0" name="track_idx" type="int" />
<param index="1" name="key_idx" type="int" />
<description>
- Returns the out handle of the key identified by [code]key_idx[/code]. The [code]track_idx[/code] must be the index of a Bezier Track.
+ Returns the out handle of the key identified by [param key_idx]. The [param track_idx] must be the index of a Bezier Track.
</description>
</method>
<method name="bezier_track_get_key_value" qualifiers="const">
@@ -159,7 +152,7 @@
<param index="0" name="track_idx" type="int" />
<param index="1" name="key_idx" type="int" />
<description>
- Returns the value of the key identified by [code]key_idx[/code]. The [code]track_idx[/code] must be the index of a Bezier Track.
+ Returns the value of the key identified by [param key_idx]. The [param track_idx] must be the index of a Bezier Track.
</description>
</method>
<method name="bezier_track_insert_key">
@@ -169,10 +162,9 @@
<param index="2" name="value" type="float" />
<param index="3" name="in_handle" type="Vector2" default="Vector2(0, 0)" />
<param index="4" name="out_handle" type="Vector2" default="Vector2(0, 0)" />
- <param index="5" name="handle_mode" type="int" enum="Animation.HandleMode" default="1" />
<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.
- [code]in_handle[/code] is the left-side weight of the added Bezier curve point, [code]out_handle[/code] is the right-side one, while [code]value[/code] is the actual value at this point.
+ Inserts a Bezier Track key at the given [param time] in seconds. The [param track_idx] must be the index of a Bezier Track.
+ [param in_handle] is the left-side weight of the added Bezier curve point, [param out_handle] is the right-side one, while [param value] is the actual value at this point.
</description>
</method>
<method name="bezier_track_interpolate" qualifiers="const">
@@ -180,17 +172,7 @@
<param index="0" name="track_idx" type="int" />
<param index="1" name="time" type="float" />
<description>
- Returns the interpolated value at the given [code]time[/code] (in seconds). The [code]track_idx[/code] must be the index of a Bezier Track.
- </description>
- </method>
- <method name="bezier_track_set_key_handle_mode">
- <return type="void" />
- <param index="0" name="track_idx" type="int" />
- <param index="1" name="key_idx" type="int" />
- <param index="2" name="key_handle_mode" type="int" enum="Animation.HandleMode" />
- <param index="3" name="balanced_value_time_ratio" type="float" default="1.0" />
- <description>
- Changes the handle mode of the keyframe at the given [code]index[/code]. See [enum HandleMode] for possible values. The [code]track_idx[/code] must be the index of a Bezier Track.
+ Returns the interpolated value at the given [param time] (in seconds). The [param track_idx] must be the index of a Bezier Track.
</description>
</method>
<method name="bezier_track_set_key_in_handle">
@@ -200,7 +182,7 @@
<param index="2" name="in_handle" type="Vector2" />
<param index="3" name="balanced_value_time_ratio" type="float" default="1.0" />
<description>
- Sets the in handle of the key identified by [code]key_idx[/code] to value [code]in_handle[/code]. The [code]track_idx[/code] must be the index of a Bezier Track.
+ Sets the in handle of the key identified by [param key_idx] to value [param in_handle]. The [param track_idx] must be the index of a Bezier Track.
</description>
</method>
<method name="bezier_track_set_key_out_handle">
@@ -210,7 +192,7 @@
<param index="2" name="out_handle" type="Vector2" />
<param index="3" name="balanced_value_time_ratio" type="float" default="1.0" />
<description>
- Sets the out handle of the key identified by [code]key_idx[/code] to value [code]out_handle[/code]. The [code]track_idx[/code] must be the index of a Bezier Track.
+ Sets the out handle of the key identified by [param key_idx] to value [param out_handle]. The [param track_idx] must be the index of a Bezier Track.
</description>
</method>
<method name="bezier_track_set_key_value">
@@ -219,7 +201,7 @@
<param index="1" name="key_idx" type="int" />
<param index="2" name="value" type="float" />
<description>
- Sets the value of the key identified by [code]key_idx[/code] to the given value. The [code]track_idx[/code] must be the index of a Bezier Track.
+ Sets the value of the key identified by [param key_idx] to the given value. The [param track_idx] must be the index of a Bezier Track.
</description>
</method>
<method name="blend_shape_track_insert_key">
@@ -228,6 +210,7 @@
<param index="1" name="time" type="float" />
<param index="2" name="amount" type="float" />
<description>
+ Inserts a key in a given blend shape track. Returns the key index.
</description>
</method>
<method name="clear">
@@ -242,6 +225,8 @@
<param index="1" name="fps" type="int" default="120" />
<param index="2" name="split_tolerance" type="float" default="4.0" />
<description>
+ Compress the animation and all its tracks in-place. This will make [method track_is_compressed] return [code]true[/code] once called on this [Animation]. Compressed tracks require less memory to be played, and are designed to be used for complex 3D animations (such as cutscenes) imported from external 3D software. Compression is lossy, but the difference is usually not noticeable in real world conditions.
+ [b]Note:[/b] Compressed tracks have various limitations (such as not being editable from the editor), so only use compressed animations if you actually need them.
</description>
</method>
<method name="copy_track">
@@ -249,7 +234,7 @@
<param index="0" name="track_idx" type="int" />
<param index="1" name="to_animation" type="Animation" />
<description>
- Adds a new track that is a copy of the given track from [code]to_animation[/code].
+ Adds a new track that is a copy of the given track from [param to_animation].
</description>
</method>
<method name="find_track" qualifiers="const">
@@ -297,6 +282,7 @@
<param index="1" name="time" type="float" />
<param index="2" name="position" type="Vector3" />
<description>
+ Inserts a key in a given 3D position track. Returns the key index.
</description>
</method>
<method name="remove_track">
@@ -312,6 +298,7 @@
<param index="1" name="time" type="float" />
<param index="2" name="rotation" type="Quaternion" />
<description>
+ Inserts a key in a given 3D rotation track. Returns the key index.
</description>
</method>
<method name="scale_track_insert_key">
@@ -320,6 +307,7 @@
<param index="1" name="time" type="float" />
<param index="2" name="scale" type="Vector3" />
<description>
+ Inserts a key in a given 3D scale track. Returns the key index.
</description>
</method>
<method name="track_find_key" qualifiers="const">
@@ -335,7 +323,7 @@
<return type="bool" />
<param index="0" name="track_idx" type="int" />
<description>
- Returns [code]true[/code] if the track at [code]idx[/code] wraps the interpolation loop. New tracks wrap the interpolation loop by default.
+ Returns [code]true[/code] if the track at [param track_idx] wraps the interpolation loop. New tracks wrap the interpolation loop by default.
</description>
</method>
<method name="track_get_interpolation_type" qualifiers="const">
@@ -349,7 +337,7 @@
<return type="int" />
<param index="0" name="track_idx" type="int" />
<description>
- Returns the amount of keys in a given track.
+ Returns the number of keys in a given track.
</description>
</method>
<method name="track_get_key_time" qualifiers="const">
@@ -404,13 +392,14 @@
<return type="bool" />
<param index="0" name="track_idx" type="int" />
<description>
+ Returns [code]true[/code] if the track is compressed, [code]false[/code] otherwise. See also [method compress].
</description>
</method>
<method name="track_is_enabled" qualifiers="const">
<return type="bool" />
<param index="0" name="track_idx" type="int" />
<description>
- Returns [code]true[/code] if the track at index [code]idx[/code] is enabled.
+ Returns [code]true[/code] if the track at index [param track_idx] is enabled.
</description>
</method>
<method name="track_is_imported" qualifiers="const">
@@ -432,7 +421,7 @@
<param index="0" name="track_idx" type="int" />
<param index="1" name="to_idx" type="int" />
<description>
- Changes the index position of track [code]idx[/code] to the one defined in [code]to_idx[/code].
+ Changes the index position of track [param track_idx] to the one defined in [param to_idx].
</description>
</method>
<method name="track_move_up">
@@ -455,7 +444,7 @@
<param index="0" name="track_idx" type="int" />
<param index="1" name="time" type="float" />
<description>
- Removes a key at [code]time[/code] in a given track.
+ Removes a key at [param time] in a given track.
</description>
</method>
<method name="track_set_enabled">
@@ -479,7 +468,7 @@
<param index="0" name="track_idx" type="int" />
<param index="1" name="interpolation" type="bool" />
<description>
- If [code]true[/code], the track at [code]idx[/code] wraps the interpolation loop.
+ If [code]true[/code], the track at [param track_idx] wraps the interpolation loop.
</description>
</method>
<method name="track_set_interpolation_type">
@@ -531,7 +520,7 @@
<param index="0" name="track_idx" type="int" />
<param index="1" name="with_idx" type="int" />
<description>
- Swaps the track [code]idx[/code]'s index position with the track [code]with_idx[/code].
+ Swaps the track [param track_idx]'s index position with the track [param with_idx].
</description>
</method>
<method name="value_track_get_key_indices" qualifiers="const">
@@ -555,7 +544,7 @@
<param index="0" name="track_idx" type="int" />
<param index="1" name="time_sec" type="float" />
<description>
- Returns the interpolated value at the given time (in seconds). The [code]track_idx[/code] must be the index of a value track.
+ Returns the interpolated value at the given time (in seconds). The [param track_idx] must be the index of a value track.
</description>
</method>
<method name="value_track_set_update_mode">
@@ -579,24 +568,21 @@
The animation step value.
</member>
</members>
- <signals>
- <signal name="tracks_changed">
- <description>
- Emitted when there's a change in the list of tracks, e.g. tracks are added, moved or have changed paths.
- </description>
- </signal>
- </signals>
<constants>
<constant name="TYPE_VALUE" value="0" enum="TrackType">
- Value tracks set values in node properties, but only those which can be Interpolated.
+ Value tracks set values in node properties, but only those which can be interpolated. For 3D position/rotation/scale, using the dedicated [constant TYPE_POSITION_3D], [constant TYPE_ROTATION_3D] and [constant TYPE_SCALE_3D] track types instead of [constant TYPE_VALUE] is recommended for performance reasons.
</constant>
<constant name="TYPE_POSITION_3D" value="1" enum="TrackType">
+ 3D position track (values are stored in [Vector3]s).
</constant>
<constant name="TYPE_ROTATION_3D" value="2" enum="TrackType">
+ 3D rotation track (values are stored in [Quaternion]s).
</constant>
<constant name="TYPE_SCALE_3D" value="3" enum="TrackType">
+ 3D scale track (values are stored in [Vector3]s).
</constant>
<constant name="TYPE_BLEND_SHAPE" value="4" enum="TrackType">
+ Blend shape track.
</constant>
<constant name="TYPE_METHOD" value="5" enum="TrackType">
Method tracks call functions with given arguments per key.
@@ -617,7 +603,15 @@
Linear interpolation.
</constant>
<constant name="INTERPOLATION_CUBIC" value="2" enum="InterpolationType">
- Cubic interpolation.
+ Cubic interpolation. This looks smoother than linear interpolation, but is more expensive to interpolate. Stick to [constant INTERPOLATION_LINEAR] for complex 3D animations imported from external software, even if it requires using a higher animation framerate in return.
+ </constant>
+ <constant name="INTERPOLATION_LINEAR_ANGLE" value="3" enum="InterpolationType">
+ Linear interpolation with shortest path rotation.
+ [b]Note:[/b] The result value is always normalized and may not match the key value.
+ </constant>
+ <constant name="INTERPOLATION_CUBIC_ANGLE" value="4" enum="InterpolationType">
+ Cubic interpolation with shortest path rotation.
+ [b]Note:[/b] The result value is always normalized and may not match the key value.
</constant>
<constant name="UPDATE_CONTINUOUS" value="0" enum="UpdateMode">
Update between keyframes.
@@ -640,11 +634,5 @@
<constant name="LOOP_PINGPONG" value="2" enum="LoopMode">
Repeats playback and reverse playback at both ends of the animation.
</constant>
- <constant name="HANDLE_MODE_FREE" value="0" enum="HandleMode">
- Assigning the free handle mode to a Bezier Track's keyframe allows you to edit the keyframe's left and right handles independently from one another.
- </constant>
- <constant name="HANDLE_MODE_BALANCED" value="1" enum="HandleMode">
- Assigning the balanced handle mode to a Bezier Track's keyframe makes it so the two handles of the keyframe always stay aligned when changing either the keyframe's left or right handle.
- </constant>
</constants>
</class>
diff --git a/doc/classes/AnimationLibrary.xml b/doc/classes/AnimationLibrary.xml
index 015d306b41..769b338063 100644
--- a/doc/classes/AnimationLibrary.xml
+++ b/doc/classes/AnimationLibrary.xml
@@ -1,10 +1,13 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AnimationLibrary" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
+ Container for [Animation] resources.
</brief_description>
<description>
+ An animation library stores a set of animations accessible through [StringName] keys, for use with [AnimationPlayer] nodes.
</description>
<tutorials>
+ <link title="Animation tutorial index">$DOCS_URL/tutorials/animation/index.html</link>
</tutorials>
<methods>
<method name="add_animation">
@@ -12,29 +15,34 @@
<param index="0" name="name" type="StringName" />
<param index="1" name="animation" type="Animation" />
<description>
+ Adds the [param animation] to the library, accessible by the key [param name].
</description>
</method>
<method name="get_animation" qualifiers="const">
<return type="Animation" />
<param index="0" name="name" type="StringName" />
<description>
+ Returns the [Animation] with the key [param name]. If the animation does not exist, [code]null[/code] is returned and an error is logged.
</description>
</method>
<method name="get_animation_list" qualifiers="const">
<return type="StringName[]" />
<description>
+ Returns the keys for the [Animation]s stored in the library.
</description>
</method>
<method name="has_animation" qualifiers="const">
<return type="bool" />
<param index="0" name="name" type="StringName" />
<description>
+ Returns [code]true[/code] if the library stores an [Animation] with [param name] as the key.
</description>
</method>
<method name="remove_animation">
<return type="void" />
<param index="0" name="name" type="StringName" />
<description>
+ Removes the [Animation] with the key [param name].
</description>
</method>
<method name="rename_animation">
@@ -42,6 +50,7 @@
<param index="0" name="name" type="StringName" />
<param index="1" name="newname" type="StringName" />
<description>
+ Changes the key of the [Animation] associated with the key [param name] to [param newname].
</description>
</method>
</methods>
@@ -53,17 +62,20 @@
<signal name="animation_added">
<param index="0" name="name" type="StringName" />
<description>
+ Emitted when an [Animation] is added, under the key [param name].
</description>
</signal>
<signal name="animation_removed">
<param index="0" name="name" type="StringName" />
<description>
+ Emitted when an [Animation] stored with the key [param name] is removed.
</description>
</signal>
<signal name="animation_renamed">
<param index="0" name="name" type="StringName" />
<param index="1" name="to_name" type="StringName" />
<description>
+ Emitted when the key for an [Animation] is changed, from [param name] to [param to_name].
</description>
</signal>
</signals>
diff --git a/doc/classes/AnimationNode.xml b/doc/classes/AnimationNode.xml
index ba20007825..b856b5f208 100644
--- a/doc/classes/AnimationNode.xml
+++ b/doc/classes/AnimationNode.xml
@@ -14,39 +14,39 @@
<method name="_get_caption" qualifiers="virtual const">
<return type="String" />
<description>
- Gets the text caption for this node (used by some editors).
+ When inheriting from [AnimationRootNode], implement this virtual method to override the text caption for this node.
</description>
</method>
<method name="_get_child_by_name" qualifiers="virtual const">
<return type="AnimationNode" />
<param index="0" name="name" type="StringName" />
<description>
- Gets a child node by index (used by editors inheriting from [AnimationRootNode]).
+ When inheriting from [AnimationRootNode], implement this virtual method to return a child node by its [param name].
</description>
</method>
<method name="_get_child_nodes" qualifiers="virtual const">
<return type="Dictionary" />
<description>
- Gets all children nodes in order as a [code]name: node[/code] dictionary. Only useful when inheriting [AnimationRootNode].
+ When inheriting from [AnimationRootNode], implement this virtual method to return all children nodes in order as a [code]name: node[/code] dictionary.
</description>
</method>
<method name="_get_parameter_default_value" qualifiers="virtual const">
<return type="Variant" />
<param index="0" name="parameter" type="StringName" />
<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.
+ When inheriting from [AnimationRootNode], implement this virtual method to return the default value of a [param 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 const">
<return type="Array" />
<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].
+ When inheriting from [AnimationRootNode], implement this virtual method to return a list of the properties on this node. 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 const">
<return type="bool" />
<description>
- Returns whether you want the blend tree editor to display filter editing on this node.
+ When inheriting from [AnimationRootNode], implement this virtual method to return whether the blend tree editor should display filter editing on this node.
</description>
</method>
<method name="_process" qualifiers="virtual const">
@@ -55,7 +55,7 @@
<param index="1" name="seek" type="bool" />
<param index="2" name="seek_root" type="bool" />
<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.
+ When inheriting from [AnimationRootNode], implement this virtual method to run some code when this node is processed. The [param time] parameter is a relative delta, unless [param seek] 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>
@@ -77,7 +77,7 @@
<param index="5" name="blend" type="float" />
<param index="6" name="pingponged" type="int" default="0" />
<description>
- Blend an animation by [code]blend[/code] amount (name must be valid in the linked [AnimationPlayer]). A [code]time[/code] and [code]delta[/code] may be passed, as well as whether [code]seek[/code] happened.
+ Blend an animation by [param blend] amount (name must be valid in the linked [AnimationPlayer]). A [param time] and [param delta] may be passed, as well as whether [param seeked] happened.
</description>
</method>
<method name="blend_input">
@@ -90,7 +90,7 @@
<param index="5" name="filter" type="int" enum="AnimationNode.FilterAction" default="0" />
<param index="6" name="sync" type="bool" default="true" />
<description>
- Blend an input. This is only useful for nodes created for an [AnimationNodeBlendTree]. The [code]time[/code] parameter is a relative delta, unless [code]seek[/code] is [code]true[/code], in which case it is absolute. A filter mode may be optionally passed (see [enum FilterAction] for options).
+ Blend an input. This is only useful for nodes created for an [AnimationNodeBlendTree]. The [param time] parameter is a relative delta, unless [param seek] is [code]true[/code], in which case it is absolute. A filter mode may be optionally passed (see [enum FilterAction] for options).
</description>
</method>
<method name="blend_node">
diff --git a/doc/classes/AnimationNodeBlendSpace1D.xml b/doc/classes/AnimationNodeBlendSpace1D.xml
index 3279c5465e..0f1ce127cd 100644
--- a/doc/classes/AnimationNodeBlendSpace1D.xml
+++ b/doc/classes/AnimationNodeBlendSpace1D.xml
@@ -19,7 +19,7 @@
<param index="1" name="pos" type="float" />
<param index="2" name="at_index" type="int" default="-1" />
<description>
- Adds a new point that represents a [code]node[/code] on the virtual axis at a given position set by [code]pos[/code]. You can insert it at a specific index using the [code]at_index[/code] argument. If you use the default value for [code]at_index[/code], the point is inserted at the end of the blend points array.
+ Adds a new point that represents a [param node] on the virtual axis at a given position set by [param pos]. You can insert it at a specific index using the [param at_index] argument. If you use the default value for [param at_index], the point is inserted at the end of the blend points array.
</description>
</method>
<method name="get_blend_point_count" qualifiers="const">
@@ -32,21 +32,21 @@
<return type="AnimationRootNode" />
<param index="0" name="point" type="int" />
<description>
- Returns the [AnimationNode] referenced by the point at index [code]point[/code].
+ Returns the [AnimationNode] referenced by the point at index [param point].
</description>
</method>
<method name="get_blend_point_position" qualifiers="const">
<return type="float" />
<param index="0" name="point" type="int" />
<description>
- Returns the position of the point at index [code]point[/code].
+ Returns the position of the point at index [param point].
</description>
</method>
<method name="remove_blend_point">
<return type="void" />
<param index="0" name="point" type="int" />
<description>
- Removes the point at index [code]point[/code] from the blend axis.
+ Removes the point at index [param point] from the blend axis.
</description>
</method>
<method name="set_blend_point_node">
@@ -54,7 +54,7 @@
<param index="0" name="point" type="int" />
<param index="1" name="node" type="AnimationRootNode" />
<description>
- Changes the [AnimationNode] referenced by the point at index [code]point[/code].
+ Changes the [AnimationNode] referenced by the point at index [param point].
</description>
</method>
<method name="set_blend_point_position">
@@ -62,7 +62,7 @@
<param index="0" name="point" type="int" />
<param index="1" name="pos" type="float" />
<description>
- Updates the position of the point at index [code]point[/code] on the blend axis.
+ Updates the position of the point at index [param point] on the blend axis.
</description>
</method>
</methods>
diff --git a/doc/classes/AnimationNodeBlendSpace2D.xml b/doc/classes/AnimationNodeBlendSpace2D.xml
index 9030634bac..8d5e153b03 100644
--- a/doc/classes/AnimationNodeBlendSpace2D.xml
+++ b/doc/classes/AnimationNodeBlendSpace2D.xml
@@ -19,7 +19,7 @@
<param index="1" name="pos" type="Vector2" />
<param index="2" name="at_index" type="int" default="-1" />
<description>
- Adds a new point that represents a [code]node[/code] at the position set by [code]pos[/code]. You can insert it at a specific index using the [code]at_index[/code] argument. If you use the default value for [code]at_index[/code], the point is inserted at the end of the blend points array.
+ Adds a new point that represents a [param node] at the position set by [param pos]. You can insert it at a specific index using the [param at_index] argument. If you use the default value for [param at_index], the point is inserted at the end of the blend points array.
</description>
</method>
<method name="add_triangle">
@@ -29,7 +29,7 @@
<param index="2" name="z" type="int" />
<param index="3" name="at_index" type="int" default="-1" />
<description>
- Creates a new triangle using three points [code]x[/code], [code]y[/code], and [code]z[/code]. Triangles can overlap. You can insert the triangle at a specific index using the [code]at_index[/code] argument. If you use the default value for [code]at_index[/code], the point is inserted at the end of the blend points array.
+ Creates a new triangle using three points [param x], [param y], and [param z]. Triangles can overlap. You can insert the triangle at a specific index using the [param at_index] argument. If you use the default value for [param at_index], the point is inserted at the end of the blend points array.
</description>
</method>
<method name="get_blend_point_count" qualifiers="const">
@@ -42,14 +42,14 @@
<return type="AnimationRootNode" />
<param index="0" name="point" type="int" />
<description>
- Returns the [AnimationRootNode] referenced by the point at index [code]point[/code].
+ Returns the [AnimationRootNode] referenced by the point at index [param point].
</description>
</method>
<method name="get_blend_point_position" qualifiers="const">
<return type="Vector2" />
<param index="0" name="point" type="int" />
<description>
- Returns the position of the point at index [code]point[/code].
+ Returns the position of the point at index [param point].
</description>
</method>
<method name="get_triangle_count" qualifiers="const">
@@ -63,21 +63,21 @@
<param index="0" name="triangle" type="int" />
<param index="1" name="point" type="int" />
<description>
- Returns the position of the point at index [code]point[/code] in the triangle of index [code]triangle[/code].
+ Returns the position of the point at index [param point] in the triangle of index [param triangle].
</description>
</method>
<method name="remove_blend_point">
<return type="void" />
<param index="0" name="point" type="int" />
<description>
- Removes the point at index [code]point[/code] from the blend space.
+ Removes the point at index [param point] from the blend space.
</description>
</method>
<method name="remove_triangle">
<return type="void" />
<param index="0" name="triangle" type="int" />
<description>
- Removes the triangle at index [code]triangle[/code] from the blend space.
+ Removes the triangle at index [param triangle] from the blend space.
</description>
</method>
<method name="set_blend_point_node">
@@ -85,7 +85,7 @@
<param index="0" name="point" type="int" />
<param index="1" name="node" type="AnimationRootNode" />
<description>
- Changes the [AnimationNode] referenced by the point at index [code]point[/code].
+ Changes the [AnimationNode] referenced by the point at index [param point].
</description>
</method>
<method name="set_blend_point_position">
@@ -93,7 +93,7 @@
<param index="0" name="point" type="int" />
<param index="1" name="pos" type="Vector2" />
<description>
- Updates the position of the point at index [code]point[/code] on the blend axis.
+ Updates the position of the point at index [param point] on the blend axis.
</description>
</method>
</methods>
diff --git a/doc/classes/AnimationNodeBlendTree.xml b/doc/classes/AnimationNodeBlendTree.xml
index b4995b90c8..2a765ac8d6 100644
--- a/doc/classes/AnimationNodeBlendTree.xml
+++ b/doc/classes/AnimationNodeBlendTree.xml
@@ -17,7 +17,7 @@
<param index="1" name="node" type="AnimationNode" />
<param index="2" name="position" type="Vector2" default="Vector2(0, 0)" />
<description>
- Adds an [AnimationNode] at the given [code]position[/code]. The [code]name[/code] is used to identify the created sub-node later.
+ Adds an [AnimationNode] at the given [param position]. The [param name] is used to identify the created sub-node later.
</description>
</method>
<method name="connect_node">
@@ -26,7 +26,7 @@
<param index="1" name="input_index" type="int" />
<param index="2" name="output_node" type="StringName" />
<description>
- Connects the output of an [AnimationNode] as input for another [AnimationNode], at the input port specified by [code]input_index[/code].
+ Connects the output of an [AnimationNode] as input for another [AnimationNode], at the input port specified by [param input_index].
</description>
</method>
<method name="disconnect_node">
@@ -41,21 +41,21 @@
<return type="AnimationNode" />
<param index="0" name="name" type="StringName" />
<description>
- Returns the sub-node with the specified [code]name[/code].
+ Returns the sub-node with the specified [param name].
</description>
</method>
<method name="get_node_position" qualifiers="const">
<return type="Vector2" />
<param index="0" name="name" type="StringName" />
<description>
- Returns the position of the sub-node with the specified [code]name[/code].
+ Returns the position of the sub-node with the specified [param name].
</description>
</method>
<method name="has_node" qualifiers="const">
<return type="bool" />
<param index="0" name="name" type="StringName" />
<description>
- Returns [code]true[/code] if a sub-node with specified [code]name[/code] exists.
+ Returns [code]true[/code] if a sub-node with specified [param name] exists.
</description>
</method>
<method name="remove_node">
@@ -87,6 +87,14 @@
The global offset of all sub-nodes.
</member>
</members>
+ <signals>
+ <signal name="node_changed">
+ <param index="0" name="node_name" type="StringName" />
+ <description>
+ Emitted when the input port information is changed.
+ </description>
+ </signal>
+ </signals>
<constants>
<constant name="CONNECTION_OK" value="0">
The connection was successful.
diff --git a/doc/classes/AnimationNodeStateMachine.xml b/doc/classes/AnimationNodeStateMachine.xml
index 1fa05fa8f1..0fb789875f 100644
--- a/doc/classes/AnimationNodeStateMachine.xml
+++ b/doc/classes/AnimationNodeStateMachine.xml
@@ -27,7 +27,7 @@
<param index="1" name="node" type="AnimationNode" />
<param index="2" name="position" type="Vector2" default="Vector2(0, 0)" />
<description>
- Adds a new node to the graph. The [code]position[/code] is used for display in the editor.
+ Adds a new node to the graph. The [param position] is used for display in the editor.
</description>
</method>
<method name="add_transition">
diff --git a/doc/classes/AnimationNodeStateMachineTransition.xml b/doc/classes/AnimationNodeStateMachineTransition.xml
index 0badb831de..4c2a30030b 100644
--- a/doc/classes/AnimationNodeStateMachineTransition.xml
+++ b/doc/classes/AnimationNodeStateMachineTransition.xml
@@ -9,7 +9,7 @@
</tutorials>
<members>
<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=$DOCS_URL/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]:
+ 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=$DOCS_URL/tutorials/animation/animation_tree.html#controlling-from-code]Using AnimationTree[/url]). For example, if [member AnimationTree.tree_root] is an [AnimationNodeStateMachine] and [member advance_condition] is set to [code]"idle"[/code]:
[codeblocks]
[gdscript]
$animation_tree.set("parameters/conditions/idle", is_on_floor and (linear_velocity.x == 0))
@@ -22,9 +22,6 @@
<member name="advance_expression" type="String" setter="set_advance_expression" getter="get_advance_expression" default="&quot;&quot;">
Use an expression as a condition for state machine transitions. It is possible to create complex animation advance conditions for switching between states and gives much greater flexibility for creating complex state machines by directly interfacing with the script code.
</member>
- <member name="advance_expression_base_node" type="NodePath" setter="set_advance_expression_base_node" getter="get_advance_expression_base_node" default="NodePath(&quot;&quot;)">
- The path to the [Node] used to evaluate an [Expression] if one is not explicitly specified internally.
- </member>
<member name="auto_advance" type="bool" setter="set_auto_advance" getter="has_auto_advance" default="false">
Turn on the transition automatically when this state is reached. This works best with [constant SWITCH_MODE_AT_END].
</member>
@@ -37,6 +34,9 @@
<member name="switch_mode" type="int" setter="set_switch_mode" getter="get_switch_mode" enum="AnimationNodeStateMachineTransition.SwitchMode" default="0">
The transition type.
</member>
+ <member name="xfade_curve" type="Curve" setter="set_xfade_curve" getter="get_xfade_curve">
+ Ease curve for better control over cross-fade between this state and the next.
+ </member>
<member name="xfade_time" type="float" setter="set_xfade_time" getter="get_xfade_time" default="0.0">
The time to cross-fade between this state and the next.
</member>
diff --git a/doc/classes/AnimationNodeTransition.xml b/doc/classes/AnimationNodeTransition.xml
index a5de170ccd..f6e2fc5eb2 100644
--- a/doc/classes/AnimationNodeTransition.xml
+++ b/doc/classes/AnimationNodeTransition.xml
@@ -40,13 +40,15 @@
</method>
</methods>
<members>
+ <member name="enabled_inputs" type="int" setter="set_enabled_inputs" getter="get_enabled_inputs" default="0">
+ The number of enabled input ports for this node.
+ </member>
<member name="from_start" type="bool" setter="set_from_start" getter="is_from_start" default="true">
If [code]true[/code], the destination animation is played back from the beginning when switched.
</member>
- <member name="input_count" type="int" setter="set_enabled_inputs" getter="get_enabled_inputs" default="0">
- The number of available input ports for this node.
+ <member name="xfade_curve" type="Curve" setter="set_xfade_curve" getter="get_xfade_curve">
</member>
- <member name="xfade_time" type="float" setter="set_cross_fade_time" getter="get_cross_fade_time" default="0.0">
+ <member name="xfade_time" type="float" setter="set_xfade_time" getter="get_xfade_time" default="0.0">
Cross-fading time (in seconds) between each animation connected to the inputs.
</member>
</members>
diff --git a/doc/classes/AnimationPlayer.xml b/doc/classes/AnimationPlayer.xml
index 7b59051f49..9efd3ac939 100644
--- a/doc/classes/AnimationPlayer.xml
+++ b/doc/classes/AnimationPlayer.xml
@@ -5,7 +5,7 @@
</brief_description>
<description>
An animation player is used for general-purpose playback of [Animation] resources. It contains a dictionary of [AnimationLibrary] resources and custom blend times between animation transitions.
- Some methods and properties use a single key to refence an animation directly. These keys are formatted as the key for the library, followed by a forward slash, then the key for the animation whithin the library, for example [code]"movement/run"[/code]. If the library's key is an empty string (known as the default library), the forward slash is omitted, being the same key used by the library.
+ Some methods and properties use a single key to reference an animation directly. These keys are formatted as the key for the library, followed by a forward slash, then the key for the animation within the library, for example [code]"movement/run"[/code]. If the library's key is an empty string (known as the default library), the forward slash is omitted, being the same key used by the library.
[AnimationPlayer] is more suited than [Tween] for animations where you know the final values in advance. For example, fading a screen in and out is more easily done with an [AnimationPlayer] node thanks to the animation tools provided by the editor. That particular example can also be implemented with a [Tween], but it requires doing everything by code.
Updating the target properties of animations occurs at process time.
</description>
@@ -20,21 +20,21 @@
<param index="0" name="name" type="StringName" />
<param index="1" name="library" type="AnimationLibrary" />
<description>
- Adds [code]library[/code] to the animation player, under the key [code]name[/code].
+ Adds [param library] to the animation player, under the key [param name].
</description>
</method>
<method name="advance">
<return type="void" />
<param index="0" name="delta" type="float" />
<description>
- Shifts position in the animation timeline and immediately updates the animation. [code]delta[/code] is the time in seconds to shift. Events between the current frame and [code]delta[/code] are handled.
+ Shifts position in the animation timeline and immediately updates the animation. [param delta] is the time in seconds to shift. Events between the current frame and [param delta] are handled.
</description>
</method>
<method name="animation_get_next" qualifiers="const">
<return type="StringName" />
<param index="0" name="anim_from" type="StringName" />
<description>
- Returns the key of the animation which is queued to play after the [code]anim_from[/code] animation.
+ Returns the key of the animation which is queued to play after the [param anim_from] animation.
</description>
</method>
<method name="animation_set_next">
@@ -42,7 +42,7 @@
<param index="0" name="anim_from" type="StringName" />
<param index="1" name="anim_to" type="StringName" />
<description>
- Triggers the [code]anim_to[/code] animation when the [code]anim_from[/code] animation completes.
+ Triggers the [param anim_to] animation when the [param anim_from] animation completes.
</description>
</method>
<method name="clear_caches">
@@ -61,28 +61,28 @@
<return type="StringName" />
<param index="0" name="animation" type="Animation" />
<description>
- Returns the key of [code]animation[/code] or an empty [StringName] if not found.
+ Returns the key of [param animation] or an empty [StringName] if not found.
</description>
</method>
<method name="find_animation_library" qualifiers="const">
<return type="StringName" />
<param index="0" name="animation" type="Animation" />
<description>
- Returns the key for the [AnimationLibrary] that contains [code]animation[/code] or an empty [StringName] if not found.
+ Returns the key for the [AnimationLibrary] that contains [param animation] or an empty [StringName] if not found.
</description>
</method>
<method name="get_animation" qualifiers="const">
<return type="Animation" />
<param index="0" name="name" type="StringName" />
<description>
- Returns the [Animation] with key [code]name[/code] or [code]null[/code] if not found.
+ Returns the [Animation] with the key [param name]. If the animation does not exist, [code]null[/code] is returned and an error is logged.
</description>
</method>
<method name="get_animation_library" qualifiers="const">
<return type="AnimationLibrary" />
<param index="0" name="name" type="StringName" />
<description>
- Returns the first [AnimationLibrary] with key [code]name[/code] or [code]null[/code] if not found.
+ Returns the first [AnimationLibrary] with key [param name] or [code]null[/code] if not found.
</description>
</method>
<method name="get_animation_library_list" qualifiers="const">
@@ -121,14 +121,14 @@
<return type="bool" />
<param index="0" name="name" type="StringName" />
<description>
- Returns [code]true[/code] if the [AnimationPlayer] stores an [Animation] with key [code]name[/code].
+ Returns [code]true[/code] if the [AnimationPlayer] stores an [Animation] with key [param name].
</description>
</method>
<method name="has_animation_library" qualifiers="const">
<return type="bool" />
<param index="0" name="name" type="StringName" />
<description>
- Returns [code]true[/code] if the [AnimationPlayer] stores an [AnimationLibrary] with key [code]name[/code].
+ Returns [code]true[/code] if the [AnimationPlayer] stores an [AnimationLibrary] with key [param name].
</description>
</method>
<method name="is_playing" qualifiers="const">
@@ -144,8 +144,8 @@
<param index="2" name="custom_speed" type="float" default="1.0" />
<param index="3" name="from_end" type="bool" default="false" />
<description>
- Plays the animation with key [code]name[/code]. Custom blend times and speed can be set. If [code]custom_speed[/code] is negative and [code]from_end[/code] is [code]true[/code], the animation will play backwards (which is equivalent to calling [method play_backwards]).
- The [AnimationPlayer] keeps track of its current or last played animation with [member assigned_animation]. If this method is called with that same animation [code]name[/code], or with no [code]name[/code] parameter, the assigned animation will resume playing if it was paused, or restart if it was stopped (see [method stop] for both pause and stop). If the animation was already playing, it will keep playing.
+ Plays the animation with key [param name]. Custom blend times and speed can be set. If [param custom_speed] is negative and [param from_end] is [code]true[/code], the animation will play backwards (which is equivalent to calling [method play_backwards]).
+ The [AnimationPlayer] keeps track of its current or last played animation with [member assigned_animation]. If this method is called with that same animation [param name], or with no [param name] parameter, the assigned animation will resume playing if it was paused, or restart if it was stopped (see [method stop] for both pause and stop). If the animation was already playing, it will keep playing.
[b]Note:[/b] The animation will be updated the next time the [AnimationPlayer] is processed. If other variables are updated at the same time this is called, they may be updated too early. To perform the update immediately, call [code]advance(0)[/code].
</description>
</method>
@@ -154,7 +154,7 @@
<param index="0" name="name" type="StringName" default="&quot;&quot;" />
<param index="1" name="custom_blend" type="float" default="-1" />
<description>
- Plays the animation with key [code]name[/code] in reverse.
+ Plays the animation with key [param name] in reverse.
This method is a shorthand for [method play] with [code]custom_speed = -1.0[/code] and [code]from_end = true[/code], so see its description for more information.
</description>
</method>
@@ -170,7 +170,7 @@
<return type="void" />
<param index="0" name="name" type="StringName" />
<description>
- Removes the [AnimationLibrary] assosiated with the key [code]name[/code].
+ Removes the [AnimationLibrary] associated with the key [param name].
</description>
</method>
<method name="rename_animation_library">
@@ -178,7 +178,7 @@
<param index="0" name="name" type="StringName" />
<param index="1" name="newname" type="StringName" />
<description>
- Moves the [AnimationLibrary] associated with the key [code]name[/code] to the key [code]newname[/code].
+ Moves the [AnimationLibrary] associated with the key [param name] to the key [param newname].
</description>
</method>
<method name="seek">
@@ -186,7 +186,7 @@
<param index="0" name="seconds" type="float" />
<param index="1" name="update" type="bool" default="false" />
<description>
- Seeks the animation to the [code]seconds[/code] point in time (in seconds). If [code]update[/code] is [code]true[/code], the animation updates too, otherwise it updates at process time. Events between the current frame and [code]seconds[/code] are skipped.
+ Seeks the animation to the [param seconds] point in time (in seconds). If [param update] is [code]true[/code], the animation updates too, otherwise it updates at process time. Events between the current frame and [param seconds] are skipped.
[b]Note:[/b] Seeking to the end of the animation doesn't emit [signal animation_finished]. If you want to skip animation and emit the signal, use [method advance].
</description>
</method>
@@ -203,8 +203,8 @@
<return type="void" />
<param index="0" name="reset" type="bool" default="true" />
<description>
- Stops or pauses the currently playing animation. If [code]reset[/code] is [code]true[/code], the animation position is reset to [code]0[/code] and the playback speed is reset to [code]1.0[/code].
- If [code]reset[/code] is [code]false[/code], the [member current_animation_position] will be kept and calling [method play] or [method play_backwards] without arguments or with the same animation name as [member assigned_animation] will resume the animation.
+ Stops or pauses the currently playing animation. If [param reset] is [code]true[/code], the animation position is reset to [code]0[/code] and the playback speed is reset to [code]1.0[/code].
+ If [param reset] is [code]false[/code], the [member current_animation_position] will be kept and calling [method play] or [method play_backwards] without arguments or with the same animation name as [member assigned_animation] will resume the animation.
</description>
</method>
</methods>
@@ -217,7 +217,7 @@
</member>
<member name="current_animation" type="String" setter="set_current_animation" getter="get_current_animation" default="&quot;&quot;">
The key of the currently playing animation. If no animation is playing, the property's value is an empty string. Changing this value does not restart the animation. See [method play] for more information on playing animations.
- [b]Note:[/b] while this property appears in the inspector, it's not meant to be edited, and it's not saved in the scene. This property is mainly used to get the currently playing animation, and internally for animation playback tracks. For more information, see [Animation].
+ [b]Note:[/b] While this property appears in the Inspector, it's not meant to be edited, and it's not saved in the scene. This property is mainly used to get the currently playing animation, and internally for animation playback tracks. For more information, see [Animation].
</member>
<member name="current_animation_length" type="float" setter="" getter="get_current_animation_length">
The length (in seconds) of the currently playing animation.
@@ -242,7 +242,7 @@
The process notification in which to update animations.
</member>
<member name="playback_speed" type="float" setter="set_speed_scale" getter="get_speed_scale" default="1.0">
- The speed scaling ratio. For instance, if this value is 1, then the animation plays at normal speed. If it's 0.5, then it plays at half speed. If it's 2, then it plays at double speed.
+ The speed scaling ratio. For example, if this value is 1, then the animation plays at normal speed. If it's 0.5, then it plays at half speed. If it's 2, then it plays at double speed.
</member>
<member name="reset_on_save" type="bool" setter="set_reset_on_save_enabled" getter="is_reset_on_save_enabled" default="true">
This is used by the editor. If set to [code]true[/code], the scene will be saved with the effects of the reset animation (the animation with the key [code]"RESET"[/code]) applied as if it had been seeked to time 0, with the editor keeping the values that the scene had before saving.
@@ -268,6 +268,16 @@
[b]Note:[/b] This signal is not emitted if an animation is looping.
</description>
</signal>
+ <signal name="animation_libraries_updated">
+ <description>
+ Notifies when the animation libraries have changed.
+ </description>
+ </signal>
+ <signal name="animation_list_changed">
+ <description>
+ Notifies when an animation list is changed.
+ </description>
+ </signal>
<signal name="animation_started">
<param index="0" name="anim_name" type="StringName" />
<description>
diff --git a/doc/classes/AnimationTree.xml b/doc/classes/AnimationTree.xml
index f2bf74f495..27797b00b5 100644
--- a/doc/classes/AnimationTree.xml
+++ b/doc/classes/AnimationTree.xml
@@ -54,6 +54,13 @@
The root animation node of this [AnimationTree]. See [AnimationNode].
</member>
</members>
+ <signals>
+ <signal name="animation_player_changed">
+ <description>
+ Emitted when the [member anim_player] is changed.
+ </description>
+ </signal>
+ </signals>
<constants>
<constant name="ANIMATION_PROCESS_PHYSICS" value="0" enum="AnimationProcessCallback">
The animations will progress during the physics frame (i.e. [method Node._physics_process]).
diff --git a/doc/classes/Area2D.xml b/doc/classes/Area2D.xml
index 034140ff52..29592f133d 100644
--- a/doc/classes/Area2D.xml
+++ b/doc/classes/Area2D.xml
@@ -4,7 +4,9 @@
2D area for detection and physics and audio influence.
</brief_description>
<description>
- 2D area that detects [CollisionObject2D] nodes overlapping, entering, or exiting. Can also alter or override local physics parameters (gravity, damping) and route audio to a custom audio bus.
+ 2D area that detects [CollisionObject2D] nodes overlapping, entering, or exiting. Can also alter or override local physics parameters (gravity, damping) and route audio to custom audio buses.
+ To give the area its shape, add a [CollisionShape2D] or a [CollisionPolygon2D] node as a [i]direct[/i] child (or add multiple such nodes as direct children) of the area.
+ [b]Warning:[/b] See [ConcavePolygonShape2D] for a warning about possibly unexpected behavior when using that shape for an area.
</description>
<tutorials>
<link title="Using Area2D">$DOCS_URL/tutorials/physics/using_area_2d.html</link>
@@ -23,10 +25,24 @@
<method name="get_overlapping_bodies" qualifiers="const">
<return type="Node2D[]" />
<description>
- Returns a list of intersecting [PhysicsBody2D]s. The overlapping body's [member CollisionObject2D.collision_layer] must be part of this area's [member CollisionObject2D.collision_mask] in order to be detected.
+ Returns a list of intersecting [PhysicsBody2D]s and [TileMap]s. The overlapping body's [member CollisionObject2D.collision_layer] must be part of this area's [member CollisionObject2D.collision_mask] in order to be detected.
For performance reasons (collisions are all processed at the same time) this list is modified once during the physics step, not immediately after objects are moved. Consider using signals instead.
</description>
</method>
+ <method name="has_overlapping_areas" qualifiers="const">
+ <return type="bool" />
+ <description>
+ Returns [code]true[/code] if intersecting any [Area2D]s, otherwise returns [code]false[/code]. The overlapping area's [member CollisionObject2D.collision_layer] must be part of this area's [member CollisionObject2D.collision_mask] in order to be detected.
+ For performance reasons (collisions are all processed at the same time) the list of overlapping areas is modified once during the physics step, not immediately after objects are moved. Consider using signals instead.
+ </description>
+ </method>
+ <method name="has_overlapping_bodies" qualifiers="const">
+ <return type="bool" />
+ <description>
+ Returns [code]true[/code] if intersecting any [PhysicsBody2D]s or [TileMap]s, otherwise returns [code]false[/code]. The overlapping body's [member CollisionObject2D.collision_layer] must be part of this area's [member CollisionObject2D.collision_mask] in order to be detected.
+ For performance reasons (collisions are all processed at the same time) the list of overlapping bodies is modified once during the physics step, not immediately after objects are moved. Consider using signals instead.
+ </description>
+ </method>
<method name="overlaps_area" qualifiers="const">
<return type="bool" />
<param index="0" name="area" type="Node" />
@@ -41,7 +57,7 @@
<description>
Returns [code]true[/code] if the given physics body intersects or overlaps this [Area2D], [code]false[/code] otherwise.
[b]Note:[/b] The result of this test is not immediate after moving objects. For performance, list of overlaps is updated once per frame and before the physics step. Consider using signals instead.
- The [code]body[/code] argument can either be a [PhysicsBody2D] or a [TileMap] instance. While TileMaps are not physics bodies themselves, they register their tiles with collision shapes as a virtual physics body.
+ The [param body] argument can either be a [PhysicsBody2D] or a [TileMap] instance. While TileMaps are not physics bodies themselves, they register their tiles with collision shapes as a virtual physics body.
</description>
</method>
</methods>
@@ -99,14 +115,14 @@
<param index="0" name="area" type="Area2D" />
<description>
Emitted when another Area2D enters this Area2D. Requires [member monitoring] to be set to [code]true[/code].
- [code]area[/code] the other Area2D.
+ [param area] the other Area2D.
</description>
</signal>
<signal name="area_exited">
<param index="0" name="area" type="Area2D" />
<description>
Emitted when another Area2D exits this Area2D. Requires [member monitoring] to be set to [code]true[/code].
- [code]area[/code] the other Area2D.
+ [param area] the other Area2D.
</description>
</signal>
<signal name="area_shape_entered">
@@ -116,10 +132,10 @@
<param index="3" name="local_shape_index" type="int" />
<description>
Emitted when one of another Area2D's [Shape2D]s enters one of this Area2D's [Shape2D]s. Requires [member monitoring] to be set to [code]true[/code].
- [code]area_rid[/code] the [RID] of the other Area2D's [CollisionObject2D] used by the [PhysicsServer2D].
- [code]area[/code] the other Area2D.
- [code]area_shape_index[/code] the index of the [Shape2D] of the other Area2D used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with [code]area.shape_owner_get_owner(area.shape_find_owner(area_shape_index))[/code].
- [code]local_shape_index[/code] the index of the [Shape2D] of this Area2D used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with [code]self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))[/code].
+ [param area_rid] the [RID] of the other Area2D's [CollisionObject2D] used by the [PhysicsServer2D].
+ [param area] the other Area2D.
+ [param area_shape_index] the index of the [Shape2D] of the other Area2D used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with [code]area.shape_owner_get_owner(area.shape_find_owner(area_shape_index))[/code].
+ [param local_shape_index] the index of the [Shape2D] of this Area2D used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with [code]self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))[/code].
</description>
</signal>
<signal name="area_shape_exited">
@@ -129,24 +145,24 @@
<param index="3" name="local_shape_index" type="int" />
<description>
Emitted when one of another Area2D's [Shape2D]s exits one of this Area2D's [Shape2D]s. Requires [member monitoring] to be set to [code]true[/code].
- [code]area_rid[/code] the [RID] of the other Area2D's [CollisionObject2D] used by the [PhysicsServer2D].
- [code]area[/code] the other Area2D.
- [code]area_shape_index[/code] the index of the [Shape2D] of the other Area2D used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with [code]area.shape_owner_get_owner(area.shape_find_owner(area_shape_index))[/code].
- [code]local_shape_index[/code] the index of the [Shape2D] of this Area2D used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with [code]self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))[/code].
+ [param area_rid] the [RID] of the other Area2D's [CollisionObject2D] used by the [PhysicsServer2D].
+ [param area] the other Area2D.
+ [param area_shape_index] the index of the [Shape2D] of the other Area2D used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with [code]area.shape_owner_get_owner(area.shape_find_owner(area_shape_index))[/code].
+ [param local_shape_index] the index of the [Shape2D] of this Area2D used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with [code]self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))[/code].
</description>
</signal>
<signal name="body_entered">
<param index="0" name="body" type="Node2D" />
<description>
Emitted when a [PhysicsBody2D] or [TileMap] enters this Area2D. Requires [member monitoring] to be set to [code]true[/code]. [TileMap]s are detected if the [TileSet] has Collision [Shape2D]s.
- [code]body[/code] the [Node], if it exists in the tree, of the other [PhysicsBody2D] or [TileMap].
+ [param body] the [Node], if it exists in the tree, of the other [PhysicsBody2D] or [TileMap].
</description>
</signal>
<signal name="body_exited">
<param index="0" name="body" type="Node2D" />
<description>
Emitted when a [PhysicsBody2D] or [TileMap] exits this Area2D. Requires [member monitoring] to be set to [code]true[/code]. [TileMap]s are detected if the [TileSet] has Collision [Shape2D]s.
- [code]body[/code] the [Node], if it exists in the tree, of the other [PhysicsBody2D] or [TileMap].
+ [param body] the [Node], if it exists in the tree, of the other [PhysicsBody2D] or [TileMap].
</description>
</signal>
<signal name="body_shape_entered">
@@ -156,10 +172,10 @@
<param index="3" name="local_shape_index" type="int" />
<description>
Emitted when one of a [PhysicsBody2D] or [TileMap]'s [Shape2D]s enters one of this Area2D's [Shape2D]s. Requires [member monitoring] to be set to [code]true[/code]. [TileMap]s are detected if the [TileSet] has Collision [Shape2D]s.
- [code]body_rid[/code] the [RID] of the [PhysicsBody2D] or [TileSet]'s [CollisionObject2D] used by the [PhysicsServer2D].
- [code]body[/code] the [Node], if it exists in the tree, of the [PhysicsBody2D] or [TileMap].
- [code]body_shape_index[/code] the index of the [Shape2D] of the [PhysicsBody2D] or [TileMap] used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with [code]body.shape_owner_get_owner(body.shape_find_owner(body_shape_index))[/code].
- [code]local_shape_index[/code] the index of the [Shape2D] of this Area2D used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with [code]self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))[/code].
+ [param body_rid] the [RID] of the [PhysicsBody2D] or [TileSet]'s [CollisionObject2D] used by the [PhysicsServer2D].
+ [param body] the [Node], if it exists in the tree, of the [PhysicsBody2D] or [TileMap].
+ [param body_shape_index] the index of the [Shape2D] of the [PhysicsBody2D] or [TileMap] used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with [code]body.shape_owner_get_owner(body.shape_find_owner(body_shape_index))[/code].
+ [param local_shape_index] the index of the [Shape2D] of this Area2D used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with [code]self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))[/code].
</description>
</signal>
<signal name="body_shape_exited">
@@ -169,10 +185,10 @@
<param index="3" name="local_shape_index" type="int" />
<description>
Emitted when one of a [PhysicsBody2D] or [TileMap]'s [Shape2D]s exits one of this Area2D's [Shape2D]s. Requires [member monitoring] to be set to [code]true[/code]. [TileMap]s are detected if the [TileSet] has Collision [Shape2D]s.
- [code]body_rid[/code] the [RID] of the [PhysicsBody2D] or [TileSet]'s [CollisionObject2D] used by the [PhysicsServer2D].
- [code]body[/code] the [Node], if it exists in the tree, of the [PhysicsBody2D] or [TileMap].
- [code]body_shape_index[/code] the index of the [Shape2D] of the [PhysicsBody2D] or [TileMap] used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with [code]body.shape_owner_get_owner(body.shape_find_owner(body_shape_index))[/code].
- [code]local_shape_index[/code] the index of the [Shape2D] of this Area2D used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with [code]self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))[/code].
+ [param body_rid] the [RID] of the [PhysicsBody2D] or [TileSet]'s [CollisionObject2D] used by the [PhysicsServer2D].
+ [param body] the [Node], if it exists in the tree, of the [PhysicsBody2D] or [TileMap].
+ [param body_shape_index] the index of the [Shape2D] of the [PhysicsBody2D] or [TileMap] used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with [code]body.shape_owner_get_owner(body.shape_find_owner(body_shape_index))[/code].
+ [param local_shape_index] the index of the [Shape2D] of this Area2D used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with [code]self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))[/code].
</description>
</signal>
</signals>
diff --git a/doc/classes/Area3D.xml b/doc/classes/Area3D.xml
index 0313e8f679..ea8cab324d 100644
--- a/doc/classes/Area3D.xml
+++ b/doc/classes/Area3D.xml
@@ -5,6 +5,8 @@
</brief_description>
<description>
3D area that detects [CollisionObject3D] nodes overlapping, entering, or exiting. Can also alter or override local physics parameters (gravity, damping) and route audio to custom audio buses.
+ To give the area its shape, add a [CollisionShape3D] or a [CollisionPolygon3D] node as a [i]direct[/i] child (or add multiple such nodes as direct children) of the area.
+ [b]Warning:[/b] See [ConcavePolygonShape3D] (also called "trimesh") for a warning about possibly unexpected behavior when using that shape for an area.
</description>
<tutorials>
<link title="3D Platformer Demo">https://godotengine.org/asset-library/asset/125</link>
@@ -21,10 +23,24 @@
<method name="get_overlapping_bodies" qualifiers="const">
<return type="Node3D[]" />
<description>
- Returns a list of intersecting [PhysicsBody3D]s. The overlapping body's [member CollisionObject3D.collision_layer] must be part of this area's [member CollisionObject3D.collision_mask] in order to be detected.
+ Returns a list of intersecting [PhysicsBody3D]s and [GridMap]s. The overlapping body's [member CollisionObject3D.collision_layer] must be part of this area's [member CollisionObject3D.collision_mask] in order to be detected.
For performance reasons (collisions are all processed at the same time) this list is modified once during the physics step, not immediately after objects are moved. Consider using signals instead.
</description>
</method>
+ <method name="has_overlapping_areas" qualifiers="const">
+ <return type="bool" />
+ <description>
+ Returns [code]true[/code] if intersecting any [Area3D]s, otherwise returns [code]false[/code]. The overlapping area's [member CollisionObject3D.collision_layer] must be part of this area's [member CollisionObject3D.collision_mask] in order to be detected.
+ For performance reasons (collisions are all processed at the same time) the list of overlapping areas is modified once during the physics step, not immediately after objects are moved. Consider using signals instead.
+ </description>
+ </method>
+ <method name="has_overlapping_bodies" qualifiers="const">
+ <return type="bool" />
+ <description>
+ Returns [code]true[/code] if intersecting any [PhysicsBody3D]s or [GridMap]s, otherwise returns [code]false[/code]. The overlapping body's [member CollisionObject3D.collision_layer] must be part of this area's [member CollisionObject3D.collision_mask] in order to be detected.
+ For performance reasons (collisions are all processed at the same time) the list of overlapping bodies is modified once during the physics step, not immediately after objects are moved. Consider using signals instead.
+ </description>
+ </method>
<method name="overlaps_area" qualifiers="const">
<return type="bool" />
<param index="0" name="area" type="Node" />
@@ -39,7 +55,7 @@
<description>
Returns [code]true[/code] if the given physics body intersects or overlaps this [Area3D], [code]false[/code] otherwise.
[b]Note:[/b] The result of this test is not immediate after moving objects. For performance, list of overlaps is updated once per frame and before the physics step. Consider using signals instead.
- The [code]body[/code] argument can either be a [PhysicsBody3D] or a [GridMap] instance. While GridMaps are not physics body themselves, they register their tiles with collision shapes as a virtual physics body.
+ The [param body] argument can either be a [PhysicsBody3D] or a [GridMap] instance. While GridMaps are not physics body themselves, they register their tiles with collision shapes as a virtual physics body.
</description>
</method>
</methods>
@@ -94,11 +110,11 @@
<member name="reverb_bus_amount" type="float" setter="set_reverb_amount" getter="get_reverb_amount" default="0.0">
The degree to which this area applies reverb to its associated audio. Ranges from [code]0[/code] to [code]1[/code] with [code]0.1[/code] precision.
</member>
- <member name="reverb_bus_enable" type="bool" setter="set_use_reverb_bus" getter="is_using_reverb_bus" default="false">
+ <member name="reverb_bus_enabled" 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="&amp;&quot;Master&quot;">
- The reverb bus name to use for this area's associated audio.
+ <member name="reverb_bus_name" type="StringName" setter="set_reverb_bus_name" getter="get_reverb_bus_name" default="&amp;&quot;Master&quot;">
+ The name of the reverb bus 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">
The degree to which this area's reverb is a uniform effect. Ranges from [code]0[/code] to [code]1[/code] with [code]0.1[/code] precision.
@@ -118,14 +134,14 @@
<param index="0" name="area" type="Area3D" />
<description>
Emitted when another Area3D enters this Area3D. Requires [member monitoring] to be set to [code]true[/code].
- [code]area[/code] the other Area3D.
+ [param area] the other Area3D.
</description>
</signal>
<signal name="area_exited">
<param index="0" name="area" type="Area3D" />
<description>
Emitted when another Area3D exits this Area3D. Requires [member monitoring] to be set to [code]true[/code].
- [code]area[/code] the other Area3D.
+ [param area] the other Area3D.
</description>
</signal>
<signal name="area_shape_entered">
@@ -135,10 +151,10 @@
<param index="3" name="local_shape_index" type="int" />
<description>
Emitted when one of another Area3D's [Shape3D]s enters one of this Area3D's [Shape3D]s. Requires [member monitoring] to be set to [code]true[/code].
- [code]area_rid[/code] the [RID] of the other Area3D's [CollisionObject3D] used by the [PhysicsServer3D].
- [code]area[/code] the other Area3D.
- [code]area_shape_index[/code] the index of the [Shape3D] of the other Area3D used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with [code]area.shape_owner_get_owner(area.shape_find_owner(area_shape_index))[/code].
- [code]local_shape_index[/code] the index of the [Shape3D] of this Area3D used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with [code]self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))[/code].
+ [param area_rid] the [RID] of the other Area3D's [CollisionObject3D] used by the [PhysicsServer3D].
+ [param area] the other Area3D.
+ [param area_shape_index] the index of the [Shape3D] of the other Area3D used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with [code]area.shape_owner_get_owner(area.shape_find_owner(area_shape_index))[/code].
+ [param local_shape_index] the index of the [Shape3D] of this Area3D used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with [code]self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))[/code].
</description>
</signal>
<signal name="area_shape_exited">
@@ -148,24 +164,24 @@
<param index="3" name="local_shape_index" type="int" />
<description>
Emitted when one of another Area3D's [Shape3D]s exits one of this Area3D's [Shape3D]s. Requires [member monitoring] to be set to [code]true[/code].
- [code]area_rid[/code] the [RID] of the other Area3D's [CollisionObject3D] used by the [PhysicsServer3D].
- [code]area[/code] the other Area3D.
- [code]area_shape_index[/code] the index of the [Shape3D] of the other Area3D used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with [code]area.shape_owner_get_owner(area.shape_find_owner(area_shape_index))[/code].
- [code]local_shape_index[/code] the index of the [Shape3D] of this Area3D used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with [code]self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))[/code].
+ [param area_rid] the [RID] of the other Area3D's [CollisionObject3D] used by the [PhysicsServer3D].
+ [param area] the other Area3D.
+ [param area_shape_index] the index of the [Shape3D] of the other Area3D used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with [code]area.shape_owner_get_owner(area.shape_find_owner(area_shape_index))[/code].
+ [param local_shape_index] the index of the [Shape3D] of this Area3D used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with [code]self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))[/code].
</description>
</signal>
<signal name="body_entered">
<param index="0" name="body" type="Node3D" />
<description>
Emitted when a [PhysicsBody3D] or [GridMap] enters this Area3D. Requires [member monitoring] to be set to [code]true[/code]. [GridMap]s are detected if the [MeshLibrary] has Collision [Shape3D]s.
- [code]body[/code] the [Node], if it exists in the tree, of the other [PhysicsBody3D] or [GridMap].
+ [param body] the [Node], if it exists in the tree, of the other [PhysicsBody3D] or [GridMap].
</description>
</signal>
<signal name="body_exited">
<param index="0" name="body" type="Node3D" />
<description>
Emitted when a [PhysicsBody3D] or [GridMap] exits this Area3D. Requires [member monitoring] to be set to [code]true[/code]. [GridMap]s are detected if the [MeshLibrary] has Collision [Shape3D]s.
- [code]body[/code] the [Node], if it exists in the tree, of the other [PhysicsBody3D] or [GridMap].
+ [param body] the [Node], if it exists in the tree, of the other [PhysicsBody3D] or [GridMap].
</description>
</signal>
<signal name="body_shape_entered">
@@ -175,10 +191,10 @@
<param index="3" name="local_shape_index" type="int" />
<description>
Emitted when one of a [PhysicsBody3D] or [GridMap]'s [Shape3D]s enters one of this Area3D's [Shape3D]s. Requires [member monitoring] to be set to [code]true[/code]. [GridMap]s are detected if the [MeshLibrary] has Collision [Shape3D]s.
- [code]body_rid[/code] the [RID] of the [PhysicsBody3D] or [MeshLibrary]'s [CollisionObject3D] used by the [PhysicsServer3D].
- [code]body[/code] the [Node], if it exists in the tree, of the [PhysicsBody3D] or [GridMap].
- [code]body_shape_index[/code] the index of the [Shape3D] of the [PhysicsBody3D] or [GridMap] used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with [code]body.shape_owner_get_owner(body.shape_find_owner(body_shape_index))[/code].
- [code]local_shape_index[/code] the index of the [Shape3D] of this Area3D used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with [code]self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))[/code].
+ [param body_rid] the [RID] of the [PhysicsBody3D] or [MeshLibrary]'s [CollisionObject3D] used by the [PhysicsServer3D].
+ [param body] the [Node], if it exists in the tree, of the [PhysicsBody3D] or [GridMap].
+ [param body_shape_index] the index of the [Shape3D] of the [PhysicsBody3D] or [GridMap] used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with [code]body.shape_owner_get_owner(body.shape_find_owner(body_shape_index))[/code].
+ [param local_shape_index] the index of the [Shape3D] of this Area3D used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with [code]self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))[/code].
</description>
</signal>
<signal name="body_shape_exited">
@@ -188,10 +204,10 @@
<param index="3" name="local_shape_index" type="int" />
<description>
Emitted when one of a [PhysicsBody3D] or [GridMap]'s [Shape3D]s enters one of this Area3D's [Shape3D]s. Requires [member monitoring] to be set to [code]true[/code]. [GridMap]s are detected if the [MeshLibrary] has Collision [Shape3D]s.
- [code]body_rid[/code] the [RID] of the [PhysicsBody3D] or [MeshLibrary]'s [CollisionObject3D] used by the [PhysicsServer3D].
- [code]body[/code] the [Node], if it exists in the tree, of the [PhysicsBody3D] or [GridMap].
- [code]body_shape_index[/code] the index of the [Shape3D] of the [PhysicsBody3D] or [GridMap] used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with [code]body.shape_owner_get_owner(body.shape_find_owner(body_shape_index))[/code].
- [code]local_shape_index[/code] the index of the [Shape3D] of this Area3D used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with [code]self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))[/code].
+ [param body_rid] the [RID] of the [PhysicsBody3D] or [MeshLibrary]'s [CollisionObject3D] used by the [PhysicsServer3D].
+ [param body] the [Node], if it exists in the tree, of the [PhysicsBody3D] or [GridMap].
+ [param body_shape_index] the index of the [Shape3D] of the [PhysicsBody3D] or [GridMap] used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with [code]body.shape_owner_get_owner(body.shape_find_owner(body_shape_index))[/code].
+ [param local_shape_index] the index of the [Shape3D] of this Area3D used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with [code]self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))[/code].
</description>
</signal>
</signals>
diff --git a/doc/classes/Array.xml b/doc/classes/Array.xml
index ac8d09be43..2ec37651f7 100644
--- a/doc/classes/Array.xml
+++ b/doc/classes/Array.xml
@@ -53,6 +53,16 @@
</constructor>
<constructor name="Array">
<return type="Array" />
+ <param index="0" name="base" type="Array" />
+ <param index="1" name="type" type="int" />
+ <param index="2" name="class_name" type="StringName" />
+ <param index="3" name="script" type="Variant" />
+ <description>
+ Creates a typed array from the [param base] array. The base array can't be already typed. See [method set_typed] for more details.
+ </description>
+ </constructor>
+ <constructor name="Array">
+ <return type="Array" />
<param index="0" name="from" type="Array" />
<description>
Constructs an [Array] as a copy of the given [Array].
@@ -201,7 +211,7 @@
<param index="0" name="value" type="Variant" />
<param index="1" name="before" type="bool" default="true" />
<description>
- Finds the index of an existing value (or the insertion index that maintains sorting order, if the value is not yet present in the array) using binary search. Optionally, a [code]before[/code] specifier can be passed. If [code]false[/code], the returned index comes after all existing entries of the value in the array.
+ Finds the index of an existing value (or the insertion index that maintains sorting order, if the value is not yet present in the array) using binary search. Optionally, a [param before] specifier can be passed. If [code]false[/code], the returned index comes after all existing entries of the value in the array.
[b]Note:[/b] Calling [method bsearch] on an unsorted array results in unexpected behavior.
</description>
</method>
@@ -211,7 +221,7 @@
<param index="1" name="func" type="Callable" />
<param index="2" name="before" type="bool" default="true" />
<description>
- Finds the index of an existing value (or the insertion index that maintains sorting order, if the value is not yet present in the array) using binary search and a custom comparison method. Optionally, a [code]before[/code] specifier can be passed. If [code]false[/code], the returned index comes after all existing entries of the value in the array. The custom method receives two arguments (an element from the array and the value searched for) and must return [code]true[/code] if the first argument is less than the second, and return [code]false[/code] otherwise.
+ Finds the index of an existing value (or the insertion index that maintains sorting order, if the value is not yet present in the array) using binary search and a custom comparison method. Optionally, a [param before] specifier can be passed. If [code]false[/code], the returned index comes after all existing entries of the value in the array. The custom method receives two arguments (an element from the array and the value searched for) and must return [code]true[/code] if the first argument is less than the second, and return [code]false[/code] otherwise.
[b]Note:[/b] Calling [method bsearch_custom] on an unsorted array results in unexpected behavior.
</description>
</method>
@@ -233,7 +243,7 @@
<param index="0" name="deep" type="bool" default="false" />
<description>
Returns a copy of the array.
- If [code]deep[/code] is [code]true[/code], a deep copy is performed: all nested arrays and dictionaries are duplicated and will not be shared with the original array. If [code]false[/code], a shallow copy is made and references to the original nested arrays and dictionaries are kept, so that modifying a sub-array or dictionary in the copy will also impact those referenced in the source array.
+ If [param deep] is [code]true[/code], a deep copy is performed: all nested arrays and dictionaries are duplicated and will not be shared with the original array. If [code]false[/code], a shallow copy is made and references to the original nested arrays and dictionaries are kept, so that modifying a sub-array or dictionary in the copy will also impact those referenced in the source array.
</description>
</method>
<method name="erase">
@@ -262,6 +272,7 @@
array.Fill(0); // Initialize the 10 elements to 0.
[/csharp]
[/codeblocks]
+ [b]Note:[/b] If [param value] is of a reference type ([Object]-derived, [Array], [Dictionary], etc.) then the array is filled with the references to the same object, i.e. no duplicates are created.
</description>
</method>
<method name="filter" qualifiers="const">
@@ -303,6 +314,24 @@
[b]Note:[/b] Calling this function is not the same as writing [code]array[0][/code]. If the array is empty, accessing by index will pause project execution when running from the editor.
</description>
</method>
+ <method name="get_typed_builtin" qualifiers="const">
+ <return type="int" />
+ <description>
+ Returns the [enum Variant.Type] constant for a typed array. If the [Array] is not typed, returns [constant TYPE_NIL].
+ </description>
+ </method>
+ <method name="get_typed_class_name" qualifiers="const">
+ <return type="StringName" />
+ <description>
+ Returns a class name of a typed [Array] of type [constant TYPE_OBJECT].
+ </description>
+ </method>
+ <method name="get_typed_script" qualifiers="const">
+ <return type="Variant" />
+ <description>
+ Returns the script associated with a typed array tied to a class name.
+ </description>
+ </method>
<method name="has" qualifiers="const">
<return type="bool" />
<param index="0" name="value" type="Variant" />
@@ -324,7 +353,6 @@
GD.Print(arr.Contains("7")); // False
[/csharp]
[/codeblocks]
-
[b]Note:[/b] This is equivalent to using the [code]in[/code] operator as follows:
[codeblocks]
[gdscript]
@@ -366,6 +394,18 @@
Returns [code]true[/code] if the array is empty.
</description>
</method>
+ <method name="is_read_only" qualifiers="const">
+ <return type="bool" />
+ <description>
+ Returns [code]true[/code] if the array is read-only. See [method set_read_only]. Arrays are automatically read-only if declared with [code]const[/code] keyword.
+ </description>
+ </method>
+ <method name="is_typed" qualifiers="const">
+ <return type="bool" />
+ <description>
+ Returns [code]true[/code] if the array is typed. Typed arrays can only store elements of their associated type and provide type safety for the [code][][/code] operator. Methods of typed array still return [Variant].
+ </description>
+ </method>
<method name="map" qualifiers="const">
<return type="Array" />
<param index="0" name="method" type="Callable" />
@@ -395,11 +435,21 @@
Returns the minimum value contained in the array if all elements are of comparable types. If the elements can't be compared, [code]null[/code] is returned.
</description>
</method>
+ <method name="pick_random" qualifiers="const">
+ <return type="Variant" />
+ <description>
+ Returns a random value from the target array.
+ [codeblock]
+ var array: Array[int] = [1, 2, 3, 4]
+ print(array.pick_random()) # Prints either of the four numbers.
+ [/codeblock]
+ </description>
+ </method>
<method name="pop_at">
<return type="Variant" />
<param index="0" name="position" type="int" />
<description>
- Removes and returns the element of the array at index [code]position[/code]. If negative, [code]position[/code] is considered relative to the end of the array. Leaves the array untouched and returns [code]null[/code] if the array is empty or if it's accessed out of bounds. An error message is printed when the array is accessed out of bounds, but not when the array is empty.
+ Removes and returns the element of the array at index [param position]. If negative, [param position] is considered relative to the end of the array. Leaves the array untouched and returns [code]null[/code] if the array is empty or if it's accessed out of bounds. An error message is printed when the array is accessed out of bounds, but not when the array is empty.
[b]Note:[/b] On large arrays, this method can be slower than [method pop_back] as it will reindex the array's elements that are located after the removed element. The larger the array and the lower the index of the removed element, the slower [method pop_at] will be.
</description>
</method>
@@ -436,8 +486,8 @@
<param index="0" name="method" type="Callable" />
<param index="1" name="accum" type="Variant" default="null" />
<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].
+ Calls the provided [Callable] for each element in array and accumulates the result in [param accum].
+ The callable's method takes two arguments: the current value of [param accum] and the current array element. If [param accum] is [code]null[/code] (default value), the iteration will start from the second element, with the first one used as initial value of [param accum].
[codeblock]
func _ready():
print([1, 2, 3].reduce(sum, 10)) # Prints 16.
@@ -479,6 +529,23 @@
Searches the array in reverse order. Optionally, a start search index can be passed. If negative, the start index is considered relative to the end of the array.
</description>
</method>
+ <method name="set_read_only">
+ <return type="void" />
+ <param index="0" name="enable" type="bool" />
+ <description>
+ Makes the [Array] read-only, i.e. disabled modifying of the array's elements. Does not apply to nested content, e.g. content of nested arrays.
+ </description>
+ </method>
+ <method name="set_typed">
+ <return type="void" />
+ <param index="0" name="type" type="int" />
+ <param index="1" name="class_name" type="StringName" />
+ <param index="2" name="script" type="Variant" />
+ <description>
+ Makes the [Array] typed. The [param type] should be one of the [enum Variant.Type] constants. [param class_name] is optional and can only be provided for [constant TYPE_OBJECT]. [param script] can only be provided if [param class_name] is not empty.
+ The method fails if an array is already typed.
+ </description>
+ </method>
<method name="shuffle">
<return type="void" />
<description>
@@ -498,17 +565,18 @@
<param index="2" name="step" type="int" default="1" />
<param index="3" name="deep" type="bool" default="false" />
<description>
- Returns the slice of the [Array], from [code]begin[/code] (inclusive) to [code]end[/code] (exclusive), as a new [Array].
- The absolute value of [code]begin[/code] and [code]end[/code] will be clamped to the array size, so the default value for [code]end[/code] makes it slice to the size of the array by default (i.e. [code]arr.slice(1)[/code] is a shorthand for [code]arr.slice(1, arr.size())[/code]).
- If either [code]begin[/code] or [code]end[/code] are negative, they will be relative to the end of the array (i.e. [code]arr.slice(0, -2)[/code] is a shorthand for [code]arr.slice(0, arr.size() - 2)[/code]).
- If specified, [code]step[/code] is the relative index between source elements. It can be negative, then [code]begin[/code] must be higher than [code]end[/code]. For example, [code][0, 1, 2, 3, 4, 5].slice(5, 1, -2)[/code] returns [code][5, 3][/code]).
- If [code]deep[/code] is true, each element will be copied by value rather than by reference.
+ Returns the slice of the [Array], from [param begin] (inclusive) to [param end] (exclusive), as a new [Array].
+ The absolute value of [param begin] and [param end] will be clamped to the array size, so the default value for [param end] makes it slice to the size of the array by default (i.e. [code]arr.slice(1)[/code] is a shorthand for [code]arr.slice(1, arr.size())[/code]).
+ If either [param begin] or [param end] are negative, they will be relative to the end of the array (i.e. [code]arr.slice(0, -2)[/code] is a shorthand for [code]arr.slice(0, arr.size() - 2)[/code]).
+ If specified, [param step] is the relative index between source elements. It can be negative, then [param begin] must be higher than [param end]. For example, [code][0, 1, 2, 3, 4, 5].slice(5, 1, -2)[/code] returns [code][5, 3][/code]).
+ If [param deep] is true, each element will be copied by value rather than by reference.
</description>
</method>
<method name="sort">
<return type="void" />
<description>
Sorts the array.
+ [b]Note:[/b] The sorting algorithm used is not [url=https://en.wikipedia.org/wiki/Sorting_algorithm#Stability]stable[/url]. This means that values considered equal may have their order changed when using [method sort].
[b]Note:[/b] Strings are sorted in alphabetical order (as opposed to natural order). This may lead to unexpected behavior when sorting an array of strings ending with a sequence of numbers. Consider the following example:
[codeblocks]
[gdscript]
@@ -533,7 +601,8 @@
<param index="0" name="func" type="Callable" />
<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]. 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.
+ [b]Note:[/b] The sorting algorithm used is not [url=https://en.wikipedia.org/wiki/Sorting_algorithm#Stability]stable[/url]. This means that values considered equal may have their order changed when using [method sort_custom].
+ [b]Note:[/b] You cannot randomize the return value as the heapsort algorithm expects a deterministic result. Randomizing the return value will result in unexpected behavior.
[codeblocks]
[gdscript]
func sort_ascending(a, b):
@@ -556,62 +625,69 @@
[/codeblocks]
</description>
</method>
+ <method name="typed_assign">
+ <return type="bool" />
+ <param index="0" name="array" type="Array" />
+ <description>
+ Assigns a different [Array] to this array reference. It the array is typed, the new array's type must be compatible and its elements will be automatically converted.
+ </description>
+ </method>
</methods>
<operators>
<operator name="operator !=">
<return type="bool" />
<param index="0" name="right" type="Array" />
<description>
- Compares the left operand [Array] against the [code]right[/code] [Array]. Returns [code]true[/code] if the sizes or contents of the arrays are [i]not[/i] equal, [code]false[/code] otherwise.
+ Compares the left operand [Array] against the [param right] [Array]. Returns [code]true[/code] if the sizes or contents of the arrays are [i]not[/i] equal, [code]false[/code] otherwise.
</description>
</operator>
<operator name="operator +">
<return type="Array" />
<param index="0" name="right" type="Array" />
<description>
- Concatenates two [Array]s together, with the [code]right[/code] [Array] being added to the end of the [Array] specified in the left operand. For example, [code][1, 2] + [3, 4][/code] results in [code][1, 2, 3, 4][/code].
+ Concatenates two [Array]s together, with the [param right] [Array] being added to the end of the [Array] specified in the left operand. For example, [code][1, 2] + [3, 4][/code] results in [code][1, 2, 3, 4][/code].
</description>
</operator>
<operator name="operator &lt;">
<return type="bool" />
<param index="0" name="right" type="Array" />
<description>
- Performs a comparison for each index between the left operand [Array] and the [code]right[/code] [Array], considering the highest common index of both arrays for this comparison: Returns [code]true[/code] on the first occurrence of an element that is less, or [code]false[/code] if the element is greater. Note that depending on the type of data stored, this function may be recursive. If all elements are equal, it compares the length of both arrays and returns [code]false[/code] if the left operand [Array] has less elements, otherwise it returns [code]true[/code].
+ Performs a comparison for each index between the left operand [Array] and the [param right] [Array], considering the highest common index of both arrays for this comparison: Returns [code]true[/code] on the first occurrence of an element that is less, or [code]false[/code] if the element is greater. Note that depending on the type of data stored, this function may be recursive. If all elements are equal, it compares the length of both arrays and returns [code]false[/code] if the left operand [Array] has fewer elements, otherwise it returns [code]true[/code].
</description>
</operator>
<operator name="operator &lt;=">
<return type="bool" />
<param index="0" name="right" type="Array" />
<description>
- Performs a comparison for each index between the left operand [Array] and the [code]right[/code] [Array], considering the highest common index of both arrays for this comparison: Returns [code]true[/code] on the first occurrence of an element that is less, or [code]false[/code] if the element is greater. Note that depending on the type of data stored, this function may be recursive. If all elements are equal, it compares the length of both arrays and returns [code]true[/code] if the left operand [Array] has less or the same number of elements, otherwise it returns [code]false[/code].
+ Performs a comparison for each index between the left operand [Array] and the [param right] [Array], considering the highest common index of both arrays for this comparison: Returns [code]true[/code] on the first occurrence of an element that is less, or [code]false[/code] if the element is greater. Note that depending on the type of data stored, this function may be recursive. If all elements are equal, it compares the length of both arrays and returns [code]true[/code] if the left operand [Array] has the same number of elements or fewer, otherwise it returns [code]false[/code].
</description>
</operator>
<operator name="operator ==">
<return type="bool" />
<param index="0" name="right" type="Array" />
<description>
- Compares the left operand [Array] against the [code]right[/code] [Array]. Returns [code]true[/code] if the sizes and contents of the arrays are equal, [code]false[/code] otherwise.
+ Compares the left operand [Array] against the [param right] [Array]. Returns [code]true[/code] if the sizes and contents of the arrays are equal, [code]false[/code] otherwise.
</description>
</operator>
<operator name="operator &gt;">
<return type="bool" />
<param index="0" name="right" type="Array" />
<description>
- Performs a comparison for each index between the left operand [Array] and the [code]right[/code] [Array], considering the highest common index of both arrays for this comparison: Returns [code]true[/code] on the first occurrence of an element that is greater, or [code]false[/code] if the element is less. Note that depending on the type of data stored, this function may be recursive. If all elements are equal, it compares the length of both arrays and returns [code]true[/code] if the [code]right[/code] [Array] has more elements, otherwise it returns [code]false[/code].
+ Performs a comparison for each index between the left operand [Array] and the [param right] [Array], considering the highest common index of both arrays for this comparison: Returns [code]true[/code] on the first occurrence of an element that is greater, or [code]false[/code] if the element is less. Note that depending on the type of data stored, this function may be recursive. If all elements are equal, it compares the length of both arrays and returns [code]true[/code] if the [param right] [Array] has more elements, otherwise it returns [code]false[/code].
</description>
</operator>
<operator name="operator &gt;=">
<return type="bool" />
<param index="0" name="right" type="Array" />
<description>
- Performs a comparison for each index between the left operand [Array] and the [code]right[/code] [Array], considering the highest common index of both arrays for this comparison: Returns [code]true[/code] on the first occurrence of an element that is greater, or [code]false[/code] if the element is less. Note that depending on the type of data stored, this function may be recursive. If all elements are equal, it compares the length of both arrays and returns [code]true[/code] if the [code]right[/code] [Array] has more or the same number of elements, otherwise it returns [code]false[/code].
+ Performs a comparison for each index between the left operand [Array] and the [param right] [Array], considering the highest common index of both arrays for this comparison: Returns [code]true[/code] on the first occurrence of an element that is greater, or [code]false[/code] if the element is less. Note that depending on the type of data stored, this function may be recursive. If all elements are equal, it compares the length of both arrays and returns [code]true[/code] if the [param right] [Array] has more or the same number of elements, otherwise it returns [code]false[/code].
</description>
</operator>
<operator name="operator []">
<return type="void" />
<param index="0" name="index" type="int" />
<description>
- Returns a reference to the element of type [Variant] at the specified location. Arrays start at index 0. [code]index[/code] can be a zero or positive value to start from the beginning, or a negative value to start from the end. Out-of-bounds array access causes a run-time error, which will result in an error being printed and the project execution pausing if run from the editor.
+ Returns a reference to the element of type [Variant] at the specified location. Arrays start at index 0. [param index] can be a zero or positive value to start from the beginning, or a negative value to start from the end. Out-of-bounds array access causes a run-time error, which will result in an error being printed and the project execution pausing if run from the editor.
</description>
</operator>
</operators>
diff --git a/doc/classes/ArrayMesh.xml b/doc/classes/ArrayMesh.xml
index 500cf342c0..b9c8ab0f6c 100644
--- a/doc/classes/ArrayMesh.xml
+++ b/doc/classes/ArrayMesh.xml
@@ -25,10 +25,12 @@
m.mesh = arr_mesh
[/gdscript]
[csharp]
- var vertices = new Godot.Collections.Array&lt;Vector3&gt;();
- vertices.Add(new Vector3(0, 1, 0));
- vertices.Add(new Vector3(1, 0, 0));
- vertices.Add(new Vector3(0, 0, 1));
+ var vertices = new Vector3[]
+ {
+ new Vector3(0, 1, 0),
+ new Vector3(1, 0, 0),
+ new Vector3(0, 0, 1),
+ };
// Initialize the ArrayMesh.
var arrMesh = new ArrayMesh();
@@ -38,7 +40,7 @@
// Create the Mesh.
arrMesh.AddSurfaceFromArrays(Mesh.PrimitiveType.Triangles, arrays);
- var m = new MeshInstance();
+ var m = new MeshInstance3D();
m.Mesh = arrMesh;
[/csharp]
[/codeblocks]
@@ -61,13 +63,13 @@
<return type="void" />
<param index="0" name="primitive" type="int" enum="Mesh.PrimitiveType" />
<param index="1" name="arrays" type="Array" />
- <param index="2" name="blend_shapes" type="Array" default="[]" />
+ <param index="2" name="blend_shapes" type="Array[]" default="[]" />
<param index="3" name="lods" type="Dictionary" default="{}" />
<param index="4" name="compress_flags" type="int" default="0" />
<description>
Creates a new surface.
- Surfaces are created to be rendered using a [code]primitive[/code], which may be any of the types defined in [enum Mesh.PrimitiveType]. (As a note, when using indices, it is recommended to only use points, lines, or triangles.) [method Mesh.get_surface_count] will become the [code]surf_idx[/code] for this new surface.
- The [code]arrays[/code] argument is an array of arrays. See [enum Mesh.ArrayType] for the values used in this array. For example, [code]arrays[0][/code] is the array of vertices. That first vertex sub-array is always required; the others are optional. Adding an index array puts this function into "index mode" where the vertex and other arrays become the sources of data and the index array defines the vertex order. All sub-arrays must have the same length as the vertex array (or be an exact multiple of the vertex array's length, when multiple elements of a sub-array correspond to a single vertex) or be empty, except for [constant Mesh.ARRAY_INDEX] if it is used.
+ Surfaces are created to be rendered using a [param primitive], 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 [param arrays] argument is an array of arrays. See [enum Mesh.ArrayType] for the values used in this array. For example, [code]arrays[0][/code] is the array of vertices. That first vertex sub-array is always required; the others are optional. Adding an index array puts this function into "index mode" where the vertex and other arrays become the sources of data and the index array defines the vertex order. All sub-arrays must have the same length as the vertex array (or be an exact multiple of the vertex array's length, when multiple elements of a sub-array correspond to a single vertex) or be empty, except for [constant Mesh.ARRAY_INDEX] if it is used.
</description>
</method>
<method name="clear_blend_shapes">
diff --git a/doc/classes/AtlasTexture.xml b/doc/classes/AtlasTexture.xml
index 759acff773..fc75459e46 100644
--- a/doc/classes/AtlasTexture.xml
+++ b/doc/classes/AtlasTexture.xml
@@ -1,26 +1,28 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AtlasTexture" inherits="Texture2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
- Crops out one part of a texture, such as a texture from a texture atlas.
+ A texture that crops out part of another Texture2D.
</brief_description>
<description>
- [Texture2D] resource that crops out one part of the [member atlas] texture, defined by [member region]. The main use case is cropping out textures from a texture atlas, which is a big texture file that packs multiple smaller textures. Consists of a [Texture2D] for the [member atlas], a [member region] that defines the area of [member atlas] to use, and a [member margin] that defines the border width.
- [AtlasTexture] cannot be used in an [AnimatedTexture], cannot be tiled in nodes such as [TextureRect], and does not work properly if used inside of other [AtlasTexture] resources. Multiple [AtlasTexture] resources can be used to crop multiple textures from the atlas. Using a texture atlas helps to optimize video memory costs and render calls compared to using multiple small files.
+ [Texture2D] resource that draws only part of its [member atlas] texture, as defined by the [member region]. An additional [member margin] can also be set, which is useful for small adjustments.
+ Multiple [AtlasTexture] resources can be cropped from the same [member atlas]. Packing many smaller textures into a singular large texture helps to optimize video memory costs and render calls.
+ [b]Note:[/b] [AtlasTexture] cannot be used in an [AnimatedTexture], and may not tile properly in nodes such as [TextureRect], when inside other [AtlasTexture] resources.
</description>
<tutorials>
</tutorials>
<members>
<member name="atlas" type="Texture2D" setter="set_atlas" getter="get_atlas">
- The texture that contains the atlas. Can be any [Texture2D] subtype.
+ The texture that contains the atlas. Can be any type inheriting from [Texture2D], including another [AtlasTexture].
</member>
<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.
+ If [code]true[/code], the area outside of the [member region] is clipped 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)">
- 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.
+ The margin around the [member region]. Useful for small adjustments. If the [member Rect2.size] of this property ("w" and "h" in the editor) is set, the drawn texture is resized to fit within the margin.
</member>
<member name="region" type="Rect2" setter="set_region" getter="get_region" default="Rect2(0, 0, 0, 0)">
- The AtlasTexture's used region.
+ The region used to draw the [member atlas].
</member>
+ <member name="resource_local_to_scene" type="bool" setter="set_local_to_scene" getter="is_local_to_scene" overrides="Resource" default="false" />
</members>
</class>
diff --git a/doc/classes/AudioEffectCapture.xml b/doc/classes/AudioEffectCapture.xml
index 016c71bf27..bac9167223 100644
--- a/doc/classes/AudioEffectCapture.xml
+++ b/doc/classes/AudioEffectCapture.xml
@@ -5,17 +5,19 @@
</brief_description>
<description>
AudioEffectCapture is an AudioEffect which copies all audio frames from the attached audio effect bus into its internal ring buffer.
- Application code should consume these audio frames from this ring buffer using [method get_buffer] and process it as needed, for example to capture data from a microphone, implement application defined effects, or to transmit audio over the network. When capturing audio data from a microphone, the format of the samples will be stereo 32-bit floating point PCM.
+ Application code should consume these audio frames from this ring buffer using [method get_buffer] and process it as needed, for example to capture data from an [AudioStreamMicrophone], implement application-defined effects, or to transmit audio over the network. When capturing audio data from a microphone, the format of the samples will be stereo 32-bit floating point PCM.
+ [b]Note:[/b] [member ProjectSettings.audio/driver/enable_input] must be [code]true[/code] for audio input to work. See also that setting's description for caveats related to permissions and operating system privacy settings.
</description>
<tutorials>
<link title="Audio buses">$DOCS_URL/tutorials/audio/audio_buses.html</link>
+ <link title="Audio Mic Record Demo">https://github.com/godotengine/godot-demo-projects/tree/master/audio/mic_record</link>
</tutorials>
<methods>
<method name="can_get_buffer" qualifiers="const">
<return type="bool" />
<param index="0" name="frames" type="int" />
<description>
- Returns [code]true[/code] if at least [code]frames[/code] audio frames are available to read in the internal ring buffer.
+ Returns [code]true[/code] if at least [param frames] audio frames are available to read in the internal ring buffer.
</description>
</method>
<method name="clear_buffer">
@@ -28,8 +30,8 @@
<return type="PackedVector2Array" />
<param index="0" name="frames" type="int" />
<description>
- Gets the next [code]frames[/code] audio samples from the internal ring buffer.
- Returns a [PackedVector2Array] containing exactly [code]frames[/code] audio samples if available, or an empty [PackedVector2Array] if insufficient data was available.
+ Gets the next [param frames] audio samples from the internal ring buffer.
+ Returns a [PackedVector2Array] containing exactly [param frames] audio samples if available, or an empty [PackedVector2Array] if insufficient data was available.
</description>
</method>
<method name="get_buffer_length_frames" qualifiers="const">
diff --git a/doc/classes/AudioEffectChorus.xml b/doc/classes/AudioEffectChorus.xml
index 83cbcff70c..de168cdfb0 100644
--- a/doc/classes/AudioEffectChorus.xml
+++ b/doc/classes/AudioEffectChorus.xml
@@ -166,7 +166,7 @@
The voice's filter rate.
</member>
<member name="voice_count" type="int" setter="set_voice_count" getter="get_voice_count" default="2">
- The amount of voices in the effect.
+ The number of voices in the effect.
</member>
<member name="wet" type="float" setter="set_wet" getter="get_wet" default="0.5">
The effect's processed signal.
diff --git a/doc/classes/AudioEffectDelay.xml b/doc/classes/AudioEffectDelay.xml
index 8223ccd6bd..b9ae12204e 100644
--- a/doc/classes/AudioEffectDelay.xml
+++ b/doc/classes/AudioEffectDelay.xml
@@ -14,40 +14,40 @@
<member name="dry" type="float" setter="set_dry" getter="get_dry" default="1.0">
Output percent of original sound. At 0, only delayed sounds are output. Value can range from 0 to 1.
</member>
- <member name="feedback/active" type="bool" setter="set_feedback_active" getter="is_feedback_active" default="false">
+ <member name="feedback_active" type="bool" setter="set_feedback_active" getter="is_feedback_active" default="false">
If [code]true[/code], feedback is enabled.
</member>
- <member name="feedback/delay_ms" type="float" setter="set_feedback_delay_ms" getter="get_feedback_delay_ms" default="340.0">
+ <member name="feedback_delay_ms" type="float" setter="set_feedback_delay_ms" getter="get_feedback_delay_ms" default="340.0">
Feedback delay time in milliseconds.
</member>
- <member name="feedback/level_db" type="float" setter="set_feedback_level_db" getter="get_feedback_level_db" default="-6.0">
+ <member name="feedback_level_db" type="float" setter="set_feedback_level_db" getter="get_feedback_level_db" default="-6.0">
Sound level for [code]tap1[/code].
</member>
- <member name="feedback/lowpass" type="float" setter="set_feedback_lowpass" getter="get_feedback_lowpass" default="16000.0">
+ <member name="feedback_lowpass" type="float" setter="set_feedback_lowpass" getter="get_feedback_lowpass" default="16000.0">
Low-pass filter for feedback, in Hz. Frequencies below this value are filtered out of the source signal.
</member>
- <member name="tap1/active" type="bool" setter="set_tap1_active" getter="is_tap1_active" default="true">
+ <member name="tap1_active" type="bool" setter="set_tap1_active" getter="is_tap1_active" default="true">
If [code]true[/code], [code]tap1[/code] will be enabled.
</member>
- <member name="tap1/delay_ms" type="float" setter="set_tap1_delay_ms" getter="get_tap1_delay_ms" default="250.0">
+ <member name="tap1_delay_ms" type="float" setter="set_tap1_delay_ms" getter="get_tap1_delay_ms" default="250.0">
[code]tap1[/code] delay time in milliseconds.
</member>
- <member name="tap1/level_db" type="float" setter="set_tap1_level_db" getter="get_tap1_level_db" default="-6.0">
+ <member name="tap1_level_db" type="float" setter="set_tap1_level_db" getter="get_tap1_level_db" default="-6.0">
Sound level for [code]tap1[/code].
</member>
- <member name="tap1/pan" type="float" setter="set_tap1_pan" getter="get_tap1_pan" default="0.2">
+ <member name="tap1_pan" type="float" setter="set_tap1_pan" getter="get_tap1_pan" default="0.2">
Pan position for [code]tap1[/code]. Value can range from -1 (fully left) to 1 (fully right).
</member>
- <member name="tap2/active" type="bool" setter="set_tap2_active" getter="is_tap2_active" default="true">
+ <member name="tap2_active" type="bool" setter="set_tap2_active" getter="is_tap2_active" default="true">
If [code]true[/code], [code]tap2[/code] will be enabled.
</member>
- <member name="tap2/delay_ms" type="float" setter="set_tap2_delay_ms" getter="get_tap2_delay_ms" default="500.0">
+ <member name="tap2_delay_ms" type="float" setter="set_tap2_delay_ms" getter="get_tap2_delay_ms" default="500.0">
[b]Tap2[/b] delay time in milliseconds.
</member>
- <member name="tap2/level_db" type="float" setter="set_tap2_level_db" getter="get_tap2_level_db" default="-12.0">
+ <member name="tap2_level_db" type="float" setter="set_tap2_level_db" getter="get_tap2_level_db" default="-12.0">
Sound level for [code]tap2[/code].
</member>
- <member name="tap2/pan" type="float" setter="set_tap2_pan" getter="get_tap2_pan" default="-0.4">
+ <member name="tap2_pan" type="float" setter="set_tap2_pan" getter="get_tap2_pan" default="-0.4">
Pan position for [code]tap2[/code]. Value can range from -1 (fully left) to 1 (fully right).
</member>
</members>
diff --git a/doc/classes/AudioServer.xml b/doc/classes/AudioServer.xml
index 98b28ae504..36f12dd5c4 100644
--- a/doc/classes/AudioServer.xml
+++ b/doc/classes/AudioServer.xml
@@ -17,7 +17,7 @@
<return type="void" />
<param index="0" name="at_position" type="int" default="-1" />
<description>
- Adds a bus at [code]at_position[/code].
+ Adds a bus at [param at_position].
</description>
</method>
<method name="add_bus_effect">
@@ -26,13 +26,14 @@
<param index="1" name="effect" type="AudioEffect" />
<param index="2" name="at_position" type="int" default="-1" />
<description>
- Adds an [AudioEffect] effect to the bus [code]bus_idx[/code] at [code]at_position[/code].
+ Adds an [AudioEffect] effect to the bus [param bus_idx] at [param at_position].
</description>
</method>
<method name="capture_get_device_list">
- <return type="Array" />
+ <return type="PackedStringArray" />
<description>
Returns the names of all audio input devices detected on the system.
+ [b]Note:[/b] [member ProjectSettings.audio/driver/enable_input] must be [code]true[/code] for audio input to work. See also that setting's description for caveats related to permissions and operating system privacy settings.
</description>
</method>
<method name="generate_bus_layout" qualifiers="const">
@@ -45,7 +46,7 @@
<return type="int" />
<param index="0" name="bus_idx" type="int" />
<description>
- Returns the amount of channels of the bus at index [code]bus_idx[/code].
+ Returns the number of channels of the bus at index [param bus_idx].
</description>
</method>
<method name="get_bus_effect">
@@ -53,14 +54,14 @@
<param index="0" name="bus_idx" type="int" />
<param index="1" name="effect_idx" type="int" />
<description>
- Returns the [AudioEffect] at position [code]effect_idx[/code] in bus [code]bus_idx[/code].
+ Returns the [AudioEffect] at position [param effect_idx] in bus [param bus_idx].
</description>
</method>
<method name="get_bus_effect_count">
<return type="int" />
<param index="0" name="bus_idx" type="int" />
<description>
- Returns the number of effects on the bus at [code]bus_idx[/code].
+ Returns the number of effects on the bus at [param bus_idx].
</description>
</method>
<method name="get_bus_effect_instance">
@@ -76,14 +77,14 @@
<return type="int" />
<param index="0" name="bus_name" type="StringName" />
<description>
- Returns the index of the bus with the name [code]bus_name[/code].
+ Returns the index of the bus with the name [param bus_name].
</description>
</method>
<method name="get_bus_name" qualifiers="const">
<return type="String" />
<param index="0" name="bus_idx" type="int" />
<description>
- Returns the name of the bus with the index [code]bus_idx[/code].
+ Returns the name of the bus with the index [param bus_idx].
</description>
</method>
<method name="get_bus_peak_volume_left_db" qualifiers="const">
@@ -91,7 +92,7 @@
<param index="0" name="bus_idx" type="int" />
<param index="1" name="channel" type="int" />
<description>
- Returns the peak volume of the left speaker at bus index [code]bus_idx[/code] and channel index [code]channel[/code].
+ Returns the peak volume of the left speaker at bus index [param bus_idx] and channel index [param channel].
</description>
</method>
<method name="get_bus_peak_volume_right_db" qualifiers="const">
@@ -99,25 +100,25 @@
<param index="0" name="bus_idx" type="int" />
<param index="1" name="channel" type="int" />
<description>
- Returns the peak volume of the right speaker at bus index [code]bus_idx[/code] and channel index [code]channel[/code].
+ Returns the peak volume of the right speaker at bus index [param bus_idx] and channel index [param channel].
</description>
</method>
<method name="get_bus_send" qualifiers="const">
<return type="StringName" />
<param index="0" name="bus_idx" type="int" />
<description>
- Returns the name of the bus that the bus at index [code]bus_idx[/code] sends to.
+ Returns the name of the bus that the bus at index [param bus_idx] sends to.
</description>
</method>
<method name="get_bus_volume_db" qualifiers="const">
<return type="float" />
<param index="0" name="bus_idx" type="int" />
<description>
- Returns the volume of the bus at index [code]bus_idx[/code] in dB.
+ Returns the volume of the bus at index [param bus_idx] in dB.
</description>
</method>
<method name="get_device_list">
- <return type="Array" />
+ <return type="PackedStringArray" />
<description>
Returns the names of all audio devices detected on the system.
</description>
@@ -156,7 +157,7 @@
<return type="bool" />
<param index="0" name="bus_idx" type="int" />
<description>
- If [code]true[/code], the bus at index [code]bus_idx[/code] is bypassing effects.
+ If [code]true[/code], the bus at index [param bus_idx] is bypassing effects.
</description>
</method>
<method name="is_bus_effect_enabled" qualifiers="const">
@@ -164,21 +165,21 @@
<param index="0" name="bus_idx" type="int" />
<param index="1" name="effect_idx" type="int" />
<description>
- If [code]true[/code], the effect at index [code]effect_idx[/code] on the bus at index [code]bus_idx[/code] is enabled.
+ If [code]true[/code], the effect at index [param effect_idx] on the bus at index [param bus_idx] is enabled.
</description>
</method>
<method name="is_bus_mute" qualifiers="const">
<return type="bool" />
<param index="0" name="bus_idx" type="int" />
<description>
- If [code]true[/code], the bus at index [code]bus_idx[/code] is muted.
+ If [code]true[/code], the bus at index [param bus_idx] is muted.
</description>
</method>
<method name="is_bus_solo" qualifiers="const">
<return type="bool" />
<param index="0" name="bus_idx" type="int" />
<description>
- If [code]true[/code], the bus at index [code]bus_idx[/code] is in solo mode.
+ If [code]true[/code], the bus at index [param bus_idx] is in solo mode.
</description>
</method>
<method name="lock">
@@ -193,14 +194,14 @@
<param index="0" name="index" type="int" />
<param index="1" name="to_index" type="int" />
<description>
- Moves the bus from index [code]index[/code] to index [code]to_index[/code].
+ Moves the bus from index [param index] to index [param to_index].
</description>
</method>
<method name="remove_bus">
<return type="void" />
<param index="0" name="index" type="int" />
<description>
- Removes the bus at index [code]index[/code].
+ Removes the bus at index [param index].
</description>
</method>
<method name="remove_bus_effect">
@@ -208,7 +209,7 @@
<param index="0" name="bus_idx" type="int" />
<param index="1" name="effect_idx" type="int" />
<description>
- Removes the effect at index [code]effect_idx[/code] from the bus at index [code]bus_idx[/code].
+ Removes the effect at index [param effect_idx] from the bus at index [param bus_idx].
</description>
</method>
<method name="set_bus_bypass_effects">
@@ -216,7 +217,7 @@
<param index="0" name="bus_idx" type="int" />
<param index="1" name="enable" type="bool" />
<description>
- If [code]true[/code], the bus at index [code]bus_idx[/code] is bypassing effects.
+ If [code]true[/code], the bus at index [param bus_idx] is bypassing effects.
</description>
</method>
<method name="set_bus_effect_enabled">
@@ -225,7 +226,7 @@
<param index="1" name="effect_idx" type="int" />
<param index="2" name="enabled" type="bool" />
<description>
- If [code]true[/code], the effect at index [code]effect_idx[/code] on the bus at index [code]bus_idx[/code] is enabled.
+ If [code]true[/code], the effect at index [param effect_idx] on the bus at index [param bus_idx] is enabled.
</description>
</method>
<method name="set_bus_layout">
@@ -240,7 +241,7 @@
<param index="0" name="bus_idx" type="int" />
<param index="1" name="enable" type="bool" />
<description>
- If [code]true[/code], the bus at index [code]bus_idx[/code] is muted.
+ If [code]true[/code], the bus at index [param bus_idx] is muted.
</description>
</method>
<method name="set_bus_name">
@@ -248,7 +249,7 @@
<param index="0" name="bus_idx" type="int" />
<param index="1" name="name" type="String" />
<description>
- Sets the name of the bus at index [code]bus_idx[/code] to [code]name[/code].
+ Sets the name of the bus at index [param bus_idx] to [param name].
</description>
</method>
<method name="set_bus_send">
@@ -256,7 +257,7 @@
<param index="0" name="bus_idx" type="int" />
<param index="1" name="send" type="StringName" />
<description>
- Connects the output of the bus at [code]bus_idx[/code] to the bus named [code]send[/code].
+ Connects the output of the bus at [param bus_idx] to the bus named [param send].
</description>
</method>
<method name="set_bus_solo">
@@ -264,7 +265,7 @@
<param index="0" name="bus_idx" type="int" />
<param index="1" name="enable" type="bool" />
<description>
- If [code]true[/code], the bus at index [code]bus_idx[/code] is in solo mode.
+ If [code]true[/code], the bus at index [param bus_idx] is in solo mode.
</description>
</method>
<method name="set_bus_volume_db">
@@ -272,7 +273,7 @@
<param index="0" name="bus_idx" type="int" />
<param index="1" name="volume_db" type="float" />
<description>
- Sets the volume of the bus at index [code]bus_idx[/code] to [code]volume_db[/code].
+ Sets the volume of the bus at index [param bus_idx] to [param volume_db].
</description>
</method>
<method name="set_enable_tagging_used_audio_streams">
@@ -287,7 +288,7 @@
<param index="1" name="effect_idx" type="int" />
<param index="2" name="by_effect_idx" type="int" />
<description>
- Swaps the position of two effects in bus [code]bus_idx[/code].
+ Swaps the position of two effects in bus [param bus_idx].
</description>
</method>
<method name="unlock">
@@ -302,7 +303,8 @@
Number of available audio buses.
</member>
<member name="capture_device" type="String" setter="capture_set_device" getter="capture_get_device" default="&quot;Default&quot;">
- Name of the current device for audio input (see [method get_device_list]). On systems with multiple audio inputs (such as analog, USB and HDMI audio), this can be used to select the audio input device. The value [code]"Default"[/code] will record audio on the system-wide default audio input. If an invalid device name is set, the value will be reverted back to [code]"Default"[/code].
+ Name of the current device for audio input (see [method capture_get_device_list]). On systems with multiple audio inputs (such as analog, USB and HDMI audio), this can be used to select the audio input device. The value [code]"Default"[/code] will record audio on the system-wide default audio input. If an invalid device name is set, the value will be reverted back to [code]"Default"[/code].
+ [b]Note:[/b] [member ProjectSettings.audio/driver/enable_input] must be [code]true[/code] for audio input to work. See also that setting's description for caveats related to permissions and operating system privacy settings.
</member>
<member name="device" type="String" setter="set_device" getter="get_device" default="&quot;Default&quot;">
Name of the current device for audio output (see [method get_device_list]). On systems with multiple audio outputs (such as analog, USB and HDMI audio), this can be used to select the audio output device. The value [code]"Default"[/code] will play audio on the system-wide default audio output. If an invalid device name is set, the value will be reverted back to [code]"Default"[/code].
diff --git a/doc/classes/AudioStreamGeneratorPlayback.xml b/doc/classes/AudioStreamGeneratorPlayback.xml
index 8bc8e61869..c16198c5c6 100644
--- a/doc/classes/AudioStreamGeneratorPlayback.xml
+++ b/doc/classes/AudioStreamGeneratorPlayback.xml
@@ -15,7 +15,7 @@
<return type="bool" />
<param index="0" name="amount" type="int" />
<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.
+ Returns [code]true[/code] if a buffer of the size [param amount] can be pushed to the audio sample data buffer without overflowing it, [code]false[/code] otherwise.
</description>
</method>
<method name="clear_buffer">
@@ -27,7 +27,7 @@
<method name="get_frames_available" qualifiers="const">
<return type="int" />
<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.
+ Returns the number of frames that can be pushed to the audio sample data buffer without overflowing it. If the result is [code]0[/code], the buffer is full.
</description>
</method>
<method name="get_skips" qualifiers="const">
diff --git a/doc/classes/AudioStreamMicrophone.xml b/doc/classes/AudioStreamMicrophone.xml
index e760bd526a..be3e91e037 100644
--- a/doc/classes/AudioStreamMicrophone.xml
+++ b/doc/classes/AudioStreamMicrophone.xml
@@ -1,9 +1,13 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AudioStreamMicrophone" inherits="AudioStream" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
+ Plays real-time audio input data.
</brief_description>
<description>
+ When used directly in an [AudioStreamPlayer] node, [AudioStreamMicrophone] plays back microphone input in real-time. This can be used in conjunction with [AudioEffectCapture] to process the data or save it.
+ [b]Note:[/b] [member ProjectSettings.audio/driver/enable_input] must be [code]true[/code] for audio input to work. See also that setting's description for caveats related to permissions and operating system privacy settings.
</description>
<tutorials>
+ <link title="Audio Mic Record Demo">https://github.com/godotengine/godot-demo-projects/tree/master/audio/mic_record</link>
</tutorials>
</class>
diff --git a/doc/classes/AudioStreamPlayer.xml b/doc/classes/AudioStreamPlayer.xml
index 29dbb1c1c9..06e183f4e2 100644
--- a/doc/classes/AudioStreamPlayer.xml
+++ b/doc/classes/AudioStreamPlayer.xml
@@ -32,7 +32,7 @@
<return type="void" />
<param index="0" name="from_position" type="float" default="0.0" />
<description>
- Plays the audio from the given [code]from_position[/code], in seconds.
+ Plays the audio from the given [param from_position], in seconds.
</description>
</method>
<method name="seek">
diff --git a/doc/classes/AudioStreamPlayer2D.xml b/doc/classes/AudioStreamPlayer2D.xml
index ee71651b42..ae86fd0e66 100644
--- a/doc/classes/AudioStreamPlayer2D.xml
+++ b/doc/classes/AudioStreamPlayer2D.xml
@@ -29,7 +29,7 @@
<return type="void" />
<param index="0" name="from_position" type="float" default="0.0" />
<description>
- Plays the audio from the given position [code]from_position[/code], in seconds.
+ Plays the audio from the given position [param from_position], in seconds.
</description>
</method>
<method name="seek">
diff --git a/doc/classes/AudioStreamPlayer3D.xml b/doc/classes/AudioStreamPlayer3D.xml
index 0219562eca..11d6e9cc7a 100644
--- a/doc/classes/AudioStreamPlayer3D.xml
+++ b/doc/classes/AudioStreamPlayer3D.xml
@@ -7,7 +7,7 @@
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 an [AudioListener3D] node to the scene and enabling it by calling [method AudioListener3D.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).
+ [b]Note:[/b] Hiding an [AudioStreamPlayer3D] node does not disable its audio output. To temporarily disable an [AudioStreamPlayer3D]'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">$DOCS_URL/tutorials/audio/audio_streams.html</link>
@@ -29,7 +29,7 @@
<return type="void" />
<param index="0" name="from_position" type="float" default="0.0" />
<description>
- Plays the audio from the given position [code]from_position[/code], in seconds.
+ Plays the audio from the given position [param from_position], in seconds.
</description>
</method>
<method name="seek">
@@ -102,12 +102,12 @@
<member name="stream_paused" type="bool" setter="set_stream_paused" getter="get_stream_paused" default="false">
If [code]true[/code], the playback is paused. You can resume it by setting [member stream_paused] to [code]false[/code].
</member>
- <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="10.0">
The factor for the attenuation effect. Higher values make the sound audible over a larger distance.
</member>
+ <member name="volume_db" type="float" setter="set_volume_db" getter="get_volume_db" default="0.0">
+ The base sound level unaffected by dampening, in decibels.
+ </member>
</members>
<signals>
<signal name="finished">
diff --git a/doc/classes/AudioStreamWAV.xml b/doc/classes/AudioStreamWAV.xml
index 1055fe053e..9f057dfa45 100644
--- a/doc/classes/AudioStreamWAV.xml
+++ b/doc/classes/AudioStreamWAV.xml
@@ -14,8 +14,8 @@
<return type="int" enum="Error" />
<param index="0" name="path" type="String" />
<description>
- Saves the AudioStreamWAV as a WAV file to [code]path[/code]. Samples with IMA ADPCM format can't be saved.
- [b]Note:[/b] A [code].wav[/code] extension is automatically appended to [code]path[/code] if it is missing.
+ Saves the AudioStreamWAV as a WAV file to [param path]. Samples with IMA ADPCM format can't be saved.
+ [b]Note:[/b] A [code].wav[/code] extension is automatically appended to [param path] if it is missing.
</description>
</method>
</methods>
diff --git a/doc/classes/BaseButton.xml b/doc/classes/BaseButton.xml
index 0d934f861d..c92e39e08a 100644
--- a/doc/classes/BaseButton.xml
+++ b/doc/classes/BaseButton.xml
@@ -44,37 +44,38 @@
</method>
</methods>
<members>
- <member name="action_mode" type="int" setter="set_action_mode" getter="get_action_mode" enum="BaseButton.ActionMode">
+ <member name="action_mode" type="int" setter="set_action_mode" getter="get_action_mode" enum="BaseButton.ActionMode" default="1">
Determines when the button is considered clicked, one of the [enum ActionMode] constants.
</member>
<member name="button_group" type="ButtonGroup" setter="set_button_group" getter="get_button_group">
The [ButtonGroup] associated with the button. Not to be confused with node groups.
</member>
- <member name="button_mask" type="int" setter="set_button_mask" getter="get_button_mask" enum="MouseButton">
+ <member name="button_mask" type="int" setter="set_button_mask" getter="get_button_mask" enum="MouseButton" default="1">
Binary mask to choose which mouse buttons this button will respond to.
To allow both left-click and right-click, use [code]MOUSE_BUTTON_MASK_LEFT | MOUSE_BUTTON_MASK_RIGHT[/code].
</member>
- <member name="button_pressed" type="bool" setter="set_pressed" getter="is_pressed">
+ <member name="button_pressed" type="bool" setter="set_pressed" getter="is_pressed" default="false">
If [code]true[/code], the button's state is pressed. Means the button is pressed down or toggled (if [member toggle_mode] is active). Only works if [member toggle_mode] is [code]true[/code].
[b]Note:[/b] Setting [member button_pressed] will result in [signal toggled] to be emitted. If you want to change the pressed state without emitting that signal, use [method set_pressed_no_signal].
</member>
- <member name="disabled" type="bool" setter="set_disabled" getter="is_disabled">
+ <member name="disabled" type="bool" setter="set_disabled" getter="is_disabled" default="false">
If [code]true[/code], the button is in disabled state and can't be clicked or toggled.
</member>
- <member name="keep_pressed_outside" type="bool" setter="set_keep_pressed_outside" getter="is_keep_pressed_outside">
+ <member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" overrides="Control" enum="Control.FocusMode" default="2" />
+ <member name="keep_pressed_outside" type="bool" setter="set_keep_pressed_outside" getter="is_keep_pressed_outside" default="false">
If [code]true[/code], the button stays pressed when moving the cursor outside the button while pressing it.
[b]Note:[/b] This property only affects the button's visual appearance. Signals will be emitted at the same moment regardless of this property's value.
</member>
<member name="shortcut" type="Shortcut" setter="set_shortcut" getter="get_shortcut">
[Shortcut] associated to the button.
</member>
- <member name="shortcut_context" type="Node" setter="set_shortcut_context" getter="get_shortcut_context">
- The [Node] which must be a parent of the focused GUI [Control] for the shortcut to be activated. If [code]null[/code], the shortcut can be activated when any control is focused (a global shortcut). This allows shortcuts to be accepted only when the user has a certain area of the GUI focused.
+ <member name="shortcut_feedback" type="bool" setter="set_shortcut_feedback" getter="is_shortcut_feedback" default="true">
+ If [code]true[/code], the button will appear pressed when its shortcut is activated. If [code]false[/code] and [member toggle_mode] is [code]false[/code], the shortcut will activate the button without appearing to press the button.
</member>
- <member name="shortcut_in_tooltip" type="bool" setter="set_shortcut_in_tooltip" getter="is_shortcut_in_tooltip_enabled">
+ <member name="shortcut_in_tooltip" type="bool" setter="set_shortcut_in_tooltip" getter="is_shortcut_in_tooltip_enabled" default="true">
If [code]true[/code], the button will add information about its shortcut in the tooltip.
</member>
- <member name="toggle_mode" type="bool" setter="set_toggle_mode" getter="is_toggle_mode">
+ <member name="toggle_mode" type="bool" setter="set_toggle_mode" getter="is_toggle_mode" default="false">
If [code]true[/code], the button is in toggle mode. Makes the button flip state between pressed and unpressed each time its area is clicked.
</member>
</members>
@@ -98,7 +99,7 @@
<signal name="toggled">
<param index="0" name="button_pressed" type="bool" />
<description>
- Emitted when the button was just toggled between pressed and normal states (only if [member toggle_mode] is active). The new state is contained in the [code]button_pressed[/code] argument.
+ Emitted when the button was just toggled between pressed and normal states (only if [member toggle_mode] is active). The new state is contained in the [param button_pressed] argument.
</description>
</signal>
</signals>
diff --git a/doc/classes/BaseMaterial3D.xml b/doc/classes/BaseMaterial3D.xml
index 93818e6cfc..fbb31cadcd 100644
--- a/doc/classes/BaseMaterial3D.xml
+++ b/doc/classes/BaseMaterial3D.xml
@@ -28,7 +28,7 @@
<return type="Texture2D" />
<param index="0" name="param" type="int" enum="BaseMaterial3D.TextureParam" />
<description>
- Returns the [Texture] associated with the specified [enum TextureParam].
+ Returns the [Texture2D] associated with the specified [enum TextureParam].
</description>
</method>
<method name="set_feature">
@@ -52,7 +52,7 @@
<param index="0" name="param" type="int" enum="BaseMaterial3D.TextureParam" />
<param index="1" name="texture" type="Texture2D" />
<description>
- Sets the texture for the slot specified by [code]param[/code]. See [enum TextureParam] for available slots.
+ Sets the texture for the slot specified by [param param]. See [enum TextureParam] for available slots.
</description>
</method>
</methods>
@@ -82,7 +82,7 @@
The hashing scale for Alpha Hash. Recommended values between [code]0[/code] and [code]2[/code].
</member>
<member name="alpha_scissor_threshold" type="float" setter="set_alpha_scissor_threshold" getter="get_alpha_scissor_threshold">
- Threshold at which the alpha scissor will discard values.
+ Threshold at which the alpha scissor will discard values. Higher values will result in more pixels being discarded. If the material becomes too opaque at a distance, try increasing [member alpha_scissor_threshold]. If the material disappears at a distance, try decreasing [member alpha_scissor_threshold].
</member>
<member name="anisotropy" type="float" setter="set_anisotropy" getter="get_anisotropy" default="0.0">
The strength of the anisotropy effect. This is multiplied by [member anisotropy_flowmap]'s alpha channel if a texture is defined there and the texture contains an alpha channel.
@@ -115,7 +115,7 @@
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">
- If [code]true[/code], the backlight effect is enabled.
+ If [code]true[/code], the backlight effect is enabled. See also [member subsurf_scatter_transmittance_enabled].
</member>
<member name="backlight_texture" type="Texture2D" setter="set_texture" getter="get_texture">
Texture used to control the backlight effect per-pixel. Added to [member backlight].
@@ -194,10 +194,13 @@
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 [VoxelGI] 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], SDFGI, or [LightmapGI] 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].
+ <member name="emission_energy_multiplier" type="float" setter="set_emission_energy_multiplier" getter="get_emission_energy_multiplier" default="1.0">
+ Multiplier for emitted light. See [member emission_enabled].
+ </member>
+ <member name="emission_intensity" type="float" setter="set_emission_intensity" getter="get_emission_intensity">
+ Luminance of emitted light, measured in nits (candela per square meter). Only available when [member ProjectSettings.rendering/lights_and_shadows/use_physical_light_units] is enabled. The default is roughly equivalent to an indoor lightbulb.
</member>
<member name="emission_on_uv2" type="bool" setter="set_flag" getter="get_flag" default="false">
Use [code]UV2[/code] to read from the [member emission_texture].
@@ -286,6 +289,7 @@
[b]Note:[/b] If [member detail_enabled] is [code]true[/code], the [member detail_albedo] texture is drawn [i]below[/i] the [member normal_texture]. To display a normal map [i]above[/i] the [member detail_albedo] texture, use [member detail_normal] instead.
</member>
<member name="orm_texture" type="Texture2D" setter="set_texture" getter="get_texture">
+ The Occlusion/Roughness/Metallic texture to use. This is a more efficient replacement of [member ao_texture], [member roughness_texture] and [member metallic_texture] in [ORMMaterial3D]. Ambient occlusion is stored in the red channel. Roughness map is stored in the green channel. Metallic map is stored in the blue channel. The alpha channel is ignored.
</member>
<member name="particles_anim_h_frames" type="int" setter="set_particles_anim_h_frames" getter="get_particles_anim_h_frames">
The number of horizontal frames in the particle sprite sheet. Only enabled when using [constant BILLBOARD_PARTICLES]. See [member billboard_mode].
@@ -302,7 +306,7 @@
<member name="proximity_fade_distance" type="float" setter="set_proximity_fade_distance" getter="get_proximity_fade_distance" default="1.0">
Distance over which the fade effect takes place. The larger the distance the longer it takes for an object to fade.
</member>
- <member name="proximity_fade_enable" type="bool" setter="set_proximity_fade" getter="is_proximity_fade_enabled" default="false">
+ <member name="proximity_fade_enabled" type="bool" setter="set_proximity_fade_enabled" getter="is_proximity_fade_enabled" default="false">
If [code]true[/code], the proximity fade effect is enabled. The proximity fade effect fades out each pixel based on its distance to another object.
</member>
<member name="refraction_enabled" type="bool" setter="set_feature" getter="get_feature" default="false">
@@ -347,13 +351,13 @@
</member>
<member name="specular_mode" type="int" setter="set_specular_mode" getter="get_specular_mode" enum="BaseMaterial3D.SpecularMode" default="0">
The method for rendering the specular blob. See [enum SpecularMode].
- [b]Note:[/b] Only applies to the specular blob. Does not affect specular reflections from the Sky, SSR, or ReflectionProbes.
+ [b]Note:[/b] [member specular_mode] only applies to the specular blob. It does not affect specular reflections from the sky, screen-space reflections, [VoxelGI], SDFGI or [ReflectionProbe]s. To disable reflections from these sources as well, set [member metallic_specular] to [code]0.0[/code] instead.
</member>
<member name="subsurf_scatter_enabled" type="bool" setter="set_feature" getter="get_feature" default="false">
If [code]true[/code], subsurface scattering is enabled. Emulates light that penetrates an object's surface, is scattered, and then emerges.
</member>
<member name="subsurf_scatter_skin_mode" type="bool" setter="set_flag" getter="get_flag" default="false">
- If [code]true[/code], subsurface scattering will use a special mode optimized for the color and density of human skin.
+ If [code]true[/code], subsurface scattering will use a special mode optimized for the color and density of human skin, such as boosting the intensity of the red channel in subsurface scattering.
</member>
<member name="subsurf_scatter_strength" type="float" setter="set_subsurface_scattering_strength" getter="get_subsurface_scattering_strength" default="0.0">
The strength of the subsurface scattering effect.
@@ -362,14 +366,19 @@
Texture used to control the subsurface scattering strength. Stored in the red texture channel. Multiplied by [member subsurf_scatter_strength].
</member>
<member name="subsurf_scatter_transmittance_boost" type="float" setter="set_transmittance_boost" getter="get_transmittance_boost" default="0.0">
+ The intensity of the subsurface scattering transmittance effect.
</member>
<member name="subsurf_scatter_transmittance_color" type="Color" setter="set_transmittance_color" getter="get_transmittance_color" default="Color(1, 1, 1, 1)">
+ The color to multiply the subsurface scattering transmittance effect with. Ignored if [member subsurf_scatter_skin_mode] is [code]true[/code].
</member>
<member name="subsurf_scatter_transmittance_depth" type="float" setter="set_transmittance_depth" getter="get_transmittance_depth" default="0.1">
+ The depth of the subsurface scattering transmittance effect.
</member>
<member name="subsurf_scatter_transmittance_enabled" type="bool" setter="set_feature" getter="get_feature" default="false">
+ If [code]true[/code], enables subsurface scattering transmittance. Only effective if [member subsurf_scatter_enabled] is [code]true[/code]. See also [member backlight_enabled].
</member>
<member name="subsurf_scatter_transmittance_texture" type="Texture2D" setter="set_texture" getter="get_texture">
+ The texture to use for multiplying the intensity of the subsurface scattering transmitteance intensity. See also [member subsurf_scatter_texture]. Ignored if [member subsurf_scatter_skin_mode] is [code]true[/code].
</member>
<member name="texture_filter" type="int" setter="set_texture_filter" getter="get_texture_filter" enum="BaseMaterial3D.TextureFilter" default="3">
Filter flags for the texture. See [enum TextureFilter] for options.
@@ -382,6 +391,7 @@
If [code]true[/code], transparency is enabled on the body. See also [member blend_mode].
</member>
<member name="use_particle_trails" type="bool" setter="set_flag" getter="get_flag" default="false">
+ If [code]true[/code], enables parts of the shader required for [GPUParticles3D] trails to function. This also requires using a mesh with appropriate skinning, such as [RibbonTrailMesh] or [TubeTrailMesh]. Enabling this feature outside of materials used in [GPUParticles3D] meshes will break material rendering.
</member>
<member name="use_point_size" type="bool" setter="set_flag" getter="get_flag" default="false">
If [code]true[/code], render point size can be changed.
@@ -398,6 +408,7 @@
</member>
<member name="uv1_triplanar_sharpness" type="float" setter="set_uv1_triplanar_blend_sharpness" getter="get_uv1_triplanar_blend_sharpness" default="1.0">
A lower number blends the texture more softly while a higher number blends the texture more sharply.
+ [b]Note:[/b] [member uv1_triplanar_sharpness] is clamped between [code]0.0[/code] and [code]150.0[/code] (inclusive) as values outside that range can look broken depending on the mesh.
</member>
<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].
@@ -413,6 +424,7 @@
</member>
<member name="uv2_triplanar_sharpness" type="float" setter="set_uv2_triplanar_blend_sharpness" getter="get_uv2_triplanar_blend_sharpness" default="1.0">
A lower number blends the texture more softly while a higher number blends the texture more sharply.
+ [b]Note:[/b] [member uv2_triplanar_sharpness] is clamped between [code]0.0[/code] and [code]150.0[/code] (inclusive) as values outside that range can look broken depending on the mesh.
</member>
<member name="uv2_world_triplanar" type="bool" setter="set_flag" getter="get_flag" default="false">
If [code]true[/code], triplanar mapping for [code]UV2[/code] is calculated in world space rather than object local space. See also [member uv2_triplanar].
@@ -496,10 +508,10 @@
The texture filter blends between the nearest 4 pixels and between the nearest 2 mipmaps. Use this for most cases as mipmaps are important to smooth out pixels that are far from the camera.
</constant>
<constant name="TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC" value="4" enum="TextureFilter">
- The texture filter reads from the nearest pixel, but selects a mipmap based on the angle between the surface and the camera view. This reduces artifacts on surfaces that are almost in line with the camera.
+ The texture filter reads from the nearest pixel, but selects a mipmap based on the angle between the surface and the camera view. This reduces artifacts on surfaces that are almost in line with the camera. The anisotropic filtering level can be changed by adjusting [member ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level].
</constant>
<constant name="TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC" value="5" enum="TextureFilter">
- The texture filter blends between the nearest 4 pixels and selects a mipmap based on the angle between the surface and the camera view. This reduces artifacts on surfaces that are almost in line with the camera. This is the slowest of the filtering options, but results in the highest quality texturing.
+ The texture filter blends between the nearest 4 pixels and selects a mipmap based on the angle between the surface and the camera view. This reduces artifacts on surfaces that are almost in line with the camera. This is the slowest of the filtering options, but results in the highest quality texturing. The anisotropic filtering level can be changed by adjusting [member ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level].
</constant>
<constant name="TEXTURE_FILTER_MAX" value="6" enum="TextureFilter">
Represents the size of the [enum TextureFilter] enum.
@@ -517,13 +529,13 @@
The material will use the texture's alpha values for transparency.
</constant>
<constant name="TRANSPARENCY_ALPHA_SCISSOR" value="2" enum="Transparency">
- The material will cut off all values below a threshold, the rest will remain opaque.
+ The material will cut off all values below a threshold, the rest will remain opaque. The opaque portions will be rendering in the depth prepass.
</constant>
<constant name="TRANSPARENCY_ALPHA_HASH" value="3" enum="Transparency">
The material will cut off all values below a spatially-deterministic threshold, the rest will remain opaque.
</constant>
<constant name="TRANSPARENCY_ALPHA_DEPTH_PRE_PASS" value="4" enum="Transparency">
- The material will use the texture's alpha value for transparency, but will still be rendered in the pre-pass.
+ The material will use the texture's alpha value for transparency, but will still be rendered in the depth prepass.
</constant>
<constant name="TRANSPARENCY_MAX" value="5" enum="Transparency">
Represents the size of the [enum Transparency] enum.
@@ -601,13 +613,14 @@
Enables AlphaToCoverage and forces all non-zero alpha values to [code]1[/code]. Alpha values in the material are passed to the AntiAliasing sample mask.
</constant>
<constant name="DEPTH_DRAW_OPAQUE_ONLY" value="0" enum="DepthDrawMode">
- Default depth draw mode. Depth is drawn only for opaque objects.
+ Default depth draw mode. Depth is drawn only for opaque objects during the opaque prepass (if any) and during the opaque pass.
</constant>
<constant name="DEPTH_DRAW_ALWAYS" value="1" enum="DepthDrawMode">
- Depth draw is calculated for both opaque and transparent objects.
+ Objects will write to depth during the opaque and the transparent passes. Transparent objects that are close to the camera may obscure other transparent objects behind them.
+ [b]Note:[/b] This does not influence whether transparent objects are included in the depth prepass or not. For that, see [enum Transparency].
</constant>
<constant name="DEPTH_DRAW_DISABLED" value="2" enum="DepthDrawMode">
- No depth draw.
+ Objects will not write their depth to the depth buffer, even during the depth prepass (if enabled).
</constant>
<constant name="CULL_BACK" value="0" enum="CullMode">
Default cull mode. The back of the object is culled when not visible. Back face triangles will be culled when facing the camera. This results in only the front side of triangles being drawn. For closed-surface meshes this means that only the exterior of the mesh will be visible.
@@ -619,7 +632,7 @@
No culling is performed.
</constant>
<constant name="FLAG_DISABLE_DEPTH_TEST" value="0" enum="Flags">
- Disables the depth test, so this object is drawn on top of all others. However, objects drawn after it in the draw order may cover it.
+ Disables the depth test, so this object is drawn on top of all others drawn before it. This puts the object in the transparent draw pass where it is sorted based on distance to camera. Objects drawn after it in the draw order may cover it. This also disables writing to depth.
</constant>
<constant name="FLAG_ALBEDO_FROM_VERTEX_COLOR" value="1" enum="Flags">
Set [code]ALBEDO[/code] to the per-vertex color specified in the mesh.
@@ -677,6 +690,7 @@
Enables the skin mode for subsurface scattering which is used to improve the look of subsurface scattering when used for human skin.
</constant>
<constant name="FLAG_PARTICLE_TRAILS_MODE" value="19" enum="Flags">
+ Enables parts of the shader required for [GPUParticles3D] trails to function. This also requires using a mesh with appropriate skinning, such as [RibbonTrailMesh] or [TubeTrailMesh]. Enabling this feature outside of materials used in [GPUParticles3D] meshes will break material rendering.
</constant>
<constant name="FLAG_ALBEDO_TEXTURE_MSDF" value="20" enum="Flags">
Enables multichannel signed distance field rendering shader.
@@ -716,7 +730,7 @@
</constant>
<constant name="BILLBOARD_PARTICLES" value="3" enum="BillboardMode">
Used for particle systems when assigned to [GPUParticles3D] and [CPUParticles3D] nodes. Enables [code]particles_anim_*[/code] properties.
- The [member ParticlesMaterial.anim_speed_min] or [member CPUParticles3D.anim_speed_min] should also be set to a value bigger than zero for the animation to play.
+ The [member ParticleProcessMaterial.anim_speed_min] or [member CPUParticles3D.anim_speed_min] should also be set to a value bigger than zero for the animation to play.
</constant>
<constant name="TEXTURE_CHANNEL_RED" value="0" enum="TextureChannel">
Used to read from the red channel of a texture.
diff --git a/doc/classes/Basis.xml b/doc/classes/Basis.xml
index 36242a4402..acc2fd34dd 100644
--- a/doc/classes/Basis.xml
+++ b/doc/classes/Basis.xml
@@ -37,7 +37,7 @@
<param index="0" name="axis" type="Vector3" />
<param index="1" name="angle" type="float" />
<description>
- Constructs a pure rotation basis matrix, rotated around the given [code]axis[/code] by [code]angle[/code] (in radians). The axis must be a normalized vector.
+ Constructs a pure rotation basis matrix, rotated around the given [param axis] by [param angle] (in radians). The axis must be a normalized vector.
</description>
</constructor>
<constructor name="Basis">
@@ -70,6 +70,7 @@
<param index="0" name="euler" type="Vector3" />
<param index="1" name="order" type="int" default="2" />
<description>
+ Constructs a pure rotation Basis matrix from Euler angles in the specified Euler rotation order. By default, use YXZ order (most common). See the [enum EulerOrder] enum for possible values.
</description>
</method>
<method name="from_scale" qualifiers="static">
@@ -83,16 +84,10 @@
<return type="Vector3" />
<param index="0" name="order" type="int" default="2" />
<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).
+ Returns the basis's rotation in the form of Euler angles. The Euler order depends on the [param order] parameter, by default it uses 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_quaternion] method instead, which returns a [Quaternion] quaternion instead of Euler angles.
</description>
</method>
- <method name="get_orthogonal_index" qualifiers="const">
- <return type="int" />
- <description>
- 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_quaternion" qualifiers="const">
<return type="Quaternion" />
<description>
@@ -115,7 +110,13 @@
<return type="bool" />
<param index="0" name="b" type="Basis" />
<description>
- Returns [code]true[/code] if this basis and [code]b[/code] are approximately equal, by calling [code]is_equal_approx[/code] on each component.
+ Returns [code]true[/code] if this basis and [param b] are approximately equal, by calling [code]is_equal_approx[/code] on each component.
+ </description>
+ </method>
+ <method name="is_finite" qualifiers="const">
+ <return type="bool" />
+ <description>
+ Returns [code]true[/code] if this basis is finite, by calling [method @GlobalScope.is_finite] on each component.
</description>
</method>
<method name="looking_at" qualifiers="static">
@@ -123,8 +124,8 @@
<param index="0" name="target" type="Vector3" />
<param index="1" name="up" type="Vector3" default="Vector3(0, 1, 0)" />
<description>
- Creates a Basis with a rotation such that the forward axis (-Z) points towards the [code]target[/code] position.
- The up axis (+Y) points as close to the [code]up[/code] vector as possible while staying perpendicular to the forward axis. The resulting Basis is orthonormalized. The [code]target[/code] and [code]up[/code] vectors cannot be zero, and cannot be parallel to each other.
+ Creates a Basis with a rotation such that the forward axis (-Z) points towards the [param target] position.
+ The up axis (+Y) points as close to the [param up] vector as possible while staying perpendicular to the forward axis. The resulting Basis is orthonormalized. The [param target] and [param up] vectors cannot be zero, and cannot be parallel to each other.
</description>
</method>
<method name="orthonormalized" qualifiers="const">
@@ -138,7 +139,7 @@
<param index="0" name="axis" type="Vector3" />
<param index="1" name="angle" type="float" />
<description>
- Introduce an additional rotation around the given axis by [code]angle[/code] (in radians). The axis must be a normalized vector.
+ Introduce an additional rotation around the given axis by [param angle] (in radians). The axis must be a normalized vector.
</description>
</method>
<method name="scaled" qualifiers="const">
@@ -196,18 +197,6 @@
</member>
</members>
<constants>
- <constant name="EULER_ORDER_XYZ" value="0">
- </constant>
- <constant name="EULER_ORDER_XZY" value="1">
- </constant>
- <constant name="EULER_ORDER_YXZ" value="2">
- </constant>
- <constant name="EULER_ORDER_YZX" value="3">
- </constant>
- <constant name="EULER_ORDER_ZXY" value="4">
- </constant>
- <constant name="EULER_ORDER_ZYX" value="5">
- </constant>
<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#.
diff --git a/doc/classes/BitMap.xml b/doc/classes/BitMap.xml
index 402fc18373..e9774ef485 100644
--- a/doc/classes/BitMap.xml
+++ b/doc/classes/BitMap.xml
@@ -12,12 +12,12 @@
<method name="convert_to_image" qualifiers="const">
<return type="Image" />
<description>
- Returns an image of the same size as the bitmap and with a [enum Image.Format] of type [code]FORMAT_L8[/code]. [code]true[/code] bits of the bitmap are being converted into white pixels, and [code]false[/code] bits into black.
+ Returns an image of the same size as the bitmap and with a [enum Image.Format] of type [constant Image.FORMAT_L8]. [code]true[/code] bits of the bitmap are being converted into white pixels, and [code]false[/code] bits into black.
</description>
</method>
<method name="create">
<return type="void" />
- <param index="0" name="size" type="Vector2" />
+ <param index="0" name="size" type="Vector2i" />
<description>
Creates a bitmap with the specified size, filled with [code]false[/code].
</description>
@@ -27,18 +27,26 @@
<param index="0" name="image" type="Image" />
<param index="1" name="threshold" type="float" default="0.1" />
<description>
- Creates a bitmap that matches the given image dimensions, every element of the bitmap is set to [code]false[/code] if the alpha value of the image at that position is equal to [code]threshold[/code] or less, and [code]true[/code] in other case.
+ Creates a bitmap that matches the given image dimensions, every element of the bitmap is set to [code]false[/code] if the alpha value of the image at that position is equal to [param threshold] or less, and [code]true[/code] in other case.
</description>
</method>
<method name="get_bit" qualifiers="const">
<return type="bool" />
- <param index="0" name="position" type="Vector2" />
+ <param index="0" name="x" type="int" />
+ <param index="1" name="y" type="int" />
+ <description>
+ Returns bitmap's value at the specified position.
+ </description>
+ </method>
+ <method name="get_bitv" qualifiers="const">
+ <return type="bool" />
+ <param index="0" name="position" type="Vector2i" />
<description>
Returns bitmap's value at the specified position.
</description>
</method>
<method name="get_size" qualifiers="const">
- <return type="Vector2" />
+ <return type="Vector2i" />
<description>
Returns bitmap's dimensions.
</description>
@@ -46,20 +54,20 @@
<method name="get_true_bit_count" qualifiers="const">
<return type="int" />
<description>
- Returns the amount of bitmap elements that are set to [code]true[/code].
+ Returns the number of bitmap elements that are set to [code]true[/code].
</description>
</method>
<method name="grow_mask">
<return type="void" />
<param index="0" name="pixels" type="int" />
- <param index="1" name="rect" type="Rect2" />
+ <param index="1" name="rect" type="Rect2i" />
<description>
- Applies morphological dilation or erosion to the bitmap. If [code]pixels[/code] is positive, dilation is applied to the bitmap. If [code]pixels[/code] is negative, erosion is applied to the bitmap. [code]rect[/code] defines the area where the morphological operation is applied. Pixels located outside the [code]rect[/code] are unaffected by [method grow_mask].
+ Applies morphological dilation or erosion to the bitmap. If [param pixels] is positive, dilation is applied to the bitmap. If [param pixels] is negative, erosion is applied to the bitmap. [param rect] defines the area where the morphological operation is applied. Pixels located outside the [param rect] are unaffected by [method grow_mask].
</description>
</method>
<method name="opaque_to_polygons" qualifiers="const">
- <return type="Array" />
- <param index="0" name="rect" type="Rect2" />
+ <return type="PackedVector2Array[]" />
+ <param index="0" name="rect" type="Rect2i" />
<param index="1" name="epsilon" type="float" default="2.0" />
<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.
@@ -67,31 +75,40 @@
[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.
+ [param epsilon] is passed to RDP to control how accurately the polygons cover the bitmap: a lower [param epsilon] corresponds to more points in the polygons.
</description>
</method>
<method name="resize">
<return type="void" />
- <param index="0" name="new_size" type="Vector2" />
+ <param index="0" name="new_size" type="Vector2i" />
<description>
- Resizes the image to [code]new_size[/code].
+ Resizes the image to [param new_size].
</description>
</method>
<method name="set_bit">
<return type="void" />
- <param index="0" name="position" type="Vector2" />
- <param index="1" name="bit" type="bool" />
+ <param index="0" name="x" type="int" />
+ <param index="1" name="y" type="int" />
+ <param index="2" name="bit" type="bool" />
<description>
Sets the bitmap's element at the specified position, to the specified value.
</description>
</method>
<method name="set_bit_rect">
<return type="void" />
- <param index="0" name="rect" type="Rect2" />
+ <param index="0" name="rect" type="Rect2i" />
<param index="1" name="bit" type="bool" />
<description>
Sets a rectangular portion of the bitmap to the specified value.
</description>
</method>
+ <method name="set_bitv">
+ <return type="void" />
+ <param index="0" name="position" type="Vector2i" />
+ <param index="1" name="bit" type="bool" />
+ <description>
+ Sets the bitmap's element at the specified position, to the specified value.
+ </description>
+ </method>
</methods>
</class>
diff --git a/doc/classes/BoneAttachment3D.xml b/doc/classes/BoneAttachment3D.xml
index dc3d448621..f29525038e 100644
--- a/doc/classes/BoneAttachment3D.xml
+++ b/doc/classes/BoneAttachment3D.xml
@@ -16,10 +16,11 @@
Returns the [NodePath] to the external [Skeleton3D] node, if one has been set.
</description>
</method>
- <method name="get_override_mode" qualifiers="const">
+ <method name="get_override_mode" qualifiers="const" is_deprecated="true">
<return type="int" />
<description>
- Returns the override mode for the BoneAttachment3D node.
+ Deprecated. Local pose overrides will be removed.
+ Returns the override mode for the BoneAttachment3D node (0=global / 1=local).
</description>
</method>
<method name="get_override_pose" qualifiers="const">
@@ -48,11 +49,12 @@
Sets the [NodePath] to the external skeleton that the BoneAttachment3D node should use. The external [Skeleton3D] node is only used when [code]use_external_skeleton[/code] is set to [code]true[/code].
</description>
</method>
- <method name="set_override_mode">
+ <method name="set_override_mode" is_deprecated="true">
<return type="void" />
<param index="0" name="override_mode" type="int" />
<description>
- Sets the override mode for the BoneAttachment3D node. The override mode defines which of the bone poses the BoneAttachment3D node will override.
+ Deprecated. Local pose overrides will be removed.
+ Sets the override mode for the BoneAttachment3D node (0=global / 1=local). The override mode defines which of the bone poses the BoneAttachment3D node will override.
</description>
</method>
<method name="set_override_pose">
diff --git a/doc/classes/BoneMap.xml b/doc/classes/BoneMap.xml
index e9142e2c4b..7135406d3c 100644
--- a/doc/classes/BoneMap.xml
+++ b/doc/classes/BoneMap.xml
@@ -8,13 +8,14 @@
By assigning the actual [Skeleton3D] bone name as the key value, it maps the [Skeleton3D] to the [SkeletonProfile].
</description>
<tutorials>
+ <link title="Retargeting 3D Skeletons">$DOCS_URL/tutorials/assets_pipeline/retargeting_3d_skeletons.html</link>
</tutorials>
<methods>
<method name="find_profile_bone_name" qualifiers="const">
<return type="StringName" />
<param index="0" name="skeleton_bone_name" type="StringName" />
<description>
- Returns a profile bone name having [code]skeleton_bone_name[/code]. If not found, an empty [StringName] will be returned.
+ Returns a profile bone name having [param skeleton_bone_name]. If not found, an empty [StringName] will be returned.
In the retargeting process, the returned bone name is the bone name of the target skeleton.
</description>
</method>
@@ -22,7 +23,7 @@
<return type="StringName" />
<param index="0" name="profile_bone_name" type="StringName" />
<description>
- Returns a skeleton bone name is mapped to [code]profile_bone_name[/code].
+ Returns a skeleton bone name is mapped to [param profile_bone_name].
In the retargeting process, the returned bone name is the bone name of the source skeleton.
</description>
</method>
@@ -31,7 +32,7 @@
<param index="0" name="profile_bone_name" type="StringName" />
<param index="1" name="skeleton_bone_name" type="StringName" />
<description>
- Maps a skeleton bone name to [code]profile_bone_name[/code].
+ Maps a skeleton bone name to [param profile_bone_name].
In the retargeting process, the setting bone name is the bone name of the source skeleton.
</description>
</method>
diff --git a/doc/classes/BoxContainer.xml b/doc/classes/BoxContainer.xml
index d7eac40505..a06b0e9c4b 100644
--- a/doc/classes/BoxContainer.xml
+++ b/doc/classes/BoxContainer.xml
@@ -14,7 +14,7 @@
<return type="Control" />
<param index="0" name="begin" type="bool" />
<description>
- Adds a [Control] node to the box as a spacer. If [code]begin[/code] is [code]true[/code], it will insert the [Control] node in front of all other children.
+ Adds a [Control] node to the box as a spacer. If [param begin] is [code]true[/code], it will insert the [Control] node in front of all other children.
</description>
</method>
</methods>
@@ -22,13 +22,25 @@
<member name="alignment" type="int" setter="set_alignment" getter="get_alignment" enum="BoxContainer.AlignmentMode" default="0">
The alignment of the container's children (must be one of [constant ALIGNMENT_BEGIN], [constant ALIGNMENT_CENTER], or [constant ALIGNMENT_END]).
</member>
+ <member name="vertical" type="bool" setter="set_vertical" getter="is_vertical" default="false">
+ If [code]true[/code], the [BoxContainer] will arrange its children vertically, rather than horizontally.
+ Can't be changed when using [HBoxContainer] and [VBoxContainer].
+ </member>
</members>
<constants>
<constant name="ALIGNMENT_BEGIN" value="0" enum="AlignmentMode">
+ The child controls will be arranged at the beginning of the container, i.e. top if orientation is vertical, left if orientation is horizontal (right for RTL layout).
</constant>
<constant name="ALIGNMENT_CENTER" value="1" enum="AlignmentMode">
+ The child controls will be centered in the container.
</constant>
<constant name="ALIGNMENT_END" value="2" enum="AlignmentMode">
+ The child controls will be arranged at the end of the container, i.e. bottom if orientation is vertical, right if orientation is horizontal (left for RTL layout).
</constant>
</constants>
+ <theme_items>
+ <theme_item name="separation" data_type="constant" type="int" default="4">
+ The space between the [BoxContainer]'s elements, in pixels.
+ </theme_item>
+ </theme_items>
</class>
diff --git a/doc/classes/Button.xml b/doc/classes/Button.xml
index 1cd9ca0afb..d2c9a77486 100644
--- a/doc/classes/Button.xml
+++ b/doc/classes/Button.xml
@@ -11,7 +11,7 @@
func _ready():
var button = Button.new()
button.text = "Click me"
- button.connect("pressed", self, "_button_pressed")
+ button.pressed.connect(self._button_pressed)
add_child(button)
func _button_pressed():
@@ -22,7 +22,7 @@
{
var button = new Button();
button.Text = "Click me";
- button.Connect("pressed", this, nameof(ButtonPressed));
+ button.Pressed += ButtonPressed;
AddChild(button);
}
@@ -42,7 +42,7 @@
</tutorials>
<members>
<member name="alignment" type="int" setter="set_text_alignment" getter="get_text_alignment" enum="HorizontalAlignment" default="1">
- Text alignment policy for the button's text, use one of the [enum @GlobalScope.HorizontalAlignment] constants.
+ Text alignment policy for the button's text, use one of the [enum HorizontalAlignment] constants.
</member>
<member name="clip_text" type="bool" setter="set_clip_text" getter="get_clip_text" default="false">
When this property is enabled, text that is too large to fit the button is clipped, when disabled the Button will always be wide enough to hold the text.
@@ -58,7 +58,7 @@
To edit margin and spacing of the icon, use [theme_item h_separation] theme property and [code]content_margin_*[/code] properties of the used [StyleBox]es.
</member>
<member name="icon_alignment" type="int" setter="set_icon_alignment" getter="get_icon_alignment" enum="HorizontalAlignment" default="0">
- Specifies if the icon should be aligned to the left, right, or center of a button. Uses the same [enum @GlobalScope.HorizontalAlignment] constants as the text alignment. If centered, text will draw on top of the icon.
+ Specifies if the icon should be aligned to the left, right, or center of a button. Uses the same [enum HorizontalAlignment] constants as the text alignment. If centered, text will draw on top of the icon.
</member>
<member name="language" type="String" setter="set_language" getter="get_language" default="&quot;&quot;">
Language code used for line-breaking and text shaping algorithms, if left empty current locale is used instead.
@@ -114,7 +114,7 @@
Icon modulate [Color] used when the [Button] is being pressed.
</theme_item>
<theme_item name="h_separation" data_type="constant" type="int" default="2">
- The horizontal space between [Button]'s icon and text.
+ The horizontal space between [Button]'s icon and text. Negative values will be treated as [code]0[/code] when used.
</theme_item>
<theme_item name="outline_size" data_type="constant" type="int" default="0">
The size of the text outline.
diff --git a/doc/classes/ButtonGroup.xml b/doc/classes/ButtonGroup.xml
index 8bedb5a1ac..277bda2836 100644
--- a/doc/classes/ButtonGroup.xml
+++ b/doc/classes/ButtonGroup.xml
@@ -11,7 +11,7 @@
</tutorials>
<methods>
<method name="get_buttons">
- <return type="Array" />
+ <return type="BaseButton[]" />
<description>
Returns an [Array] of [Button]s who have this as their [ButtonGroup] (see [member BaseButton.button_group]).
</description>
diff --git a/doc/classes/CPUParticles2D.xml b/doc/classes/CPUParticles2D.xml
index 64e9310181..314e46d9d0 100644
--- a/doc/classes/CPUParticles2D.xml
+++ b/doc/classes/CPUParticles2D.xml
@@ -15,7 +15,7 @@
<return type="void" />
<param index="0" name="particles" type="Node" />
<description>
- Sets this node's properties to match a given [GPUParticles2D] node with an assigned [ParticlesMaterial].
+ Sets this node's properties to match a given [GPUParticles2D] node with an assigned [ParticleProcessMaterial].
</description>
</method>
<method name="get_param_curve" qualifiers="const">
@@ -29,12 +29,14 @@
<return type="float" />
<param index="0" name="param" type="int" enum="CPUParticles2D.Parameter" />
<description>
+ Returns the maximum value range for the given parameter.
</description>
</method>
<method name="get_param_min" qualifiers="const">
<return type="float" />
<param index="0" name="param" type="int" enum="CPUParticles2D.Parameter" />
<description>
+ Returns the minimum value range for the given parameter.
</description>
</method>
<method name="get_particle_flag" qualifiers="const">
@@ -63,6 +65,7 @@
<param index="0" name="param" type="int" enum="CPUParticles2D.Parameter" />
<param index="1" name="value" type="float" />
<description>
+ Sets the maximum value for the given parameter.
</description>
</method>
<method name="set_param_min">
@@ -70,6 +73,7 @@
<param index="0" name="param" type="int" enum="CPUParticles2D.Parameter" />
<param index="1" name="value" type="float" />
<description>
+ Sets the minimum value for the given parameter.
</description>
</method>
<method name="set_particle_flag">
@@ -89,29 +93,38 @@
Each particle's rotation will be animated along this [Curve].
</member>
<member name="angle_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0">
+ Maximum initial rotation applied to each particle, in degrees.
</member>
<member name="angle_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0">
+ Minimum equivalent of [member angle_max].
</member>
<member name="angular_velocity_curve" type="Curve" setter="set_param_curve" getter="get_param_curve">
Each particle's angular velocity will vary along this [Curve].
</member>
<member name="angular_velocity_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0">
+ Maximum initial angular velocity (rotation speed) applied to each particle in [i]degrees[/i] per second.
</member>
<member name="angular_velocity_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0">
+ Minimum equivalent of [member angular_velocity_max].
</member>
<member name="anim_offset_curve" type="Curve" setter="set_param_curve" getter="get_param_curve">
Each particle's animation offset will vary along this [Curve].
</member>
<member name="anim_offset_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0">
+ Maximum animation offset that corresponds to frame index in the texture. [code]0[/code] is the first frame, [code]1[/code] is the last one. See [member CanvasItemMaterial.particles_animation].
</member>
<member name="anim_offset_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0">
+ Minimum equivalent of [member anim_offset_max].
</member>
<member name="anim_speed_curve" type="Curve" setter="set_param_curve" getter="get_param_curve">
Each particle's animation speed will vary along this [Curve].
</member>
<member name="anim_speed_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0">
+ Maximum particle animation speed. Animation speed of [code]1[/code] means that the particles will make full [code]0[/code] to [code]1[/code] offset cycle during lifetime, [code]2[/code] means [code]2[/code] cycles etc.
+ With animation speed greater than [code]1[/code], remember to enable [member CanvasItemMaterial.particles_anim_loop] property if you want the animation to repeat.
</member>
<member name="anim_speed_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0">
+ Minimum equivalent of [member anim_speed_max].
</member>
<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.
@@ -126,8 +139,10 @@
Damping will vary along this [Curve].
</member>
<member name="damping_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0">
+ The maximum rate at which particles lose velocity. For example value of [code]100[/code] means that the particle will go from [code]100[/code] velocity to [code]0[/code] in [code]1[/code] second.
</member>
<member name="damping_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0">
+ Minimum equivalent of [member damping_max].
</member>
<member name="direction" type="Vector2" setter="set_direction" getter="get_direction" default="Vector2(1, 0)">
Unit vector specifying the particles' emission direction.
@@ -160,7 +175,7 @@
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">
- 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.
+ The particle system's frame rate is fixed to a value. For example, 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">
If [code]true[/code], results in fractional delta calculation which has a smoother particles display effect.
@@ -172,12 +187,16 @@
Each particle's hue will vary along this [Curve].
</member>
<member name="hue_variation_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0">
+ Maximum initial hue variation applied to each particle. It will shift the particle color's hue.
</member>
<member name="hue_variation_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0">
+ Minimum equivalent of [member hue_variation_max].
</member>
<member name="initial_velocity_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0">
+ Maximum initial velocity magnitude for each particle. Direction comes from [member direction] and [member spread].
</member>
<member name="initial_velocity_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0">
+ Minimum equivalent of [member initial_velocity_max].
</member>
<member name="lifetime" type="float" setter="set_lifetime" getter="get_lifetime" default="1.0">
Amount of time each particle will exist.
@@ -189,8 +208,10 @@
Each particle's linear acceleration will vary along this [Curve].
</member>
<member name="linear_accel_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0">
+ Maximum linear acceleration applied to each particle in the direction of motion.
</member>
<member name="linear_accel_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0">
+ Minimum equivalent of [member linear_accel_max].
</member>
<member name="local_coords" type="bool" setter="set_use_local_coordinates" getter="get_use_local_coordinates" default="false">
If [code]true[/code], particles use the parent node's coordinate space (known as local coordinates). This will cause particles to move and rotate along the [CPUParticles2D] node (and its parents) when it is moved or rotated. If [code]false[/code], particles use global coordinates; they will not move or rotate along the [CPUParticles2D] node (and its parents) when it is moved or rotated.
@@ -202,8 +223,10 @@
Each particle's orbital velocity will vary along this [Curve].
</member>
<member name="orbit_velocity_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0">
+ Maximum orbital velocity applied to each particle. Makes the particles circle around origin. Specified in number of full rotations around origin per second.
</member>
<member name="orbit_velocity_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0">
+ Minimum equivalent of [member orbit_velocity_max].
</member>
<member name="particle_flag_align_y" type="bool" setter="set_particle_flag" getter="get_particle_flag" default="false">
Align Y axis of particle with the direction of its velocity.
@@ -215,8 +238,10 @@
Each particle's radial acceleration will vary along this [Curve].
</member>
<member name="radial_accel_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0">
+ Maximum radial acceleration applied to each particle. Makes particle accelerate away from the origin or towards it if negative.
</member>
<member name="radial_accel_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0">
+ Minimum equivalent of [member radial_accel_max].
</member>
<member name="randomness" type="float" setter="set_randomness_ratio" getter="get_randomness_ratio" default="0.0">
Emission lifetime randomness ratio.
@@ -225,17 +250,24 @@
Each particle's scale will vary along this [Curve].
</member>
<member name="scale_amount_max" type="float" setter="set_param_max" getter="get_param_max" default="1.0">
+ Maximum initial scale applied to each particle.
</member>
<member name="scale_amount_min" type="float" setter="set_param_min" getter="get_param_min" default="1.0">
+ Minimum equivalent of [member scale_amount_max].
</member>
<member name="scale_curve_x" type="Curve" setter="set_scale_curve_x" getter="get_scale_curve_x">
+ Each particle's horizontal scale will vary along this [Curve].
+ [member split_scale] must be enabled.
</member>
<member name="scale_curve_y" type="Curve" setter="set_scale_curve_y" getter="get_scale_curve_y">
+ Each particle's vertical scale will vary along this [Curve].
+ [member split_scale] must be enabled.
</member>
<member name="speed_scale" type="float" setter="set_speed_scale" getter="get_speed_scale" default="1.0">
Particle system's running speed scaling ratio. A value of [code]0[/code] can be used to pause the particles.
</member>
<member name="split_scale" type="bool" setter="set_split_scale" getter="get_split_scale" default="false">
+ If [code]true[/code], the scale curve will be split into x and y components. See [member scale_curve_x] and [member scale_curve_y].
</member>
<member name="spread" type="float" setter="set_spread" getter="get_spread" default="45.0">
Each particle's initial direction range from [code]+spread[/code] to [code]-spread[/code] degrees.
@@ -244,8 +276,10 @@
Each particle's tangential acceleration will vary along this [Curve].
</member>
<member name="tangential_accel_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0">
+ Maximum tangential acceleration applied to each particle. Tangential acceleration is perpendicular to the particle's velocity giving the particles a swirling motion.
</member>
<member name="tangential_accel_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0">
+ Minimum equivalent of [member tangential_accel_max].
</member>
<member name="texture" type="Texture2D" setter="set_texture" getter="get_texture">
Particle texture. If [code]null[/code], particles will be squares.
diff --git a/doc/classes/CPUParticles3D.xml b/doc/classes/CPUParticles3D.xml
index bb1dcd322f..3a15a117f5 100644
--- a/doc/classes/CPUParticles3D.xml
+++ b/doc/classes/CPUParticles3D.xml
@@ -14,7 +14,7 @@
<return type="void" />
<param index="0" name="particles" type="Node" />
<description>
- Sets this node's properties to match a given [GPUParticles3D] node with an assigned [ParticlesMaterial].
+ Sets this node's properties to match a given [GPUParticles3D] node with an assigned [ParticleProcessMaterial].
</description>
</method>
<method name="get_param_curve" qualifiers="const">
@@ -28,12 +28,14 @@
<return type="float" />
<param index="0" name="param" type="int" enum="CPUParticles3D.Parameter" />
<description>
+ Returns the maximum value range for the given parameter.
</description>
</method>
<method name="get_param_min" qualifiers="const">
<return type="float" />
<param index="0" name="param" type="int" enum="CPUParticles3D.Parameter" />
<description>
+ Returns the minimum value range for the given parameter.
</description>
</method>
<method name="get_particle_flag" qualifiers="const">
@@ -62,7 +64,7 @@
<param index="0" name="param" type="int" enum="CPUParticles3D.Parameter" />
<param index="1" name="value" type="float" />
<description>
- Sets the maximum value for the given parameter
+ Sets the maximum value for the given parameter.
</description>
</method>
<method name="set_param_min">
@@ -70,7 +72,7 @@
<param index="0" name="param" type="int" enum="CPUParticles3D.Parameter" />
<param index="1" name="value" type="float" />
<description>
- Sets the minimum value for the given parameter
+ Sets the minimum value for the given parameter.
</description>
</method>
<method name="set_particle_flag">
@@ -123,13 +125,16 @@
Minimum particle animation speed.
</member>
<member name="color" type="Color" setter="set_color" getter="get_color" default="Color(1, 1, 1, 1)">
- Each particle's initial color. To have particle display color in a [BaseMaterial3D] make sure to set [member BaseMaterial3D.vertex_color_use_as_albedo] to [code]true[/code].
+ Each particle's initial color.
+ [b]Note:[/b] [member color] multiplies the particle mesh's vertex colors. To have a visible effect on a [BaseMaterial3D], [member BaseMaterial3D.vertex_color_use_as_albedo] [i]must[/i] be [code]true[/code]. For a [ShaderMaterial], [code]ALBEDO *= COLOR.rgb;[/code] must be inserted in the shader's [code]fragment()[/code] function. Otherwise, [member color] will have no visible effect.
</member>
<member name="color_initial_ramp" type="Gradient" setter="set_color_initial_ramp" getter="get_color_initial_ramp">
Each particle's initial color will vary along this [GradientTexture1D] (multiplied with [member color]).
+ [b]Note:[/b] [member color_initial_ramp] multiplies the particle mesh's vertex colors. To have a visible effect on a [BaseMaterial3D], [member BaseMaterial3D.vertex_color_use_as_albedo] [i]must[/i] be [code]true[/code]. For a [ShaderMaterial], [code]ALBEDO *= COLOR.rgb;[/code] must be inserted in the shader's [code]fragment()[/code] function. Otherwise, [member color_initial_ramp] will have no visible effect.
</member>
<member name="color_ramp" type="Gradient" setter="set_color_ramp" getter="get_color_ramp">
Each particle's color will vary along this [GradientTexture1D] over its lifetime (multiplied with [member color]).
+ [b]Note:[/b] [member color_ramp] multiplies the particle mesh's vertex colors. To have a visible effect on a [BaseMaterial3D], [member BaseMaterial3D.vertex_color_use_as_albedo] [i]must[/i] be [code]true[/code]. For a [ShaderMaterial], [code]ALBEDO *= COLOR.rgb;[/code] must be inserted in the shader's [code]fragment()[/code] function. Otherwise, [member color_ramp] will have no visible effect.
</member>
<member name="damping_curve" type="Curve" setter="set_param_curve" getter="get_param_curve">
Damping will vary along this [Curve].
@@ -151,6 +156,7 @@
</member>
<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].
+ [b]Note:[/b] [member emission_colors] multiplies the particle mesh's vertex colors. To have a visible effect on a [BaseMaterial3D], [member BaseMaterial3D.vertex_color_use_as_albedo] [i]must[/i] be [code]true[/code]. For a [ShaderMaterial], [code]ALBEDO *= COLOR.rgb;[/code] must be inserted in the shader's [code]fragment()[/code] function. Otherwise, [member emission_colors] will have no visible effect.
</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].
@@ -183,7 +189,7 @@
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">
- 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 particle system itself.
+ The particle system's frame rate is fixed to a value. For example, changing the value to 2 will make the particles render at 2 frames per second. Note this does not slow down the particle system itself.
</member>
<member name="flatness" type="float" setter="set_flatness" getter="get_flatness" default="0.0">
Amount of [member spread] in Y/Z plane. A value of [code]1[/code] restricts particles to X/Z plane.
diff --git a/doc/classes/Callable.xml b/doc/classes/Callable.xml
index 48c1b30d8e..dd48ee6790 100644
--- a/doc/classes/Callable.xml
+++ b/doc/classes/Callable.xml
@@ -54,7 +54,7 @@
<param index="0" name="object" type="Object" />
<param index="1" name="method" type="StringName" />
<description>
- Creates a new [Callable] for the method called [code]method[/code] in the specified [code]object[/code].
+ Creates a new [Callable] for the method called [param method] in the specified [param object].
</description>
</constructor>
</constructors>
@@ -75,6 +75,17 @@
<return type="void" />
<description>
Calls the method represented by this [Callable] in deferred mode, i.e. during the idle frame. Arguments can be passed and should match the method's signature.
+ [codeblock]
+ func _ready():
+ grab_focus.call_deferred()
+ [/codeblock]
+ </description>
+ </method>
+ <method name="callv" qualifiers="const">
+ <return type="Variant" />
+ <param index="0" name="arguments" type="Array" />
+ <description>
+ Calls the method represented by this [Callable]. Contrary to [method call], this method does not take a variable number of arguments but expects all arguments to be passed via a single [Array].
</description>
</method>
<method name="get_method" qualifiers="const">
diff --git a/doc/classes/CallbackTweener.xml b/doc/classes/CallbackTweener.xml
index 6e4ee0380e..626405bc8e 100644
--- a/doc/classes/CallbackTweener.xml
+++ b/doc/classes/CallbackTweener.xml
@@ -14,7 +14,8 @@
<return type="CallbackTweener" />
<param index="0" name="delay" type="float" />
<description>
- Makes the callback call delayed by given time in seconds. Example:
+ Makes the callback call delayed by given time in seconds.
+ [b]Example:[/b]
[codeblock]
var tween = get_tree().create_tween()
tween.tween_callback(queue_free).set_delay(2) #this will call queue_free() after 2 seconds
diff --git a/doc/classes/Camera2D.xml b/doc/classes/Camera2D.xml
index edb5235b75..9315a85e1f 100644
--- a/doc/classes/Camera2D.xml
+++ b/doc/classes/Camera2D.xml
@@ -7,7 +7,7 @@
Camera node for 2D scenes. It forces the screen (current layer) to scroll following this node. This makes it easier (and faster) to program scrollable scenes than manually changing the position of [CanvasItem]-based nodes.
Cameras register themselves in the nearest [Viewport] node (when ascending the tree). Only one camera can be active per viewport. If no viewport is available ascending the tree, the camera will register in the global viewport.
This node is intended to be a simple helper to get things going quickly, but more functionality may be desired to change how the camera works. To make your own custom camera node, inherit it from [Node2D] and change the transform of the canvas by setting [member Viewport.canvas_transform] in [Viewport] (you can obtain the current [Viewport] by using [method Node.get_viewport]).
- Note that the [Camera2D] node's [code]position[/code] doesn't represent the actual position of the screen, which may differ due to applied smoothing or limits. You can use [method get_camera_screen_center] to get the real position.
+ Note that the [Camera2D] node's [code]position[/code] doesn't represent the actual position of the screen, which may differ due to applied smoothing or limits. You can use [method get_screen_center_position] to get the real position.
</description>
<tutorials>
<link title="2D Platformer Demo">https://godotengine.org/asset-library/asset/120</link>
@@ -27,20 +27,6 @@
Forces the camera to update scroll immediately.
</description>
</method>
- <method name="get_camera_position" qualifiers="const">
- <return type="Vector2" />
- <description>
- Returns the camera's [code]position[/code] (the tracked point the camera attempts to follow), relative to the origin.
- [b]Note:[/b] The returned value is not the same as [member Node2D.position] or [member Node2D.global_position], as it is affected by the [code]drag[/code] properties.
- </description>
- </method>
- <method name="get_camera_screen_center" qualifiers="const">
- <return type="Vector2" />
- <description>
- Returns the location of the [Camera2D]'s screen-center, relative to the origin.
- [b]Note:[/b] The real [code]position[/code] of the camera may be different, see [method get_camera_position].
- </description>
- </method>
<method name="get_drag_margin" qualifiers="const">
<return type="float" />
<param index="0" name="margin" type="int" enum="Side" />
@@ -55,11 +41,25 @@
Returns the camera limit for the specified [enum Side]. See also [member limit_bottom], [member limit_top], [member limit_left], and [member limit_right].
</description>
</method>
+ <method name="get_screen_center_position" qualifiers="const">
+ <return type="Vector2" />
+ <description>
+ Returns the center of the screen from this camera's point of view, in global coordinates.
+ [b]Note:[/b] The exact targeted position of the camera may be different. See [method get_target_position].
+ </description>
+ </method>
+ <method name="get_target_position" qualifiers="const">
+ <return type="Vector2" />
+ <description>
+ Returns this camera's target position, in global coordinates.
+ [b]Note:[/b] The returned value is not the same as [member Node2D.global_position], as it is affected by the drag properties. It is also not the same as the current position if [member position_smoothing_enabled] is [code]true[/code] (see [method get_screen_center_position]).
+ </description>
+ </method>
<method name="reset_smoothing">
<return type="void" />
<description>
Sets the camera's position immediately to its current smoothing destination.
- This method has no effect if [member smoothing_enabled] is [code]false[/code].
+ This method has no effect if [member position_smoothing_enabled] is [code]false[/code].
</description>
</method>
<method name="set_drag_margin">
@@ -124,6 +124,9 @@
<member name="editor_draw_screen" type="bool" setter="set_screen_drawing_enabled" getter="is_screen_drawing_enabled" default="true">
If [code]true[/code], draws the camera's screen rectangle in the editor.
</member>
+ <member name="ignore_rotation" type="bool" setter="set_ignore_rotation" getter="is_ignoring_rotation" default="true">
+ If [code]true[/code], the camera's rendered view is not affected by its [member Node2D.rotation] and [member Node2D.global_rotation].
+ </member>
<member name="limit_bottom" type="int" setter="set_limit" getter="get_limit" default="10000000">
Bottom scroll limit in pixels. The camera stops moving when reaching this value, but [member offset] can push the view past the limit.
</member>
@@ -135,7 +138,7 @@
</member>
<member name="limit_smoothed" type="bool" setter="set_limit_smoothing_enabled" getter="is_limit_smoothing_enabled" default="false">
If [code]true[/code], the camera smoothly stops when reaches its limits.
- This property has no effect if [member smoothing_enabled] is [code]false[/code].
+ This property has no effect if [member position_smoothing_enabled] is [code]false[/code].
[b]Note:[/b] To immediately update the camera's position to be within limits without smoothing, even with this setting enabled, invoke [method reset_smoothing].
</member>
<member name="limit_top" type="int" setter="set_limit" getter="get_limit" default="-10000000">
@@ -144,17 +147,21 @@
<member name="offset" type="Vector2" setter="set_offset" getter="get_offset" default="Vector2(0, 0)">
The camera's relative offset. Useful for looking around or camera shake animations. The offsetted camera can go past the limits defined in [member limit_top], [member limit_bottom], [member limit_left] and [member limit_right].
</member>
+ <member name="position_smoothing_enabled" type="bool" setter="set_position_smoothing_enabled" getter="is_position_smoothing_enabled" default="false">
+ If [code]true[/code], the camera's view smoothly moves towards its target position at [member position_smoothing_speed].
+ </member>
+ <member name="position_smoothing_speed" type="float" setter="set_position_smoothing_speed" getter="get_position_smoothing_speed" default="5.0">
+ Speed in pixels per second of the camera's smoothing effect when [member position_smoothing_enabled] is [code]true[/code].
+ </member>
<member name="process_callback" type="int" setter="set_process_callback" getter="get_process_callback" enum="Camera2D.Camera2DProcessCallback" default="1">
The camera's process callback. See [enum Camera2DProcessCallback].
</member>
- <member name="rotating" type="bool" setter="set_rotating" getter="is_rotating" default="false">
- If [code]true[/code], the camera view rotates with the target.
- </member>
- <member name="smoothing_enabled" type="bool" setter="set_enable_follow_smoothing" getter="is_follow_smoothing_enabled" default="false">
- If [code]true[/code], the camera smoothly moves towards the target at [member smoothing_speed].
+ <member name="rotation_smoothing_enabled" type="bool" setter="set_rotation_smoothing_enabled" getter="is_rotation_smoothing_enabled" default="false">
+ If [code]true[/code], the camera's view smoothly rotates, via asymptotic smoothing, to align with its target rotation at [member rotation_smoothing_speed].
+ [b]Note:[/b] This property has no effect if [member ignore_rotation] is [code]true[/code].
</member>
- <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 name="rotation_smoothing_speed" type="float" setter="set_rotation_smoothing_speed" getter="get_rotation_smoothing_speed" default="5.0">
+ The angular, asymptotic speed of the camera's rotation smoothing effect when [member rotation_smoothing_enabled] is [code]true[/code].
</member>
<member name="zoom" type="Vector2" setter="set_zoom" getter="get_zoom" default="Vector2(1, 1)">
The camera's zoom. A zoom of [code]Vector(2, 2)[/code] doubles the size seen in the viewport. A zoom of [code]Vector(0.5, 0.5)[/code] halves the size seen in the viewport.
diff --git a/doc/classes/Camera3D.xml b/doc/classes/Camera3D.xml
index 71d16b5791..322c4f0bf4 100644
--- a/doc/classes/Camera3D.xml
+++ b/doc/classes/Camera3D.xml
@@ -14,7 +14,7 @@
<return type="void" />
<param index="0" name="enable_next" type="bool" default="true" />
<description>
- If this is the current camera, remove it from being current. If [code]enable_next[/code] is [code]true[/code], request to make the next camera current, if any.
+ If this is the current camera, remove it from being current. If [param enable_next] is [code]true[/code], request to make the next camera current, if any.
</description>
</method>
<method name="get_camera_rid" qualifiers="const">
@@ -33,11 +33,11 @@
<return type="bool" />
<param index="0" name="layer_number" type="int" />
<description>
- Returns whether or not the specified layer of the [member cull_mask] is enabled, given a [code]layer_number[/code] between 1 and 20.
+ Returns whether or not the specified layer of the [member cull_mask] is enabled, given a [param layer_number] between 1 and 20.
</description>
</method>
<method name="get_frustum" qualifiers="const">
- <return type="Array" />
+ <return type="Plane[]" />
<description>
Returns the camera's frustum planes in world space units as an array of [Plane]s in the following order: near, far, left, top, right, bottom. Not to be confused with [member frustum_offset].
</description>
@@ -81,7 +81,7 @@
<param index="0" name="screen_point" type="Vector2" />
<param index="1" name="z_depth" type="float" />
<description>
- Returns the 3D point in world space that maps to the given 2D coordinate in the [Viewport] rectangle on a plane that is the given [code]z_depth[/code] distance into the scene away from the camera.
+ Returns the 3D point in world space that maps to the given 2D coordinate in the [Viewport] rectangle on a plane that is the given [param z_depth] distance into the scene away from the camera.
</description>
</method>
<method name="project_ray_normal" qualifiers="const">
@@ -103,7 +103,7 @@
<param index="0" name="layer_number" type="int" />
<param index="1" name="value" type="bool" />
<description>
- Based on [code]value[/code], enables or disables the specified layer in the [member cull_mask], given a [code]layer_number[/code] between 1 and 20.
+ Based on [param value], enables or disables the specified layer in the [member cull_mask], given a [param layer_number] between 1 and 20.
</description>
</method>
<method name="set_frustum">
@@ -113,7 +113,7 @@
<param index="2" name="z_near" type="float" />
<param index="3" name="z_far" type="float" />
<description>
- Sets the camera projection to frustum mode (see [constant PROJECTION_FRUSTUM]), by specifying a [code]size[/code], an [code]offset[/code], and the [code]z_near[/code] and [code]z_far[/code] clip planes in world space units. See also [member frustum_offset].
+ Sets the camera projection to frustum mode (see [constant PROJECTION_FRUSTUM]), by specifying a [param size], an [param offset], and the [param z_near] and [param z_far] clip planes in world space units. See also [member frustum_offset].
</description>
</method>
<method name="set_orthogonal">
@@ -122,7 +122,7 @@
<param index="1" name="z_near" type="float" />
<param index="2" name="z_far" type="float" />
<description>
- Sets the camera projection to orthogonal mode (see [constant PROJECTION_ORTHOGONAL]), by specifying a [code]size[/code], and the [code]z_near[/code] and [code]z_far[/code] clip planes in world space units. (As a hint, 2D games often use this projection, with values specified in pixels.)
+ Sets the camera projection to orthogonal mode (see [constant PROJECTION_ORTHOGONAL]), by specifying a [param size], and the [param z_near] and [param z_far] clip planes in world space units. (As a hint, 2D games often use this projection, with values specified in pixels.)
</description>
</method>
<method name="set_perspective">
@@ -131,7 +131,7 @@
<param index="1" name="z_near" type="float" />
<param index="2" name="z_far" type="float" />
<description>
- Sets the camera projection to perspective mode (see [constant PROJECTION_PERSPECTIVE]), by specifying a [code]fov[/code] (field of view) angle in degrees, and the [code]z_near[/code] and [code]z_far[/code] clip planes in world space units.
+ Sets the camera projection to perspective mode (see [constant PROJECTION_PERSPECTIVE]), by specifying a [param fov] (field of view) angle in degrees, and the [param z_near] and [param z_far] clip planes in world space units.
</description>
</method>
<method name="unproject_position" qualifiers="const">
@@ -150,6 +150,9 @@
</method>
</methods>
<members>
+ <member name="attributes" type="CameraAttributes" setter="set_attributes" getter="get_attributes">
+ The [CameraAttributes] to use for this camera.
+ </member>
<member name="cull_mask" type="int" setter="set_cull_mask" getter="get_cull_mask" default="1048575">
The culling mask that describes which 3D render layers are rendered by this camera.
</member>
@@ -160,9 +163,6 @@
<member name="doppler_tracking" type="int" setter="set_doppler_tracking" getter="get_doppler_tracking" enum="Camera3D.DopplerTracking" default="0">
If not [constant DOPPLER_TRACKING_DISABLED], this camera will simulate the [url=https://en.wikipedia.org/wiki/Doppler_effect]Doppler effect[/url] for objects changed in particular [code]_process[/code] methods. See [enum DopplerTracking] for possible values.
</member>
- <member name="effects" type="CameraEffects" setter="set_effects" getter="get_effects">
- The [CameraEffects] to use for this camera.
- </member>
<member name="environment" type="Environment" setter="set_environment" getter="get_environment">
The [Environment] to use for this camera.
</member>
@@ -194,7 +194,7 @@
The camera's projection mode. In [constant PROJECTION_PERSPECTIVE] mode, objects' Z distance from the camera's local space scales their perceived size.
</member>
<member name="size" type="float" setter="set_size" getter="get_size" default="1.0">
- The camera's size measured as 1/2 the width or height. Only applicable in orthogonal and frustum modes. Since [member keep_aspect] locks on axis, [code]size[/code] sets the other axis' size length.
+ The camera's size in meters measured as the diameter of the width or height, depending on [member keep_aspect]. Only applicable in orthogonal and frustum modes.
</member>
<member name="v_offset" type="float" setter="set_v_offset" getter="get_v_offset" default="0.0">
The vertical (Y) offset of the camera viewport.
diff --git a/doc/classes/CameraAttributes.xml b/doc/classes/CameraAttributes.xml
new file mode 100644
index 0000000000..23dc212069
--- /dev/null
+++ b/doc/classes/CameraAttributes.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="CameraAttributes" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ Parent class for camera settings.
+ </brief_description>
+ <description>
+ Controls camera-specific attributes such as depth of field and exposure override.
+ When used in a [WorldEnvironment] it provides default settings for exposure, auto-exposure, and depth of field that will be used by all cameras without their own [CameraAttributes], including the editor camera. When used in a [Camera3D] it will override any [CameraAttributes] set in the [WorldEnvironment]. When used in [VoxelGI] or [LightmapGI], only the exposure settings will be used.
+ See also [Environment] for general 3D environment settings.
+ This is a pure virtual class that is inherited by [CameraAttributesPhysical] and [CameraAttributesPractical].
+ </description>
+ <tutorials>
+ </tutorials>
+ <members>
+ <member name="auto_exposure_enabled" type="bool" setter="set_auto_exposure_enabled" getter="is_auto_exposure_enabled" default="false">
+ If [code]true[/code], enables the tonemapping auto exposure mode of the scene renderer. If [code]true[/code], the renderer will automatically determine the exposure setting to adapt to the scene's illumination and the observed light.
+ </member>
+ <member name="auto_exposure_scale" type="float" setter="set_auto_exposure_scale" getter="get_auto_exposure_scale" default="0.4">
+ The scale of the auto exposure effect. Affects the intensity of auto exposure.
+ </member>
+ <member name="auto_exposure_speed" type="float" setter="set_auto_exposure_speed" getter="get_auto_exposure_speed" default="0.5">
+ The speed of the auto exposure effect. Affects the time needed for the camera to perform auto exposure.
+ </member>
+ <member name="exposure_multiplier" type="float" setter="set_exposure_multiplier" getter="get_exposure_multiplier" default="1.0">
+ Multiplier for the exposure amount. A higher value results in a brighter image.
+ </member>
+ <member name="exposure_sensitivity" type="float" setter="set_exposure_sensitivity" getter="get_exposure_sensitivity" default="100.0">
+ Sensitivity of camera sensors, measured in ISO. A higher sensitivity results in a brighter image. Only available when [member ProjectSettings.rendering/lights_and_shadows/use_physical_light_units] is enabled. When [member auto_exposure_enabled] this can be used as a method of exposure compensation, doubling the value will increase the exposure value (measured in EV100) by 1 stop.
+ </member>
+ </members>
+</class>
diff --git a/doc/classes/CameraAttributesPhysical.xml b/doc/classes/CameraAttributesPhysical.xml
new file mode 100644
index 0000000000..a61e735932
--- /dev/null
+++ b/doc/classes/CameraAttributesPhysical.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="CameraAttributesPhysical" inherits="CameraAttributes" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ Physically-based camera settings.
+ </brief_description>
+ <description>
+ [CameraAttributesPhysical] is used to set rendering settings based on a physically-based camera's settings. It is responsible for exposure, auto-exposure, and depth of field.
+ When used in a [WorldEnvironment] it provides default settings for exposure, auto-exposure, and depth of field that will be used by all cameras without their own [CameraAttributes], including the editor camera. When used in a [Camera3D] it will override any [CameraAttributes] set in the [WorldEnvironment] and will override the [Camera3D]s [member Camera3D.far], [member Camera3D.near], [member Camera3D.fov], and [member Camera3D.keep_aspect] properties. When used in [VoxelGI] or [LightmapGI], only the exposure settings will be used.
+ The default settings are intended for use in an outdoor environment, tips for settings for use in an indoor environment can be found in each setting's documentation.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="get_fov" qualifiers="const">
+ <return type="float" />
+ <description>
+ Returns the vertical field of view that corresponds to the [member frustum_focal_length]. This value is calculated internally whenever [member frustum_focal_length] is changed.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="auto_exposure_max_exposure_value" type="float" setter="set_auto_exposure_max_exposure_value" getter="get_auto_exposure_max_exposure_value" default="10.0">
+ The maximum luminance (in EV100) used when calculating auto exposure. When calculating scene average luminance, color values will be clamped to at least this value. This limits the auto-exposure from exposing below a certain brightness, resulting in a cut off point where the scene will remain bright.
+ </member>
+ <member name="auto_exposure_min_exposure_value" type="float" setter="set_auto_exposure_min_exposure_value" getter="get_auto_exposure_min_exposure_value" default="-8.0">
+ The minimum luminance luminance (in EV100) used when calculating auto exposure. When calculating scene average luminance, color values will be clamped to at least this value. This limits the auto-exposure from exposing above a certain brightness, resulting in a cut off point where the scene will remain dark.
+ </member>
+ <member name="exposure_aperture" type="float" setter="set_aperture" getter="get_aperture" default="16.0">
+ Size of the aperture of the camera, measured in f-stops. An f-stop is a unitless ratio between the focal length of the camera and the diameter of the aperture. A high aperture setting will result in a smaller aperture which leads to a dimmer image and sharper focus. A low aperture results in a wide aperture which lets in more light resulting in a brighter, less-focused image. Default is appropriate for outdoors at daytime (i.e. for use with a default [DirectionalLight3D]), for indoor lighting, a value between 2 and 4 is more appropriate.
+ Only available when [member ProjectSettings.rendering/lights_and_shadows/use_physical_light_units] is enabled.
+ </member>
+ <member name="exposure_shutter_speed" type="float" setter="set_shutter_speed" getter="get_shutter_speed" default="100.0">
+ Time for shutter to open and close, measured in seconds. A higher value will let in more light leading to a brighter image, while a lower amount will let in less light leading to a darker image.
+ Only available when [member ProjectSettings.rendering/lights_and_shadows/use_physical_light_units] is enabled.
+ </member>
+ <member name="frustum_far" type="float" setter="set_far" getter="get_far" default="4000.0">
+ Override value for [member Camera3D.far]. Used internally when calculating depth of field. When attached to a [Camera3D] as its [member Camera3D.attributes], it will override the [member Camera3D.far] property.
+ </member>
+ <member name="frustum_focal_length" type="float" setter="set_focal_length" getter="get_focal_length" default="35.0">
+ Distance between camera lens and camera aperture, measured in millimeters. Controls field of view and depth of field. A larger focal length will result in a smaller field of view and a narrower depth of field meaning fewer objects will be in focus. A smaller focal length will result in a wider field of view and a larger depth of field meaning more objects will be in focus. When attached to a [Camera3D] as its [member Camera3D.attributes], it will override the [member Camera3D.fov] property and the [member Camera3D.keep_aspect] property.
+ </member>
+ <member name="frustum_focus_distance" type="float" setter="set_focus_distance" getter="get_focus_distance" default="10.0">
+ Distance from camera of object that will be in focus, measured in meters. Internally this will be clamped to be at least 1 millimeter larger than [member frustum_focal_length].
+ </member>
+ <member name="frustum_near" type="float" setter="set_near" getter="get_near" default="0.05">
+ Override value for [member Camera3D.near]. Used internally when calculating depth of field. When attached to a [Camera3D] as its [member Camera3D.attributes], it will override the [member Camera3D.near] property.
+ </member>
+ </members>
+</class>
diff --git a/doc/classes/CameraAttributesPractical.xml b/doc/classes/CameraAttributesPractical.xml
new file mode 100644
index 0000000000..924b02fc79
--- /dev/null
+++ b/doc/classes/CameraAttributesPractical.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="CameraAttributesPractical" inherits="CameraAttributes" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ Camera settings in an easy to use format.
+ </brief_description>
+ <description>
+ Controls camera-specific attributes such as auto-exposure, depth of field, and exposure override.
+ When used in a [WorldEnvironment] it provides default settings for exposure, auto-exposure, and depth of field that will be used by all cameras without their own [CameraAttributes], including the editor camera. When used in a [Camera3D] it will override any [CameraAttributes] set in the [WorldEnvironment]. When used in [VoxelGI] or [LightmapGI], only the exposure settings will be used.
+ </description>
+ <tutorials>
+ </tutorials>
+ <members>
+ <member name="auto_exposure_max_sensitivity" type="float" setter="set_auto_exposure_max_sensitivity" getter="get_auto_exposure_max_sensitivity" default="800.0">
+ The maximum sensitivity (in ISO) used when calculating auto exposure. When calculating scene average luminance, color values will be clamped to at least this value. This limits the auto-exposure from exposing below a certain brightness, resulting in a cut off point where the scene will remain bright.
+ </member>
+ <member name="auto_exposure_min_sensitivity" type="float" setter="set_auto_exposure_min_sensitivity" getter="get_auto_exposure_min_sensitivity" default="0.0">
+ The minimum sensitivity (in ISO) used when calculating auto exposure. When calculating scene average luminance, color values will be clamped to at least this value. This limits the auto-exposure from exposing above a certain brightness, resulting in a cut off point where the scene will remain dark.
+ </member>
+ <member name="dof_blur_amount" type="float" setter="set_dof_blur_amount" getter="get_dof_blur_amount" default="0.1">
+ Sets the maximum amount of blur. When using physically-based blur amounts, will instead act as a multiplier. High values lead to an increased amount of bluriness, but can be much more expensive to calculate. It is best to keep this as low as possible for a given art style.
+ </member>
+ <member name="dof_blur_far_distance" type="float" setter="set_dof_blur_far_distance" getter="get_dof_blur_far_distance" default="10.0">
+ Objects further from the [Camera3D] by this amount will be blurred by the depth of field effect. Measured in meters.
+ </member>
+ <member name="dof_blur_far_enabled" type="bool" setter="set_dof_blur_far_enabled" getter="is_dof_blur_far_enabled" default="false">
+ Enables depth of field blur for objects further than [member dof_blur_far_distance]. Strength of blur is controlled by [member dof_blur_amount] and modulated by [member dof_blur_far_transition].
+ </member>
+ <member name="dof_blur_far_transition" type="float" setter="set_dof_blur_far_transition" getter="get_dof_blur_far_transition" default="5.0">
+ When positive, distance over which (starting from [member dof_blur_far_distance]) blur effect will scale from 0 to [member dof_blur_amount]. When negative, uses physically-based scaling so depth of field effect will scale from 0 at [member dof_blur_far_distance] and will increase in a physically accurate way as objects get further from the [Camera3D].
+ </member>
+ <member name="dof_blur_near_distance" type="float" setter="set_dof_blur_near_distance" getter="get_dof_blur_near_distance" default="2.0">
+ Objects closer from the [Camera3D] by this amount will be blurred by the depth of field effect. Measured in meters.
+ </member>
+ <member name="dof_blur_near_enabled" type="bool" setter="set_dof_blur_near_enabled" getter="is_dof_blur_near_enabled" default="false">
+ Enables depth of field blur for objects closer than [member dof_blur_near_distance]. Strength of blur is controlled by [member dof_blur_amount] and modulated by [member dof_blur_near_transition].
+ </member>
+ <member name="dof_blur_near_transition" type="float" setter="set_dof_blur_near_transition" getter="get_dof_blur_near_transition" default="1.0">
+ When positive, distance over which blur effect will scale from 0 to [member dof_blur_amount], ending at [member dof_blur_near_distance]. When negative, uses physically-based scaling so depth of field effect will scale from 0 at [member dof_blur_near_distance] and will increase in a physically accurate way as objects get closer to the [Camera3D].
+ </member>
+ </members>
+</class>
diff --git a/doc/classes/CameraEffects.xml b/doc/classes/CameraEffects.xml
deleted file mode 100644
index c108b30f23..0000000000
--- a/doc/classes/CameraEffects.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CameraEffects" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
- <brief_description>
- Contains camera-specific effects such as depth of field and exposure override.
- </brief_description>
- <description>
- Contains camera-specific effects such as depth of field and exposure override.
- See also [Environment] for general 3D environment settings.
- </description>
- <tutorials>
- </tutorials>
- <members>
- <member name="dof_blur_amount" type="float" setter="set_dof_blur_amount" getter="get_dof_blur_amount" default="0.1">
- The amount of blur for both near and far depth-of-field effects. The amount of blur increases the radius of the blur effect, making the affected area blurrier. However, If the amount is too high, you might start to see lines appearing, especially when using a low quality blur.
- </member>
- <member name="dof_blur_far_distance" type="float" setter="set_dof_blur_far_distance" getter="get_dof_blur_far_distance" default="10.0">
- The distance from the camera where the far blur effect affects the rendering.
- </member>
- <member name="dof_blur_far_enabled" type="bool" setter="set_dof_blur_far_enabled" getter="is_dof_blur_far_enabled" default="false">
- If [code]true[/code], enables the depth-of-field far blur effect. This has a significant performance cost. Consider disabling it in scenes where there are no far away objects.
- </member>
- <member name="dof_blur_far_transition" type="float" setter="set_dof_blur_far_transition" getter="get_dof_blur_far_transition" default="5.0">
- The length of the transition between the no-blur area and far blur.
- </member>
- <member name="dof_blur_near_distance" type="float" setter="set_dof_blur_near_distance" getter="get_dof_blur_near_distance" default="2.0">
- Distance from the camera where the near blur effect affects the rendering.
- </member>
- <member name="dof_blur_near_enabled" type="bool" setter="set_dof_blur_near_enabled" getter="is_dof_blur_near_enabled" default="false">
- If [code]true[/code], enables the depth-of-field near blur effect. This has a significant performance cost. Consider disabling it in scenes where there are no nearby objects.
- </member>
- <member name="dof_blur_near_transition" type="float" setter="set_dof_blur_near_transition" getter="get_dof_blur_near_transition" default="1.0">
- The length of the transition between the near blur and no-blur area.
- </member>
- <member name="override_exposure" type="float" setter="set_override_exposure" getter="get_override_exposure" default="1.0">
- The exposure override value to use. Higher values will result in a brighter scene. Only effective if [member override_exposure_enabled] is [code]true[/code].
- </member>
- <member name="override_exposure_enabled" type="bool" setter="set_override_exposure_enabled" getter="is_override_exposure_enabled" default="false">
- If [code]true[/code], overrides the manual or automatic exposure defined in the [Environment] with the value in [member override_exposure].
- </member>
- </members>
-</class>
diff --git a/doc/classes/CameraServer.xml b/doc/classes/CameraServer.xml
index 7ec49c7df4..d346fbde4f 100644
--- a/doc/classes/CameraServer.xml
+++ b/doc/classes/CameraServer.xml
@@ -15,11 +15,11 @@
<return type="void" />
<param index="0" name="feed" type="CameraFeed" />
<description>
- Adds the camera [code]feed[/code] to the camera server.
+ Adds the camera [param feed] to the camera server.
</description>
</method>
<method name="feeds">
- <return type="Array" />
+ <return type="CameraFeed[]" />
<description>
Returns an array of [CameraFeed]s.
</description>
@@ -28,7 +28,7 @@
<return type="CameraFeed" />
<param index="0" name="index" type="int" />
<description>
- Returns the [CameraFeed] corresponding to the camera with the given [code]index[/code].
+ Returns the [CameraFeed] corresponding to the camera with the given [param index].
</description>
</method>
<method name="get_feed_count">
@@ -41,7 +41,7 @@
<return type="void" />
<param index="0" name="feed" type="CameraFeed" />
<description>
- Removes the specified camera [code]feed[/code].
+ Removes the specified camera [param feed].
</description>
</method>
</methods>
diff --git a/doc/classes/CameraTexture.xml b/doc/classes/CameraTexture.xml
index 8eedfe3580..e7020c869e 100644
--- a/doc/classes/CameraTexture.xml
+++ b/doc/classes/CameraTexture.xml
@@ -16,6 +16,7 @@
<member name="camera_is_active" type="bool" setter="set_camera_active" getter="get_camera_active" default="false">
Convenience property that gives access to the active property of the [CameraFeed].
</member>
+ <member name="resource_local_to_scene" type="bool" setter="set_local_to_scene" getter="is_local_to_scene" overrides="Resource" default="false" />
<member name="which_feed" type="int" setter="set_which_feed" getter="get_which_feed" enum="CameraServer.FeedImage" default="0">
Which image within the [CameraFeed] we want access to, important if the camera image is split in a Y and CbCr component.
</member>
diff --git a/doc/classes/CanvasItem.xml b/doc/classes/CanvasItem.xml
index 391ff1efb1..a2859552a9 100644
--- a/doc/classes/CanvasItem.xml
+++ b/doc/classes/CanvasItem.xml
@@ -5,11 +5,11 @@
</brief_description>
<description>
Base class of anything 2D. Canvas items are laid out in a tree; children inherit and extend their parent's transform. [CanvasItem] is extended by [Control] for anything GUI-related, and by [Node2D] for anything related to the 2D engine.
- Any [CanvasItem] can draw. For this, [method update] must be called, then [constant NOTIFICATION_DRAW] will be received on idle time to request redraw. Because of this, canvas items don't need to be redrawn on every frame, improving the performance significantly. Several functions for drawing on the [CanvasItem] are provided (see [code]draw_*[/code] functions). However, they can only be used inside the [method Object._notification], signal or [method _draw] virtual functions.
+ Any [CanvasItem] can draw. For this, [method queue_redraw] is called by the engine, then [constant NOTIFICATION_DRAW] will be received on idle time to request redraw. Because of this, canvas items don't need to be redrawn on every frame, improving the performance significantly. Several functions for drawing on the [CanvasItem] are provided (see [code]draw_*[/code] functions). However, they can only be used inside [method _draw], its corresponding [method Object._notification] or methods connected to the [signal draw] signal.
Canvas items are drawn in tree order. By default, children are on top of their parents so a root [CanvasItem] will be drawn behind everything. This behavior can be changed on a per-item basis.
A [CanvasItem] can also be hidden, which will also hide its children. It provides many ways to change parameters such as modulation (for itself and its children) and self modulation (only for itself), as well as its blend mode.
Ultimately, a transform notification can be requested, which will notify the node that its global position changed in case the parent tree changed.
- [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].
+ [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.deg_to_rad].
</description>
<tutorials>
<link title="Viewport and canvas transforms">$DOCS_URL/tutorials/2d/2d_transforms.html</link>
@@ -20,7 +20,8 @@
<method name="_draw" qualifiers="virtual">
<return type="void" />
<description>
- Overridable function called by the engine (if defined) to draw the canvas item.
+ Called when [CanvasItem] has been requested to redraw (after [method queue_redraw] is called, either manually or by the engine).
+ Corresponds to the [constant NOTIFICATION_DRAW] notification in [method Object._notification].
</description>
</method>
<method name="draw_animation_slice">
@@ -44,7 +45,7 @@
<param index="6" name="width" type="float" default="1.0" />
<param index="7" name="antialiased" type="bool" default="false" />
<description>
- Draws a unfilled arc between the given angles. The larger the value of [code]point_count[/code], the smoother the curve. See also [method draw_circle].
+ Draws a unfilled arc between the given angles. The larger the value of [param point_count], the smoother the curve. See also [method draw_circle].
</description>
</method>
<method name="draw_char" qualifiers="const">
@@ -86,7 +87,7 @@
<param index="2" name="uvs" type="PackedVector2Array" default="PackedVector2Array()" />
<param index="3" name="texture" type="Texture2D" default="null" />
<description>
- Draws a colored polygon of any amount of points, convex or concave. Unlike [method draw_polygon], a single color must be specified for the whole polygon.
+ Draws a colored polygon of any number of points, convex or concave. Unlike [method draw_polygon], a single color must be specified for the whole polygon.
</description>
</method>
<method name="draw_dashed_line">
@@ -106,6 +107,23 @@
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_lcd_texture_rect_region">
+ <return type="void" />
+ <param index="0" name="texture" type="Texture2D" />
+ <param index="1" name="rect" type="Rect2" />
+ <param index="2" name="src_rect" type="Rect2" />
+ <param index="3" name="modulate" type="Color" default="Color(1, 1, 1, 1)" />
+ <description>
+ Draws a textured rectangle region of the font texture with LCD subpixel anti-aliasing at a given position, optionally modulated by a color.
+ Texture is drawn using the following blend operation, blend mode of the [CanvasItemMaterial] is ignored:
+ [codeblock]
+ dst.r = texture.r * modulate.r * modulate.a + dst.r * (1.0 - texture.r * modulate.a);
+ dst.g = texture.g * modulate.g * modulate.a + dst.g * (1.0 - texture.g * modulate.a);
+ dst.b = texture.b * modulate.b * modulate.a + dst.b * (1.0 - texture.b * modulate.a);
+ dst.a = modulate.a + dst.a * (1.0 - modulate.a);
+ [/codeblock]
+ </description>
+ </method>
<method name="draw_line">
<return type="void" />
<param index="0" name="from" type="Vector2" />
@@ -137,8 +155,8 @@
<param index="5" name="pixel_range" type="float" default="4.0" />
<description>
Draws a textured rectangle region of the multi-channel signed distance field texture at a given position, optionally modulated by a color. See [member FontFile.multichannel_signed_distance_field] for more information and caveats about MSDF font rendering.
- If [code]outline[/code] is positive, each alpha channel value of pixel in region is set to maximum value of true distance in the [code]outline[/code] radius.
- Value of the [code]pixel_range[/code] should the same that was used during distance field texture generation.
+ If [param outline] is positive, each alpha channel value of pixel in region is set to maximum value of true distance in the [param outline] radius.
+ Value of the [param pixel_range] should the same that was used during distance field texture generation.
</description>
</method>
<method name="draw_multiline">
@@ -147,7 +165,7 @@
<param index="1" name="color" type="Color" />
<param index="2" name="width" type="float" default="1.0" />
<description>
- Draws multiple disconnected lines with a uniform [code]color[/code]. When drawing large amounts of lines, this is faster than using individual [method draw_line] calls. To draw interconnected lines, use [method draw_polyline] instead.
+ Draws multiple disconnected lines with a uniform [param color]. When drawing large amounts of lines, this is faster than using individual [method draw_line] calls. To draw interconnected lines, use [method draw_polyline] instead.
</description>
</method>
<method name="draw_multiline_colors">
@@ -156,7 +174,7 @@
<param index="1" name="colors" type="PackedColorArray" />
<param index="2" name="width" type="float" default="1.0" />
<description>
- Draws multiple disconnected lines with a uniform [code]width[/code] and segment-by-segment coloring. Colors assigned to line segments match by index between [code]points[/code] and [code]colors[/code]. When drawing large amounts of lines, this is faster than using individual [method draw_line] calls. To draw interconnected lines, use [method draw_polyline_colors] instead.
+ Draws multiple disconnected lines with a uniform [param width] and segment-by-segment coloring. Colors assigned to line segments match by index between [param points] and [param colors]. When drawing large amounts of lines, this is faster than using individual [method draw_line] calls. To draw interconnected lines, use [method draw_polyline_colors] instead.
</description>
</method>
<method name="draw_multiline_string" qualifiers="const">
@@ -174,7 +192,7 @@
<param index="10" name="direction" type="int" enum="TextServer.Direction" default="0" />
<param index="11" name="orientation" type="int" enum="TextServer.Orientation" default="0" />
<description>
- Breaks [code]text[/code] to the lines and draws it using the specified [code]font[/code] at the [code]position[/code] (top-left corner). The text will have its color multiplied by [code]modulate[/code]. If [code]clip_w[/code] is greater than or equal to 0, the text will be clipped if it exceeds the specified width.
+ Breaks [param text] into lines and draws it using the specified [param font] at the [param pos] (top-left corner). The text will have its color multiplied by [param modulate]. If [param width] is greater than or equal to 0, the text will be clipped if it exceeds the specified width.
</description>
</method>
<method name="draw_multiline_string_outline" qualifiers="const">
@@ -193,7 +211,7 @@
<param index="11" name="direction" type="int" enum="TextServer.Direction" default="0" />
<param index="12" name="orientation" type="int" enum="TextServer.Orientation" default="0" />
<description>
- Breaks [code]text[/code] to the lines and draws text outline using the specified [code]font[/code] at the [code]position[/code] (top-left corner). The text will have its color multiplied by [code]modulate[/code]. If [code]clip_w[/code] is greater than or equal to 0, the text will be clipped if it exceeds the specified width.
+ Breaks [param text] to the lines and draws text outline using the specified [param font] at the [param pos] (top-left corner). The text will have its color multiplied by [param modulate]. If [param width] is greater than or equal to 0, the text will be clipped if it exceeds the specified width.
</description>
</method>
<method name="draw_multimesh">
@@ -211,7 +229,7 @@
<param index="2" name="uvs" type="PackedVector2Array" default="PackedVector2Array()" />
<param index="3" name="texture" type="Texture2D" default="null" />
<description>
- Draws a solid polygon of any amount of points, convex or concave. Unlike [method draw_colored_polygon], each point's color can be changed individually. See also [method draw_polyline] and [method draw_polyline_colors].
+ Draws a solid polygon of any number of points, convex or concave. Unlike [method draw_colored_polygon], each point's color can be changed individually. See also [method draw_polyline] and [method draw_polyline_colors].
</description>
</method>
<method name="draw_polyline">
@@ -221,7 +239,7 @@
<param index="2" name="width" type="float" default="1.0" />
<param index="3" name="antialiased" type="bool" default="false" />
<description>
- Draws interconnected line segments with a uniform [code]color[/code] and [code]width[/code] and optional antialiasing. When drawing large amounts of lines, this is faster than using individual [method draw_line] calls. To draw disconnected lines, use [method draw_multiline] instead. See also [method draw_polygon].
+ Draws interconnected line segments with a uniform [param color] and [param width] and optional antialiasing. When drawing large amounts of lines, this is faster than using individual [method draw_line] calls. To draw disconnected lines, use [method draw_multiline] instead. See also [method draw_polygon].
</description>
</method>
<method name="draw_polyline_colors">
@@ -231,7 +249,7 @@
<param index="2" name="width" type="float" default="1.0" />
<param index="3" name="antialiased" type="bool" default="false" />
<description>
- Draws interconnected line segments with a uniform [code]width[/code] and segment-by-segment coloring, and optional antialiasing. Colors assigned to line segments match by index between [code]points[/code] and [code]colors[/code]. When drawing large amounts of lines, this is faster than using individual [method draw_line] calls. To draw disconnected lines, use [method draw_multiline_colors] instead. See also [method draw_polygon].
+ Draws interconnected line segments with a uniform [param width] and segment-by-segment coloring, and optional antialiasing. Colors assigned to line segments match by index between [param points] and [param colors]. When drawing large amounts of lines, this is faster than using individual [method draw_line] calls. To draw disconnected lines, use [method draw_multiline_colors] instead. See also [method draw_polygon].
</description>
</method>
<method name="draw_primitive">
@@ -252,8 +270,8 @@
<param index="2" name="filled" type="bool" default="true" />
<param index="3" name="width" type="float" default="1.0" />
<description>
- Draws a rectangle. If [code]filled[/code] is [code]true[/code], the rectangle will be filled with the [code]color[/code] specified. If [code]filled[/code] is [code]false[/code], the rectangle will be drawn as a stroke with the [code]color[/code] and [code]width[/code] specified.
- [b]Note:[/b] [code]width[/code] is only effective if [code]filled[/code] is [code]false[/code].
+ Draws a rectangle. If [param filled] is [code]true[/code], the rectangle will be filled with the [param color] specified. If [param filled] is [code]false[/code], the rectangle will be drawn as a stroke with the [param color] and [param width] specified.
+ [b]Note:[/b] [param width] is only effective if [param filled] is [code]false[/code].
</description>
</method>
<method name="draw_set_transform">
@@ -285,23 +303,23 @@
<param index="8" name="direction" type="int" enum="TextServer.Direction" default="0" />
<param index="9" name="orientation" type="int" enum="TextServer.Orientation" default="0" />
<description>
- Draws [code]text[/code] using the specified [code]font[/code] at the [code]position[/code] (bottom-left corner using the baseline of the font). The text will have its color multiplied by [code]modulate[/code]. If [code]clip_w[/code] is greater than or equal to 0, the text will be clipped if it exceeds the specified width.
+ Draws [param text] using the specified [param font] at the [param pos] (bottom-left corner using the baseline of the font). The text will have its color multiplied by [param modulate]. If [param width] is greater than or equal to 0, the text will be clipped if it exceeds the specified width.
[b]Example using the default project font:[/b]
[codeblocks]
[gdscript]
# If using this method in a script that redraws constantly, move the
# `default_font` declaration to a member variable assigned in `_ready()`
# so the Control is only created once.
- var default_font = Control.new().get_font("font")
- var default_font_size = Control.new().get_font_size("font_size")
- draw_string(default_font, Vector2(64, 64), "Hello world", HORIZONTAL_ALIGNMENT_LEFT, -1, font_size)
+ var default_font = ThemeDB.fallback_font
+ var default_font_size = ThemeDB.fallback_font_size
+ draw_string(default_font, Vector2(64, 64), "Hello world", HORIZONTAL_ALIGNMENT_LEFT, -1, default_font_size)
[/gdscript]
[csharp]
// If using this method in a script that redraws constantly, move the
- // `default_font` declaration to a member variable assigned in `_ready()`
+ // `default_font` declaration to a member variable assigned in `_Ready()`
// so the Control is only created once.
- Font defaultFont = new Control().GetFont("font");
- int defaultFontSize = new Control().GetFontSize("font_size");
+ Font defaultFont = ThemeDB.FallbackFont;
+ int defaultFontSize = ThemeDB.FallbackFontSize;
DrawString(defaultFont, new Vector2(64, 64), "Hello world", HORIZONTAL_ALIGNMENT_LEFT, -1, defaultFontSize);
[/csharp]
[/codeblocks]
@@ -322,7 +340,7 @@
<param index="9" name="direction" type="int" enum="TextServer.Direction" default="0" />
<param index="10" name="orientation" type="int" enum="TextServer.Orientation" default="0" />
<description>
- Draws [code]text[/code] outline using the specified [code]font[/code] at the [code]position[/code] (bottom-left corner using the baseline of the font). The text will have its color multiplied by [code]modulate[/code]. If [code]clip_w[/code] is greater than or equal to 0, the text will be clipped if it exceeds the specified width.
+ Draws [param text] outline using the specified [param font] at the [param pos] (bottom-left corner using the baseline of the font). The text will have its color multiplied by [param modulate]. If [param width] is greater than or equal to 0, the text will be clipped if it exceeds the specified width.
</description>
</method>
<method name="draw_style_box">
@@ -350,7 +368,7 @@
<param index="3" name="modulate" type="Color" default="Color(1, 1, 1, 1)" />
<param index="4" name="transpose" type="bool" default="false" />
<description>
- Draws a textured rectangle at a given position, optionally modulated by a color. If [code]transpose[/code] is [code]true[/code], the texture will have its X and Y coordinates swapped.
+ Draws a textured rectangle at a given position, optionally modulated by a color. If [param transpose] is [code]true[/code], the texture will have its X and Y coordinates swapped.
</description>
</method>
<method name="draw_texture_rect_region">
@@ -362,7 +380,7 @@
<param index="4" name="transpose" type="bool" default="false" />
<param index="5" name="clip_uv" type="bool" default="true" />
<description>
- Draws a textured rectangle region at a given position, optionally modulated by a color. If [code]transpose[/code] is [code]true[/code], the texture will have its X and Y coordinates swapped.
+ Draws a textured rectangle region at a given position, optionally modulated by a color. If [param transpose] is [code]true[/code], the texture will have its X and Y coordinates swapped.
</description>
</method>
<method name="force_update_transform">
@@ -398,7 +416,7 @@
<method name="get_global_transform" qualifiers="const">
<return type="Transform2D" />
<description>
- Returns the global transform matrix of this item.
+ Returns the global transform matrix of this item, i.e. the combined transform up to the topmost [CanvasItem] node. The topmost item is a [CanvasItem] that either has no parent, has non-[CanvasItem] parent or it has [member top_level] enabled.
</description>
</method>
<method name="get_global_transform_with_canvas" qualifiers="const">
@@ -438,6 +456,13 @@
Returns this item's transform in relation to the viewport.
</description>
</method>
+ <method name="get_visibility_layer_bit" qualifiers="const">
+ <return type="bool" />
+ <param index="0" name="layer" type="int" />
+ <description>
+ Returns an individual bit on the rendering visibility layer.
+ </description>
+ </method>
<method name="get_world_2d" qualifiers="const">
<return type="World2D" />
<description>
@@ -465,52 +490,68 @@
<method name="is_visible_in_tree" qualifiers="const">
<return type="bool" />
<description>
- Returns [code]true[/code] if the node is present in the [SceneTree], its [member visible] property is [code]true[/code] and all its antecedents are also visible. If any antecedent is hidden, this node will not be visible in the scene tree.
+ Returns [code]true[/code] if the node is present in the [SceneTree], its [member visible] property is [code]true[/code] and all its antecedents are also visible. If any antecedent is hidden, this node will not be visible in the scene tree, and is consequently not drawn (see [method _draw]).
</description>
</method>
<method name="make_canvas_position_local" qualifiers="const">
<return type="Vector2" />
<param index="0" name="screen_point" type="Vector2" />
<description>
- Assigns [code]screen_point[/code] as this node's new local transform.
+ Assigns [param screen_point] as this node's new local transform.
</description>
</method>
<method name="make_input_local" qualifiers="const">
<return type="InputEvent" />
<param index="0" name="event" type="InputEvent" />
<description>
- Transformations issued by [code]event[/code]'s inputs are applied in local space instead of global space.
+ Transformations issued by [param event]'s inputs are applied in local space instead of global space.
+ </description>
+ </method>
+ <method name="move_to_front">
+ <return type="void" />
+ <description>
+ Moves this node to display on top of its siblings. This has more use in [Control], as [Node2D] can be ordered with [member Node2D.z_index].
+ Internally, the node is moved to the bottom of parent's children list. The method has no effect on nodes without a parent.
+ </description>
+ </method>
+ <method name="queue_redraw">
+ <return type="void" />
+ <description>
+ Queues the [CanvasItem] to redraw. During idle time, if [CanvasItem] is visible, [constant NOTIFICATION_DRAW] is sent and [method _draw] is called. This only occurs [b]once[/b] per frame, even if this method has been called multiple times.
</description>
</method>
<method name="set_notify_local_transform">
<return type="void" />
<param index="0" name="enable" type="bool" />
<description>
- If [code]enable[/code] is [code]true[/code], this node will receive [constant NOTIFICATION_LOCAL_TRANSFORM_CHANGED] when its local transform changes.
+ If [param enable] is [code]true[/code], this node will receive [constant NOTIFICATION_LOCAL_TRANSFORM_CHANGED] when its local transform changes.
</description>
</method>
<method name="set_notify_transform">
<return type="void" />
<param index="0" name="enable" type="bool" />
<description>
- If [code]enable[/code] is [code]true[/code], this node will receive [constant NOTIFICATION_TRANSFORM_CHANGED] when its global transform changes.
+ If [param enable] is [code]true[/code], this node will receive [constant NOTIFICATION_TRANSFORM_CHANGED] when its global transform changes.
</description>
</method>
- <method name="show">
+ <method name="set_visibility_layer_bit">
<return type="void" />
+ <param index="0" name="layer" type="int" />
+ <param index="1" name="enabled" type="bool" />
<description>
- Show the [CanvasItem] if it's currently hidden. This is equivalent to setting [member visible] to [code]true[/code]. For controls that inherit [Popup], the correct way to make them visible is to call one of the multiple [code]popup*()[/code] functions instead.
+ Set/clear individual bits on the rendering visibility layer. This simplifies editing this [CanvasItem]'s visibility layer.
</description>
</method>
- <method name="update">
+ <method name="show">
<return type="void" />
<description>
- Queue the [CanvasItem] for update. [constant NOTIFICATION_DRAW] will be called on idle time to request redraw.
+ Show the [CanvasItem] if it's currently hidden. This is equivalent to setting [member visible] to [code]true[/code]. For controls that inherit [Popup], the correct way to make them visible is to call one of the multiple [code]popup*()[/code] functions instead.
</description>
</method>
</methods>
<members>
- <member name="clip_children" type="bool" setter="set_clip_children" getter="is_clipping_children" default="false">
+ <member name="clip_children" type="int" setter="set_clip_children_mode" getter="get_clip_children_mode" enum="CanvasItem.ClipChildrenMode" default="0">
+ Allows the current node to clip children nodes, essentially acting as a mask.
</member>
<member name="light_mask" type="int" setter="set_light_mask" getter="get_light_mask" default="1">
The rendering layers in which this [CanvasItem] responds to [Light2D] nodes.
@@ -539,6 +580,9 @@
<member name="use_parent_material" type="bool" setter="set_use_parent_material" getter="get_use_parent_material" default="false">
If [code]true[/code], the parent [CanvasItem]'s [member material] property is used as this one's material.
</member>
+ <member name="visibility_layer" type="int" setter="set_visibility_layer" getter="get_visibility_layer" default="1">
+ The rendering layer in which this [CanvasItem] is rendered by [Viewport] nodes. A [Viewport] will render a [CanvasItem] if it and all its parents share a layer with the [Viewport]'s canvas cull mask.
+ </member>
<member name="visible" type="bool" setter="set_visible" getter="is_visible" default="true">
If [code]true[/code], this [CanvasItem] 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]).
[b]Note:[/b] For controls that inherit [Popup], the correct way to make them visible is to call one of the multiple [code]popup*()[/code] functions instead.
@@ -547,7 +591,8 @@
<signals>
<signal name="draw">
<description>
- Emitted when the [CanvasItem] must redraw. This can only be connected realtime, as deferred will not allow drawing.
+ Emitted when the [CanvasItem] must redraw, [i]after[/i] the related [constant NOTIFICATION_DRAW] notification, and [i]before[/i] [method _draw] is called.
+ [b]Note:[/b] Deferred connections do not allow drawing through the [code]draw_*[/code] methods.
</description>
</signal>
<signal name="hidden">
@@ -574,7 +619,7 @@
The [CanvasItem]'s local transform has changed. This notification is only received if enabled by [method set_notify_local_transform].
</constant>
<constant name="NOTIFICATION_DRAW" value="30">
- The [CanvasItem] is requested to draw.
+ The [CanvasItem] is requested to draw (see [method _draw]).
</constant>
<constant name="NOTIFICATION_VISIBILITY_CHANGED" value="31">
The [CanvasItem]'s visibility has changed.
@@ -601,11 +646,11 @@
The texture filter blends between the nearest 4 pixels and between the nearest 2 mipmaps. Use this for non-pixel art textures that may be viewed at a low scale (e.g. due to [Camera2D] zoom), as mipmaps are important to smooth out pixels that are smaller than on-screen pixels.
</constant>
<constant name="TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC" value="5" enum="TextureFilter">
- The texture filter reads from the nearest pixel, but selects a mipmap based on the angle between the surface and the camera view. This reduces artifacts on surfaces that are almost in line with the camera.
+ The texture filter reads from the nearest pixel, but selects a mipmap based on the angle between the surface and the camera view. This reduces artifacts on surfaces that are almost in line with the camera. The anisotropic filtering level can be changed by adjusting [member ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level].
[b]Note:[/b] This texture filter is rarely useful in 2D projects. [constant TEXTURE_FILTER_NEAREST_WITH_MIPMAPS] is usually more appropriate.
</constant>
<constant name="TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC" value="6" enum="TextureFilter">
- The texture filter blends between the nearest 4 pixels and selects a mipmap based on the angle between the surface and the camera view. This reduces artifacts on surfaces that are almost in line with the camera. This is the slowest of the filtering options, but results in the highest quality texturing.
+ The texture filter blends between the nearest 4 pixels and selects a mipmap based on the angle between the surface and the camera view. This reduces artifacts on surfaces that are almost in line with the camera. This is the slowest of the filtering options, but results in the highest quality texturing. The anisotropic filtering level can be changed by adjusting [member ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level].
[b]Note:[/b] This texture filter is rarely useful in 2D projects. [constant TEXTURE_FILTER_LINEAR_WITH_MIPMAPS] is usually more appropriate.
</constant>
<constant name="TEXTURE_FILTER_MAX" value="7" enum="TextureFilter">
@@ -626,5 +671,13 @@
<constant name="TEXTURE_REPEAT_MAX" value="4" enum="TextureRepeat">
Represents the size of the [enum TextureRepeat] enum.
</constant>
+ <constant name="CLIP_CHILDREN_DISABLED" value="0" enum="ClipChildrenMode">
+ </constant>
+ <constant name="CLIP_CHILDREN_ONLY" value="1" enum="ClipChildrenMode">
+ </constant>
+ <constant name="CLIP_CHILDREN_AND_DRAW" value="2" enum="ClipChildrenMode">
+ </constant>
+ <constant name="CLIP_CHILDREN_MAX" value="3" enum="ClipChildrenMode">
+ </constant>
</constants>
</class>
diff --git a/doc/classes/CanvasItemMaterial.xml b/doc/classes/CanvasItemMaterial.xml
index 22daf79074..59226840bc 100644
--- a/doc/classes/CanvasItemMaterial.xml
+++ b/doc/classes/CanvasItemMaterial.xml
@@ -28,7 +28,7 @@
[b]Note:[/b] This property is only used and visible in the editor if [member particles_animation] is [code]true[/code].
</member>
<member name="particles_animation" type="bool" setter="set_particles_animation" getter="get_particles_animation" default="false">
- If [code]true[/code], enable spritesheet-based animation features when assigned to [GPUParticles2D] and [CPUParticles2D] nodes. The [member ParticlesMaterial.anim_speed_max] or [member CPUParticles2D.anim_speed_max] should also be set to a positive value for the animation to play.
+ If [code]true[/code], enable spritesheet-based animation features when assigned to [GPUParticles2D] and [CPUParticles2D] nodes. The [member ParticleProcessMaterial.anim_speed_max] or [member CPUParticles2D.anim_speed_max] should also be set to a positive value for the animation to play.
This property (and other [code]particles_anim_*[/code] properties that depend on it) has no effect on other types of nodes.
</member>
</members>
diff --git a/doc/classes/CanvasLayer.xml b/doc/classes/CanvasLayer.xml
index ff2c3a8855..7c1b19b961 100644
--- a/doc/classes/CanvasLayer.xml
+++ b/doc/classes/CanvasLayer.xml
@@ -5,6 +5,7 @@
</brief_description>
<description>
Canvas drawing layer. [CanvasItem] nodes that are direct or indirect children of a [CanvasLayer] will be drawn in that layer. The layer is a numeric index that defines the draw order. The default 2D scene renders with index 0, so a [CanvasLayer] with index -1 will be drawn below, and one with index 1 will be drawn above. This is very useful for HUDs (in layer 1+ or above), or backgrounds (in layer -1 or below).
+ Embedded [Window]s are placed in layer 1024. CanvasItems in layer 1025 or above appear in front of embedded windows, CanvasItems in layer 1023 or below appear behind embedded windows.
</description>
<tutorials>
<link title="Viewport and canvas transforms">$DOCS_URL/tutorials/2d/2d_transforms.html</link>
@@ -35,11 +36,12 @@
<member name="custom_viewport" type="Node" setter="set_custom_viewport" getter="get_custom_viewport">
The custom [Viewport] node assigned to the [CanvasLayer]. If [code]null[/code], uses the default viewport instead.
</member>
- <member name="follow_viewport_enable" type="bool" setter="set_follow_viewport" getter="is_following_viewport" default="false">
- Sets the layer to follow the viewport in order to simulate a pseudo 3D effect.
+ <member name="follow_viewport_enabled" type="bool" setter="set_follow_viewport" getter="is_following_viewport" default="false">
+ If enabled, the [CanvasLayer] will use the viewport's transform, so it will move when camera moves instead of being anchored in a fixed position on the screen.
+ Together with [member follow_viewport_scale] it can be used for a pseudo 3D effect.
</member>
<member name="follow_viewport_scale" type="float" setter="set_follow_viewport_scale" getter="get_follow_viewport_scale" default="1.0">
- Scales the layer when using [member follow_viewport_enable]. Layers moving into the foreground should have increasing scales, while layers moving into the background should have decreasing scales.
+ Scales the layer when using [member follow_viewport_enabled]. Layers moving into the foreground should have increasing scales, while layers moving into the background should have decreasing scales.
</member>
<member name="layer" type="int" setter="set_layer" getter="get_layer" default="1">
Layer index for draw order. Lower values are drawn first.
diff --git a/doc/classes/CanvasTexture.xml b/doc/classes/CanvasTexture.xml
index ac18c2d474..d5bf65835f 100644
--- a/doc/classes/CanvasTexture.xml
+++ b/doc/classes/CanvasTexture.xml
@@ -1,25 +1,37 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="CanvasTexture" inherits="Texture2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
+ Texture with optional normal and specular maps for use in 2D rendering.
</brief_description>
<description>
+ [CanvasTexture] is an alternative to [ImageTexture] for 2D rendering. It allows using normal maps and specular maps in any node that inherits from [CanvasItem]. [CanvasTexture] also allows overriding the texture's filter and repeat mode independently of the node's properties (or the project settings).
+ [b]Note:[/b] [CanvasTexture] cannot be used in 3D rendering. For physically-based materials in 3D, use [BaseMaterial3D] instead.
</description>
<tutorials>
</tutorials>
<members>
<member name="diffuse_texture" type="Texture2D" setter="set_diffuse_texture" getter="get_diffuse_texture">
+ The diffuse (color) texture to use. This is the main texture you want to set in most cases.
</member>
<member name="normal_texture" type="Texture2D" setter="set_normal_texture" getter="get_normal_texture">
+ The normal map texture to use. Only has a visible effect if [Light2D]s are affecting this [CanvasTexture].
+ [b]Note:[/b] Godot expects the normal map to use X+, Y+, and Z+ coordinates. See [url=http://wiki.polycount.com/wiki/Normal_Map_Technical_Details#Common_Swizzle_Coordinates]this page[/url] for a comparison of normal map coordinates expected by popular engines.
</member>
+ <member name="resource_local_to_scene" type="bool" setter="set_local_to_scene" getter="is_local_to_scene" overrides="Resource" default="false" />
<member name="specular_color" type="Color" setter="set_specular_color" getter="get_specular_color" default="Color(1, 1, 1, 1)">
+ The multiplier for specular reflection colors. The [Light2D]'s color is also taken into account when determining the reflection color. Only has a visible effect if [Light2D]s are affecting this [CanvasTexture].
</member>
<member name="specular_shininess" type="float" setter="set_specular_shininess" getter="get_specular_shininess" default="1.0">
+ The specular exponent for [Light2D] specular reflections. Higher values result in a more glossy/"wet" look, with reflections becoming more localized and less visible overall. The default value of [code]1.0[/code] disables specular reflections entirely. Only has a visible effect if [Light2D]s are affecting this [CanvasTexture].
</member>
<member name="specular_texture" type="Texture2D" setter="set_specular_texture" getter="get_specular_texture">
+ The specular map to use for [Light2D] specular reflections. This should be a grayscale or colored texture, with brighter areas resulting in a higher [member specular_shininess] value. Using a colored [member specular_texture] allows controlling specular shininess on a per-channel basis. Only has a visible effect if [Light2D]s are affecting this [CanvasTexture].
</member>
<member name="texture_filter" type="int" setter="set_texture_filter" getter="get_texture_filter" enum="CanvasItem.TextureFilter" default="0">
+ The texture filtering mode to use when drawing this [CanvasTexture].
</member>
<member name="texture_repeat" type="int" setter="set_texture_repeat" getter="get_texture_repeat" enum="CanvasItem.TextureRepeat" default="0">
+ The texture repeat mode to use when drawing this [CanvasTexture].
</member>
</members>
</class>
diff --git a/doc/classes/CharacterBody2D.xml b/doc/classes/CharacterBody2D.xml
index 4a95e18575..7395556d05 100644
--- a/doc/classes/CharacterBody2D.xml
+++ b/doc/classes/CharacterBody2D.xml
@@ -10,7 +10,7 @@
</description>
<tutorials>
<link title="Kinematic character (2D)">$DOCS_URL/tutorials/physics/kinematic_character_2d.html</link>
- <link title="Using KinematicBody2D">$DOCS_URL/tutorials/physics/using_kinematic_body_2d.html</link>
+ <link title="Using CharacterBody2D">$DOCS_URL/tutorials/physics/using_character_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>
@@ -19,7 +19,7 @@
<return type="float" />
<param index="0" name="up_direction" type="Vector2" default="Vector2(0, -1)" />
<description>
- Returns the floor's collision angle at the last collision point according to [code]up_direction[/code], which is [code]Vector2.UP[/code] by default. This value is always positive and only valid after calling [method move_and_slide] and when [method is_on_floor] returns [code]true[/code].
+ Returns the floor's collision angle at the last collision point according to [param up_direction], which is [code]Vector2.UP[/code] by default. This value is always positive and only valid after calling [method move_and_slide] and when [method is_on_floor] returns [code]true[/code].
</description>
</method>
<method name="get_floor_normal" qualifiers="const">
@@ -131,7 +131,7 @@
<method name="move_and_slide">
<return type="bool" />
<description>
- Moves the body based on [member velocity]. If the body collides with another, it will slide along the other body (by default only on floor) rather than stop immediately. If the other body is a [CharacterBody2D] or [RigidDynamicBody2D], 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.
+ Moves the body based on [member velocity]. If the body collides with another, it will slide along the other body (by default only on floor) 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.
Modifies [member velocity] if a slide collision occurred. To get the latest collision call [method get_last_slide_collision], for detailed information about collisions that occurred, use [method get_slide_collision].
When the body touches a moving platform, the platform's velocity is automatically added to the body motion. If a collision occurs due to the platform's motion, it will always be first in the slide collisions.
The general behavior and available properties change according to the [member motion_mode].
@@ -140,12 +140,6 @@
</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_block_on_wall" type="bool" setter="set_floor_block_on_wall_enabled" getter="is_floor_block_on_wall_enabled" default="true">
If [code]true[/code], the body will be able to move on the floor only. This option avoids to be able to walk on walls, it will however allow to slide down along them.
</member>
@@ -158,7 +152,7 @@
</member>
<member name="floor_snap_length" type="float" setter="set_floor_snap_length" getter="get_floor_snap_length" default="1.0">
Sets a snapping distance. When set to a value different from [code]0.0[/code], the body is kept attached to slopes when calling [method move_and_slide]. The snapping vector is determined by the given distance along the opposite direction of the [member up_direction].
- As long as the snapping vector is in contact with the ground and the body moves against `up_direction`, the body will remain attached to the surface. Snapping is not applied if the body moves along `up_direction`, so it will be able to detach from the ground when jumping.
+ As long as the snapping vector is in contact with the ground and the body moves against [member up_direction], the body will remain attached to the surface. Snapping is not applied if the body moves along [member up_direction], so it will be able to detach from the ground when jumping.
</member>
<member name="floor_stop_on_slope" type="bool" setter="set_floor_stop_on_slope_enabled" getter="is_floor_stop_on_slope_enabled" default="true">
If [code]true[/code], the body will not slide on slopes when calling [method move_and_slide] when the body is standing still.
@@ -170,15 +164,21 @@
<member name="motion_mode" type="int" setter="set_motion_mode" getter="get_motion_mode" enum="CharacterBody2D.MotionMode" default="0">
Sets the motion mode which defines the behavior of [method move_and_slide]. See [enum MotionMode] constants for available modes.
</member>
- <member name="moving_platform_apply_velocity_on_leave" type="int" setter="set_moving_platform_apply_velocity_on_leave" getter="get_moving_platform_apply_velocity_on_leave" enum="CharacterBody2D.MovingPlatformApplyVelocityOnLeave" default="0">
- Sets the behavior to apply when you leave a moving platform. By default, to be physically accurate, when you leave the last platform velocity is applied. See [enum MovingPlatformApplyVelocityOnLeave] constants for available behavior.
- </member>
- <member name="moving_platform_floor_layers" type="int" setter="set_moving_platform_floor_layers" getter="get_moving_platform_floor_layers" default="4294967295">
+ <member name="platform_floor_layers" type="int" setter="set_platform_floor_layers" getter="get_platform_floor_layers" default="4294967295">
Collision layers that will be included for detecting floor bodies that will act as moving platforms to be followed by the [CharacterBody2D]. By default, all floor bodies are detected and propagate their velocity.
</member>
- <member name="moving_platform_wall_layers" type="int" setter="set_moving_platform_wall_layers" getter="get_moving_platform_wall_layers" default="0">
+ <member name="platform_on_leave" type="int" setter="set_platform_on_leave" getter="get_platform_on_leave" enum="CharacterBody2D.PlatformOnLeave" default="0">
+ Sets the behavior to apply when you leave a moving platform. By default, to be physically accurate, when you leave the last platform velocity is applied. See [enum PlatformOnLeave] constants for available behavior.
+ </member>
+ <member name="platform_wall_layers" type="int" setter="set_platform_wall_layers" getter="get_platform_wall_layers" default="0">
Collision layers that will be included for detecting wall bodies that will act as moving platforms to be followed by the [CharacterBody2D]. By default, all wall bodies are ignored.
</member>
+ <member name="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="slide_on_ceiling" type="bool" setter="set_slide_on_ceiling_enabled" getter="is_slide_on_ceiling_enabled" default="true">
If [code]true[/code], during a jump against the ceiling, the body will slide, if [code]false[/code] it will be stopped and will fall vertically.
</member>
@@ -199,13 +199,13 @@
<constant name="MOTION_MODE_FLOATING" value="1" enum="MotionMode">
Apply when there is no notion of floor or ceiling. All collisions will be reported as [code]on_wall[/code]. In this mode, when you slide, the speed will always be constant. This mode is suitable for top-down games.
</constant>
- <constant name="PLATFORM_VEL_ON_LEAVE_ALWAYS" value="0" enum="MovingPlatformApplyVelocityOnLeave">
+ <constant name="PLATFORM_ON_LEAVE_ADD_VELOCITY" value="0" enum="PlatformOnLeave">
Add the last platform velocity to the [member velocity] when you leave a moving platform.
</constant>
- <constant name="PLATFORM_VEL_ON_LEAVE_UPWARD_ONLY" value="1" enum="MovingPlatformApplyVelocityOnLeave">
+ <constant name="PLATFORM_ON_LEAVE_ADD_UPWARD_VELOCITY" value="1" enum="PlatformOnLeave">
Add the last platform velocity to the [member velocity] when you leave a moving platform, but any downward motion is ignored. It's useful to keep full jump height even when the platform is moving down.
</constant>
- <constant name="PLATFORM_VEL_ON_LEAVE_NEVER" value="2" enum="MovingPlatformApplyVelocityOnLeave">
+ <constant name="PLATFORM_ON_LEAVE_DO_NOTHING" value="2" enum="PlatformOnLeave">
Do nothing when leaving a platform.
</constant>
</constants>
diff --git a/doc/classes/CharacterBody3D.xml b/doc/classes/CharacterBody3D.xml
index 73f4e1c82e..309e2231a4 100644
--- a/doc/classes/CharacterBody3D.xml
+++ b/doc/classes/CharacterBody3D.xml
@@ -20,7 +20,7 @@
<return type="float" />
<param index="0" name="up_direction" type="Vector3" default="Vector3(0, 1, 0)" />
<description>
- Returns the floor's collision angle at the last collision point according to [code]up_direction[/code], which is [code]Vector3.UP[/code] by default. This value is always positive and only valid after calling [method move_and_slide] and when [method is_on_floor] returns [code]true[/code].
+ Returns the floor's collision angle at the last collision point according to [param up_direction], which is [code]Vector3.UP[/code] by default. This value is always positive and only valid after calling [method move_and_slide] and when [method is_on_floor] returns [code]true[/code].
</description>
</method>
<method name="get_floor_normal" qualifiers="const">
@@ -117,7 +117,7 @@
<method name="move_and_slide">
<return type="bool" />
<description>
- Moves the body based on [member 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 [RigidDynamicBody3D], 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.
+ Moves the body based on [member 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.
Modifies [member velocity] if a slide collision occurred. To get the latest collision call [method get_last_slide_collision], for more detailed information about collisions that occurred, use [method get_slide_collision].
When the body touches a moving platform, the platform's velocity is automatically added to the body motion. If a collision occurs due to the platform's motion, it will always be first in the slide collisions.
Returns [code]true[/code] if the body collided, otherwise, returns [code]false[/code].
@@ -125,12 +125,6 @@
</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_block_on_wall" type="bool" setter="set_floor_block_on_wall_enabled" getter="is_floor_block_on_wall_enabled" default="true">
If [code]true[/code], the body will be able to move on the floor only. This option avoids to be able to walk on walls, it will however allow to slide down along them.
</member>
@@ -143,7 +137,7 @@
</member>
<member name="floor_snap_length" type="float" setter="set_floor_snap_length" getter="get_floor_snap_length" default="0.1">
Sets a snapping distance. When set to a value different from [code]0.0[/code], the body is kept attached to slopes when calling [method move_and_slide]. The snapping vector is determined by the given distance along the opposite direction of the [member up_direction].
- As long as the snapping vector is in contact with the ground and the body moves against `up_direction`, the body will remain attached to the surface. Snapping is not applied if the body moves along `up_direction`, so it will be able to detach from the ground when jumping.
+ As long as the snapping vector is in contact with the ground and the body moves against [member up_direction], the body will remain attached to the surface. Snapping is not applied if the body moves along [member up_direction], so it will be able to detach from the ground when jumping.
</member>
<member name="floor_stop_on_slope" type="bool" setter="set_floor_stop_on_slope_enabled" getter="is_floor_stop_on_slope_enabled" default="true">
If [code]true[/code], the body will not slide on slopes when calling [method move_and_slide] when the body is standing still.
@@ -155,15 +149,21 @@
<member name="motion_mode" type="int" setter="set_motion_mode" getter="get_motion_mode" enum="CharacterBody3D.MotionMode" default="0">
Sets the motion mode which defines the behavior of [method move_and_slide]. See [enum MotionMode] constants for available modes.
</member>
- <member name="moving_platform_apply_velocity_on_leave" type="int" setter="set_moving_platform_apply_velocity_on_leave" getter="get_moving_platform_apply_velocity_on_leave" enum="CharacterBody3D.MovingPlatformApplyVelocityOnLeave" default="0">
- Sets the behavior to apply when you leave a moving platform. By default, to be physically accurate, when you leave the last platform velocity is applied. See [enum MovingPlatformApplyVelocityOnLeave] constants for available behavior.
- </member>
- <member name="moving_platform_floor_layers" type="int" setter="set_moving_platform_floor_layers" getter="get_moving_platform_floor_layers" default="4294967295">
+ <member name="platform_floor_layers" type="int" setter="set_platform_floor_layers" getter="get_platform_floor_layers" default="4294967295">
Collision layers that will be included for detecting floor bodies that will act as moving platforms to be followed by the [CharacterBody3D]. By default, all floor bodies are detected and propagate their velocity.
</member>
- <member name="moving_platform_wall_layers" type="int" setter="set_moving_platform_wall_layers" getter="get_moving_platform_wall_layers" default="0">
+ <member name="platform_on_leave" type="int" setter="set_platform_on_leave" getter="get_platform_on_leave" enum="CharacterBody3D.PlatformOnLeave" default="0">
+ Sets the behavior to apply when you leave a moving platform. By default, to be physically accurate, when you leave the last platform velocity is applied. See [enum PlatformOnLeave] constants for available behavior.
+ </member>
+ <member name="platform_wall_layers" type="int" setter="set_platform_wall_layers" getter="get_platform_wall_layers" default="0">
Collision layers that will be included for detecting wall bodies that will act as moving platforms to be followed by the [CharacterBody3D]. By default, all wall bodies are ignored.
</member>
+ <member name="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="slide_on_ceiling" type="bool" setter="set_slide_on_ceiling_enabled" getter="is_slide_on_ceiling_enabled" default="true">
If [code]true[/code], during a jump against the ceiling, the body will slide, if [code]false[/code] it will be stopped and will fall vertically.
</member>
@@ -184,13 +184,13 @@
<constant name="MOTION_MODE_FLOATING" value="1" enum="MotionMode">
Apply when there is no notion of floor or ceiling. All collisions will be reported as [code]on_wall[/code]. In this mode, when you slide, the speed will always be constant. This mode is suitable for games without ground like space games.
</constant>
- <constant name="PLATFORM_VEL_ON_LEAVE_ALWAYS" value="0" enum="MovingPlatformApplyVelocityOnLeave">
+ <constant name="PLATFORM_ON_LEAVE_ADD_VELOCITY" value="0" enum="PlatformOnLeave">
Add the last platform velocity to the [member velocity] when you leave a moving platform.
</constant>
- <constant name="PLATFORM_VEL_ON_LEAVE_UPWARD_ONLY" value="1" enum="MovingPlatformApplyVelocityOnLeave">
+ <constant name="PLATFORM_ON_LEAVE_ADD_UPWARD_VELOCITY" value="1" enum="PlatformOnLeave">
Add the last platform velocity to the [member velocity] when you leave a moving platform, but any downward motion is ignored. It's useful to keep full jump height even when the platform is moving down.
</constant>
- <constant name="PLATFORM_VEL_ON_LEAVE_NEVER" value="2" enum="MovingPlatformApplyVelocityOnLeave">
+ <constant name="PLATFORM_ON_LEAVE_DO_NOTHING" value="2" enum="PlatformOnLeave">
Do nothing when leaving a platform.
</constant>
</constants>
diff --git a/doc/classes/CheckBox.xml b/doc/classes/CheckBox.xml
index 6483faf763..699e872e99 100644
--- a/doc/classes/CheckBox.xml
+++ b/doc/classes/CheckBox.xml
@@ -4,7 +4,7 @@
Binary choice user interface widget. See also [CheckButton].
</brief_description>
<description>
- A checkbox allows the user to make a binary choice (choosing only one of two possible options). It's similar to [CheckButton] in functionality, but it has a different appearance. To follow established UX patterns, it's recommended to use CheckBox when toggling it has [b]no[/b] immediate effect on something. For instance, it should be used when toggling it will only do something once a confirmation button is pressed.
+ A checkbox allows the user to make a binary choice (choosing only one of two possible options). It's similar to [CheckButton] in functionality, but it has a different appearance. To follow established UX patterns, it's recommended to use CheckBox when toggling it has [b]no[/b] immediate effect on something. For example, it could be used when toggling it will only do something once a confirmation button is pressed.
See also [BaseButton] which contains common properties and methods associated with this node.
</description>
<tutorials>
@@ -35,11 +35,11 @@
<theme_item name="font_pressed_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
The [CheckBox] text's font color when it's pressed.
</theme_item>
- <theme_item name="check_v_adjust" data_type="constant" type="int" default="0">
+ <theme_item name="check_v_offset" data_type="constant" type="int" default="0">
The vertical offset used when rendering the check icons (in pixels).
</theme_item>
<theme_item name="h_separation" data_type="constant" type="int" default="4">
- The separation between the check icon and the text (in pixels).
+ The separation between the check icon and the text (in pixels). Negative values will be treated as [code]0[/code] when used.
</theme_item>
<theme_item name="outline_size" data_type="constant" type="int" default="0">
The size of the text outline.
diff --git a/doc/classes/CheckButton.xml b/doc/classes/CheckButton.xml
index 51b0411f4e..dfbaa7cbee 100644
--- a/doc/classes/CheckButton.xml
+++ b/doc/classes/CheckButton.xml
@@ -4,7 +4,7 @@
Checkable button. See also [CheckBox].
</brief_description>
<description>
- CheckButton is a toggle button displayed as a check field. It's similar to [CheckBox] in functionality, but it has a different appearance. To follow established UX patterns, it's recommended to use CheckButton when toggling it has an [b]immediate[/b] effect on something. For instance, it should be used if toggling it enables/disables a setting without requiring the user to press a confirmation button.
+ CheckButton is a toggle button displayed as a check field. It's similar to [CheckBox] in functionality, but it has a different appearance. To follow established UX patterns, it's recommended to use CheckButton when toggling it has an [b]immediate[/b] effect on something. For example, it could be used if toggling it enables/disables a setting without requiring the user to press a confirmation button.
See also [BaseButton] which contains common properties and methods associated with this node.
</description>
<tutorials>
@@ -35,11 +35,11 @@
<theme_item name="font_pressed_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
The [CheckButton] text's font color when it's pressed.
</theme_item>
- <theme_item name="check_v_adjust" data_type="constant" type="int" default="0">
+ <theme_item name="check_v_offset" data_type="constant" type="int" default="0">
The vertical offset used when rendering the toggle icons (in pixels).
</theme_item>
<theme_item name="h_separation" data_type="constant" type="int" default="4">
- The separation between the toggle icon and the text (in pixels).
+ The separation between the toggle icon and the text (in pixels). Negative values will be treated as [code]0[/code] when used.
</theme_item>
<theme_item name="outline_size" data_type="constant" type="int" default="0">
The size of the text outline.
@@ -50,30 +50,30 @@
<theme_item name="font_size" data_type="font_size" type="int">
Font size of the [CheckButton]'s text.
</theme_item>
- <theme_item name="off" data_type="icon" type="Texture2D">
- The icon to display when the [CheckButton] is unchecked (for left-to-right layouts).
- </theme_item>
- <theme_item name="off_disabled" data_type="icon" type="Texture2D">
- The icon to display when the [CheckButton] is unchecked and disabled (for left-to-right layouts).
- </theme_item>
- <theme_item name="off_disabled_mirrored" data_type="icon" type="Texture2D">
- The icon to display when the [CheckButton] is unchecked and disabled (for right-to-left layouts).
- </theme_item>
- <theme_item name="off_mirrored" data_type="icon" type="Texture2D">
- The icon to display when the [CheckButton] is unchecked (for right-to-left layouts).
- </theme_item>
- <theme_item name="on" data_type="icon" type="Texture2D">
+ <theme_item name="checked" data_type="icon" type="Texture2D">
The icon to display when the [CheckButton] is checked (for left-to-right layouts).
</theme_item>
- <theme_item name="on_disabled" data_type="icon" type="Texture2D">
+ <theme_item name="checked_disabled" data_type="icon" type="Texture2D">
The icon to display when the [CheckButton] is checked and disabled (for left-to-right layouts).
</theme_item>
- <theme_item name="on_disabled_mirrored" data_type="icon" type="Texture2D">
+ <theme_item name="checked_disabled_mirrored" data_type="icon" type="Texture2D">
The icon to display when the [CheckButton] is checked and disabled (for right-to-left layouts).
</theme_item>
- <theme_item name="on_mirrored" data_type="icon" type="Texture2D">
+ <theme_item name="checked_mirrored" data_type="icon" type="Texture2D">
The icon to display when the [CheckButton] is checked (for right-to-left layouts).
</theme_item>
+ <theme_item name="unchecked" data_type="icon" type="Texture2D">
+ The icon to display when the [CheckButton] is unchecked (for left-to-right layouts).
+ </theme_item>
+ <theme_item name="unchecked_disabled" data_type="icon" type="Texture2D">
+ The icon to display when the [CheckButton] is unchecked and disabled (for left-to-right layouts).
+ </theme_item>
+ <theme_item name="unchecked_disabled_mirrored" data_type="icon" type="Texture2D">
+ The icon to display when the [CheckButton] is unchecked and disabled (for right-to-left layouts).
+ </theme_item>
+ <theme_item name="unchecked_mirrored" data_type="icon" type="Texture2D">
+ The icon to display when the [CheckButton] is unchecked (for right-to-left layouts).
+ </theme_item>
<theme_item name="disabled" data_type="style" type="StyleBox">
The [StyleBox] to display as a background when the [CheckButton] is disabled.
</theme_item>
diff --git a/doc/classes/ClassDB.xml b/doc/classes/ClassDB.xml
index 151b34c430..5d3c6210f6 100644
--- a/doc/classes/ClassDB.xml
+++ b/doc/classes/ClassDB.xml
@@ -13,14 +13,14 @@
<return type="bool" />
<param index="0" name="class" type="StringName" />
<description>
- Returns [code]true[/code] if you can instance objects from the specified [code]class[/code], [code]false[/code] in other case.
+ Returns [code]true[/code] if objects can be instantiated from the specified [param class], otherwise returns [code]false[/code].
</description>
</method>
<method name="class_exists" qualifiers="const">
<return type="bool" />
<param index="0" name="class" type="StringName" />
<description>
- Returns whether the specified [code]class[/code] is available or not.
+ Returns whether the specified [param class] is available or not.
</description>
</method>
<method name="class_get_enum_constants" qualifiers="const">
@@ -29,7 +29,7 @@
<param index="1" name="enum" type="StringName" />
<param index="2" name="no_inheritance" type="bool" default="false" />
<description>
- Returns an array with all the keys in [code]enum[/code] of [code]class[/code] or its ancestry.
+ Returns an array with all the keys in [param enum] of [param class] or its ancestry.
</description>
</method>
<method name="class_get_enum_list" qualifiers="const">
@@ -37,7 +37,7 @@
<param index="0" name="class" type="StringName" />
<param index="1" name="no_inheritance" type="bool" default="false" />
<description>
- Returns an array with all the enums of [code]class[/code] or its ancestry.
+ Returns an array with all the enums of [param class] or its ancestry.
</description>
</method>
<method name="class_get_integer_constant" qualifiers="const">
@@ -45,7 +45,7 @@
<param index="0" name="class" type="StringName" />
<param index="1" name="name" type="StringName" />
<description>
- Returns the value of the integer constant [code]name[/code] of [code]class[/code] or its ancestry. Always returns 0 when the constant could not be found.
+ Returns the value of the integer constant [param name] of [param class] or its ancestry. Always returns 0 when the constant could not be found.
</description>
</method>
<method name="class_get_integer_constant_enum" qualifiers="const">
@@ -54,7 +54,7 @@
<param index="1" name="name" type="StringName" />
<param index="2" name="no_inheritance" type="bool" default="false" />
<description>
- Returns which enum the integer constant [code]name[/code] of [code]class[/code] or its ancestry belongs to.
+ Returns which enum the integer constant [param name] of [param class] or its ancestry belongs to.
</description>
</method>
<method name="class_get_integer_constant_list" qualifiers="const">
@@ -62,15 +62,15 @@
<param index="0" name="class" type="StringName" />
<param index="1" name="no_inheritance" type="bool" default="false" />
<description>
- Returns an array with the names all the integer constants of [code]class[/code] or its ancestry.
+ Returns an array with the names all the integer constants of [param class] or its ancestry.
</description>
</method>
<method name="class_get_method_list" qualifiers="const">
- <return type="Array" />
+ <return type="Dictionary[]" />
<param index="0" name="class" type="StringName" />
<param index="1" name="no_inheritance" type="bool" default="false" />
<description>
- Returns an array with all the methods of [code]class[/code] or its ancestry if [code]no_inheritance[/code] is [code]false[/code]. Every element of the array is a [Dictionary] with the following keys: [code]args[/code], [code]default_args[/code], [code]flags[/code], [code]id[/code], [code]name[/code], [code]return: (class_name, hint, hint_string, name, type, usage)[/code].
+ Returns an array with all the methods of [param class] or its ancestry if [param no_inheritance] is [code]false[/code]. Every element of the array is a [Dictionary] with the following keys: [code]args[/code], [code]default_args[/code], [code]flags[/code], [code]id[/code], [code]name[/code], [code]return: (class_name, hint, hint_string, name, type, usage)[/code].
[b]Note:[/b] In exported release builds the debug info is not available, so the returned dictionaries will contain only method names.
</description>
</method>
@@ -79,15 +79,15 @@
<param index="0" name="object" type="Object" />
<param index="1" name="property" type="StringName" />
<description>
- Returns the value of [code]property[/code] of [code]class[/code] or its ancestry.
+ Returns the value of [param property] of [param object] or its ancestry.
</description>
</method>
<method name="class_get_property_list" qualifiers="const">
- <return type="Array" />
+ <return type="Dictionary[]" />
<param index="0" name="class" type="StringName" />
<param index="1" name="no_inheritance" type="bool" default="false" />
<description>
- Returns an array with all the properties of [code]class[/code] or its ancestry if [code]no_inheritance[/code] is [code]false[/code].
+ Returns an array with all the properties of [param class] or its ancestry if [param no_inheritance] is [code]false[/code].
</description>
</method>
<method name="class_get_signal" qualifiers="const">
@@ -95,15 +95,15 @@
<param index="0" name="class" type="StringName" />
<param index="1" name="signal" type="StringName" />
<description>
- Returns the [code]signal[/code] data of [code]class[/code] or its ancestry. The returned value is a [Dictionary] with the following keys: [code]args[/code], [code]default_args[/code], [code]flags[/code], [code]id[/code], [code]name[/code], [code]return: (class_name, hint, hint_string, name, type, usage)[/code].
+ Returns the [param signal] data of [param class] or its ancestry. The returned value is a [Dictionary] with the following keys: [code]args[/code], [code]default_args[/code], [code]flags[/code], [code]id[/code], [code]name[/code], [code]return: (class_name, hint, hint_string, name, type, usage)[/code].
</description>
</method>
<method name="class_get_signal_list" qualifiers="const">
- <return type="Array" />
+ <return type="Dictionary[]" />
<param index="0" name="class" type="StringName" />
<param index="1" name="no_inheritance" type="bool" default="false" />
<description>
- Returns an array with all the signals of [code]class[/code] or its ancestry if [code]no_inheritance[/code] is [code]false[/code]. Every element of the array is a [Dictionary] as described in [method class_get_signal].
+ Returns an array with all the signals of [param class] or its ancestry if [param no_inheritance] is [code]false[/code]. Every element of the array is a [Dictionary] as described in [method class_get_signal].
</description>
</method>
<method name="class_has_enum" qualifiers="const">
@@ -112,7 +112,7 @@
<param index="1" name="name" type="StringName" />
<param index="2" name="no_inheritance" type="bool" default="false" />
<description>
- Returns whether [code]class[/code] or its ancestry has an enum called [code]name[/code] or not.
+ Returns whether [param class] or its ancestry has an enum called [param name] or not.
</description>
</method>
<method name="class_has_integer_constant" qualifiers="const">
@@ -120,7 +120,7 @@
<param index="0" name="class" type="StringName" />
<param index="1" name="name" type="StringName" />
<description>
- Returns whether [code]class[/code] or its ancestry has an integer constant called [code]name[/code] or not.
+ Returns whether [param class] or its ancestry has an integer constant called [param name] or not.
</description>
</method>
<method name="class_has_method" qualifiers="const">
@@ -129,7 +129,7 @@
<param index="1" name="method" type="StringName" />
<param index="2" name="no_inheritance" type="bool" default="false" />
<description>
- Returns whether [code]class[/code] (or its ancestry if [code]no_inheritance[/code] is [code]false[/code]) has a method called [code]method[/code] or not.
+ Returns whether [param class] (or its ancestry if [param no_inheritance] is [code]false[/code]) has a method called [param method] or not.
</description>
</method>
<method name="class_has_signal" qualifiers="const">
@@ -137,7 +137,7 @@
<param index="0" name="class" type="StringName" />
<param index="1" name="signal" type="StringName" />
<description>
- Returns whether [code]class[/code] or its ancestry has a signal called [code]signal[/code] or not.
+ Returns whether [param class] or its ancestry has a signal called [param signal] or not.
</description>
</method>
<method name="class_set_property" qualifiers="const">
@@ -146,7 +146,7 @@
<param index="1" name="property" type="StringName" />
<param index="2" name="value" type="Variant" />
<description>
- Sets [code]property[/code] value of [code]class[/code] to [code]value[/code].
+ Sets [param property] value of [param object] to [param value].
</description>
</method>
<method name="get_class_list" qualifiers="const">
@@ -159,28 +159,28 @@
<return type="PackedStringArray" />
<param index="0" name="class" type="StringName" />
<description>
- Returns the names of all the classes that directly or indirectly inherit from [code]class[/code].
+ Returns the names of all the classes that directly or indirectly inherit from [param class].
</description>
</method>
<method name="get_parent_class" qualifiers="const">
<return type="StringName" />
<param index="0" name="class" type="StringName" />
<description>
- Returns the parent class of [code]class[/code].
+ Returns the parent class of [param class].
</description>
</method>
<method name="instantiate" qualifiers="const">
<return type="Variant" />
<param index="0" name="class" type="StringName" />
<description>
- Creates an instance of [code]class[/code].
+ Creates an instance of [param class].
</description>
</method>
<method name="is_class_enabled" qualifiers="const">
<return type="bool" />
<param index="0" name="class" type="StringName" />
<description>
- Returns whether this [code]class[/code] is enabled or not.
+ Returns whether this [param class] is enabled or not.
</description>
</method>
<method name="is_parent_class" qualifiers="const">
@@ -188,7 +188,7 @@
<param index="0" name="class" type="StringName" />
<param index="1" name="inherits" type="StringName" />
<description>
- Returns whether [code]inherits[/code] is an ancestor of [code]class[/code] or not.
+ Returns whether [param inherits] is an ancestor of [param class] or not.
</description>
</method>
</methods>
diff --git a/doc/classes/CodeEdit.xml b/doc/classes/CodeEdit.xml
index d9f8e17145..e7ef5fb289 100644
--- a/doc/classes/CodeEdit.xml
+++ b/doc/classes/CodeEdit.xml
@@ -4,7 +4,7 @@
Multiline text control intended for editing code.
</brief_description>
<description>
- CodeEdit is a specialised [TextEdit] designed for editing plain text code files. It contains a bunch of features commonly found in code editors such as line numbers, line folding, code completion, indent management and string / comment management.
+ CodeEdit is a specialized [TextEdit] designed for editing plain text code files. It contains a bunch of features commonly found in code editors such as line numbers, line folding, code completion, indent management and string / comment management.
[b]Note:[/b] By default [CodeEdit] always use left-to-right text direction to correctly display source code.
</description>
<tutorials>
@@ -14,22 +14,22 @@
<return type="void" />
<param index="0" name="replace" type="bool" />
<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.
+ Override this method to define how the selected entry should be inserted. If [param replace] is true, any existing text should be replaced.
</description>
</method>
<method name="_filter_code_completion_candidates" qualifiers="virtual const">
- <return type="Array" />
+ <return type="Dictionary[]" />
<param index="0" name="candidates" type="Dictionary[]" />
<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.
+ Override this method to define what items in [param candidates] should be displayed.
+ Both [param candidates] 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" />
<param index="0" name="force" type="bool" />
<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.
+ Override this method to define what happens when the user requests code completion. If [param force] is true, any checks should be bypassed.
</description>
</method>
<method name="add_auto_brace_completion_pair">
@@ -123,7 +123,7 @@
<return type="void" />
<param index="0" name="replace" type="bool" default="false" />
<description>
- Inserts the selected entry into the text. If [code]replace[/code] is true, any existing text is replaced rather then merged.
+ Inserts the selected entry into the text. If [param replace] is true, any existing text is replaced rather then merged.
</description>
</method>
<method name="do_indent">
@@ -155,17 +155,17 @@
<return type="String" />
<param index="0" name="open_key" type="String" />
<description>
- Gets the matching auto brace close key for [code]open_key[/code].
+ Gets the matching auto brace close key for [param open_key].
</description>
</method>
<method name="get_bookmarked_lines" qualifiers="const">
- <return type="Array" />
+ <return type="PackedInt32Array" />
<description>
Gets all bookmarked lines.
</description>
</method>
<method name="get_breakpointed_lines" qualifiers="const">
- <return type="Array" />
+ <return type="PackedInt32Array" />
<description>
Gets all breakpointed lines.
</description>
@@ -174,7 +174,7 @@
<return type="Dictionary" />
<param index="0" name="index" type="int" />
<description>
- Gets the completion option at [code]index[/code]. The return [Dictionary] has the following key-values:
+ Gets the completion option at [param index]. 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.
@@ -207,7 +207,7 @@
<param index="0" name="line" type="int" />
<param index="1" name="column" type="int" />
<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].
+ If [param line] [param column] 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">
@@ -222,11 +222,11 @@
<param index="0" name="line" type="int" />
<param index="1" name="column" type="int" />
<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].
+ If [param line] [param column] 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 type="PackedInt32Array" />
<description>
Gets all executing lines.
</description>
@@ -253,28 +253,28 @@
<return type="bool" />
<param index="0" name="close_key" type="String" />
<description>
- Returns [code]true[/code] if close key [code]close_key[/code] exists.
+ Returns [code]true[/code] if close key [param close_key] exists.
</description>
</method>
<method name="has_auto_brace_completion_open_key" qualifiers="const">
<return type="bool" />
<param index="0" name="open_key" type="String" />
<description>
- Returns [code]true[/code] if open key [code]open_key[/code] exists.
+ Returns [code]true[/code] if open key [param open_key] exists.
</description>
</method>
<method name="has_comment_delimiter" qualifiers="const">
<return type="bool" />
<param index="0" name="start_key" type="String" />
<description>
- Returns [code]true[/code] if comment [code]start_key[/code] exists.
+ Returns [code]true[/code] if comment [param start_key] exists.
</description>
</method>
<method name="has_string_delimiter" qualifiers="const">
<return type="bool" />
<param index="0" name="start_key" type="String" />
<description>
- Returns [code]true[/code] if string [code]start_key[/code] exists.
+ Returns [code]true[/code] if string [param start_key] exists.
</description>
</method>
<method name="indent_lines">
@@ -288,7 +288,7 @@
<param index="0" name="line" type="int" />
<param index="1" name="column" type="int" default="-1" />
<description>
- Returns 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].
+ Returns delimiter index if [param line] [param column] is in a comment. If [param column] is not provided, will return delimiter index if the entire [param line] is a comment. Otherwise [code]-1[/code].
</description>
</method>
<method name="is_in_string" qualifiers="const">
@@ -296,7 +296,7 @@
<param index="0" name="line" type="int" />
<param index="1" name="column" type="int" default="-1" />
<description>
- Returns 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].
+ Returns the delimiter index if [param line] [param column] is in a string. If [param column] is not provided, will return the delimiter index if the entire [param line] is a string. Otherwise [code]-1[/code].
</description>
</method>
<method name="is_line_bookmarked" qualifiers="const">
@@ -331,21 +331,21 @@
<return type="void" />
<param index="0" name="start_key" type="String" />
<description>
- Removes the comment delimiter with [code]start_key[/code].
+ Removes the comment delimiter with [param start_key].
</description>
</method>
<method name="remove_string_delimiter">
<return type="void" />
<param index="0" name="start_key" type="String" />
<description>
- Removes the string delimiter with [code]start_key[/code].
+ Removes the string delimiter with [param start_key].
</description>
</method>
<method name="request_code_completion">
<return type="void" />
<param index="0" name="force" type="bool" default="false" />
<description>
- Emits [signal code_completion_requested], 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.
+ Emits [signal code_completion_requested], if [param force] 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">
@@ -430,7 +430,7 @@
<return type="void" />
<param index="0" name="force" type="bool" />
<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].
+ Submits all completion options added with [method add_code_completion_option]. Will try to force the autoccomplete menu to popup, if [param force] is [code]true[/code].
[b]Note:[/b] This will replace all current candidates.
</description>
</method>
@@ -482,7 +482,7 @@
Prefixes to trigger an automatic indent.
</member>
<member name="indent_size" type="int" setter="set_indent_size" getter="get_indent_size" default="4">
- Size of tabs, if [code]indent_use_spaces[/code] is enabled the amount of spaces to use.
+ Size of tabs, if [code]indent_use_spaces[/code] is enabled the number of spaces to use.
</member>
<member name="indent_use_spaces" type="bool" setter="set_indent_using_spaces" getter="is_indent_using_spaces" default="false">
Use spaces instead of tabs for indentation.
@@ -616,8 +616,8 @@
<theme_item name="font_readonly_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 0.5)">
Sets the font [Color] when [member TextEdit.editable] is disabled.
</theme_item>
- <theme_item name="font_selected_color" data_type="color" type="Color" default="Color(0, 0, 0, 1)">
- Sets the [Color] of the selected text. [member TextEdit.override_selected_font_color] has to be enabled.
+ <theme_item name="font_selected_color" data_type="color" type="Color" default="Color(0, 0, 0, 0)">
+ Sets the [Color] of the selected text. If equal to [code]Color(0, 0, 0, 0)[/code], it will be ignored.
</theme_item>
<theme_item name="line_length_guideline_color" data_type="color" type="Color" default="Color(0.3, 0.5, 0.8, 0.1)">
[Color] of the main line length guideline, secondary guidelines will have 50% alpha applied.
diff --git a/doc/classes/CollisionObject2D.xml b/doc/classes/CollisionObject2D.xml
index 31858bf080..ee69015ae1 100644
--- a/doc/classes/CollisionObject2D.xml
+++ b/doc/classes/CollisionObject2D.xml
@@ -16,10 +16,36 @@
<param index="1" name="event" type="InputEvent" />
<param index="2" name="shape_idx" type="int" />
<description>
- Accepts unhandled [InputEvent]s. [code]shape_idx[/code] is the child index of the clicked [Shape2D]. Connect to the [code]input_event[/code] signal to easily pick up these events.
+ Accepts unhandled [InputEvent]s. [param shape_idx] is the child index of the clicked [Shape2D]. Connect to the [code]input_event[/code] signal to easily pick up these events.
[b]Note:[/b] [method _input_event] requires [member input_pickable] to be [code]true[/code] and at least one [member collision_layer] bit to be set.
</description>
</method>
+ <method name="_mouse_enter" qualifiers="virtual">
+ <return type="void" />
+ <description>
+ Called when the mouse pointer enters any of this object's shapes. Requires [member input_pickable] to be [code]true[/code] and at least one [member collision_layer] bit to be set. Note that moving between different shapes within a single [CollisionObject2D] won't cause this function to be called.
+ </description>
+ </method>
+ <method name="_mouse_exit" qualifiers="virtual">
+ <return type="void" />
+ <description>
+ Called when the mouse pointer exits all this object's shapes. Requires [member input_pickable] to be [code]true[/code] and at least one [member collision_layer] bit to be set. Note that moving between different shapes within a single [CollisionObject2D] won't cause this function to be called.
+ </description>
+ </method>
+ <method name="_mouse_shape_enter" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="shape_idx" type="int" />
+ <description>
+ Called when the mouse pointer enters any of this object's shapes or moves from one shape to another. [param shape_idx] is the child index of the newly entered [Shape2D]. Requires [member input_pickable] to be [code]true[/code] and at least one [member collision_layer] bit to be called.
+ </description>
+ </method>
+ <method name="_mouse_shape_exit" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="shape_idx" type="int" />
+ <description>
+ Called when the mouse pointer exits any of this object's shapes. [param shape_idx] is the child index of the exited [Shape2D]. Requires [member input_pickable] to be [code]true[/code] and at least one [member collision_layer] bit to be called.
+ </description>
+ </method>
<method name="create_shape_owner">
<return type="int" />
<param index="0" name="owner" type="Object" />
@@ -31,14 +57,14 @@
<return type="bool" />
<param index="0" name="layer_number" type="int" />
<description>
- Returns whether or not the specified layer of the [member collision_layer] is enabled, given a [code]layer_number[/code] between 1 and 32.
+ Returns whether or not the specified layer of the [member collision_layer] is enabled, given a [param layer_number] between 1 and 32.
</description>
</method>
<method name="get_collision_mask_value" qualifiers="const">
<return type="bool" />
<param index="0" name="layer_number" type="int" />
<description>
- Returns whether or not the specified layer of the [member collision_mask] is enabled, given a [code]layer_number[/code] between 1 and 32.
+ Returns whether or not the specified layer of the [member collision_mask] is enabled, given a [param layer_number] between 1 and 32.
</description>
</method>
<method name="get_rid" qualifiers="const">
@@ -51,11 +77,11 @@
<return type="float" />
<param index="0" name="owner_id" type="int" />
<description>
- Returns the [code]one_way_collision_margin[/code] of the shape owner identified by given [code]owner_id[/code].
+ Returns the [code]one_way_collision_margin[/code] of the shape owner identified by given [param owner_id].
</description>
</method>
<method name="get_shape_owners">
- <return type="Array" />
+ <return type="PackedInt32Array" />
<description>
Returns an [Array] of [code]owner_id[/code] identifiers. You can use these ids in other methods that take [code]owner_id[/code] as an argument.
</description>
@@ -86,7 +112,7 @@
<param index="0" name="layer_number" type="int" />
<param index="1" name="value" type="bool" />
<description>
- Based on [code]value[/code], enables or disables the specified layer in the [member collision_layer], given a [code]layer_number[/code] between 1 and 32.
+ Based on [param value], enables or disables the specified layer in the [member collision_layer], given a [param layer_number] between 1 and 32.
</description>
</method>
<method name="set_collision_mask_value">
@@ -94,7 +120,7 @@
<param index="0" name="layer_number" type="int" />
<param index="1" name="value" type="bool" />
<description>
- Based on [code]value[/code], enables or disables the specified layer in the [member collision_mask], given a [code]layer_number[/code] between 1 and 32.
+ Based on [param value], enables or disables the specified layer in the [member collision_mask], given a [param layer_number] between 1 and 32.
</description>
</method>
<method name="shape_find_owner" qualifiers="const">
@@ -177,7 +203,7 @@
<param index="0" name="owner_id" type="int" />
<param index="1" name="enable" type="bool" />
<description>
- If [code]enable[/code] is [code]true[/code], collisions for the shape owner originating from this [CollisionObject2D] will not be reported to collided with [CollisionObject2D]s.
+ If [param enable] is [code]true[/code], collisions for the shape owner originating from this [CollisionObject2D] will not be reported to collided with [CollisionObject2D]s.
</description>
</method>
<method name="shape_owner_set_one_way_collision_margin">
@@ -185,7 +211,7 @@
<param index="0" name="owner_id" type="int" />
<param index="1" name="margin" type="float" />
<description>
- Sets the [code]one_way_collision_margin[/code] of the shape owner identified by given [code]owner_id[/code] to [code]margin[/code] pixels.
+ Sets the [code]one_way_collision_margin[/code] of the shape owner identified by given [param owner_id] to [param margin] pixels.
</description>
</method>
<method name="shape_owner_set_transform">
@@ -206,6 +232,9 @@
The physics layers this CollisionObject2D scans. Collision objects can scan one or more of 32 different layers. See also [member collision_layer].
[b]Note:[/b] Object A can detect a contact with object B only if object B is in any of the layers that object A scans. See [url=$DOCS_URL/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information.
</member>
+ <member name="collision_priority" type="float" setter="set_collision_priority" getter="get_collision_priority" default="1.0">
+ The priority used to solve colliding when occurring penetration. The higher the priority is, the lower the penetration into the object will be. This can for example be used to prevent the player from breaking through the boundaries of a level.
+ </member>
<member name="disable_mode" type="int" setter="set_disable_mode" getter="get_disable_mode" enum="CollisionObject2D.DisableMode" default="0">
Defines the behavior in physics when [member Node.process_mode] is set to [constant Node.PROCESS_MODE_DISABLED]. See [enum DisableMode] for more details about the different modes.
</member>
@@ -237,13 +266,13 @@
<signal name="mouse_shape_entered">
<param index="0" name="shape_idx" type="int" />
<description>
- Emitted when the mouse pointer enters any of this object's shapes or moves from one shape to another. [code]shape_idx[/code] is the child index of the newly entered [Shape2D]. Requires [member input_pickable] to be [code]true[/code] and at least one [member collision_layer] bit to be set.
+ Emitted when the mouse pointer enters any of this object's shapes or moves from one shape to another. [param shape_idx] is the child index of the newly entered [Shape2D]. Requires [member input_pickable] to be [code]true[/code] and at least one [member collision_layer] bit to be set.
</description>
</signal>
<signal name="mouse_shape_exited">
<param index="0" name="shape_idx" type="int" />
<description>
- Emitted when the mouse pointer exits any of this object's shapes. [code]shape_idx[/code] is the child index of the exited [Shape2D]. Requires [member input_pickable] to be [code]true[/code] and at least one [member collision_layer] bit to be set.
+ Emitted when the mouse pointer exits any of this object's shapes. [param shape_idx] is the child index of the exited [Shape2D]. Requires [member input_pickable] to be [code]true[/code] and at least one [member collision_layer] bit to be set.
</description>
</signal>
</signals>
diff --git a/doc/classes/CollisionObject3D.xml b/doc/classes/CollisionObject3D.xml
index 1319274920..f10136521a 100644
--- a/doc/classes/CollisionObject3D.xml
+++ b/doc/classes/CollisionObject3D.xml
@@ -17,10 +17,22 @@
<param index="3" name="normal" type="Vector3" />
<param index="4" name="shape_idx" type="int" />
<description>
- Receives unhandled [InputEvent]s. [code]position[/code] is the location in world space of the mouse pointer on the surface of the shape with index [code]shape_idx[/code] and [code]normal[/code] is the normal vector of the surface at that point. Connect to the [signal input_event] signal to easily pick up these events.
+ Receives unhandled [InputEvent]s. [param position] is the location in world space of the mouse pointer on the surface of the shape with index [param shape_idx] and [param normal] is the normal vector of the surface at that point. Connect to the [signal input_event] signal to easily pick up these events.
[b]Note:[/b] [method _input_event] requires [member input_ray_pickable] to be [code]true[/code] and at least one [member collision_layer] bit to be set.
</description>
</method>
+ <method name="_mouse_enter" qualifiers="virtual">
+ <return type="void" />
+ <description>
+ Called when the mouse pointer enters any of this object's shapes. Requires [member input_ray_pickable] to be [code]true[/code] and at least one [member collision_layer] bit to be set. Note that moving between different shapes within a single [CollisionObject3D] won't cause this function to be called.
+ </description>
+ </method>
+ <method name="_mouse_exit" qualifiers="virtual">
+ <return type="void" />
+ <description>
+ Called when the mouse pointer exits all this object's shapes. Requires [member input_ray_pickable] to be [code]true[/code] and at least one [member collision_layer] bit to be set. Note that moving between different shapes within a single [CollisionObject3D] won't cause this function to be called.
+ </description>
+ </method>
<method name="create_shape_owner">
<return type="int" />
<param index="0" name="owner" type="Object" />
@@ -32,14 +44,14 @@
<return type="bool" />
<param index="0" name="layer_number" type="int" />
<description>
- Returns whether or not the specified layer of the [member collision_layer] is enabled, given a [code]layer_number[/code] between 1 and 32.
+ Returns whether or not the specified layer of the [member collision_layer] is enabled, given a [param layer_number] between 1 and 32.
</description>
</method>
<method name="get_collision_mask_value" qualifiers="const">
<return type="bool" />
<param index="0" name="layer_number" type="int" />
<description>
- Returns whether or not the specified layer of the [member collision_mask] is enabled, given a [code]layer_number[/code] between 1 and 32.
+ Returns whether or not the specified layer of the [member collision_mask] is enabled, given a [param layer_number] between 1 and 32.
</description>
</method>
<method name="get_rid" qualifiers="const">
@@ -49,7 +61,7 @@
</description>
</method>
<method name="get_shape_owners">
- <return type="Array" />
+ <return type="PackedInt32Array" />
<description>
Returns an [Array] of [code]owner_id[/code] identifiers. You can use these ids in other methods that take [code]owner_id[/code] as an argument.
</description>
@@ -73,7 +85,7 @@
<param index="0" name="layer_number" type="int" />
<param index="1" name="value" type="bool" />
<description>
- Based on [code]value[/code], enables or disables the specified layer in the [member collision_layer], given a [code]layer_number[/code] between 1 and 32.
+ Based on [param value], enables or disables the specified layer in the [member collision_layer], given a [param layer_number] between 1 and 32.
</description>
</method>
<method name="set_collision_mask_value">
@@ -81,7 +93,7 @@
<param index="0" name="layer_number" type="int" />
<param index="1" name="value" type="bool" />
<description>
- Based on [code]value[/code], enables or disables the specified layer in the [member collision_mask], given a [code]layer_number[/code] between 1 and 32.
+ Based on [param value], enables or disables the specified layer in the [member collision_mask], given a [param layer_number] between 1 and 32.
</description>
</method>
<method name="shape_find_owner" qualifiers="const">
@@ -177,6 +189,9 @@
The physics layers this CollisionObject3D [b]scans[/b]. Collision objects can scan one or more of 32 different layers. See also [member collision_layer].
[b]Note:[/b] Object A can detect a contact with object B only if object B is in any of the layers that object A scans. See [url=$DOCS_URL/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information.
</member>
+ <member name="collision_priority" type="float" setter="set_collision_priority" getter="get_collision_priority" default="1.0">
+ The priority used to solve colliding when occurring penetration. The higher the priority is, the lower the penetration into the object will be. This can for example be used to prevent the player from breaking through the boundaries of a level.
+ </member>
<member name="disable_mode" type="int" setter="set_disable_mode" getter="get_disable_mode" enum="CollisionObject3D.DisableMode" default="0">
Defines the behavior in physics when [member Node.process_mode] is set to [constant Node.PROCESS_MODE_DISABLED]. See [enum DisableMode] for more details about the different modes.
</member>
@@ -195,7 +210,7 @@
<param index="3" name="normal" type="Vector3" />
<param index="4" name="shape_idx" type="int" />
<description>
- 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.
+ Emitted when the object receives an unhandled [InputEvent]. [param position] is the location in world space of the mouse pointer on the surface of the shape with index [param shape_idx] and [param normal] is the normal vector of the surface at that point.
</description>
</signal>
<signal name="mouse_entered">
diff --git a/doc/classes/CollisionShape2D.xml b/doc/classes/CollisionShape2D.xml
index 246e0e8663..75530370bc 100644
--- a/doc/classes/CollisionShape2D.xml
+++ b/doc/classes/CollisionShape2D.xml
@@ -4,7 +4,8 @@
Node that represents collision shape data in 2D space.
</brief_description>
<description>
- Editor facility for creating and editing collision shapes in 2D space. You can use this node to represent all sorts of collision shapes, for example, add this to an [Area2D] to give it a detection shape, or add it to a [PhysicsBody2D] to create a solid object. [b]IMPORTANT[/b]: this is an Editor-only helper to create shapes, use [method CollisionObject2D.shape_owner_get_shape] to get the actual shape.
+ Editor facility for creating and editing collision shapes in 2D space. Set the [member shape] property to configure the shape. [b]IMPORTANT[/b]: this is an Editor-only helper to create shapes, use [method CollisionObject2D.shape_owner_get_shape] to get the actual shape.
+ You can use this node to represent all sorts of collision shapes, for example, add this to an [Area2D] to give it a detection shape, or add it to a [PhysicsBody2D] to create a solid object.
</description>
<tutorials>
<link title="Physics introduction">$DOCS_URL/tutorials/physics/physics_introduction.html</link>
@@ -13,6 +14,10 @@
<link title="2D Kinematic Character Demo">https://godotengine.org/asset-library/asset/113</link>
</tutorials>
<members>
+ <member name="debug_color" type="Color" setter="set_debug_color" getter="get_debug_color" default="Color(0, 0, 0, 1)">
+ The collision shape debug color.
+ [b]Note:[/b] The default value is [member ProjectSettings.debug/shapes/collision/shape_color]. The [code]Color(0, 0, 0, 1)[/code] value documented here is a placeholder, and not the actual default debug color.
+ </member>
<member name="disabled" type="bool" setter="set_disabled" getter="is_disabled" default="false">
A disabled collision shape has no effect in the world. This property should be changed with [method Object.set_deferred].
</member>
diff --git a/doc/classes/CollisionShape3D.xml b/doc/classes/CollisionShape3D.xml
index c8423dac9e..304b46ba27 100644
--- a/doc/classes/CollisionShape3D.xml
+++ b/doc/classes/CollisionShape3D.xml
@@ -4,7 +4,8 @@
Node that represents collision shape data in 3D space.
</brief_description>
<description>
- Editor facility for creating and editing collision shapes in 3D space. You can use this node to represent all sorts of collision shapes, for example, add this to an [Area3D] to give it a detection shape, or add it to a [PhysicsBody3D] to create a solid object. [b]IMPORTANT[/b]: this is an Editor-only helper to create shapes, use [method CollisionObject3D.shape_owner_get_shape] to get the actual shape.
+ Editor facility for creating and editing collision shapes in 3D space. Set the [member shape] property to configure the shape. [b]IMPORTANT[/b]: this is an Editor-only helper to create shapes, use [method CollisionObject3D.shape_owner_get_shape] to get the actual shape.
+ You can use this node to represent all sorts of collision shapes, for example, add this to an [Area3D] to give it a detection shape, or add it to a [PhysicsBody3D] to create a solid object.
</description>
<tutorials>
<link title="Physics introduction">$DOCS_URL/tutorials/physics/physics_introduction.html</link>
diff --git a/doc/classes/Color.xml b/doc/classes/Color.xml
index 0ed623e0bc..90fbdcc622 100644
--- a/doc/classes/Color.xml
+++ b/doc/classes/Color.xml
@@ -57,7 +57,7 @@
<param index="0" name="code" type="String" />
<param index="1" name="alpha" type="float" />
<description>
- Constructs a [Color] either from an HTML color code or from a standardized color name, with [code]alpha[/code] on the range of 0 to 1. Supported color names are the same as the constants.
+ Constructs a [Color] either from an HTML color code or from a standardized color name, with [param alpha] on the range of 0 to 1. Supported color names are the same as the constants.
</description>
</constructor>
<constructor name="Color">
@@ -121,7 +121,7 @@
<param index="0" name="min" type="Color" default="Color(0, 0, 0, 0)" />
<param index="1" name="max" type="Color" default="Color(1, 1, 1, 1)" />
<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.
+ Returns a new color with all components clamped between the components of [param min] and [param max], by running [method @GlobalScope.clamp] on each component.
</description>
</method>
<method name="darkened" qualifiers="const">
@@ -141,12 +141,6 @@
[/codeblocks]
</description>
</method>
- <method name="find_named_color" qualifiers="static">
- <return type="int" />
- <param index="0" name="name" type="String" />
- <description>
- </description>
- </method>
<method name="from_hsv" qualifiers="static">
<return type="Color" />
<param index="0" name="h" type="float" />
@@ -154,7 +148,7 @@
<param index="2" name="v" type="float" />
<param index="3" name="alpha" type="float" default="1.0" />
<description>
- Constructs a color from an [url=https://en.wikipedia.org/wiki/HSL_and_HSV]HSV profile[/url]. [code]h[/code] (hue), [code]s[/code] (saturation), and [code]v[/code] (value) are typically between 0 and 1.
+ Constructs a color from an [url=https://en.wikipedia.org/wiki/HSL_and_HSV]HSV profile[/url]. [param h] (hue), [param s] (saturation), and [param v] (value) are typically between 0 and 1.
[codeblocks]
[gdscript]
var color = Color.from_hsv(0.58, 0.5, 0.79, 0.8)
@@ -172,7 +166,7 @@
<param index="2" name="l" type="float" />
<param index="3" name="alpha" type="float" default="1.0" />
<description>
- Constructs a color from an [url=https://bottosson.github.io/posts/colorpicker/]OK HSL profile[/url]. [code]h[/code] (hue), [code]s[/code] (saturation), and [code]v[/code] (value) are typically between 0 and 1.
+ Constructs a color from an [url=https://bottosson.github.io/posts/colorpicker/]OK HSL profile[/url]. [param h] (hue), [param s] (saturation), and [param l] (lightness) are typically between 0 and 1.
[codeblocks]
[gdscript]
var color = Color.from_ok_hsl(0.58, 0.5, 0.79, 0.8)
@@ -187,6 +181,7 @@
<return type="Color" />
<param index="0" name="rgbe" type="int" />
<description>
+ Encodes a [Color] from a RGBE9995 format integer. See [constant Image.FORMAT_RGBE9995].
</description>
</method>
<method name="from_string" qualifiers="static">
@@ -194,6 +189,7 @@
<param index="0" name="str" type="String" />
<param index="1" name="default" type="Color" />
<description>
+ Creates a [Color] from string, which can be either a HTML color code or a named color. Fallbacks to [param default] if the string does not denote any valid color.
</description>
</method>
<method name="get_luminance" qualifiers="const">
@@ -201,45 +197,33 @@
<description>
Returns the luminance of the color in the [code][0.0, 1.0][/code] range.
This is useful when determining light or dark color. Colors with a luminance smaller than 0.5 can be generally considered dark.
- [b]Note:[/b] [method get_luminance] relies on the colour being in the linear color space to return an accurate relative luminance value. If the color is in the sRGB color space, use [method srgb_to_linear] to convert it to the linear color space first.
- </description>
- </method>
- <method name="get_named_color" qualifiers="static">
- <return type="Color" />
- <param index="0" name="idx" type="int" />
- <description>
- </description>
- </method>
- <method name="get_named_color_count" qualifiers="static">
- <return type="int" />
- <description>
- </description>
- </method>
- <method name="get_named_color_name" qualifiers="static">
- <return type="String" />
- <param index="0" name="idx" type="int" />
- <description>
+ [b]Note:[/b] [method get_luminance] relies on the color being in the linear color space to return an accurate relative luminance value. If the color is in the sRGB color space, use [method srgb_to_linear] to convert it to the linear color space first.
</description>
</method>
<method name="hex" qualifiers="static">
<return type="Color" />
<param index="0" name="hex" type="int" />
<description>
+ Returns the [Color] associated with the provided integer number, with 8 bits per channel in ARGB order. The integer should be 32-bit. Best used with hexadecimal notation.
+ [codeblock]
+ modulate = Color.hex(0xffff0000) # red
+ [/codeblock]
</description>
</method>
<method name="hex64" qualifiers="static">
<return type="Color" />
<param index="0" name="hex" type="int" />
<description>
+ Same as [method hex], but takes 64-bit integer and the color uses 16 bits per channel.
</description>
</method>
<method name="html" qualifiers="static">
<return type="Color" />
<param index="0" name="rgba" type="String" />
<description>
- Returns a new color from [code]rgba[/code], an HTML hexadecimal color string. [code]rgba[/code] is not case sensitive, and may be prefixed with a '#' character.
- [code]rgba[/code] must be a valid three-digit or six-digit hexadecimal color string, and may contain an alpha channel value. If [code]rgba[/code] does not contain an alpha channel value, an alpha channel value of 1.0 is applied.
- If [code]rgba[/code] is invalid a Color(0.0, 0.0, 0.0, 1.0) is returned.
+ Returns a new color from [param rgba], an HTML hexadecimal color string. [param rgba] is not case sensitive, and may be prefixed with a '#' character.
+ [param rgba] must be a valid three-digit or six-digit hexadecimal color string, and may contain an alpha channel value. If [param rgba] does not contain an alpha channel value, an alpha channel value of 1.0 is applied.
+ If [param rgba] is invalid a Color(0.0, 0.0, 0.0, 1.0) is returned.
[b]Note:[/b] This method is not implemented in C#, but the same functionality is provided in the class constructor.
[codeblocks]
[gdscript]
@@ -257,7 +241,7 @@
<return type="bool" />
<param index="0" name="color" type="String" />
<description>
- Returns [code]true[/code] if [code]color[/code] is a valid HTML hexadecimal color string. [code]color[/code] is not case sensitive, and may be prefixed with a '#' character.
+ Returns [code]true[/code] if [param color] is a valid HTML hexadecimal color string. [param color] is not case sensitive, and may be prefixed with a '#' character.
For a string to be valid it must be three-digit or six-digit hexadecimal, and may contain an alpha channel value.
[codeblocks]
[gdscript]
@@ -299,7 +283,7 @@
<return type="bool" />
<param index="0" name="to" type="Color" />
<description>
- Returns [code]true[/code] if this color and [code]color[/code] are approximately equal, by running [method @GlobalScope.is_equal_approx] on each component.
+ Returns [code]true[/code] if this color and [param to] are approximately equal, by running [method @GlobalScope.is_equal_approx] on each component.
</description>
</method>
<method name="lerp" qualifiers="const">
@@ -307,7 +291,7 @@
<param index="0" name="to" type="Color" />
<param index="1" name="weight" type="float" />
<description>
- Returns the linear interpolation with another color. The interpolation factor [code]weight[/code] is between 0 and 1.
+ Returns the linear interpolation with another color. The interpolation factor [param weight] is between 0 and 1.
[codeblocks]
[gdscript]
var c1 = Color(1.0, 0.0, 0.0)
@@ -420,7 +404,7 @@
<param index="0" name="with_alpha" type="bool" default="true" />
<description>
Returns the color converted to an HTML hexadecimal color string in RGBA format (ex: [code]ff34f822[/code]).
- Setting [code]with_alpha[/code] to [code]false[/code] excludes alpha from the hexadecimal string (and uses RGB instead of RGBA format).
+ Setting [param with_alpha] to [code]false[/code] excludes alpha from the hexadecimal string (and uses RGB instead of RGBA format).
[codeblocks]
[gdscript]
var color = Color(1, 1, 1, 0.5)
diff --git a/doc/classes/ColorPicker.xml b/doc/classes/ColorPicker.xml
index 705d2282c1..2b287d7546 100644
--- a/doc/classes/ColorPicker.xml
+++ b/doc/classes/ColorPicker.xml
@@ -19,6 +19,14 @@
[b]Note:[/b] The presets list is only for [i]this[/i] color picker.
</description>
</method>
+ <method name="add_recent_preset">
+ <return type="void" />
+ <param index="0" name="color" type="Color" />
+ <description>
+ Adds the given color to a list of color recent presets so that it can be picked later. Recent presets are the colors that were picked recently, a new preset is automatically created and added to recent presets when you pick a new color.
+ [b]Note:[/b] The recent presets list is only for [i]this[/i] color picker.
+ </description>
+ </method>
<method name="erase_preset">
<return type="void" />
<param index="0" name="color" type="Color" />
@@ -26,35 +34,61 @@
Removes the given color from the list of color presets of this color picker.
</description>
</method>
+ <method name="erase_recent_preset">
+ <return type="void" />
+ <param index="0" name="color" type="Color" />
+ <description>
+ Removes the given color from the list of color recent presets of this color picker.
+ </description>
+ </method>
<method name="get_presets" qualifiers="const">
<return type="PackedColorArray" />
<description>
Returns the list of colors in the presets of the color picker.
</description>
</method>
+ <method name="get_recent_presets" qualifiers="const">
+ <return type="PackedColorArray" />
+ <description>
+ Returns the list of colors in the recent presets of the color picker.
+ </description>
+ </method>
</methods>
<members>
+ <member name="can_add_swatches" type="bool" setter="set_can_add_swatches" getter="are_swatches_enabled" default="true">
+ If [code]true[/code], it's possible to add presets under Swatches. If [code]false[/code], the button to add presets is disabled.
+ </member>
<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="color_mode" type="int" setter="set_color_mode" getter="get_color_mode" enum="ColorPicker.ColorModeType" default="0">
The currently selected color mode. See [enum ColorModeType].
</member>
+ <member name="color_modes_visible" type="bool" setter="set_modes_visible" getter="are_modes_visible" default="true">
+ If [code]true[/code], the color mode buttons are visible.
+ </member>
<member name="deferred_mode" type="bool" setter="set_deferred_mode" getter="is_deferred_mode" default="false">
If [code]true[/code], the color will apply only after the user releases the mouse button, otherwise it will apply immediately even in mouse motion event (which can cause performance issues).
</member>
<member name="edit_alpha" type="bool" setter="set_edit_alpha" getter="is_editing_alpha" default="true">
If [code]true[/code], shows an alpha channel slider (opacity).
</member>
+ <member name="hex_visible" type="bool" setter="set_hex_visible" getter="is_hex_visible" default="true">
+ If [code]true[/code], the hex color code input field is visible.
+ </member>
<member name="picker_shape" type="int" setter="set_picker_shape" getter="get_picker_shape" enum="ColorPicker.PickerShapeType" default="0">
The shape of the color space view. See [enum PickerShapeType].
</member>
- <member name="presets_enabled" type="bool" setter="set_presets_enabled" getter="are_presets_enabled" default="true">
- If [code]true[/code], the "add preset" button is enabled.
- </member>
<member name="presets_visible" type="bool" setter="set_presets_visible" getter="are_presets_visible" default="true">
- If [code]true[/code], saved color presets are visible.
+ If [code]true[/code], the Swatches and Recent Colors presets are visible.
</member>
+ <member name="sampler_visible" type="bool" setter="set_sampler_visible" getter="is_sampler_visible" default="true">
+ If [code]true[/code], the color sampler and color preview are visible.
+ </member>
+ <member name="sliders_visible" type="bool" setter="set_sliders_visible" getter="are_sliders_visible" default="true">
+ If [code]true[/code], the color sliders are visible.
+ </member>
+ <member name="vertical" type="bool" setter="set_vertical" getter="is_vertical" overrides="BoxContainer" default="true" />
</members>
<signals>
<signal name="color_changed">
@@ -103,12 +137,16 @@
<constant name="SHAPE_OKHSL_CIRCLE" value="3" enum="PickerShapeType">
HSL OK Color Model circle color space.
</constant>
+ <constant name="SHAPE_NONE" value="4" enum="PickerShapeType">
+ The color space shape and the shape select button are hidden. Can't be selected from the shapes popup.
+ </constant>
</constants>
<theme_items>
<theme_item name="h_width" data_type="constant" type="int" default="30">
The width of the hue selection slider.
</theme_item>
<theme_item name="label_width" data_type="constant" type="int" default="10">
+ The minimum width of the color labels next to sliders.
</theme_item>
<theme_item name="margin" data_type="constant" type="int" default="4">
The margin around the [ColorPicker].
@@ -128,15 +166,35 @@
<theme_item name="color_hue" data_type="icon" type="Texture2D">
Custom texture for the hue selection slider on the right.
</theme_item>
+ <theme_item name="color_okhsl_hue" data_type="icon" type="Texture2D">
+ Custom texture for the H slider in the OKHSL color mode.
+ </theme_item>
+ <theme_item name="expanded_arrow" data_type="icon" type="Texture2D">
+ The icon for color preset drop down menu when expanded.
+ </theme_item>
+ <theme_item name="folded_arrow" data_type="icon" type="Texture2D">
+ The icon for color preset drop down menu when folded.
+ </theme_item>
<theme_item name="overbright_indicator" data_type="icon" type="Texture2D">
The indicator used to signalize that the color value is outside the 0-1 range.
</theme_item>
<theme_item name="picker_cursor" data_type="icon" type="Texture2D">
+ The image displayed over the color box/circle (depending on the [member picker_shape]), marking the currently selected color.
</theme_item>
<theme_item name="sample_bg" data_type="icon" type="Texture2D">
+ Background panel for the color preview box (visible when the color is translucent).
</theme_item>
<theme_item name="screen_picker" data_type="icon" type="Texture2D">
The icon for the screen color picker button.
</theme_item>
+ <theme_item name="shape_circle" data_type="icon" type="Texture2D">
+ The icon for circular picker shapes.
+ </theme_item>
+ <theme_item name="shape_rect" data_type="icon" type="Texture2D">
+ The icon for rectangular picker shapes.
+ </theme_item>
+ <theme_item name="shape_rect_wheel" data_type="icon" type="Texture2D">
+ The icon for rectangular wheel picker shapes.
+ </theme_item>
</theme_items>
</class>
diff --git a/doc/classes/CompressedCubemap.xml b/doc/classes/CompressedCubemap.xml
index fbb0879fdc..10ee266897 100644
--- a/doc/classes/CompressedCubemap.xml
+++ b/doc/classes/CompressedCubemap.xml
@@ -1,8 +1,17 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="CompressedCubemap" inherits="CompressedTextureLayered" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
+ 6-sided texture typically used in 3D rendering, optionally compressed.
</brief_description>
<description>
+ A cubemap that is loaded from a [code].ccube[/code] file. This file format is internal to Godot; it is created by importing other image formats with the import system. [CompressedCubemap] can use one of 4 compresson methods:
+ - Uncompressed (uncompressed on the GPU)
+ - Lossless (WebP or PNG, uncompressed on the GPU)
+ - Lossy (WebP, uncompressed on the GPU)
+ - VRAM Compressed (compressed on the GPU)
+ Only [b]VRAM Compressed[/b] actually reduces the memory usage on the GPU. The [b]Lossless[/b] and [b]Lossy[/b] compression methods will reduce the required storage on disk, but they will not reduce memory usage on the GPU as the texture is sent to the GPU uncompressed.
+ Using [b]VRAM Compressed[/b] also improves loading times, as VRAM-compressed textures are faster to load compared to textures using lossless or lossy compression. VRAM compression can exhibit noticeable artifacts and is intended to be used for 3D rendering, not 2D.
+ See [Cubemap] for a general description of cubemaps.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/CompressedCubemapArray.xml b/doc/classes/CompressedCubemapArray.xml
index ff096cea47..4221241910 100644
--- a/doc/classes/CompressedCubemapArray.xml
+++ b/doc/classes/CompressedCubemapArray.xml
@@ -1,8 +1,17 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="CompressedCubemapArray" inherits="CompressedTextureLayered" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
+ Array of 6-sided textures typically used in 3D rendering, optionally compressed.
</brief_description>
<description>
+ A cubemap array that is loaded from a [code].ccubearray[/code] file. This file format is internal to Godot; it is created by importing other image formats with the import system. [CompressedCubemapArray] can use one of 4 compresson methods:
+ - Uncompressed (uncompressed on the GPU)
+ - Lossless (WebP or PNG, uncompressed on the GPU)
+ - Lossy (WebP, uncompressed on the GPU)
+ - VRAM Compressed (compressed on the GPU)
+ Only [b]VRAM Compressed[/b] actually reduces the memory usage on the GPU. The [b]Lossless[/b] and [b]Lossy[/b] compression methods will reduce the required storage on disk, but they will not reduce memory usage on the GPU as the texture is sent to the GPU uncompressed.
+ Using [b]VRAM Compressed[/b] also improves loading times, as VRAM-compressed textures are faster to load compared to textures using lossless or lossy compression. VRAM compression can exhibit noticeable artifacts and is intended to be used for 3D rendering, not 2D.
+ See [CubemapArray] for a general description of cubemap arrays.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/CompressedTexture2D.xml b/doc/classes/CompressedTexture2D.xml
index f74265b8d5..660062af7b 100644
--- a/doc/classes/CompressedTexture2D.xml
+++ b/doc/classes/CompressedTexture2D.xml
@@ -1,10 +1,16 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="CompressedTexture2D" inherits="Texture2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
- A [code].ctex[/code] texture.
+ Texture with 2 dimensions, optionally compressed.
</brief_description>
<description>
- A texture that is loaded from a [code].ctex[/code] file.
+ A texture that is loaded from a [code].ctex[/code] file. This file format is internal to Godot; it is created by importing other image formats with the import system. [CompressedTexture2D] can use one of 4 compression methods (including a lack of any compression):
+ - Uncompressed (uncompressed on the GPU)
+ - Lossless (WebP or PNG, uncompressed on the GPU)
+ - Lossy (WebP, uncompressed on the GPU)
+ - VRAM Compressed (compressed on the GPU)
+ Only [b]VRAM Compressed[/b] actually reduces the memory usage on the GPU. The [b]Lossless[/b] and [b]Lossy[/b] compression methods will reduce the required storage on disk, but they will not reduce memory usage on the GPU as the texture is sent to the GPU uncompressed.
+ Using [b]VRAM Compressed[/b] also improves loading times, as VRAM-compressed textures are faster to load compared to textures using lossless or lossy compression. VRAM compression can exhibit noticeable artifacts and is intended to be used for 3D rendering, not 2D.
</description>
<tutorials>
</tutorials>
@@ -13,13 +19,14 @@
<return type="int" enum="Error" />
<param index="0" name="path" type="String" />
<description>
- Loads the texture from the given path.
+ Loads the texture from the specified [param path].
</description>
</method>
</methods>
<members>
<member name="load_path" type="String" setter="load" getter="get_load_path" default="&quot;&quot;">
- The CompressedTexture's file path to a [code].ctex[/code] file.
+ The [CompressedTexture2D]'s file path to a [code].ctex[/code] file.
</member>
+ <member name="resource_local_to_scene" type="bool" setter="set_local_to_scene" getter="is_local_to_scene" overrides="Resource" default="false" />
</members>
</class>
diff --git a/doc/classes/CompressedTexture2DArray.xml b/doc/classes/CompressedTexture2DArray.xml
index 0c751759af..0bd894a2da 100644
--- a/doc/classes/CompressedTexture2DArray.xml
+++ b/doc/classes/CompressedTexture2DArray.xml
@@ -1,8 +1,17 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="CompressedTexture2DArray" inherits="CompressedTextureLayered" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
+ Array of 2-dimensional textures, optionally compressed.
</brief_description>
<description>
+ A texture array that is loaded from a [code].ctexarray[/code] file. This file format is internal to Godot; it is created by importing other image formats with the import system. [CompressedTexture2DArray] can use one of 4 compresson methods:
+ - Uncompressed (uncompressed on the GPU)
+ - Lossless (WebP or PNG, uncompressed on the GPU)
+ - Lossy (WebP, uncompressed on the GPU)
+ - VRAM Compressed (compressed on the GPU)
+ Only [b]VRAM Compressed[/b] actually reduces the memory usage on the GPU. The [b]Lossless[/b] and [b]Lossy[/b] compression methods will reduce the required storage on disk, but they will not reduce memory usage on the GPU as the texture is sent to the GPU uncompressed.
+ Using [b]VRAM Compressed[/b] also improves loading times, as VRAM-compressed textures are faster to load compared to textures using lossless or lossy compression. VRAM compression can exhibit noticeable artifacts and is intended to be used for 3D rendering, not 2D.
+ See [Texture2DArray] for a general description of texture arrays.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/CompressedTexture3D.xml b/doc/classes/CompressedTexture3D.xml
index 50bd025861..b11583b684 100644
--- a/doc/classes/CompressedTexture3D.xml
+++ b/doc/classes/CompressedTexture3D.xml
@@ -1,8 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="CompressedTexture3D" inherits="Texture3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
+ Texture with 3 dimensions, optionally compressed.
</brief_description>
<description>
+ [CompressedTexture3D] is the VRAM-compressed counterpart of [ImageTexture3D]. The file extension for [CompressedTexture3D] files is [code].ctex3d[/code]. This file format is internal to Godot; it is created by importing other image formats with the import system.
+ [CompressedTexture3D] uses VRAM compression, which allows to reduce memory usage on the GPU when rendering the texture. This also improves loading times, as VRAM-compressed textures are faster to load compared to textures using lossless compression. VRAM compression can exhibit noticeable artifacts and is intended to be used for 3D rendering, not 2D.
+ See [Texture3D] for a general description of 3D textures.
</description>
<tutorials>
</tutorials>
@@ -11,11 +15,13 @@
<return type="int" enum="Error" />
<param index="0" name="path" type="String" />
<description>
+ Loads the texture from the specified [param path].
</description>
</method>
</methods>
<members>
<member name="load_path" type="String" setter="load" getter="get_load_path" default="&quot;&quot;">
+ The [CompressedTexture3D]'s file path to a [code].ctex3d[/code] file.
</member>
</members>
</class>
diff --git a/doc/classes/CompressedTextureLayered.xml b/doc/classes/CompressedTextureLayered.xml
index 547679c0f0..376483ae5c 100644
--- a/doc/classes/CompressedTextureLayered.xml
+++ b/doc/classes/CompressedTextureLayered.xml
@@ -1,8 +1,16 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="CompressedTextureLayered" inherits="TextureLayered" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
+ Base class for texture arrays that can optionally be compressed.
</brief_description>
<description>
+ A texture array that is loaded from a [code].ctexarray[/code] file. This file format is internal to Godot; it is created by importing other image formats with the import system. [CompressedTexture2D] can use one of 4 compresson methods:
+ - Uncompressed (uncompressed on the GPU)
+ - Lossless (WebP or PNG, uncompressed on the GPU)
+ - Lossy (WebP, uncompressed on the GPU)
+ - VRAM Compressed (compressed on the GPU)
+ Only [b]VRAM Compressed[/b] actually reduces the memory usage on the GPU. The [b]Lossless[/b] and [b]Lossy[/b] compression methods will reduce the required storage on disk, but they will not reduce memory usage on the GPU as the texture is sent to the GPU uncompressed.
+ Using [b]VRAM Compressed[/b] also improves loading times, as VRAM-compressed textures are faster to load compared to textures using lossless or lossy compression. VRAM compression can exhibit noticeable artifacts and is intended to be used for 3D rendering, not 2D.
</description>
<tutorials>
</tutorials>
@@ -11,11 +19,13 @@
<return type="int" enum="Error" />
<param index="0" name="path" type="String" />
<description>
+ Loads the texture at [param path].
</description>
</method>
</methods>
<members>
<member name="load_path" type="String" setter="load" getter="get_load_path" default="&quot;&quot;">
+ The path the texture should be loaded from.
</member>
</members>
</class>
diff --git a/doc/classes/ConcavePolygonShape2D.xml b/doc/classes/ConcavePolygonShape2D.xml
index f3c245c229..ee3e4f6de4 100644
--- a/doc/classes/ConcavePolygonShape2D.xml
+++ b/doc/classes/ConcavePolygonShape2D.xml
@@ -4,9 +4,10 @@
Concave polygon shape resource for 2D physics.
</brief_description>
<description>
- 2D concave polygon shape to be added as a [i]direct[/i] child of a [PhysicsBody2D] or [Area2D] using a [CollisionShape2D] node. It is made out of segments and is optimal for complex polygonal concave collisions. However, it is not advised to use for [RigidDynamicBody2D] nodes. A CollisionPolygon2D in convex decomposition mode (solids) or several convex objects are advised for that instead. Otherwise, a concave polygon 2D shape is better for static collisions.
+ 2D concave polygon shape to be added as a [i]direct[/i] child of a [PhysicsBody2D] or [Area2D] using a [CollisionShape2D] node. It is made out of segments and is optimal for complex polygonal concave collisions. However, it is not advised to use for [RigidBody2D] nodes. A CollisionPolygon2D in convex decomposition mode (solids) or several convex objects are advised for that instead. Otherwise, a concave polygon 2D shape is better for static collisions.
The main difference between a [ConvexPolygonShape2D] and a [ConcavePolygonShape2D] is that a concave polygon assumes it is concave and uses a more complex method of collision detection, and a convex one forces itself to be convex to speed up collision detection.
[b]Performance:[/b] Due to its complexity, [ConcavePolygonShape2D] is the slowest collision shape to check collisions against. Its use should generally be limited to level geometry. For convex geometry, using [ConvexPolygonShape2D] will perform better. For dynamic physics bodies that need concave collision, several [ConvexPolygonShape2D]s can be used to represent its collision by using convex decomposition; see [ConvexPolygonShape2D]'s documentation for instructions. However, consider using primitive collision shapes such as [CircleShape2D] or [RectangleShape2D] first.
+ [b]Warning:[/b] Using this shape for an [Area2D] (via a [CollisionShape2D] node) may give unexpected results: the area will only detect collisions with the segments in the [ConcavePolygonShape2D] (and not with any "inside" of the shape, for example).
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/ConcavePolygonShape3D.xml b/doc/classes/ConcavePolygonShape3D.xml
index 6a54b4bda7..f01ca8efaf 100644
--- a/doc/classes/ConcavePolygonShape3D.xml
+++ b/doc/classes/ConcavePolygonShape3D.xml
@@ -5,8 +5,9 @@
</brief_description>
<description>
3D concave polygon shape resource (also called "trimesh") to be added as a [i]direct[/i] child of a [PhysicsBody3D] or [Area3D] using a [CollisionShape3D] node. This shape is created by feeding a list of triangles. Despite its name, [ConcavePolygonShape3D] can also store convex polygon shapes. However, unlike [ConvexPolygonShape3D], [ConcavePolygonShape3D] is [i]not[/i] limited to storing convex shapes exclusively.
- [b]Note:[/b] When used for collision, [ConcavePolygonShape3D] is intended to work with static [PhysicsBody3D] nodes like [StaticBody3D] and will not work with [CharacterBody3D] or [RigidDynamicBody3D] with a mode other than Static.
+ [b]Note:[/b] 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.
[b]Performance:[/b] Due to its complexity, [ConcavePolygonShape3D] is the slowest collision shape to check collisions against. Its use should generally be limited to level geometry. For convex geometry, using [ConvexPolygonShape3D] will perform better. For dynamic physics bodies that need concave collision, several [ConvexPolygonShape3D]s can be used to represent its collision by using convex decomposition; see [ConvexPolygonShape3D]'s documentation for instructions. However, consider using primitive collision shapes such as [SphereShape3D] or [BoxShape3D] first.
+ [b]Warning:[/b] Using this shape for an [Area3D] (via a [CollisionShape3D] node, created e.g. by using the [i]Create Trimesh Collision Sibling[/i] option in the [i]Mesh[/i] menu that appears when selecting a [MeshInstance3D] node) may give unexpected results: the area will only detect collisions with the triangle faces in the [ConcavePolygonShape3D] (and not with any "inside" of the shape, for example); moreover it will only detect all such collisions if [member backface_collision] is [code]true[/code].
</description>
<tutorials>
<link title="3D Physics Tests Demo">https://godotengine.org/asset-library/asset/675</link>
diff --git a/doc/classes/ConeTwistJoint3D.xml b/doc/classes/ConeTwistJoint3D.xml
index 5f2ad109f2..1cfe9d197d 100644
--- a/doc/classes/ConeTwistJoint3D.xml
+++ b/doc/classes/ConeTwistJoint3D.xml
@@ -36,13 +36,13 @@
<member name="softness" type="float" setter="set_param" getter="get_param" default="0.8">
The ease with which the joint starts to twist. If it's too low, it takes more force to start twisting the joint.
</member>
- <member name="swing_span" type="float" setter="_set_swing_span" getter="_get_swing_span" default="45.0">
+ <member name="swing_span" type="float" setter="set_param" getter="get_param" default="0.785398">
Swing is rotation from side to side, around the axis perpendicular to the twist axis.
The swing span defines, how much rotation will not get corrected along the swing axis.
Could be defined as looseness in the [ConeTwistJoint3D].
If below 0.05, this behavior is locked.
</member>
- <member name="twist_span" type="float" setter="_set_twist_span" getter="_get_twist_span" default="180.0">
+ <member name="twist_span" type="float" setter="set_param" getter="get_param" default="3.14159">
Twist is the rotation around the twist axis, this value defined how far the joint can twist.
Twist is locked if below 0.05.
</member>
diff --git a/doc/classes/ConfigFile.xml b/doc/classes/ConfigFile.xml
index ecd317e064..4e60df6b96 100644
--- a/doc/classes/ConfigFile.xml
+++ b/doc/classes/ConfigFile.xml
@@ -98,6 +98,12 @@
Removes the entire contents of the config.
</description>
</method>
+ <method name="encode_to_text" qualifiers="const">
+ <return type="String" />
+ <description>
+ Obtain the text version of this config file (the same text that would be written to a file).
+ </description>
+ </method>
<method name="erase_section">
<return type="void" />
<param index="0" name="section" type="String" />
@@ -132,7 +138,7 @@
<param index="1" name="key" type="String" />
<param index="2" name="default" type="Variant" default="null" />
<description>
- Returns the current value for the specified section and key. If either the section or the key do not exist, the method returns the fallback [code]default[/code] value. If [code]default[/code] is not specified or set to [code]null[/code], an error is also raised.
+ Returns the current value for the specified section and key. If either the section or the key do not exist, the method returns the fallback [param default] value. If [param default] is not specified or set to [code]null[/code], an error is also raised.
</description>
</method>
<method name="has_section" qualifiers="const">
@@ -157,7 +163,7 @@
<param index="0" name="path" type="String" />
<description>
Loads the config file specified as a parameter. The file's contents are parsed and loaded in the [ConfigFile] object which the method was called on.
- Returns one of the [enum Error] code constants ([code]OK[/code] on success).
+ Returns one of the [enum Error] code constants ([constant OK] on success).
</description>
</method>
<method name="load_encrypted">
@@ -165,8 +171,8 @@
<param index="0" name="path" type="String" />
<param index="1" name="key" type="PackedByteArray" />
<description>
- Loads the encrypted config file specified as a parameter, using the provided [code]key[/code] to decrypt it. The file's contents are parsed and loaded in the [ConfigFile] object which the method was called on.
- Returns one of the [enum Error] code constants ([code]OK[/code] on success).
+ Loads the encrypted config file specified as a parameter, using the provided [param key] to decrypt it. The file's contents are parsed and loaded in the [ConfigFile] object which the method was called on.
+ Returns one of the [enum Error] code constants ([constant OK] on success).
</description>
</method>
<method name="load_encrypted_pass">
@@ -174,8 +180,8 @@
<param index="0" name="path" type="String" />
<param index="1" name="password" type="String" />
<description>
- Loads the encrypted config file specified as a parameter, using the provided [code]password[/code] to decrypt it. The file's contents are parsed and loaded in the [ConfigFile] object which the method was called on.
- Returns one of the [enum Error] code constants ([code]OK[/code] on success).
+ Loads the encrypted config file specified as a parameter, using the provided [param password] to decrypt it. The file's contents are parsed and loaded in the [ConfigFile] object which the method was called on.
+ Returns one of the [enum Error] code constants ([constant OK] on success).
</description>
</method>
<method name="parse">
@@ -183,7 +189,7 @@
<param index="0" name="data" type="String" />
<description>
Parses the passed string as the contents of a config file. The string is parsed and loaded in the ConfigFile object which the method was called on.
- Returns one of the [enum Error] code constants ([code]OK[/code] on success).
+ Returns one of the [enum Error] code constants ([constant OK] on success).
</description>
</method>
<method name="save">
@@ -191,7 +197,7 @@
<param index="0" name="path" type="String" />
<description>
Saves the contents of the [ConfigFile] object to the file specified as a parameter. The output file uses an INI-style structure.
- Returns one of the [enum Error] code constants ([code]OK[/code] on success).
+ Returns one of the [enum Error] code constants ([constant OK] on success).
</description>
</method>
<method name="save_encrypted">
@@ -199,8 +205,8 @@
<param index="0" name="path" type="String" />
<param index="1" name="key" type="PackedByteArray" />
<description>
- Saves the contents of the [ConfigFile] object to the AES-256 encrypted file specified as a parameter, using the provided [code]key[/code] to encrypt it. The output file uses an INI-style structure.
- Returns one of the [enum Error] code constants ([code]OK[/code] on success).
+ Saves the contents of the [ConfigFile] object to the AES-256 encrypted file specified as a parameter, using the provided [param key] to encrypt it. The output file uses an INI-style structure.
+ Returns one of the [enum Error] code constants ([constant OK] on success).
</description>
</method>
<method name="save_encrypted_pass">
@@ -208,8 +214,8 @@
<param index="0" name="path" type="String" />
<param index="1" name="password" type="String" />
<description>
- Saves the contents of the [ConfigFile] object to the AES-256 encrypted file specified as a parameter, using the provided [code]password[/code] to encrypt it. The output file uses an INI-style structure.
- Returns one of the [enum Error] code constants ([code]OK[/code] on success).
+ Saves the contents of the [ConfigFile] object to the AES-256 encrypted file specified as a parameter, using the provided [param password] to encrypt it. The output file uses an INI-style structure.
+ Returns one of the [enum Error] code constants ([constant OK] on success).
</description>
</method>
<method name="set_value">
diff --git a/doc/classes/ConfirmationDialog.xml b/doc/classes/ConfirmationDialog.xml
index d4c503857d..48b4df9126 100644
--- a/doc/classes/ConfirmationDialog.xml
+++ b/doc/classes/ConfirmationDialog.xml
@@ -8,10 +8,10 @@
To get cancel action, you can use:
[codeblocks]
[gdscript]
- get_cancel().connect("pressed", self, "cancelled")
+ get_cancel_button().pressed.connect(self.cancelled)
[/gdscript]
[csharp]
- GetCancel().Connect("pressed", this, nameof(Cancelled));
+ GetCancelButton().Pressed += Cancelled;
[/csharp]
[/codeblocks]
</description>
diff --git a/doc/classes/Container.xml b/doc/classes/Container.xml
index a13e1598b2..0e1ef02573 100644
--- a/doc/classes/Container.xml
+++ b/doc/classes/Container.xml
@@ -14,14 +14,14 @@
<method name="_get_allowed_size_flags_horizontal" qualifiers="virtual const">
<return type="PackedInt32Array" />
<description>
- Implement to return a list of allowed horizontal [enum Control.SizeFlags] for child nodes. This doesn't technically prevent the usages of any other size flags, if your implementation requires that. This only limits the options available to the user in the inspector dock.
+ Implement to return a list of allowed horizontal [enum Control.SizeFlags] for child nodes. This doesn't technically prevent the usages of any other size flags, if your implementation requires that. This only limits the options available to the user in the Inspector dock.
[b]Note:[/b] Having no size flags is equal to having [constant Control.SIZE_SHRINK_BEGIN]. As such, this value is always implicitly allowed.
</description>
</method>
<method name="_get_allowed_size_flags_vertical" qualifiers="virtual const">
<return type="PackedInt32Array" />
<description>
- Implement to return a list of allowed vertical [enum Control.SizeFlags] for child nodes. This doesn't technically prevent the usages of any other size flags, if your implementation requires that. This only limits the options available to the user in the inspector dock.
+ Implement to return a list of allowed vertical [enum Control.SizeFlags] for child nodes. This doesn't technically prevent the usages of any other size flags, if your implementation requires that. This only limits the options available to the user in the Inspector dock.
[b]Note:[/b] Having no size flags is equal to having [constant Control.SIZE_SHRINK_BEGIN]. As such, this value is always implicitly allowed.
</description>
</method>
diff --git a/doc/classes/Control.xml b/doc/classes/Control.xml
index ad5dcdfc45..8a38deeebe 100644
--- a/doc/classes/Control.xml
+++ b/doc/classes/Control.xml
@@ -7,12 +7,12 @@
Base class for all UI-related nodes. [Control] features a bounding rectangle that defines its extents, an anchor position relative to its parent control or the current viewport, and offsets relative to the anchor. The offsets update automatically when the node, any of its parents, or the screen size change.
For more information on Godot's UI system, anchors, offsets, and containers, see the related tutorials in the manual. To build flexible UIs, you'll need a mix of UI elements that inherit from [Control] and [Container] nodes.
[b]User Interface nodes and input[/b]
- Godot sends input events to the scene's root node first, by calling [method Node._input]. [method Node._input] forwards the event down the node tree to the nodes under the mouse cursor, or on keyboard focus. To do so, it calls [code]MainLoop._input_event[/code].
- [b]FIXME:[/b] No longer valid after DisplayServer split and Input refactoring.
+ Godot propagates input events via viewports. Each [Viewport] is responsible for propagating [InputEvent]s to their child nodes. As the [member SceneTree.root] is a [Window], this already happens automatically for all UI elements in your game.
+ Input events are propagated through the [SceneTree] from the root node to all child nodes by calling [method Node._input]. For UI elements specifically, it makes more sense to override the virtual method [method _gui_input], which filters out unrelated input events, such as by checking z-order, [member mouse_filter], focus, or if the event was inside of the control's bounding box.
Call [method accept_event] so no other node receives the event. Once you accept an input, it becomes handled so [method Node._unhandled_input] will not process it.
- Only one [Control] node can be in keyboard focus. Only the node in focus will receive keyboard events. To get the focus, call [method grab_focus]. [Control] nodes lose focus when another node grabs it, or if you hide the node in focus.
+ Only one [Control] node can be in focus. Only the node in focus will receive events. To get the focus, call [method grab_focus]. [Control] nodes lose focus when another node grabs it, or if you hide the node in focus.
Sets [member mouse_filter] to [constant MOUSE_FILTER_IGNORE] to tell a [Control] node to ignore mouse or touch events. You'll need it if you place an icon on top of a button.
- [Theme] resources change the Control's appearance. If you change the [Theme] on a [Control] node, it affects all of its children. To override some of the theme's parameters, call one of the [code]add_theme_*_override[/code] methods, like [method add_theme_font_override]. You can override the theme with the inspector.
+ [Theme] resources change the Control's appearance. If you change the [Theme] on a [Control] node, it affects all of its children. To override some of the theme's parameters, call one of the [code]add_theme_*_override[/code] methods, like [method add_theme_font_override]. You can override the theme with the Inspector.
[b]Note:[/b] Theme items are [i]not[/i] [Object] properties. This means you can't access their values using [method Object.get] and [method Object.set]. Instead, use the [code]get_theme_*[/code] and [code]add_theme_*_override[/code] methods provided by this class.
</description>
<tutorials>
@@ -27,7 +27,7 @@
<param index="0" name="at_position" type="Vector2" />
<param index="1" name="data" type="Variant" />
<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.
+ Godot calls this method to test if [param data] from a control's [method _get_drag_data] can be dropped at [param at_position]. [param at_position] is local to this control.
This method should only be used to test the data. Process the data in [method _drop_data].
[codeblocks]
[gdscript]
@@ -52,7 +52,7 @@
<param index="0" name="at_position" type="Vector2" />
<param index="1" name="data" type="Variant" />
<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.
+ Godot calls this method to pass you the [param data] from a control's [method _get_drag_data] result. Godot first calls [method _can_drop_data] to test if [param data] is allowed to drop at [param at_position] where [param at_position] is local to this control.
[codeblocks]
[gdscript]
func _can_drop_data(position, data):
@@ -77,7 +77,7 @@
<return type="Variant" />
<param index="0" name="at_position" type="Vector2" />
<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].
+ 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]. [param at_position] 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]
@@ -110,7 +110,7 @@
<param index="0" name="event" type="InputEvent" />
<description>
Virtual method to be implemented by the user. Use this method to process and accept inputs on UI elements. See [method accept_event].
- Example: clicking a control.
+ [b]Example usage for clicking a control:[/b]
[codeblocks]
[gdscript]
func _gui_input(event):
@@ -145,7 +145,7 @@
<return type="bool" />
<param index="0" name="position" type="Vector2" />
<description>
- Virtual method to be implemented by the user. Returns whether the given [code]point[/code] is inside this control.
+ Virtual method to be implemented by the user. Returns whether the given [param position] 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>
@@ -154,12 +154,12 @@
<return type="Object" />
<param index="0" name="for_text" type="String" />
<description>
- Virtual method to be implemented by the user. Returns a [Control] node that should be used as a tooltip instead of the default one. The [code]for_text[/code] includes the contents of the [member hint_tooltip] property.
+ Virtual method to be implemented by the user. Returns a [Control] node that should be used as a tooltip instead of the default one. The [param for_text] includes the contents of the [member tooltip_text] property.
The returned node must be of type [Control] or Control-derived. It can have child nodes of any type. It is freed when the tooltip disappears, so make sure you always provide a new instance (if you want to use a pre-existing node from your scene tree, you can duplicate it and pass the duplicated instance). When [code]null[/code] or a non-Control node is returned, the default tooltip will be used instead.
- The returned node will be added as child to a [PopupPanel], so you should only provide the contents of that panel. That [PopupPanel] can be themed using [method Theme.set_stylebox] for the type [code]"TooltipPanel"[/code] (see [member hint_tooltip] for an example).
+ The returned node will be added as child to a [PopupPanel], so you should only provide the contents of that panel. That [PopupPanel] can be themed using [method Theme.set_stylebox] for the type [code]"TooltipPanel"[/code] (see [member tooltip_text] for an example).
[b]Note:[/b] The tooltip is shrunk to minimal size. If you want to ensure it's fully visible, you might want to set its [member custom_minimum_size] to some non-zero value.
[b]Note:[/b] The node (and any relevant children) should be [member CanvasItem.visible] when returned, otherwise, the viewport that instantiates it will not be able to calculate its minimum size reliably.
- Example of usage with a custom-constructed node:
+ [b]Example of usage with a custom-constructed node:[/b]
[codeblocks]
[gdscript]
func _make_custom_tooltip(for_text):
@@ -176,7 +176,7 @@
}
[/csharp]
[/codeblocks]
- Example of usage with a custom scene instance:
+ [b]Example of usage with a custom scene instance:[/b]
[codeblocks]
[gdscript]
func _make_custom_tooltip(for_text):
@@ -196,12 +196,12 @@
</description>
</method>
<method name="_structured_text_parser" qualifiers="virtual const">
- <return type="Array" />
+ <return type="Vector2i[]" />
<param index="0" name="args" type="Array" />
<param index="1" name="text" type="String" />
<description>
User defined BiDi algorithm override function.
- Returns [code]Array[/code] of [code]Vector2i[/code] text ranges, in the left-to-right order. Ranges should cover full source [code]text[/code] without overlaps. BiDi algorithm will be used on each range separately.
+ Returns an [Array] of [Vector2i] text ranges, in the left-to-right order. Ranges should cover full source [param text] without overlaps. BiDi algorithm will be used on each range separately.
</description>
</method>
<method name="accept_event">
@@ -215,7 +215,7 @@
<param index="0" name="name" type="StringName" />
<param index="1" name="color" type="Color" />
<description>
- Creates a local override for a theme [Color] with the specified [code]name[/code]. Local overrides always take precedence when fetching theme items for the control. An override can be removed with [method remove_theme_color_override].
+ Creates a local override for a theme [Color] with the specified [param name]. Local overrides always take precedence when fetching theme items for the control. An override can be removed with [method remove_theme_color_override].
See also [method get_theme_color].
[b]Example of overriding a label's color and resetting it later:[/b]
[codeblocks]
@@ -243,7 +243,7 @@
<param index="0" name="name" type="StringName" />
<param index="1" name="constant" type="int" />
<description>
- Creates a local override for a theme constant with the specified [code]name[/code]. Local overrides always take precedence when fetching theme items for the control. An override can be removed with [method remove_theme_constant_override].
+ Creates a local override for a theme constant with the specified [param name]. Local overrides always take precedence when fetching theme items for the control. An override can be removed with [method remove_theme_constant_override].
See also [method get_theme_constant].
</description>
</method>
@@ -252,7 +252,7 @@
<param index="0" name="name" type="StringName" />
<param index="1" name="font" type="Font" />
<description>
- Creates a local override for a theme [Font] with the specified [code]name[/code]. Local overrides always take precedence when fetching theme items for the control. An override can be removed with [method remove_theme_font_override].
+ Creates a local override for a theme [Font] with the specified [param name]. Local overrides always take precedence when fetching theme items for the control. An override can be removed with [method remove_theme_font_override].
See also [method get_theme_font].
</description>
</method>
@@ -261,7 +261,7 @@
<param index="0" name="name" type="StringName" />
<param index="1" name="font_size" type="int" />
<description>
- Creates a local override for a theme font size with the specified [code]name[/code]. Local overrides always take precedence when fetching theme items for the control. An override can be removed with [method remove_theme_font_size_override].
+ Creates a local override for a theme font size with the specified [param name]. Local overrides always take precedence when fetching theme items for the control. An override can be removed with [method remove_theme_font_size_override].
See also [method get_theme_font_size].
</description>
</method>
@@ -270,7 +270,7 @@
<param index="0" name="name" type="StringName" />
<param index="1" name="texture" type="Texture2D" />
<description>
- Creates a local override for a theme icon with the specified [code]name[/code]. Local overrides always take precedence when fetching theme items for the control. An override can be removed with [method remove_theme_icon_override].
+ Creates a local override for a theme icon with the specified [param name]. Local overrides always take precedence when fetching theme items for the control. An override can be removed with [method remove_theme_icon_override].
See also [method get_theme_icon].
</description>
</method>
@@ -279,7 +279,7 @@
<param index="0" name="name" type="StringName" />
<param index="1" name="stylebox" type="StyleBox" />
<description>
- Creates a local override for a theme [StyleBox] with the specified [code]name[/code]. Local overrides always take precedence when fetching theme items for the control. An override can be removed with [method remove_theme_stylebox_override].
+ Creates a local override for a theme [StyleBox] with the specified [param name]. Local overrides always take precedence when fetching theme items for the control. An override can be removed with [method remove_theme_stylebox_override].
See also [method get_theme_stylebox].
[b]Example of modifying a property in a StyleBox by duplicating it:[/b]
[codeblocks]
@@ -337,7 +337,7 @@
<param index="0" name="data" type="Variant" />
<param index="1" name="preview" type="Control" />
<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.
+ Forces drag and bypasses [method _get_drag_data] and [method set_drag_preview] by passing [param data] and [param preview]. 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>
@@ -383,7 +383,7 @@
<method name="get_global_rect" qualifiers="const">
<return type="Rect2" />
<description>
- Returns the position and size of the control relative to the top-left corner of the screen. See [member position] and [member size].
+ Returns the position and size of the control relative to the [CanvasLayer]. See [member global_position] and [member size].
</description>
</method>
<method name="get_minimum_size" qualifiers="const">
@@ -422,7 +422,7 @@
<description>
Returns the position of this [Control] in global screen coordinates (i.e. taking window position into account). Mostly useful for editor plugins.
Equals to [member global_position] if the window is embedded (see [member Viewport.gui_embed_subwindows]).
- Example usage for showing a popup:
+ [b]Example usage for showing a popup:[/b]
[codeblock]
popup_menu.position = get_screen_position() + get_local_mouse_position()
popup_menu.reset_size()
@@ -435,8 +435,8 @@
<param index="0" name="name" type="StringName" />
<param index="1" name="theme_type" type="StringName" default="&quot;&quot;" />
<description>
- Returns a [Color] from the first matching [Theme] in the tree if that [Theme] has a color item with the specified [code]name[/code] and [code]theme_type[/code]. If [code]theme_type[/code] is omitted the class name of the current control is used as the type, or [member theme_type_variation] if it is defined. If the type is a class name its parent classes are also checked, in order of inheritance. If the type is a variation its base types are checked, in order of dependency, then the control's class name and its parent classes are checked.
- For the current control its local overrides are considered first (see [method add_theme_color_override]), then its assigned [member theme]. After the current control, each parent control and its assigned [member theme] are considered; controls without a [member theme] assigned are skipped. If no matching [Theme] is found in the tree, a custom project [Theme] (see [member ProjectSettings.gui/theme/custom]) and the default [Theme] are used.
+ Returns a [Color] from the first matching [Theme] in the tree if that [Theme] has a color item with the specified [param name] and [param theme_type]. If [param theme_type] is omitted the class name of the current control is used as the type, or [member theme_type_variation] if it is defined. If the type is a class name its parent classes are also checked, in order of inheritance. If the type is a variation its base types are checked, in order of dependency, then the control's class name and its parent classes are checked.
+ For the current control its local overrides are considered first (see [method add_theme_color_override]), then its assigned [member theme]. After the current control, each parent control and its assigned [member theme] are considered; controls without a [member theme] assigned are skipped. If no matching [Theme] is found in the tree, the custom project [Theme] (see [member ProjectSettings.gui/theme/custom]) and the default [Theme] are used (see [ThemeDB]).
[codeblocks]
[gdscript]
func _ready():
@@ -462,7 +462,7 @@
<param index="0" name="name" type="StringName" />
<param index="1" name="theme_type" type="StringName" default="&quot;&quot;" />
<description>
- Returns a constant from the first matching [Theme] in the tree if that [Theme] has a constant item with the specified [code]name[/code] and [code]theme_type[/code].
+ Returns a constant from the first matching [Theme] in the tree if that [Theme] has a constant item with the specified [param name] and [param theme_type].
See [method get_theme_color] for details.
</description>
</method>
@@ -492,7 +492,7 @@
<param index="0" name="name" type="StringName" />
<param index="1" name="theme_type" type="StringName" default="&quot;&quot;" />
<description>
- Returns a [Font] from the first matching [Theme] in the tree if that [Theme] has a font item with the specified [code]name[/code] and [code]theme_type[/code].
+ Returns a [Font] from the first matching [Theme] in the tree if that [Theme] has a font item with the specified [param name] and [param theme_type].
See [method get_theme_color] for details.
</description>
</method>
@@ -501,7 +501,7 @@
<param index="0" name="name" type="StringName" />
<param index="1" name="theme_type" type="StringName" default="&quot;&quot;" />
<description>
- Returns a font size from the first matching [Theme] in the tree if that [Theme] has a font size item with the specified [code]name[/code] and [code]theme_type[/code].
+ Returns a font size from the first matching [Theme] in the tree if that [Theme] has a font size item with the specified [param name] and [param theme_type].
See [method get_theme_color] for details.
</description>
</method>
@@ -510,7 +510,7 @@
<param index="0" name="name" type="StringName" />
<param index="1" name="theme_type" type="StringName" default="&quot;&quot;" />
<description>
- Returns an icon from the first matching [Theme] in the tree if that [Theme] has an icon item with the specified [code]name[/code] and [code]theme_type[/code].
+ Returns an icon from the first matching [Theme] in the tree if that [Theme] has an icon item with the specified [param name] and [param theme_type].
See [method get_theme_color] for details.
</description>
</method>
@@ -519,7 +519,7 @@
<param index="0" name="name" type="StringName" />
<param index="1" name="theme_type" type="StringName" default="&quot;&quot;" />
<description>
- Returns a [StyleBox] from the first matching [Theme] in the tree if that [Theme] has a stylebox item with the specified [code]name[/code] and [code]theme_type[/code].
+ Returns a [StyleBox] from the first matching [Theme] in the tree if that [Theme] has a stylebox item with the specified [param name] and [param theme_type].
See [method get_theme_color] for details.
</description>
</method>
@@ -527,7 +527,8 @@
<return type="String" />
<param index="0" name="at_position" type="Vector2" default="Vector2(0, 0)" />
<description>
- Returns the tooltip, which will appear when the cursor is resting over this control. See [member hint_tooltip].
+ Returns the tooltip text [param at_position] in local coordinates, which will typically appear when the cursor is resting over this control. By default, it returns [member tooltip_text].
+ [b]Note:[/b] This method can be overridden to customize its behavior. If this method returns an empty [String], no tooltip is displayed.
</description>
</method>
<method name="grab_click_focus">
@@ -552,6 +553,7 @@
<return type="void" />
<description>
Steal the focus from another control and become the focused control (see [member focus_mode]).
+ [b]Note[/b]: Using this method together with [method Callable.call_deferred] makes it more reliable, especially when called inside [method Node._ready].
</description>
</method>
<method name="has_focus" qualifiers="const">
@@ -565,7 +567,7 @@
<param index="0" name="name" type="StringName" />
<param index="1" name="theme_type" type="StringName" default="&quot;&quot;" />
<description>
- Returns [code]true[/code] if there is a matching [Theme] in the tree that has a color item with the specified [code]name[/code] and [code]theme_type[/code].
+ Returns [code]true[/code] if there is a matching [Theme] in the tree that has a color item with the specified [param name] and [param theme_type].
See [method get_theme_color] for details.
</description>
</method>
@@ -573,7 +575,7 @@
<return type="bool" />
<param index="0" name="name" type="StringName" />
<description>
- Returns [code]true[/code] if there is a local override for a theme [Color] with the specified [code]name[/code] in this [Control] node.
+ Returns [code]true[/code] if there is a local override for a theme [Color] with the specified [param name] in this [Control] node.
See [method add_theme_color_override].
</description>
</method>
@@ -582,7 +584,7 @@
<param index="0" name="name" type="StringName" />
<param index="1" name="theme_type" type="StringName" default="&quot;&quot;" />
<description>
- Returns [code]true[/code] if there is a matching [Theme] in the tree that has a constant item with the specified [code]name[/code] and [code]theme_type[/code].
+ Returns [code]true[/code] if there is a matching [Theme] in the tree that has a constant item with the specified [param name] and [param theme_type].
See [method get_theme_color] for details.
</description>
</method>
@@ -590,7 +592,7 @@
<return type="bool" />
<param index="0" name="name" type="StringName" />
<description>
- Returns [code]true[/code] if there is a local override for a theme constant with the specified [code]name[/code] in this [Control] node.
+ Returns [code]true[/code] if there is a local override for a theme constant with the specified [param name] in this [Control] node.
See [method add_theme_constant_override].
</description>
</method>
@@ -599,7 +601,7 @@
<param index="0" name="name" type="StringName" />
<param index="1" name="theme_type" type="StringName" default="&quot;&quot;" />
<description>
- Returns [code]true[/code] if there is a matching [Theme] in the tree that has a font item with the specified [code]name[/code] and [code]theme_type[/code].
+ Returns [code]true[/code] if there is a matching [Theme] in the tree that has a font item with the specified [param name] and [param theme_type].
See [method get_theme_color] for details.
</description>
</method>
@@ -607,7 +609,7 @@
<return type="bool" />
<param index="0" name="name" type="StringName" />
<description>
- Returns [code]true[/code] if there is a local override for a theme [Font] with the specified [code]name[/code] in this [Control] node.
+ Returns [code]true[/code] if there is a local override for a theme [Font] with the specified [param name] in this [Control] node.
See [method add_theme_font_override].
</description>
</method>
@@ -616,7 +618,7 @@
<param index="0" name="name" type="StringName" />
<param index="1" name="theme_type" type="StringName" default="&quot;&quot;" />
<description>
- Returns [code]true[/code] if there is a matching [Theme] in the tree that has a font size item with the specified [code]name[/code] and [code]theme_type[/code].
+ Returns [code]true[/code] if there is a matching [Theme] in the tree that has a font size item with the specified [param name] and [param theme_type].
See [method get_theme_color] for details.
</description>
</method>
@@ -624,7 +626,7 @@
<return type="bool" />
<param index="0" name="name" type="StringName" />
<description>
- Returns [code]true[/code] if there is a local override for a theme font size with the specified [code]name[/code] in this [Control] node.
+ Returns [code]true[/code] if there is a local override for a theme font size with the specified [param name] in this [Control] node.
See [method add_theme_font_size_override].
</description>
</method>
@@ -633,7 +635,7 @@
<param index="0" name="name" type="StringName" />
<param index="1" name="theme_type" type="StringName" default="&quot;&quot;" />
<description>
- Returns [code]true[/code] if there is a matching [Theme] in the tree that has an icon item with the specified [code]name[/code] and [code]theme_type[/code].
+ Returns [code]true[/code] if there is a matching [Theme] in the tree that has an icon item with the specified [param name] and [param theme_type].
See [method get_theme_color] for details.
</description>
</method>
@@ -641,7 +643,7 @@
<return type="bool" />
<param index="0" name="name" type="StringName" />
<description>
- Returns [code]true[/code] if there is a local override for a theme icon with the specified [code]name[/code] in this [Control] node.
+ Returns [code]true[/code] if there is a local override for a theme icon with the specified [param name] in this [Control] node.
See [method add_theme_icon_override].
</description>
</method>
@@ -650,7 +652,7 @@
<param index="0" name="name" type="StringName" />
<param index="1" name="theme_type" type="StringName" default="&quot;&quot;" />
<description>
- Returns [code]true[/code] if there is a matching [Theme] in the tree that has a stylebox item with the specified [code]name[/code] and [code]theme_type[/code].
+ Returns [code]true[/code] if there is a matching [Theme] in the tree that has a stylebox item with the specified [param name] and [param theme_type].
See [method get_theme_color] for details.
</description>
</method>
@@ -658,7 +660,7 @@
<return type="bool" />
<param index="0" name="name" type="StringName" />
<description>
- Returns [code]true[/code] if there is a local override for a theme [StyleBox] with the specified [code]name[/code] in this [Control] node.
+ Returns [code]true[/code] if there is a local override for a theme [StyleBox] with the specified [param name] in this [Control] node.
See [method add_theme_stylebox_override].
</description>
</method>
@@ -678,49 +680,49 @@
<method name="release_focus">
<return type="void" />
<description>
- Give up the focus. No other control will be able to receive keyboard input.
+ Give up the focus. No other control will be able to receive input.
</description>
</method>
<method name="remove_theme_color_override">
<return type="void" />
<param index="0" name="name" type="StringName" />
<description>
- Removes a local override for a theme [Color] with the specified [code]name[/code] previously added by [method add_theme_color_override] or via the Inspector dock.
+ Removes a local override for a theme [Color] with the specified [param name] previously added by [method add_theme_color_override] or via the Inspector dock.
</description>
</method>
<method name="remove_theme_constant_override">
<return type="void" />
<param index="0" name="name" type="StringName" />
<description>
- Removes a local override for a theme constant with the specified [code]name[/code] previously added by [method add_theme_constant_override] or via the Inspector dock.
+ Removes a local override for a theme constant with the specified [param name] previously added by [method add_theme_constant_override] or via the Inspector dock.
</description>
</method>
<method name="remove_theme_font_override">
<return type="void" />
<param index="0" name="name" type="StringName" />
<description>
- Removes a local override for a theme [Font] with the specified [code]name[/code] previously added by [method add_theme_font_override] or via the Inspector dock.
+ Removes a local override for a theme [Font] with the specified [param name] previously added by [method add_theme_font_override] or via the Inspector dock.
</description>
</method>
<method name="remove_theme_font_size_override">
<return type="void" />
<param index="0" name="name" type="StringName" />
<description>
- Removes a local override for a theme font size with the specified [code]name[/code] previously added by [method add_theme_font_size_override] or via the Inspector dock.
+ Removes a local override for a theme font size with the specified [param name] previously added by [method add_theme_font_size_override] or via the Inspector dock.
</description>
</method>
<method name="remove_theme_icon_override">
<return type="void" />
<param index="0" name="name" type="StringName" />
<description>
- Removes a local override for a theme icon with the specified [code]name[/code] previously added by [method add_theme_icon_override] or via the Inspector dock.
+ Removes a local override for a theme icon with the specified [param name] previously added by [method add_theme_icon_override] or via the Inspector dock.
</description>
</method>
<method name="remove_theme_stylebox_override">
<return type="void" />
<param index="0" name="name" type="StringName" />
<description>
- Removes a local override for a theme [StyleBox] with the specified [code]name[/code] previously added by [method add_theme_stylebox_override] or via the Inspector dock.
+ Removes a local override for a theme [StyleBox] with the specified [param name] previously added by [method add_theme_stylebox_override] or via the Inspector dock.
</description>
</method>
<method name="reset_size">
@@ -736,9 +738,9 @@
<param index="2" name="keep_offset" type="bool" default="false" />
<param index="3" name="push_opposite_anchor" type="bool" default="true" />
<description>
- Sets the anchor for the specified [enum Side] to [code]anchor[/code]. A setter method for [member anchor_bottom], [member anchor_left], [member anchor_right] and [member anchor_top].
- If [code]keep_offset[/code] is [code]true[/code], offsets aren't updated after this operation.
- If [code]push_opposite_anchor[/code] is [code]true[/code] and the opposite anchor overlaps this anchor, the opposite one will have its value overridden. For example, when setting left anchor to 1 and the right anchor has value of 0.5, the right anchor will also get value of 1. If [code]push_opposite_anchor[/code] was [code]false[/code], the left anchor would get value 0.5.
+ Sets the anchor for the specified [enum Side] to [param anchor]. A setter method for [member anchor_bottom], [member anchor_left], [member anchor_right] and [member anchor_top].
+ If [param keep_offset] is [code]true[/code], offsets aren't updated after this operation.
+ If [param push_opposite_anchor] is [code]true[/code] and the opposite anchor overlaps this anchor, the opposite one will have its value overridden. For example, when setting left anchor to 1 and the right anchor has value of 0.5, the right anchor will also get value of 1. If [param push_opposite_anchor] was [code]false[/code], the left anchor would get value 0.5.
</description>
</method>
<method name="set_anchor_and_offset">
@@ -765,8 +767,8 @@
<param index="0" name="preset" type="int" enum="Control.LayoutPreset" />
<param index="1" name="keep_offsets" type="bool" default="false" />
<description>
- Sets the anchors to a [code]preset[/code] from [enum Control.LayoutPreset] enum. This is the code equivalent to using the Layout menu in the 2D editor.
- If [code]keep_offsets[/code] is [code]true[/code], control's position will also be updated.
+ Sets the anchors to a [param preset] from [enum Control.LayoutPreset] enum. This is the code equivalent to using the Layout menu in the 2D editor.
+ If [param keep_offsets] is [code]true[/code], control's position will also be updated.
</description>
</method>
<method name="set_begin">
@@ -780,7 +782,7 @@
<return type="void" />
<param index="0" name="target" type="Object" />
<description>
- Forwards the handling of this control's drag and drop to [code]target[/code] object.
+ Forwards the handling of this control's drag and drop to [param target] object.
Forwarding can be implemented in the target object 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
@@ -887,7 +889,7 @@
<param index="0" name="side" type="int" enum="Side" />
<param index="1" name="neighbor" type="NodePath" />
<description>
- Sets the anchor for the specified [enum Side] to the [Control] at [code]neighbor[/code] node path. A setter method for [member focus_neighbor_bottom], [member focus_neighbor_left], [member focus_neighbor_right] and [member focus_neighbor_top].
+ Sets the anchor for the specified [enum Side] to the [Control] at [param neighbor] node path. A setter method for [member focus_neighbor_bottom], [member focus_neighbor_left], [member focus_neighbor_right] and [member focus_neighbor_top].
</description>
</method>
<method name="set_global_position">
@@ -895,8 +897,8 @@
<param index="0" name="position" type="Vector2" />
<param index="1" name="keep_offsets" type="bool" default="false" />
<description>
- Sets the [member global_position] to given [code]position[/code].
- If [code]keep_offsets[/code] is [code]true[/code], control's anchors will be updated instead of offsets.
+ Sets the [member global_position] to given [param position].
+ If [param keep_offsets] is [code]true[/code], control's anchors will be updated instead of offsets.
</description>
</method>
<method name="set_offset">
@@ -904,7 +906,7 @@
<param index="0" name="side" type="int" enum="Side" />
<param index="1" name="offset" type="float" />
<description>
- Sets the offset for the specified [enum Side] to [code]offset[/code]. A setter method for [member offset_bottom], [member offset_left], [member offset_right] and [member offset_top].
+ Sets the offset for the specified [enum Side] to [param offset]. A setter method for [member offset_bottom], [member offset_left], [member offset_right] and [member offset_top].
</description>
</method>
<method name="set_offsets_preset">
@@ -913,9 +915,9 @@
<param index="1" name="resize_mode" type="int" enum="Control.LayoutPresetMode" default="0" />
<param index="2" name="margin" type="int" default="0" />
<description>
- Sets the offsets to a [code]preset[/code] from [enum Control.LayoutPreset] enum. This is the code equivalent to using the Layout menu in the 2D editor.
- Use parameter [code]resize_mode[/code] with constants from [enum Control.LayoutPresetMode] to better determine the resulting size of the [Control]. Constant size will be ignored if used with presets that change size, e.g. [code]PRESET_LEFT_WIDE[/code].
- Use parameter [code]margin[/code] to determine the gap between the [Control] and the edges.
+ Sets the offsets to a [param preset] from [enum Control.LayoutPreset] enum. This is the code equivalent to using the Layout menu in the 2D editor.
+ Use parameter [param resize_mode] with constants from [enum Control.LayoutPresetMode] to better determine the resulting size of the [Control]. Constant size will be ignored if used with presets that change size, e.g. [constant PRESET_LEFT_WIDE].
+ Use parameter [param margin] to determine the gap between the [Control] and the edges.
</description>
</method>
<method name="set_position">
@@ -923,8 +925,8 @@
<param index="0" name="position" type="Vector2" />
<param index="1" name="keep_offsets" type="bool" default="false" />
<description>
- Sets the [member position] to given [code]position[/code].
- If [code]keep_offsets[/code] is [code]true[/code], control's anchors will be updated instead of offsets.
+ Sets the [member position] to given [param position].
+ If [param keep_offsets] is [code]true[/code], control's anchors will be updated instead of offsets.
</description>
</method>
<method name="set_size">
@@ -933,7 +935,7 @@
<param index="1" name="keep_offsets" type="bool" default="false" />
<description>
Sets the size (see [member size]).
- If [code]keep_offsets[/code] is [code]true[/code], control's anchors will be updated instead of offsets.
+ If [param keep_offsets] is [code]true[/code], control's anchors will be updated instead of offsets.
</description>
</method>
<method name="update_minimum_size">
@@ -946,7 +948,7 @@
<return type="void" />
<param index="0" name="position" type="Vector2" />
<description>
- Moves the mouse cursor to [code]position[/code], relative to [member position] of this [Control].
+ Moves the mouse cursor to [param position], relative to [member position] of this [Control].
</description>
</method>
</methods>
@@ -974,30 +976,30 @@
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="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.
+ 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, gamepad, and mouse signals.
</member>
<member name="focus_neighbor_bottom" 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 down arrow on the keyboard or down on a gamepad by default. You can change the key by editing the [code]ui_down[/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 focus to if the user presses the down arrow on the keyboard or down on a gamepad by default. You can change the key by editing the [member ProjectSettings.input/ui_down] 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_left" 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 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.
+ Tells Godot which node it should give 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 [member ProjectSettings.input/ui_left] 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 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 [member ProjectSettings.input/ui_right] 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.
+ Tells Godot which node it should give 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 [member ProjectSettings.input/ui_up] 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_next" type="NodePath" setter="set_focus_next" getter="get_focus_next" default="NodePath(&quot;&quot;)">
- Tells Godot which node it should give keyboard focus to if the user presses [kbd]Tab[/kbd] on a keyboard by default. You can change the key by editing the [code]ui_focus_next[/code] input action.
+ Tells Godot which node it should give focus to if the user presses [kbd]Tab[/kbd] on a keyboard by default. You can change the key by editing the [member ProjectSettings.input/ui_focus_next] input action.
If this property is not set, Godot will select a "best guess" based on surrounding nodes in the scene tree.
</member>
<member name="focus_previous" type="NodePath" setter="set_focus_previous" getter="get_focus_previous" default="NodePath(&quot;&quot;)">
- Tells Godot which node it should give keyboard focus to if the user presses [kbd]Shift + Tab[/kbd] on a keyboard by default. You can change the key by editing the [code]ui_focus_prev[/code] input action.
+ Tells Godot which node it should give focus to if the user presses [kbd]Shift + Tab[/kbd] on a keyboard by default. You can change the key by editing the [member ProjectSettings.input/ui_focus_prev] input action.
If this property is not set, Godot will select a "best guess" based on surrounding nodes in the scene tree.
</member>
<member name="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).
+ The node's global position, relative to the world (usually to the [CanvasLayer]).
</member>
<member name="grow_horizontal" type="int" setter="set_h_grow_direction" getter="get_h_grow_direction" enum="Control.GrowDirection" default="1">
Controls the direction on the horizontal axis in which the control should grow if its horizontal minimum size is changed to be greater than its current size, as the control always has to be at least the minimum size.
@@ -1005,31 +1007,13 @@
<member name="grow_vertical" type="int" setter="set_v_grow_direction" getter="get_v_grow_direction" enum="Control.GrowDirection" default="1">
Controls the direction on the vertical axis in which the control should grow if its vertical minimum size is changed to be greater than its current size, as the control always has to be at least the minimum size.
</member>
- <member name="hint_tooltip" type="String" setter="set_tooltip" getter="_get_tooltip" default="&quot;&quot;">
- Changes the tooltip text. The tooltip appears when the user's mouse cursor stays idle over this control for a few moments, provided that the [member mouse_filter] property is not [constant MOUSE_FILTER_IGNORE]. You can change the time required for the tooltip to appear with [code]gui/timers/tooltip_delay_sec[/code] option in Project Settings.
- The tooltip popup will use either a default implementation, or a custom one that you can provide by overriding [method _make_custom_tooltip]. The default tooltip includes a [PopupPanel] and [Label] whose theme properties can be customized using [Theme] methods with the [code]"TooltipPanel"[/code] and [code]"TooltipLabel"[/code] respectively. For example:
- [codeblocks]
- [gdscript]
- var style_box = StyleBoxFlat.new()
- style_box.set_bg_color(Color(1, 1, 0))
- style_box.set_border_width_all(2)
- # We assume here that the `theme` property has been assigned a custom Theme beforehand.
- theme.set_stylebox("panel", "TooltipPanel", style_box)
- theme.set_color("font_color", "TooltipLabel", Color(0, 1, 1))
- [/gdscript]
- [csharp]
- var styleBox = new StyleBoxFlat();
- styleBox.SetBgColor(new Color(1, 1, 0));
- styleBox.SetBorderWidthAll(2);
- // We assume here that the `Theme` property has been assigned a custom Theme beforehand.
- Theme.SetStyleBox("panel", "TooltipPanel", styleBox);
- Theme.SetColor("font_color", "TooltipLabel", new Color(0, 1, 1));
- [/csharp]
- [/codeblocks]
- </member>
<member name="layout_direction" type="int" setter="set_layout_direction" getter="get_layout_direction" enum="Control.LayoutDirection" default="0">
Controls layout direction and text writing direction. Right-to-left layouts are necessary for certain languages (e.g. Arabic and Hebrew).
</member>
+ <member name="localize_numeral_system" type="bool" setter="set_localize_numeral_system" getter="is_localizing_numeral_system" default="true">
+ If [code]true[/code], automatically converts code line numbers, list indices, [SpinBox] and [ProgressBar] values from the Western Arabic (0..9) to the numeral systems used in current locale.
+ [b]Note:[/b] Numbers within the text are not automatically converted, it can be done manually, using [method TextServer.format_number].
+ </member>
<member name="mouse_default_cursor_shape" type="int" setter="set_default_cursor_shape" getter="get_default_cursor_shape" enum="Control.CursorShape" default="0">
The default cursor shape for this control. Useful for Godot plugins and applications or games that use the system's mouse cursors.
[b]Note:[/b] On Linux, shapes may vary depending on the cursor theme of the system.
@@ -1039,7 +1023,7 @@
</member>
<member name="mouse_force_pass_scroll_events" type="bool" setter="set_force_pass_scroll_events" getter="is_force_pass_scroll_events" default="true">
When enabled, scroll wheel events processed by [method _gui_input] will be passed to the parent control even if [member mouse_filter] is set to [constant MOUSE_FILTER_STOP]. As it defaults to true, this allows nested scrollable containers to work out of the box.
- You should disable it on the root of your UI if you do not want scroll events to go to the [code]_unhandled_input[/code] processing.
+ You should disable it on the root of your UI if you do not want scroll events to go to the [method Node._unhandled_input] processing.
</member>
<member name="offset_bottom" type="float" setter="set_offset" getter="get_offset" default="0.0">
Distance between the node's bottom edge and its parent control, based on [member anchor_bottom].
@@ -1067,10 +1051,13 @@
The node's rotation around its pivot, in radians. See [member pivot_offset] to change the pivot's position.
</member>
<member name="scale" type="Vector2" setter="set_scale" getter="get_scale" default="Vector2(1, 1)">
- The node's scale, relative to its [member size]. Change this property to scale the node around its [member 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=$DOCS_URL/tutorials/viewports/multiple_resolutions.html]documentation[/url] instead of scaling Controls individually.
+ The node's scale, relative to its [member size]. Change this property to scale the node around its [member pivot_offset]. The Control's [member tooltip_text] 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=$DOCS_URL/tutorials/rendering/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 instantiated. To set the Control's scale when it's instantiated, wait for one frame using [code]await get_tree().process_frame[/code] then set its [member scale] property.
</member>
+ <member name="shortcut_context" type="Node" setter="set_shortcut_context" getter="get_shortcut_context">
+ The [Node] which must be a parent of the focused [Control] for the shortcut to be activated. If [code]null[/code], the shortcut can be activated when any control is focused (a global shortcut). This allows shortcuts to be accepted only when the user has a certain area of the GUI focused.
+ </member>
<member name="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>
@@ -1092,16 +1079,38 @@
[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>
+ <member name="tooltip_text" type="String" setter="set_tooltip_text" getter="get_tooltip_text" default="&quot;&quot;">
+ The default tooltip text. The tooltip appears when the user's mouse cursor stays idle over this control for a few moments, provided that the [member mouse_filter] property is not [constant MOUSE_FILTER_IGNORE]. The time required for the tooltip to appear can be changed with the [member ProjectSettings.gui/timers/tooltip_delay_sec] option. See also [method get_tooltip].
+ The tooltip popup will use either a default implementation, or a custom one that you can provide by overriding [method _make_custom_tooltip]. The default tooltip includes a [PopupPanel] and [Label] whose theme properties can be customized using [Theme] methods with the [code]"TooltipPanel"[/code] and [code]"TooltipLabel"[/code] respectively. For example:
+ [codeblocks]
+ [gdscript]
+ var style_box = StyleBoxFlat.new()
+ style_box.set_bg_color(Color(1, 1, 0))
+ style_box.set_border_width_all(2)
+ # We assume here that the `theme` property has been assigned a custom Theme beforehand.
+ theme.set_stylebox("panel", "TooltipPanel", style_box)
+ theme.set_color("font_color", "TooltipLabel", Color(0, 1, 1))
+ [/gdscript]
+ [csharp]
+ var styleBox = new StyleBoxFlat();
+ styleBox.SetBgColor(new Color(1, 1, 0));
+ styleBox.SetBorderWidthAll(2);
+ // We assume here that the `Theme` property has been assigned a custom Theme beforehand.
+ Theme.SetStyleBox("panel", "TooltipPanel", styleBox);
+ Theme.SetColor("font_color", "TooltipLabel", new Color(0, 1, 1));
+ [/csharp]
+ [/codeblocks]
+ </member>
</members>
<signals>
<signal name="focus_entered">
<description>
- Emitted when the node gains keyboard focus.
+ Emitted when the node gains focus.
</description>
</signal>
<signal name="focus_exited">
<description>
- Emitted when the node loses keyboard focus.
+ Emitted when the node loses focus.
</description>
</signal>
<signal name="gui_input">
@@ -1145,6 +1154,7 @@
</signal>
<signal name="theme_changed">
<description>
+ Emitted when the [constant NOTIFICATION_THEME_CHANGED] notification is sent.
</description>
</signal>
</signals>
@@ -1156,7 +1166,7 @@
The node can only grab focus on mouse clicks. Use with [member focus_mode].
</constant>
<constant name="FOCUS_ALL" value="2" enum="FocusMode">
- The node can grab focus on mouse click or using the arrows and the Tab keys on the keyboard. Use with [member focus_mode].
+ The node can grab focus on mouse click, using the arrows and the Tab keys on the keyboard, or using the D-pad buttons on a gamepad. Use with [member focus_mode].
</constant>
<constant name="NOTIFICATION_RESIZED" value="40">
Sent when the node changes size. Use [member size] to get the new size.
@@ -1174,7 +1184,12 @@
Sent when the node loses focus.
</constant>
<constant name="NOTIFICATION_THEME_CHANGED" value="45">
- Sent when the node's [member theme] changes, right before Godot redraws the control. Happens when you call one of the [code]add_theme_*_override[/code] methods.
+ Sent when the node needs to refresh its theme items. This happens in one of the following cases:
+ - The [member theme] property is changed on this node or any of its ancestors.
+ - The [member theme_type_variation] property is changed on this node.
+ - One of the node's theme property overrides is changed.
+ - The node enters the scene tree.
+ [b]Note:[/b] As an optimization, this notification won't be sent from changes that occur while this node is outside of the scene tree. Instead, all of the theme item updates can be applied at once when the node enters the scene tree.
</constant>
<constant name="NOTIFICATION_SCROLL_BEGIN" value="47">
Sent when this node is inside a [ScrollContainer] which has begun being scrolled.
@@ -1319,7 +1334,7 @@
The control will receive mouse button input events through [method _gui_input] if clicked on. And the control will receive the [signal mouse_entered] and [signal mouse_exited] signals. These events are automatically marked as handled, and they will not propagate further to other controls. This also results in blocking signals in other controls.
</constant>
<constant name="MOUSE_FILTER_PASS" value="1" enum="MouseFilter">
- The control will receive mouse button input events through [method _gui_input] if clicked on. And the control will receive the [signal mouse_entered] and [signal mouse_exited] signals. If this control does not handle the event, the parent control (if any) will be considered, and so on until there is no more parent control to potentially handle it. This also allows signals to fire in other controls. If no control handled it, the event will be passed to `_unhandled_input` for further processing.
+ The control will receive mouse button input events through [method _gui_input] if clicked on. And the control will receive the [signal mouse_entered] and [signal mouse_exited] signals. If this control does not handle the event, the parent control (if any) will be considered, and so on until there is no more parent control to potentially handle it. This also allows signals to fire in other controls. If no control handled it, the event will be passed to [method Node._unhandled_input] for further processing.
</constant>
<constant name="MOUSE_FILTER_IGNORE" value="2" enum="MouseFilter">
The control will not receive mouse button input events through [method _gui_input]. The control will also not receive the [signal mouse_entered] nor [signal mouse_exited] signals. This will not block other controls from receiving these events or firing the signals. Ignored events will not be handled automatically.
diff --git a/doc/classes/Crypto.xml b/doc/classes/Crypto.xml
index ed5b642f90..ade63225dc 100644
--- a/doc/classes/Crypto.xml
+++ b/doc/classes/Crypto.xml
@@ -86,7 +86,7 @@
<param index="0" name="key" type="CryptoKey" />
<param index="1" name="ciphertext" type="PackedByteArray" />
<description>
- Decrypt the given [code]ciphertext[/code] with the provided private [code]key[/code].
+ Decrypt the given [param ciphertext] with the provided private [param key].
[b]Note:[/b] The maximum size of accepted ciphertext is limited by the key size.
</description>
</method>
@@ -95,7 +95,7 @@
<param index="0" name="key" type="CryptoKey" />
<param index="1" name="plaintext" type="PackedByteArray" />
<description>
- Encrypt the given [code]plaintext[/code] with the provided public [code]key[/code].
+ Encrypt the given [param plaintext] with the provided public [param key].
[b]Note:[/b] The maximum size of accepted plaintext is limited by the key size.
</description>
</method>
@@ -103,14 +103,14 @@
<return type="PackedByteArray" />
<param index="0" name="size" type="int" />
<description>
- Generates a [PackedByteArray] of cryptographically secure random bytes with given [code]size[/code].
+ Generates a [PackedByteArray] of cryptographically secure random bytes with given [param size].
</description>
</method>
<method name="generate_rsa">
<return type="CryptoKey" />
<param index="0" name="size" type="int" />
<description>
- Generates an RSA [CryptoKey] that can be used for creating self-signed certificates and passed to [method StreamPeerSSL.accept_stream].
+ Generates an RSA [CryptoKey] that can be used for creating self-signed certificates and passed to [method StreamPeerTLS.accept_stream].
</description>
</method>
<method name="generate_self_signed_certificate">
@@ -120,7 +120,7 @@
<param index="2" name="not_before" type="String" default="&quot;20140101000000&quot;" />
<param index="3" name="not_after" type="String" default="&quot;20340101000000&quot;" />
<description>
- Generates a self-signed [X509Certificate] from the given [CryptoKey] and [code]issuer_name[/code]. The certificate validity will be defined by [code]not_before[/code] and [code]not_after[/code] (first valid date and last valid date). The [code]issuer_name[/code] must contain at least "CN=" (common name, i.e. the domain name), "O=" (organization, i.e. your company name), "C=" (country, i.e. 2 lettered ISO-3166 code of the country the organization is based in).
+ Generates a self-signed [X509Certificate] from the given [CryptoKey] and [param issuer_name]. The certificate validity will be defined by [param not_before] and [param not_after] (first valid date and last valid date). The [param issuer_name] must contain at least "CN=" (common name, i.e. the domain name), "O=" (organization, i.e. your company name), "C=" (country, i.e. 2 lettered ISO-3166 code of the country the organization is based in).
A small example to generate an RSA key and a X509 self-signed certificate.
[codeblocks]
[gdscript]
@@ -146,7 +146,7 @@
<param index="1" name="key" type="PackedByteArray" />
<param index="2" name="msg" type="PackedByteArray" />
<description>
- Generates an [url=https://en.wikipedia.org/wiki/HMAC]HMAC[/url] digest of [code]msg[/code] using [code]key[/code]. The [code]hash_type[/code] parameter is the hashing algorithm that is used for the inner and outer hashes.
+ Generates an [url=https://en.wikipedia.org/wiki/HMAC]HMAC[/url] digest of [param msg] using [param key]. The [param hash_type] parameter is the hashing algorithm that is used for the inner and outer hashes.
Currently, only [constant HashingContext.HASH_SHA256] and [constant HashingContext.HASH_SHA1] are supported.
</description>
</method>
@@ -156,7 +156,7 @@
<param index="1" name="hash" type="PackedByteArray" />
<param index="2" name="key" type="CryptoKey" />
<description>
- Sign a given [code]hash[/code] of type [code]hash_type[/code] with the provided private [code]key[/code].
+ Sign a given [param hash] of type [param hash_type] with the provided private [param key].
</description>
</method>
<method name="verify">
@@ -166,7 +166,7 @@
<param index="2" name="signature" type="PackedByteArray" />
<param index="3" name="key" type="CryptoKey" />
<description>
- Verify that a given [code]signature[/code] for [code]hash[/code] of type [code]hash_type[/code] against the provided public [code]key[/code].
+ Verify that a given [param signature] for [param hash] of type [param hash_type] against the provided public [param key].
</description>
</method>
</methods>
diff --git a/doc/classes/CryptoKey.xml b/doc/classes/CryptoKey.xml
index 4859e182fe..7db810177f 100644
--- a/doc/classes/CryptoKey.xml
+++ b/doc/classes/CryptoKey.xml
@@ -5,7 +5,7 @@
</brief_description>
<description>
The CryptoKey class represents a cryptographic key. Keys can be loaded and saved like any other [Resource].
- They can be used to generate a self-signed [X509Certificate] via [method Crypto.generate_self_signed_certificate] and as private key in [method StreamPeerSSL.accept_stream] along with the appropriate certificate.
+ They can be used to generate a self-signed [X509Certificate] via [method Crypto.generate_self_signed_certificate] and as private key in [method StreamPeerTLS.accept_stream] along with the appropriate certificate.
</description>
<tutorials>
</tutorials>
@@ -21,8 +21,8 @@
<param index="0" name="path" type="String" />
<param index="1" name="public_only" type="bool" default="false" />
<description>
- Loads a key from [code]path[/code]. If [code]public_only[/code] is [code]true[/code], only the public key will be loaded.
- [b]Note:[/b] [code]path[/code] should be a "*.pub" file if [code]public_only[/code] is [code]true[/code], a "*.key" file otherwise.
+ Loads a key from [param path]. If [param public_only] is [code]true[/code], only the public key will be loaded.
+ [b]Note:[/b] [param path] should be a "*.pub" file if [param public_only] is [code]true[/code], a "*.key" file otherwise.
</description>
</method>
<method name="load_from_string">
@@ -30,7 +30,7 @@
<param index="0" name="string_key" type="String" />
<param index="1" name="public_only" type="bool" default="false" />
<description>
- Loads a key from the given [code]string[/code]. If [code]public_only[/code] is [code]true[/code], only the public key will be loaded.
+ Loads a key from the given [param string_key]. If [param public_only] is [code]true[/code], only the public key will be loaded.
</description>
</method>
<method name="save">
@@ -38,15 +38,15 @@
<param index="0" name="path" type="String" />
<param index="1" name="public_only" type="bool" default="false" />
<description>
- Saves a key to the given [code]path[/code]. If [code]public_only[/code] is [code]true[/code], only the public key will be saved.
- [b]Note:[/b] [code]path[/code] should be a "*.pub" file if [code]public_only[/code] is [code]true[/code], a "*.key" file otherwise.
+ Saves a key to the given [param path]. If [param public_only] is [code]true[/code], only the public key will be saved.
+ [b]Note:[/b] [param path] should be a "*.pub" file if [param public_only] is [code]true[/code], a "*.key" file otherwise.
</description>
</method>
<method name="save_to_string">
<return type="String" />
<param index="0" name="public_only" type="bool" default="false" />
<description>
- Returns a string containing the key in PEM format. If [code]public_only[/code] is [code]true[/code], only the public key will be included.
+ Returns a string containing the key in PEM format. If [param public_only] is [code]true[/code], only the public key will be included.
</description>
</method>
</methods>
diff --git a/doc/classes/Cubemap.xml b/doc/classes/Cubemap.xml
index 7173388027..46ddede9b1 100644
--- a/doc/classes/Cubemap.xml
+++ b/doc/classes/Cubemap.xml
@@ -4,9 +4,10 @@
6-sided texture typically used in 3D rendering.
</brief_description>
<description>
- A cubemap is a 6-sided texture typically used for faking reflections in 3D rendering. It can be used to make an object look as if it's reflecting its surroundings. This usually delivers much better performance than other reflection methods.
- This resource is typically used as a uniform in custom shaders. Few core Godot methods make use of Cubemap resources.
- [b]Note:[/b] Godot doesn't support using cubemaps as a [PanoramaSkyMaterial]. You can use [url=https://danilw.github.io/GLSL-howto/cubemap_to_panorama_js/cubemap_to_panorama.html]this tool[/url] to convert a cube map to an equirectangular sky map.
+ A cubemap is made of 6 textures organized in layers. They are typically used for faking reflections in 3D rendering (see [ReflectionProbe]). It can be used to make an object look as if it's reflecting its surroundings. This usually delivers much better performance than other reflection methods.
+ This resource is typically used as a uniform in custom shaders. Few core Godot methods make use of [Cubemap] resources.
+ To create such a texture file yourself, reimport your image files using the Godot Editor import presets.
+ [b]Note:[/b] Godot doesn't support using cubemaps in a [PanoramaSkyMaterial]. You can use [url=https://danilw.github.io/GLSL-howto/cubemap_to_panorama_js/cubemap_to_panorama.html]this tool[/url] to convert a cubemap to an equirectangular sky map.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/CubemapArray.xml b/doc/classes/CubemapArray.xml
index 4fca842b5a..2fd55b66c6 100644
--- a/doc/classes/CubemapArray.xml
+++ b/doc/classes/CubemapArray.xml
@@ -1,8 +1,14 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="CubemapArray" inherits="ImageTextureLayered" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
+ A single composite texture resource which consists of multiple [Cubemap]s.
</brief_description>
<description>
+ [CubemapArray]s are made of an array of [Cubemap]s. Accordingly, like [Cubemap]s they are made of multiple textures the amount of which must be divisible by 6 (one image for each face of the cube). The primary benefit of [CubemapArray]s is that they can be accessed in shader code using a single texture reference. In other words, you can pass multiple [Cubemap]s into a shader using a single [CubemapArray].
+ Generally, [CubemapArray]s provide a more efficient way for storing multiple [Cubemap]s compared to storing multiple [Cubemap]s themselves in an array.
+ Internally, Godot uses [CubemapArray]s for many effects including the [Sky], if you set [member ProjectSettings.rendering/reflections/sky_reflections/texture_array_reflections] to [code]true[/code].
+ To create such a texture file yourself, reimport your image files using the Godot Editor import presets.
+ [b]Note:[/b] [CubemapArray] is not supported in the OpenGL 3 rendering backend.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/Curve.xml b/doc/classes/Curve.xml
index ca6c92f2aa..d5864f30fa 100644
--- a/doc/classes/Curve.xml
+++ b/doc/classes/Curve.xml
@@ -30,7 +30,7 @@
<method name="clean_dupes">
<return type="void" />
<description>
- Removes points that are closer than [code]CMP_EPSILON[/code] (0.00001) units to their neighbor on the curve.
+ Removes duplicate points, i.e. points that are less than 0.00001 units (engine epsilon value) away from their neighbor on the curve.
</description>
</method>
<method name="clear_points">
@@ -43,56 +43,56 @@
<return type="int" enum="Curve.TangentMode" />
<param index="0" name="index" type="int" />
<description>
- Returns the left [enum TangentMode] for the point at [code]index[/code].
+ Returns the left [enum TangentMode] for the point at [param index].
</description>
</method>
<method name="get_point_left_tangent" qualifiers="const">
<return type="float" />
<param index="0" name="index" type="int" />
<description>
- Returns the left tangent angle (in degrees) for the point at [code]index[/code].
+ Returns the left tangent angle (in degrees) for the point at [param index].
</description>
</method>
<method name="get_point_position" qualifiers="const">
<return type="Vector2" />
<param index="0" name="index" type="int" />
<description>
- Returns the curve coordinates for the point at [code]index[/code].
+ Returns the curve coordinates for the point at [param index].
</description>
</method>
<method name="get_point_right_mode" qualifiers="const">
<return type="int" enum="Curve.TangentMode" />
<param index="0" name="index" type="int" />
<description>
- Returns the right [enum TangentMode] for the point at [code]index[/code].
+ Returns the right [enum TangentMode] for the point at [param index].
</description>
</method>
<method name="get_point_right_tangent" qualifiers="const">
<return type="float" />
<param index="0" name="index" type="int" />
<description>
- Returns the right tangent angle (in degrees) for the point at [code]index[/code].
+ Returns the right tangent angle (in degrees) for the point at [param index].
</description>
</method>
- <method name="interpolate" qualifiers="const">
- <return type="float" />
- <param index="0" name="offset" type="float" />
+ <method name="remove_point">
+ <return type="void" />
+ <param index="0" name="index" type="int" />
<description>
- Returns the Y value for the point that would exist at the X position [code]offset[/code] along the curve.
+ Removes the point at [code]index[/code] from the curve.
</description>
</method>
- <method name="interpolate_baked" qualifiers="const">
+ <method name="sample" qualifiers="const">
<return type="float" />
<param index="0" name="offset" type="float" />
<description>
- Returns the Y value for the point that would exist at the X position [code]offset[/code] along the curve using the baked cache. Bakes the curve's points if not already baked.
+ Returns the Y value for the point that would exist at the X position [param offset] along the curve.
</description>
</method>
- <method name="remove_point">
- <return type="void" />
- <param index="0" name="index" type="int" />
+ <method name="sample_baked" qualifiers="const">
+ <return type="float" />
+ <param index="0" name="offset" type="float" />
<description>
- Removes the point at [code]index[/code] from the curve.
+ Returns the Y value for the point that would exist at the X position [param offset] along the curve using the baked cache. Bakes the curve's points if not already baked.
</description>
</method>
<method name="set_point_left_mode">
@@ -100,7 +100,7 @@
<param index="0" name="index" type="int" />
<param index="1" name="mode" type="int" enum="Curve.TangentMode" />
<description>
- Sets the left [enum TangentMode] for the point at [code]index[/code] to [code]mode[/code].
+ Sets the left [enum TangentMode] for the point at [param index] to [param mode].
</description>
</method>
<method name="set_point_left_tangent">
@@ -108,7 +108,7 @@
<param index="0" name="index" type="int" />
<param index="1" name="tangent" type="float" />
<description>
- Sets the left tangent angle for the point at [code]index[/code] to [code]tangent[/code].
+ Sets the left tangent angle for the point at [param index] to [param tangent].
</description>
</method>
<method name="set_point_offset">
@@ -124,7 +124,7 @@
<param index="0" name="index" type="int" />
<param index="1" name="mode" type="int" enum="Curve.TangentMode" />
<description>
- Sets the right [enum TangentMode] for the point at [code]index[/code] to [code]mode[/code].
+ Sets the right [enum TangentMode] for the point at [param index] to [param mode].
</description>
</method>
<method name="set_point_right_tangent">
@@ -132,7 +132,7 @@
<param index="0" name="index" type="int" />
<param index="1" name="tangent" type="float" />
<description>
- Sets the right tangent angle for the point at [code]index[/code] to [code]tangent[/code].
+ Sets the right tangent angle for the point at [param index] to [param tangent].
</description>
</method>
<method name="set_point_value">
@@ -140,7 +140,7 @@
<param index="0" name="index" type="int" />
<param index="1" name="y" type="float" />
<description>
- Assigns the vertical position [code]y[/code] to the point at [code]index[/code].
+ Assigns the vertical position [param y] to the point at [param index].
</description>
</method>
</methods>
diff --git a/doc/classes/Curve2D.xml b/doc/classes/Curve2D.xml
index 09e6e23410..ccdf085319 100644
--- a/doc/classes/Curve2D.xml
+++ b/doc/classes/Curve2D.xml
@@ -15,10 +15,10 @@
<param index="0" name="position" type="Vector2" />
<param index="1" name="in" type="Vector2" default="Vector2(0, 0)" />
<param index="2" name="out" type="Vector2" default="Vector2(0, 0)" />
- <param index="3" name="at_position" type="int" default="-1" />
+ <param index="3" name="index" type="int" default="-1" />
<description>
- Adds a point to a curve at [code]position[/code] relative to the [Curve2D]'s position, with control points [code]in[/code] and [code]out[/code].
- If [code]at_position[/code] is given, the point is inserted before the point number [code]at_position[/code], moving that point (and every point after) after the inserted point. If [code]at_position[/code] is not given, or is an illegal value ([code]at_position &lt;0[/code] or [code]at_position &gt;= [method get_point_count][/code]), the point will be appended at the end of the point list.
+ Adds a point with the specified [param position] relative to the curve's own position, with control points [param in] and [param out]. Appends the new point at the end of the point list.
+ If [param index] is given, the new point is inserted before the existing point identified by index [param index]. Every existing point starting from [param index] is shifted further down the list of points. The index must be greater than or equal to [code]0[/code] and must not exceed the number of existing points in the line. See [member point_count].
</description>
</method>
<method name="clear_points">
@@ -43,70 +43,86 @@
<return type="float" />
<param index="0" name="to_point" type="Vector2" />
<description>
- Returns the closest offset to [code]to_point[/code]. This offset is meant to be used in [method interpolate_baked].
- [code]to_point[/code] must be in this curve's local space.
+ Returns the closest offset to [param to_point]. This offset is meant to be used in [method sample_baked].
+ [param to_point] must be in this curve's local space.
</description>
</method>
<method name="get_closest_point" qualifiers="const">
<return type="Vector2" />
<param index="0" name="to_point" type="Vector2" />
<description>
- Returns the closest baked point (in curve's local space) to [code]to_point[/code].
- [code]to_point[/code] must be in this curve's local space.
+ Returns the closest baked point (in curve's local space) to [param to_point].
+ [param to_point] must be in this curve's local space.
</description>
</method>
<method name="get_point_in" qualifiers="const">
<return type="Vector2" />
<param index="0" name="idx" type="int" />
<description>
- Returns the position of the control point leading to the vertex [code]idx[/code]. The returned position is relative to the vertex [code]idx[/code]. If the index is out of bounds, the function sends an error to the console, and returns [code](0, 0)[/code].
+ Returns the position of the control point leading to the vertex [param idx]. The returned position is relative to the vertex [param idx]. If the index is out of bounds, the function sends an error to the console, and returns [code](0, 0)[/code].
</description>
</method>
<method name="get_point_out" qualifiers="const">
<return type="Vector2" />
<param index="0" name="idx" type="int" />
<description>
- Returns the position of the control point leading out of the vertex [code]idx[/code]. The returned position is relative to the vertex [code]idx[/code]. If the index is out of bounds, the function sends an error to the console, and returns [code](0, 0)[/code].
+ Returns the position of the control point leading out of the vertex [param idx]. The returned position is relative to the vertex [param idx]. If the index is out of bounds, the function sends an error to the console, and returns [code](0, 0)[/code].
</description>
</method>
<method name="get_point_position" qualifiers="const">
<return type="Vector2" />
<param index="0" name="idx" type="int" />
<description>
- Returns the position of the vertex [code]idx[/code]. If the index is out of bounds, the function sends an error to the console, and returns [code](0, 0)[/code].
+ Returns the position of the vertex [param idx]. If the index is out of bounds, the function sends an error to the console, and returns [code](0, 0)[/code].
</description>
</method>
- <method name="interpolate" qualifiers="const">
+ <method name="remove_point">
+ <return type="void" />
+ <param index="0" name="idx" type="int" />
+ <description>
+ Deletes the point [code]idx[/code] from the curve. Sends an error to the console if [code]idx[/code] is out of bounds.
+ </description>
+ </method>
+ <method name="sample" qualifiers="const">
<return type="Vector2" />
<param index="0" name="idx" type="int" />
<param index="1" name="t" type="float" />
<description>
- Returns the position between the vertex [code]idx[/code] and the vertex [code]idx + 1[/code], where [code]t[/code] controls if the point is the first vertex ([code]t = 0.0[/code]), the last vertex ([code]t = 1.0[/code]), or in between. Values of [code]t[/code] outside the range ([code]0.0 &gt;= t &lt;=1[/code]) give strange, but predictable results.
- If [code]idx[/code] is out of bounds it is truncated to the first or last vertex, and [code]t[/code] is ignored. If the curve has no points, the function sends an error to the console, and returns [code](0, 0)[/code].
+ Returns the position between the vertex [param idx] and the vertex [code]idx + 1[/code], where [param t] controls if the point is the first vertex ([code]t = 0.0[/code]), the last vertex ([code]t = 1.0[/code]), or in between. Values of [param t] outside the range ([code]0.0 &gt;= t &lt;=1[/code]) give strange, but predictable results.
+ If [param idx] is out of bounds it is truncated to the first or last vertex, and [param t] is ignored. If the curve has no points, the function sends an error to the console, and returns [code](0, 0)[/code].
</description>
</method>
- <method name="interpolate_baked" qualifiers="const">
+ <method name="sample_baked" qualifiers="const">
<return type="Vector2" />
<param index="0" name="offset" type="float" />
<param index="1" name="cubic" type="bool" default="false" />
<description>
- Returns a point within the curve at position [code]offset[/code], where [code]offset[/code] is measured as a pixel distance along the curve.
- To do that, it finds the two cached points where the [code]offset[/code] lies between, then interpolates the values. This interpolation is cubic if [code]cubic[/code] is set to [code]true[/code], or linear if set to [code]false[/code].
+ Returns a point within the curve at position [param offset], where [param offset] is measured as a pixel distance along the curve.
+ To do that, it finds the two cached points where the [param offset] lies between, then interpolates the values. This interpolation is cubic if [param cubic] is set to [code]true[/code], or linear if set to [code]false[/code].
Cubic interpolation tends to follow the curves better, but linear is faster (and often, precise enough).
</description>
</method>
- <method name="interpolatef" qualifiers="const">
- <return type="Vector2" />
- <param index="0" name="fofs" type="float" />
+ <method name="sample_baked_with_rotation" qualifiers="const">
+ <return type="Transform2D" />
+ <param index="0" name="offset" type="float" />
+ <param index="1" name="cubic" type="bool" default="false" />
+ <param index="2" name="loop" type="bool" default="true" />
+ <param index="3" name="lookahead" type="float" default="4.0" />
<description>
- Returns the position at the vertex [code]fofs[/code]. It calls [method interpolate] using the integer part of [code]fofs[/code] as [code]idx[/code], and its fractional part as [code]t[/code].
+ Similar to [method sample_baked], but returns [Transform2D] that includes a rotation along the curve. Returns empty transform if length of the curve is [code]0[/code].
+ Use [param loop] to smooth the tangent at the end of the curve. [param lookahead] defines the distance to a nearby point for calculating the tangent vector.
+ [codeblock]
+ var transform = curve.sample_baked_with_rotation(offset)
+ position = transform.get_origin()
+ rotation = transform.get_rotation()
+ [/codeblock]
</description>
</method>
- <method name="remove_point">
- <return type="void" />
- <param index="0" name="idx" type="int" />
+ <method name="samplef" qualifiers="const">
+ <return type="Vector2" />
+ <param index="0" name="fofs" type="float" />
<description>
- Deletes the point [code]idx[/code] from the curve. Sends an error to the console if [code]idx[/code] is out of bounds.
+ Returns the position at the vertex [param fofs]. It calls [method sample] using the integer part of [param fofs] as [code]idx[/code], and its fractional part as [code]t[/code].
</description>
</method>
<method name="set_point_in">
@@ -114,7 +130,7 @@
<param index="0" name="idx" type="int" />
<param index="1" name="position" type="Vector2" />
<description>
- Sets the position of the control point leading to the vertex [code]idx[/code]. If the index is out of bounds, the function sends an error to the console. The position is relative to the vertex.
+ Sets the position of the control point leading to the vertex [param idx]. If the index is out of bounds, the function sends an error to the console. The position is relative to the vertex.
</description>
</method>
<method name="set_point_out">
@@ -122,7 +138,7 @@
<param index="0" name="idx" type="int" />
<param index="1" name="position" type="Vector2" />
<description>
- Sets the position of the control point leading out of the vertex [code]idx[/code]. If the index is out of bounds, the function sends an error to the console. The position is relative to the vertex.
+ Sets the position of the control point leading out of the vertex [param idx]. If the index is out of bounds, the function sends an error to the console. The position is relative to the vertex.
</description>
</method>
<method name="set_point_position">
@@ -130,7 +146,7 @@
<param index="0" name="idx" type="int" />
<param index="1" name="position" type="Vector2" />
<description>
- Sets the position for the vertex [code]idx[/code]. If the index is out of bounds, the function sends an error to the console.
+ Sets the position for the vertex [param idx]. If the index is out of bounds, the function sends an error to the console.
</description>
</method>
<method name="tessellate" qualifiers="const">
@@ -140,8 +156,8 @@
<description>
Returns a list of points along the curve, with a curvature controlled point density. That is, the curvier parts will have more points than the straighter parts.
This approximation makes straight segments between each point, then subdivides those segments until the resulting shape is similar enough.
- [code]max_stages[/code] controls how many subdivisions a curve segment may face before it is considered approximate enough. Each subdivision splits the segment in half, so the default 5 stages may mean up to 32 subdivisions per curve segment. Increase with care!
- [code]tolerance_degrees[/code] controls how many degrees the midpoint of a segment may deviate from the real curve, before the segment has to be subdivided.
+ [param max_stages] controls how many subdivisions a curve segment may face before it is considered approximate enough. Each subdivision splits the segment in half, so the default 5 stages may mean up to 32 subdivisions per curve segment. Increase with care!
+ [param tolerance_degrees] controls how many degrees the midpoint of a segment may deviate from the real curve, before the segment has to be subdivided.
</description>
</method>
</methods>
diff --git a/doc/classes/Curve3D.xml b/doc/classes/Curve3D.xml
index 7115da8543..63134417b1 100644
--- a/doc/classes/Curve3D.xml
+++ b/doc/classes/Curve3D.xml
@@ -15,10 +15,10 @@
<param index="0" name="position" type="Vector3" />
<param index="1" name="in" type="Vector3" default="Vector3(0, 0, 0)" />
<param index="2" name="out" type="Vector3" default="Vector3(0, 0, 0)" />
- <param index="3" name="at_position" type="int" default="-1" />
+ <param index="3" name="index" type="int" default="-1" />
<description>
- Adds a point to a curve at [code]position[/code] relative to the [Curve3D]'s position, with control points [code]in[/code] and [code]out[/code].
- If [code]at_position[/code] is given, the point is inserted before the point number [code]at_position[/code], moving that point (and every point after) after the inserted point. If [code]at_position[/code] is not given, or is an illegal value ([code]at_position &lt;0[/code] or [code]at_position &gt;= [method get_point_count][/code]), the point will be appended at the end of the point list.
+ Adds a point with the specified [param position] relative to the curve's own position, with control points [param in] and [param out]. Appends the new point at the end of the point list.
+ If [param index] is given, the new point is inserted before the existing point identified by index [param index]. Every existing point starting from [param index] is shifted further down the list of points. The index must be greater than or equal to [code]0[/code] and must not exceed the number of existing points in the line. See [member point_count].
</description>
</method>
<method name="clear_points">
@@ -56,87 +56,96 @@
<return type="float" />
<param index="0" name="to_point" type="Vector3" />
<description>
- Returns the closest offset to [code]to_point[/code]. This offset is meant to be used in [method interpolate_baked] or [method interpolate_baked_up_vector].
- [code]to_point[/code] must be in this curve's local space.
+ Returns the closest offset to [param to_point]. This offset is meant to be used in [method sample_baked] or [method sample_baked_up_vector].
+ [param to_point] must be in this curve's local space.
</description>
</method>
<method name="get_closest_point" qualifiers="const">
<return type="Vector3" />
<param index="0" name="to_point" type="Vector3" />
<description>
- Returns the closest baked point (in curve's local space) to [code]to_point[/code].
- [code]to_point[/code] must be in this curve's local space.
+ Returns the closest baked point (in curve's local space) to [param to_point].
+ [param to_point] must be in this curve's local space.
</description>
</method>
<method name="get_point_in" qualifiers="const">
<return type="Vector3" />
<param index="0" name="idx" type="int" />
<description>
- Returns the position of the control point leading to the vertex [code]idx[/code]. The returned position is relative to the vertex [code]idx[/code]. If the index is out of bounds, the function sends an error to the console, and returns [code](0, 0, 0)[/code].
+ Returns the position of the control point leading to the vertex [param idx]. The returned position is relative to the vertex [param idx]. If the index is out of bounds, the function sends an error to the console, and returns [code](0, 0, 0)[/code].
</description>
</method>
<method name="get_point_out" qualifiers="const">
<return type="Vector3" />
<param index="0" name="idx" type="int" />
<description>
- Returns the position of the control point leading out of the vertex [code]idx[/code]. The returned position is relative to the vertex [code]idx[/code]. If the index is out of bounds, the function sends an error to the console, and returns [code](0, 0, 0)[/code].
+ Returns the position of the control point leading out of the vertex [param idx]. The returned position is relative to the vertex [param idx]. If the index is out of bounds, the function sends an error to the console, and returns [code](0, 0, 0)[/code].
</description>
</method>
<method name="get_point_position" qualifiers="const">
<return type="Vector3" />
<param index="0" name="idx" type="int" />
<description>
- Returns the position of the vertex [code]idx[/code]. If the index is out of bounds, the function sends an error to the console, and returns [code](0, 0, 0)[/code].
+ Returns the position of the vertex [param idx]. If the index is out of bounds, the function sends an error to the console, and returns [code](0, 0, 0)[/code].
</description>
</method>
<method name="get_point_tilt" qualifiers="const">
<return type="float" />
<param index="0" name="idx" type="int" />
<description>
- Returns the tilt angle in radians for the point [code]idx[/code]. If the index is out of bounds, the function sends an error to the console, and returns [code]0[/code].
+ Returns the tilt angle in radians for the point [param idx]. If the index is out of bounds, the function sends an error to the console, and returns [code]0[/code].
</description>
</method>
- <method name="interpolate" qualifiers="const">
+ <method name="remove_point">
+ <return type="void" />
+ <param index="0" name="idx" type="int" />
+ <description>
+ Deletes the point [code]idx[/code] from the curve. Sends an error to the console if [code]idx[/code] is out of bounds.
+ </description>
+ </method>
+ <method name="sample" qualifiers="const">
<return type="Vector3" />
<param index="0" name="idx" type="int" />
<param index="1" name="t" type="float" />
<description>
- Returns the position between the vertex [code]idx[/code] and the vertex [code]idx + 1[/code], where [code]t[/code] controls if the point is the first vertex ([code]t = 0.0[/code]), the last vertex ([code]t = 1.0[/code]), or in between. Values of [code]t[/code] outside the range ([code]0.0 &gt;= t &lt;=1[/code]) give strange, but predictable results.
- If [code]idx[/code] is out of bounds it is truncated to the first or last vertex, and [code]t[/code] is ignored. If the curve has no points, the function sends an error to the console, and returns [code](0, 0, 0)[/code].
+ Returns the position between the vertex [param idx] and the vertex [code]idx + 1[/code], where [param t] controls if the point is the first vertex ([code]t = 0.0[/code]), the last vertex ([code]t = 1.0[/code]), or in between. Values of [param t] outside the range ([code]0.0 &gt;= t &lt;=1[/code]) give strange, but predictable results.
+ If [param idx] is out of bounds it is truncated to the first or last vertex, and [param t] is ignored. If the curve has no points, the function sends an error to the console, and returns [code](0, 0, 0)[/code].
</description>
</method>
- <method name="interpolate_baked" qualifiers="const">
+ <method name="sample_baked" qualifiers="const">
<return type="Vector3" />
<param index="0" name="offset" type="float" />
<param index="1" name="cubic" type="bool" default="false" />
<description>
- Returns a point within the curve at position [code]offset[/code], where [code]offset[/code] is measured as a distance in 3D units along the curve.
- To do that, it finds the two cached points where the [code]offset[/code] lies between, then interpolates the values. This interpolation is cubic if [code]cubic[/code] is set to [code]true[/code], or linear if set to [code]false[/code].
+ Returns a point within the curve at position [param offset], where [param offset] is measured as a distance in 3D units along the curve.
+ To do that, it finds the two cached points where the [param offset] lies between, then interpolates the values. This interpolation is cubic if [param cubic] is set to [code]true[/code], or linear if set to [code]false[/code].
Cubic interpolation tends to follow the curves better, but linear is faster (and often, precise enough).
</description>
</method>
- <method name="interpolate_baked_up_vector" qualifiers="const">
+ <method name="sample_baked_up_vector" qualifiers="const">
<return type="Vector3" />
<param index="0" name="offset" type="float" />
<param index="1" name="apply_tilt" type="bool" default="false" />
<description>
- Returns an up vector within the curve at position [code]offset[/code], where [code]offset[/code] is measured as a distance in 3D units along the curve.
- To do that, it finds the two cached up vectors where the [code]offset[/code] lies between, then interpolates the values. If [code]apply_tilt[/code] is [code]true[/code], an interpolated tilt is applied to the interpolated up vector.
+ Returns an up vector within the curve at position [param offset], where [param offset] is measured as a distance in 3D units along the curve.
+ To do that, it finds the two cached up vectors where the [param offset] lies between, then interpolates the values. If [param apply_tilt] is [code]true[/code], an interpolated tilt is applied to the interpolated up vector.
If the curve has no up vectors, the function sends an error to the console, and returns [code](0, 1, 0)[/code].
</description>
</method>
- <method name="interpolatef" qualifiers="const">
- <return type="Vector3" />
- <param index="0" name="fofs" type="float" />
+ <method name="sample_baked_with_rotation" qualifiers="const">
+ <return type="Transform3D" />
+ <param index="0" name="offset" type="float" />
+ <param index="1" name="cubic" type="bool" default="false" />
+ <param index="2" name="apply_tilt" type="bool" default="false" />
<description>
- Returns the position at the vertex [code]fofs[/code]. It calls [method interpolate] using the integer part of [code]fofs[/code] as [code]idx[/code], and its fractional part as [code]t[/code].
+ Similar with [code]interpolate_baked()[/code]. The the return value is [code]Transform3D[/code], with [code]origin[/code] as point position, [code]basis.x[/code] as sideway vector, [code]basis.y[/code] as up vector, [code]basis.z[/code] as forward vector. When the curve length is 0, there is no reasonable way to caculate the rotation, all vectors aligned with global space axes.
</description>
</method>
- <method name="remove_point">
- <return type="void" />
- <param index="0" name="idx" type="int" />
+ <method name="samplef" qualifiers="const">
+ <return type="Vector3" />
+ <param index="0" name="fofs" type="float" />
<description>
- Deletes the point [code]idx[/code] from the curve. Sends an error to the console if [code]idx[/code] is out of bounds.
+ Returns the position at the vertex [param fofs]. It calls [method sample] using the integer part of [param fofs] as [code]idx[/code], and its fractional part as [code]t[/code].
</description>
</method>
<method name="set_point_in">
@@ -144,7 +153,7 @@
<param index="0" name="idx" type="int" />
<param index="1" name="position" type="Vector3" />
<description>
- Sets the position of the control point leading to the vertex [code]idx[/code]. If the index is out of bounds, the function sends an error to the console. The position is relative to the vertex.
+ Sets the position of the control point leading to the vertex [param idx]. If the index is out of bounds, the function sends an error to the console. The position is relative to the vertex.
</description>
</method>
<method name="set_point_out">
@@ -152,7 +161,7 @@
<param index="0" name="idx" type="int" />
<param index="1" name="position" type="Vector3" />
<description>
- Sets the position of the control point leading out of the vertex [code]idx[/code]. If the index is out of bounds, the function sends an error to the console. The position is relative to the vertex.
+ Sets the position of the control point leading out of the vertex [param idx]. If the index is out of bounds, the function sends an error to the console. The position is relative to the vertex.
</description>
</method>
<method name="set_point_position">
@@ -160,7 +169,7 @@
<param index="0" name="idx" type="int" />
<param index="1" name="position" type="Vector3" />
<description>
- Sets the position for the vertex [code]idx[/code]. If the index is out of bounds, the function sends an error to the console.
+ Sets the position for the vertex [param idx]. If the index is out of bounds, the function sends an error to the console.
</description>
</method>
<method name="set_point_tilt">
@@ -168,7 +177,7 @@
<param index="0" name="idx" type="int" />
<param index="1" name="tilt" type="float" />
<description>
- Sets the tilt angle in radians for the point [code]idx[/code]. If the index is out of bounds, the function sends an error to the console.
+ Sets the tilt angle in radians for the point [param idx]. If the index is out of bounds, the function sends an error to the console.
The tilt controls the rotation along the look-at axis an object traveling the path would have. In the case of a curve controlling a [PathFollow3D], this tilt is an offset over the natural tilt the [PathFollow3D] calculates.
</description>
</method>
@@ -179,8 +188,8 @@
<description>
Returns a list of points along the curve, with a curvature controlled point density. That is, the curvier parts will have more points than the straighter parts.
This approximation makes straight segments between each point, then subdivides those segments until the resulting shape is similar enough.
- [code]max_stages[/code] controls how many subdivisions a curve segment may face before it is considered approximate enough. Each subdivision splits the segment in half, so the default 5 stages may mean up to 32 subdivisions per curve segment. Increase with care!
- [code]tolerance_degrees[/code] controls how many degrees the midpoint of a segment may deviate from the real curve, before the segment has to be subdivided.
+ [param max_stages] controls how many subdivisions a curve segment may face before it is considered approximate enough. Each subdivision splits the segment in half, so the default 5 stages may mean up to 32 subdivisions per curve segment. Increase with care!
+ [param tolerance_degrees] controls how many degrees the midpoint of a segment may deviate from the real curve, before the segment has to be subdivided.
</description>
</method>
</methods>
diff --git a/doc/classes/CurveTexture.xml b/doc/classes/CurveTexture.xml
index 85473fc237..03e008d738 100644
--- a/doc/classes/CurveTexture.xml
+++ b/doc/classes/CurveTexture.xml
@@ -13,6 +13,7 @@
<member name="curve" type="Curve" setter="set_curve" getter="get_curve">
The [Curve] that is rendered onto the texture.
</member>
+ <member name="resource_local_to_scene" type="bool" setter="set_local_to_scene" getter="is_local_to_scene" overrides="Resource" default="false" />
<member name="texture_mode" type="int" setter="set_texture_mode" getter="get_texture_mode" enum="CurveTexture.TextureMode" default="0">
The format the texture should be generated with. When passing a CurveTexture as a input to a [Shader], this may need to be adjusted.
</member>
diff --git a/doc/classes/CurveXYZTexture.xml b/doc/classes/CurveXYZTexture.xml
index e3f2e8fc45..8c4e2dce0f 100644
--- a/doc/classes/CurveXYZTexture.xml
+++ b/doc/classes/CurveXYZTexture.xml
@@ -19,6 +19,7 @@
<member name="curve_z" type="Curve" setter="set_curve_z" getter="get_curve_z">
The [Curve] that is rendered onto the texture's blue channel.
</member>
+ <member name="resource_local_to_scene" type="bool" setter="set_local_to_scene" getter="is_local_to_scene" overrides="Resource" default="false" />
<member name="width" type="int" setter="set_width" getter="get_width" default="256">
The width of the texture (in pixels). Higher values make it possible to represent high-frequency data better (such as sudden direction changes), at the cost of increased generation time and memory usage.
</member>
diff --git a/doc/classes/CylinderShape3D.xml b/doc/classes/CylinderShape3D.xml
index 6ff142da59..dcb14ec945 100644
--- a/doc/classes/CylinderShape3D.xml
+++ b/doc/classes/CylinderShape3D.xml
@@ -5,6 +5,7 @@
</brief_description>
<description>
Cylinder shape for collisions. Like [CapsuleShape3D], but without hemispheres at the cylinder's ends.
+ [b]Note:[/b] There are several known bugs with cylinder collision shapes. Using [CapsuleShape3D] or [BoxShape3D] instead is recommended.
[b]Performance:[/b] Being a primitive collision shape, [CylinderShape3D] is fast to check collisions against (though not as fast as [SphereShape3D]). [CylinderShape3D] is also more demanding compared to [CapsuleShape3D].
</description>
<tutorials>
diff --git a/doc/classes/DTLSServer.xml b/doc/classes/DTLSServer.xml
index 562d16fec7..9af8be99ef 100644
--- a/doc/classes/DTLSServer.xml
+++ b/doc/classes/DTLSServer.xml
@@ -152,14 +152,14 @@
<param index="1" name="certificate" type="X509Certificate" />
<param index="2" name="chain" type="X509Certificate" default="null" />
<description>
- Setup the DTLS server to use the given [code]private_key[/code] and provide the given [code]certificate[/code] to clients. You can pass the optional [code]chain[/code] parameter to provide additional CA chain information along with the certificate.
+ Setup the DTLS server to use the given [param key] and provide the given [param certificate] to clients. You can pass the optional [param chain] parameter to provide additional CA chain information along with the certificate.
</description>
</method>
<method name="take_connection">
<return type="PacketPeerDTLS" />
<param index="0" name="udp_peer" type="PacketPeerUDP" />
<description>
- Try to initiate the DTLS handshake with the given [code]udp_peer[/code] which must be already connected (see [method PacketPeerUDP.connect_to_host]).
+ Try to initiate the DTLS handshake with the given [param udp_peer] which must be already connected (see [method PacketPeerUDP.connect_to_host]).
[b]Note:[/b] You must check that the state of the return PacketPeerUDP is [constant PacketPeerDTLS.STATUS_HANDSHAKING], as it is normal that 50% of the new connections will be invalid due to cookie exchange.
</description>
</method>
diff --git a/doc/classes/Dictionary.xml b/doc/classes/Dictionary.xml
index 68fa069618..9842288d35 100644
--- a/doc/classes/Dictionary.xml
+++ b/doc/classes/Dictionary.xml
@@ -4,7 +4,7 @@
Dictionary type.
</brief_description>
<description>
- Dictionary type. Associative container which contains values referenced by unique keys. Dictionaries are composed of pairs of keys (which must be unique) and values. Dictionaries will preserve the insertion order when adding elements, even though this may not be reflected when printing the dictionary. In other programming languages, this data structure is sometimes referred to as a hash map or associative array.
+ Dictionary type. Associative container, which contains values referenced by unique keys. Dictionaries are composed of pairs of keys (which must be unique) and values. Dictionaries will preserve the insertion order when adding elements. In other programming languages, this data structure is sometimes referred to as a hash map or associative array.
You can define a dictionary by placing a comma-separated list of [code]key: value[/code] pairs in curly braces [code]{}[/code].
Erasing elements while iterating over them [b]is not supported[/b] and will result in undefined behavior.
[b]Note:[/b] Dictionaries are always passed by reference. To get a copy of a dictionary which can be modified independently of the original dictionary, use [method duplicate].
@@ -207,7 +207,7 @@
<return type="Dictionary" />
<param index="0" name="deep" type="bool" default="false" />
<description>
- Creates a copy of the dictionary, and returns it. The [code]deep[/code] parameter causes inner dictionaries and arrays to be copied recursively, but does not apply to objects.
+ Creates a copy of the dictionary, and returns it. The [param deep] parameter causes inner dictionaries and arrays to be copied recursively, but does not apply to objects.
</description>
</method>
<method name="erase">
@@ -218,6 +218,14 @@
[b]Note:[/b] Don't erase elements while iterating over the dictionary. You can iterate over the [method keys] array instead.
</description>
</method>
+ <method name="find_key" qualifiers="const">
+ <return type="Variant" />
+ <param index="0" name="value" type="Variant" />
+ <description>
+ Returns the first key whose associated value is equal to [param value], or [code]null[/code] if no such value is found.
+ [b]Note:[/b] [code]null[/code] is also a valid key. If you have it in your [Dictionary], the [method find_key] method can give misleading results.
+ </description>
+ </method>
<method name="get" qualifiers="const">
<return type="Variant" />
<param index="0" name="key" type="Variant" />
@@ -296,7 +304,7 @@
<param index="0" name="dictionary" type="Dictionary" />
<param index="1" name="overwrite" type="bool" default="false" />
<description>
- Adds elements from [code]dictionary[/code] to this [Dictionary]. By default, duplicate keys will not be copied over, unless [code]overwrite[/code] is [code]true[/code].
+ Adds elements from [param dictionary] to this [Dictionary]. By default, duplicate keys will not be copied over, unless [param overwrite] is [code]true[/code].
</description>
</method>
<method name="size" qualifiers="const">
@@ -317,18 +325,21 @@
<return type="bool" />
<param index="0" name="right" type="Dictionary" />
<description>
+ Returns [code]true[/code] if the dictionaries differ, i.e. their key or value lists are different (including the order).
</description>
</operator>
<operator name="operator ==">
<return type="bool" />
<param index="0" name="right" type="Dictionary" />
<description>
+ Returns [code]true[/code] if both dictionaries have the same contents, i.e. their keys list and value list are equal.
</description>
</operator>
<operator name="operator []">
<return type="Variant" />
<param index="0" name="key" type="Variant" />
<description>
+ Returns a value at the given [param key] or [code]null[/code] and error if the key does not exist. For safe access, use [method get] or [method has].
</description>
</operator>
</operators>
diff --git a/doc/classes/Directory.xml b/doc/classes/DirAccess.xml
index c3eb469934..181d2eb485 100644
--- a/doc/classes/Directory.xml
+++ b/doc/classes/DirAccess.xml
@@ -1,18 +1,26 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Directory" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+<class name="DirAccess" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Type used to handle the filesystem.
</brief_description>
<description>
Directory type. It is used to manage directories and their content (not restricted to the project folder).
- When creating a new [Directory], it must be explicitly opened using [method open] before most methods can be used. However, [method file_exists] and [method dir_exists] can be used without opening a directory. If so, they use a path relative to [code]res://[/code].
+ [DirAccess] can't be instantiated directly. Instead it is created with a static method that takes a path for which it will be opened.
+ Most of the methods have a static alternative that can be used without creating a [DirAccess]. Static methods only support absolute paths (including [code]res://[/code] and [code]user://[/code]).
+ [codeblock]
+ # Standard
+ var dir = DirAccess.open("user://levels")
+ dir.make_dir("world1")
+ # Static
+ DirAccess.make_dir_absolute("user://levels/world1")
+ [/codeblock]
[b]Note:[/b] Many resources types are imported (e.g. textures or sound files), and their source asset will not be included in the exported game, as only the imported version is used. Use [ResourceLoader] to access imported resources.
Here is an example on how to iterate through the files of a directory:
[codeblocks]
[gdscript]
func dir_contents(path):
- var dir = Directory.new()
- if dir.open(path) == OK:
+ var dir = DirAccess.open(path)
+ if dir:
dir.list_dir_begin()
var file_name = dir.get_next()
while file_name != "":
@@ -27,8 +35,8 @@
[csharp]
public void DirContents(string path)
{
- var dir = new Directory();
- if (dir.Open(path) == Error.Ok)
+ using var dir = DirAccess.Open(path);
+ if (dir != null)
{
dir.ListDirBegin();
string fileName = dir.GetNext();
@@ -59,19 +67,30 @@
<methods>
<method name="change_dir">
<return type="int" enum="Error" />
- <param index="0" name="todir" type="String" />
+ <param index="0" name="to_dir" type="String" />
<description>
Changes the currently opened directory to the one passed as an argument. The argument can be relative to the current directory (e.g. [code]newdir[/code] or [code]../newdir[/code]), or an absolute path (e.g. [code]/tmp/newdir[/code] or [code]res://somedir/newdir[/code]).
- Returns one of the [enum Error] code constants ([code]OK[/code] on success).
+ Returns one of the [enum Error] code constants ([constant OK] on success).
</description>
</method>
<method name="copy">
<return type="int" enum="Error" />
<param index="0" name="from" type="String" />
<param index="1" name="to" type="String" />
+ <param index="2" name="chmod_flags" type="int" default="-1" />
<description>
- Copies the [code]from[/code] file to the [code]to[/code] destination. Both arguments should be paths to files, either relative or absolute. If the destination file exists and is not access-protected, it will be overwritten.
- Returns one of the [enum Error] code constants ([code]OK[/code] on success).
+ Copies the [param from] file to the [param to] destination. Both arguments should be paths to files, either relative or absolute. If the destination file exists and is not access-protected, it will be overwritten.
+ If [param chmod_flags] is different than [code]-1[/code], the Unix permissions for the destination path will be set to the provided value, if available on the current operating system.
+ Returns one of the [enum Error] code constants ([constant OK] on success).
+ </description>
+ </method>
+ <method name="copy_absolute" qualifiers="static">
+ <return type="int" enum="Error" />
+ <param index="0" name="from" type="String" />
+ <param index="1" name="to" type="String" />
+ <param index="2" name="chmod_flags" type="int" default="-1" />
+ <description>
+ Static version of [method copy]. Supports only absolute paths.
</description>
</method>
<method name="current_is_dir" qualifiers="const">
@@ -85,7 +104,13 @@
<param index="0" name="path" type="String" />
<description>
Returns whether the target directory exists. The argument can be relative to the current directory, or an absolute path.
- If the [Directory] is not open, the path is relative to [code]res://[/code].
+ </description>
+ </method>
+ <method name="dir_exists_absolute" qualifiers="static">
+ <return type="bool" />
+ <param index="0" name="path" type="String" />
+ <description>
+ Static version of [method dir_exists]. Supports only absolute paths.
</description>
</method>
<method name="file_exists">
@@ -93,11 +118,12 @@
<param index="0" name="path" type="String" />
<description>
Returns whether the target file exists. The argument can be relative to the current directory, or an absolute path.
- If the [Directory] is not open, the path is relative to [code]res://[/code].
+ For a static equivalent, use [method FileAccess.file_exists].
</description>
</method>
- <method name="get_current_dir">
+ <method name="get_current_dir" qualifiers="const">
<return type="String" />
+ <param index="0" name="include_drive" type="bool" default="true" />
<description>
Returns the absolute path to the currently opened directory (e.g. [code]res://folder[/code] or [code]C:\tmp\folder[/code]).
</description>
@@ -105,7 +131,7 @@
<method name="get_current_drive">
<return type="int" />
<description>
- Returns the currently opened directory's drive index. See [method get_drive] to convert returned index to the name of the drive.
+ Returns the currently opened directory's drive index. See [method get_drive_name] to convert returned index to the name of the drive.
</description>
</method>
<method name="get_directories">
@@ -115,17 +141,15 @@
Affected by [member include_hidden] and [member include_navigational].
</description>
</method>
- <method name="get_drive">
- <return type="String" />
- <param index="0" name="idx" type="int" />
+ <method name="get_directories_at" qualifiers="static">
+ <return type="PackedStringArray" />
+ <param index="0" name="path" type="String" />
<description>
- On Windows, returns the name of the drive (partition) passed as an argument (e.g. [code]C:[/code]).
- On macOS, returns the path to the mounted volume passed as an argument.
- On Linux, returns the path to the mounted volume or GTK 3 bookmark passed as an argument.
- On other platforms, or if the requested drive does not exist, the method returns an empty String.
+ Returns a [PackedStringArray] containing filenames of the directory contents, excluding files, at the given [param path]. The array is sorted alphabetically.
+ Use [method get_directories] if you want more control of what gets included.
</description>
</method>
- <method name="get_drive_count">
+ <method name="get_drive_count" qualifiers="static">
<return type="int" />
<description>
On Windows, returns the number of drives (partitions) mounted on the current filesystem.
@@ -134,6 +158,16 @@
On other platforms, the method returns 0.
</description>
</method>
+ <method name="get_drive_name" qualifiers="static">
+ <return type="String" />
+ <param index="0" name="idx" type="int" />
+ <description>
+ On Windows, returns the name of the drive (partition) passed as an argument (e.g. [code]C:[/code]).
+ On macOS, returns the path to the mounted volume passed as an argument.
+ On Linux, returns the path to the mounted volume or GTK 3 bookmark passed as an argument.
+ On other platforms, or if the requested drive does not exist, the method returns an empty String.
+ </description>
+ </method>
<method name="get_files">
<return type="PackedStringArray" />
<description>
@@ -141,17 +175,31 @@
Affected by [member include_hidden].
</description>
</method>
+ <method name="get_files_at" qualifiers="static">
+ <return type="PackedStringArray" />
+ <param index="0" name="path" type="String" />
+ <description>
+ Returns a [PackedStringArray] containing filenames of the directory contents, excluding directories, at the given [param path]. The array is sorted alphabetically.
+ Use [method get_files] if you want more control of what gets included.
+ </description>
+ </method>
<method name="get_next">
<return type="String" />
<description>
- Returns the next element (file or directory) in the current directory (including [code].[/code] and [code]..[/code], unless [code]skip_navigational[/code] was given to [method list_dir_begin]).
- The name of the file or directory is returned (and not its full path). Once the stream has been fully processed, the method returns an empty String and closes the stream automatically (i.e. [method list_dir_end] would not be mandatory in such a case).
+ Returns the next element (file or directory) in the current directory.
+ The name of the file or directory is returned (and not its full path). Once the stream has been fully processed, the method returns an empty [String] and closes the stream automatically (i.e. [method list_dir_end] would not be mandatory in such a case).
+ </description>
+ </method>
+ <method name="get_open_error" qualifiers="static">
+ <return type="int" enum="Error" />
+ <description>
+ Returns the result of the last [method open] call in the current thread.
</description>
</method>
<method name="get_space_left">
<return type="int" />
<description>
- On UNIX desktop systems, returns the available space on the current directory's disk. On other platforms, this information is not available and the method returns 0 or -1.
+ Returns the available space on the current directory's disk, in bytes. Returns [code]0[/code] if the platform-specific method to query the available space fails.
</description>
</method>
<method name="list_dir_begin">
@@ -173,7 +221,14 @@
<param index="0" name="path" type="String" />
<description>
Creates a directory. The argument can be relative to the current directory, or an absolute path. The target directory should be placed in an already existing directory (to create the full path recursively, see [method make_dir_recursive]).
- Returns one of the [enum Error] code constants ([code]OK[/code] on success).
+ Returns one of the [enum Error] code constants ([constant OK] on success).
+ </description>
+ </method>
+ <method name="make_dir_absolute" qualifiers="static">
+ <return type="int" enum="Error" />
+ <param index="0" name="path" type="String" />
+ <description>
+ Static version of [method make_dir]. Supports only absolute paths.
</description>
</method>
<method name="make_dir_recursive">
@@ -181,15 +236,22 @@
<param index="0" name="path" type="String" />
<description>
Creates a target directory and all necessary intermediate directories in its path, by calling [method make_dir] recursively. The argument can be relative to the current directory, or an absolute path.
- Returns one of the [enum Error] code constants ([code]OK[/code] on success).
+ Returns one of the [enum Error] code constants ([constant OK] on success).
</description>
</method>
- <method name="open">
+ <method name="make_dir_recursive_absolute" qualifiers="static">
<return type="int" enum="Error" />
<param index="0" name="path" type="String" />
<description>
- Opens an existing directory of the filesystem. The [code]path[/code] argument can be within the project tree ([code]res://folder[/code]), the user directory ([code]user://folder[/code]) or an absolute path of the user filesystem (e.g. [code]/tmp/folder[/code] or [code]C:\tmp\folder[/code]).
- Returns one of the [enum Error] code constants ([code]OK[/code] on success).
+ Static version of [method make_dir_recursive]. Supports only absolute paths.
+ </description>
+ </method>
+ <method name="open" qualifiers="static">
+ <return type="DirAccess" />
+ <param index="0" name="path" type="String" />
+ <description>
+ Creates a new [DirAccess] object and opens an existing directory of the filesystem. The [param path] argument can be within the project tree ([code]res://folder[/code]), the user directory ([code]user://folder[/code]) or an absolute path of the user filesystem (e.g. [code]/tmp/folder[/code] or [code]C:\tmp\folder[/code]).
+ Returns [code]null[/code] if opening the directory failed. You can use [method get_open_error] to check the error that occurred.
</description>
</method>
<method name="remove">
@@ -198,7 +260,14 @@
<description>
Permanently deletes the target file or an empty directory. The argument can be relative to the current directory, or an absolute path. If the target directory is not empty, the operation will fail.
If you don't want to delete the file/directory permanently, use [method OS.move_to_trash] instead.
- Returns one of the [enum Error] code constants ([code]OK[/code] on success).
+ Returns one of the [enum Error] code constants ([constant OK] on success).
+ </description>
+ </method>
+ <method name="remove_absolute" qualifiers="static">
+ <return type="int" enum="Error" />
+ <param index="0" name="path" type="String" />
+ <description>
+ Static version of [method remove]. Supports only absolute paths.
</description>
</method>
<method name="rename">
@@ -206,17 +275,25 @@
<param index="0" name="from" type="String" />
<param index="1" name="to" type="String" />
<description>
- Renames (move) the [code]from[/code] file or directory to the [code]to[/code] destination. Both arguments should be paths to files or directories, either relative or absolute. If the destination file or directory exists and is not access-protected, it will be overwritten.
- Returns one of the [enum Error] code constants ([code]OK[/code] on success).
+ Renames (move) the [param from] file or directory to the [param to] destination. Both arguments should be paths to files or directories, either relative or absolute. If the destination file or directory exists and is not access-protected, it will be overwritten.
+ Returns one of the [enum Error] code constants ([constant OK] on success).
+ </description>
+ </method>
+ <method name="rename_absolute" qualifiers="static">
+ <return type="int" enum="Error" />
+ <param index="0" name="from" type="String" />
+ <param index="1" name="to" type="String" />
+ <description>
+ Static version of [method rename]. Supports only absolute paths.
</description>
</method>
</methods>
<members>
- <member name="include_hidden" type="bool" setter="set_include_hidden" getter="get_include_hidden" default="false">
+ <member name="include_hidden" type="bool" setter="set_include_hidden" getter="get_include_hidden">
If [code]true[/code], hidden files are included when the navigating directory.
Affects [method list_dir_begin], [method get_directories] and [method get_files].
</member>
- <member name="include_navigational" type="bool" setter="set_include_navigational" getter="get_include_navigational" default="false">
+ <member name="include_navigational" type="bool" setter="set_include_navigational" getter="get_include_navigational">
If [code]true[/code], [code].[/code] and [code]..[/code] are included when navigating the directory.
Affects [method list_dir_begin] and [method get_directories].
</member>
diff --git a/doc/classes/DirectionalLight2D.xml b/doc/classes/DirectionalLight2D.xml
index a1b8ea86be..7a54980c19 100644
--- a/doc/classes/DirectionalLight2D.xml
+++ b/doc/classes/DirectionalLight2D.xml
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="DirectionalLight2D" inherits="Light2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
+ Directional light from a distance.
</brief_description>
<description>
+ A directional light is a type of [Light2D] node that models an infinite number of parallel rays covering the entire scene. It is used for lights with strong intensity that are located far away from the scene (for example: to model sunlight or moonlight).
</description>
<tutorials>
</tutorials>
@@ -11,6 +13,7 @@
The height of the light. Used with 2D normal mapping. Ranges from 0 (parallel to the plane) to 1 (perpendicular to the plane).
</member>
<member name="max_distance" type="float" setter="set_max_distance" getter="get_max_distance" default="10000.0">
+ Maximum distance this light covers. Increasing this value will make directional shadows visible from further away, at the cost of lower overall shadow detail and performance (due to more objects being included in shadow rendering).
</member>
</members>
</class>
diff --git a/doc/classes/DisplayServer.xml b/doc/classes/DisplayServer.xml
index e642bc7b73..0039301bf6 100644
--- a/doc/classes/DisplayServer.xml
+++ b/doc/classes/DisplayServer.xml
@@ -1,8 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="DisplayServer" inherits="Object" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
+ Singleton for window management functions.
</brief_description>
<description>
+ [DisplayServer] handles everything related to window management. This is separated from [OS] as a single operating system may support multiple display servers.
+ [b]Headless mode:[/b] Starting the engine with the [code]--headless[/code] [url=$DOCS_URL/tutorials/editor/command_line_tutorial.html]command line argument[/url] disables all rendering and window management functions. Most functions from [DisplayServer] will return dummy values in this case.
</description>
<tutorials>
</tutorials>
@@ -16,8 +19,8 @@
<method name="clipboard_get_primary" qualifiers="const">
<return type="String" />
<description>
- Returns the user's primary clipboard as a string if possible.
- [b]Note:[/b] This method is only implemented on Linux.
+ Returns the user's [url=https://unix.stackexchange.com/questions/139191/whats-the-difference-between-primary-selection-and-clipboard-buffer]primary[/url] clipboard as a string if possible. This is the clipboard that is set when the user selects text in any application, rather than when pressing [kbd]Ctrl + C[/kbd]. The clipboard data can then be pasted by clicking the middle mouse button in any application that supports the primary clipboard mechanism.
+ [b]Note:[/b] This method is only implemented on Linux (X11).
</description>
</method>
<method name="clipboard_has" qualifiers="const">
@@ -37,22 +40,14 @@
<return type="void" />
<param index="0" name="clipboard_primary" type="String" />
<description>
- Sets the user's primary clipboard content to the given string.
- [b]Note:[/b] This method is only implemented on Linux.
- </description>
- </method>
- <method name="create_sub_window">
- <return type="int" />
- <param index="0" name="mode" type="int" enum="DisplayServer.WindowMode" />
- <param index="1" name="vsync_mode" type="int" enum="DisplayServer.VSyncMode" />
- <param index="2" name="flags" type="int" />
- <param index="3" name="rect" type="Rect2i" default="Rect2i(0, 0, 0, 0)" />
- <description>
+ Sets the user's [url=https://unix.stackexchange.com/questions/139191/whats-the-difference-between-primary-selection-and-clipboard-buffer]primary[/url] clipboard content to the given string. This is the clipboard that is set when the user selects text in any application, rather than when pressing [kbd]Ctrl + C[/kbd]. The clipboard data can then be pasted by clicking the middle mouse button in any application that supports the primary clipboard mechanism.
+ [b]Note:[/b] This method is only implemented on Linux (X11).
</description>
</method>
<method name="cursor_get_shape" qualifiers="const">
<return type="int" enum="DisplayServer.CursorShape" />
<description>
+ Returns the default mouse cursor shape set by [method cursor_set_shape].
</description>
</method>
<method name="cursor_set_custom_image">
@@ -61,18 +56,14 @@
<param index="1" name="shape" type="int" enum="DisplayServer.CursorShape" default="0" />
<param index="2" name="hotspot" type="Vector2" default="Vector2(0, 0)" />
<description>
+ Sets a custom mouse cursor image for the defined [param shape]. This means the user's operating system and mouse cursor theme will no longer influence the mouse cursor's appearance. The image must be [code]256x256[/code] or smaller for correct appearance. [param hotspot] can optionally be set to define the area where the cursor will click. By default, [param hotspot] is set to [code]Vector2(0, 0)[/code], which is the top-left corner of the image. See also [method cursor_set_shape].
</description>
</method>
<method name="cursor_set_shape">
<return type="void" />
<param index="0" name="shape" type="int" enum="DisplayServer.CursorShape" />
<description>
- </description>
- </method>
- <method name="delete_sub_window">
- <return type="void" />
- <param index="0" name="window_id" type="int" />
- <description>
+ Sets the default mouse cursor shape. The cursor's appearance will vary depending on the user's operating system and mouse cursor theme. See also [method cursor_get_shape] and [method cursor_set_custom_image].
</description>
</method>
<method name="dialog_input_text">
@@ -82,6 +73,8 @@
<param index="2" name="existing_text" type="String" />
<param index="3" name="callback" type="Callable" />
<description>
+ Shows a text input dialog which uses the operating system's native look-and-feel. [param callback] will be called with a [String] argument equal to the text field's contents when the dialog is closed for any reason.
+ [b]Note:[/b] This method is implemented on macOS.
</description>
</method>
<method name="dialog_show">
@@ -91,21 +84,34 @@
<param index="2" name="buttons" type="PackedStringArray" />
<param index="3" name="callback" type="Callable" />
<description>
+ Shows a text dialog which uses the operating system's native look-and-feel. [param callback] will be called when the dialog is closed for any reason.
+ [b]Note:[/b] This method is implemented on macOS.
</description>
</method>
<method name="enable_for_stealing_focus">
<return type="void" />
<param index="0" name="process_id" type="int" />
<description>
+ Allows the [param process_id] PID to steal focus from this window. In other words, this disables the operating system's focus stealing protection for the specified PID.
+ [b]Note:[/b] This method is implemented on Windows.
</description>
</method>
<method name="force_process_and_drop_events">
<return type="void" />
<description>
+ Forces window manager processing while ignoring all [InputEvent]s. See also [method process_events].
+ [b]Note:[/b] This method is implemented on Windows and macOS.
+ </description>
+ </method>
+ <method name="get_accent_color" qualifiers="const">
+ <return type="Color" />
+ <description>
+ Returns OS theme accent color. Returns [code]Color(0, 0, 0, 0)[/code], if accent color is unknown.
+ [b]Note:[/b] This method is implemented on macOS and Windows.
</description>
</method>
<method name="get_display_cutouts" qualifiers="const">
- <return type="Array" />
+ <return type="Rect2[]" />
<description>
Returns an [Array] of [Rect2], each of which is the bounding rectangle for a display cutout or notch. These are non-functional areas on edge-to-edge screens used by cameras and sensors. Returns an empty array if the device does not have cutouts. See also [method get_display_safe_area].
[b]Note:[/b] Currently only implemented on Android. Other platforms will return an empty array even if they do have display cutouts or notches.
@@ -120,189 +126,222 @@
<method name="get_name" qualifiers="const">
<return type="String" />
<description>
+ Returns the name of the [DisplayServer] currently in use. Most operating systems only have a single [DisplayServer], but Linux has access to more than one [DisplayServer] (although only X11 is currently implemented in Godot).
+ The names of built-in display servers are [code]Windows[/code], [code]macOS[/code], [code]X11[/code] (Linux), [code]Android[/code], [code]iOS[/code], [code]web[/code] (HTML5) and [code]headless[/code] (when started with the [code]--headless[/code] [url=$DOCS_URL/tutorials/editor/command_line_tutorial.html]command line argument[/url]).
</description>
</method>
<method name="get_screen_count" qualifiers="const">
<return type="int" />
<description>
+ Returns the number of displays available.
</description>
</method>
<method name="get_swap_cancel_ok">
<return type="bool" />
<description>
+ Returns [code]true[/code] if positions of [b]OK[/b] and [b]Cancel[/b] buttons are swapped in dialogs. This is enabled by default on Windows and UWP to follow interface conventions, and be toggled by changing [member ProjectSettings.gui/common/swap_cancel_ok].
+ [b]Note:[/b] This doesn't affect native dialogs such as the ones spawned by [method DisplayServer.dialog_show].
</description>
</method>
<method name="get_window_at_screen_position" qualifiers="const">
<return type="int" />
<param index="0" name="position" type="Vector2i" />
<description>
+ Returns the ID of the window at the specified screen [param position] (in pixels). On multi-monitor setups, the screen position is relative to the virtual desktop area. On multi-monitor setups with different screen resolutions or orientations, the origin may be located outside any display like this:
+ [codeblock]
+ * (0, 0) +-------+
+ | |
+ +-------------+ | |
+ | | | |
+ | | | |
+ +-------------+ +-------+
+ [/codeblock]
</description>
</method>
<method name="get_window_list" qualifiers="const">
<return type="PackedInt32Array" />
<description>
+ Returns the list of Godot window IDs belonging to this process.
+ [b]Note:[/b] Native dialogs are not included in this list.
</description>
</method>
<method name="global_menu_add_check_item">
- <return type="void" />
+ <return type="int" />
<param index="0" name="menu_root" type="String" />
<param index="1" name="label" type="String" />
<param index="2" name="callback" type="Callable" />
- <param index="3" name="tag" type="Variant" default="null" />
- <param index="4" name="accelerator" type="int" enum="Key" default="0" />
- <param index="5" name="index" type="int" default="-1" />
+ <param index="3" name="key_callback" type="Callable" />
+ <param index="4" name="tag" type="Variant" default="null" />
+ <param index="5" name="accelerator" type="int" enum="Key" default="0" />
+ <param index="6" name="index" type="int" default="-1" />
<description>
- Adds a new checkable item with text [code]label[/code] to the global menu with ID [code]menu_root[/code].
+ Adds a new checkable item with text [param label] to the global menu with ID [param menu_root].
+ Returns index of the inserted item, it's not guaranteed to be the same as [param index] value.
[b]Note:[/b] This method is implemented on macOS.
[b]Supported system menu IDs:[/b]
[codeblock]
- "" - Main menu (macOS).
+ "_main" - Main menu (macOS).
"_dock" - Dock popup menu (macOS).
[/codeblock]
</description>
</method>
<method name="global_menu_add_icon_check_item">
- <return type="void" />
+ <return type="int" />
<param index="0" name="menu_root" type="String" />
<param index="1" name="icon" type="Texture2D" />
<param index="2" name="label" type="String" />
<param index="3" name="callback" type="Callable" />
- <param index="4" name="tag" type="Variant" default="null" />
- <param index="5" name="accelerator" type="int" enum="Key" default="0" />
- <param index="6" name="index" type="int" default="-1" />
+ <param index="4" name="key_callback" type="Callable" />
+ <param index="5" name="tag" type="Variant" default="null" />
+ <param index="6" name="accelerator" type="int" enum="Key" default="0" />
+ <param index="7" name="index" type="int" default="-1" />
<description>
- Adds a new checkable item with text [code]label[/code] and icon [code]icon[/code] to the global menu with ID [code]menu_root[/code].
+ Adds a new checkable item with text [param label] and icon [param icon] to the global menu with ID [param menu_root].
+ Returns index of the inserted item, it's not guaranteed to be the same as [param index] value.
[b]Note:[/b] This method is implemented on macOS.
[b]Supported system menu IDs:[/b]
[codeblock]
- "" - Main menu (macOS).
+ "_main" - Main menu (macOS).
"_dock" - Dock popup menu (macOS).
[/codeblock]
</description>
</method>
<method name="global_menu_add_icon_item">
- <return type="void" />
+ <return type="int" />
<param index="0" name="menu_root" type="String" />
<param index="1" name="icon" type="Texture2D" />
<param index="2" name="label" type="String" />
<param index="3" name="callback" type="Callable" />
- <param index="4" name="tag" type="Variant" default="null" />
- <param index="5" name="accelerator" type="int" enum="Key" default="0" />
- <param index="6" name="index" type="int" default="-1" />
+ <param index="4" name="key_callback" type="Callable" />
+ <param index="5" name="tag" type="Variant" default="null" />
+ <param index="6" name="accelerator" type="int" enum="Key" default="0" />
+ <param index="7" name="index" type="int" default="-1" />
<description>
- Adds a new item with text [code]label[/code] and icon [code]icon[/code] to the global menu with ID [code]menu_root[/code].
+ Adds a new item with text [param label] and icon [param icon] to the global menu with ID [param menu_root].
+ Returns index of the inserted item, it's not guaranteed to be the same as [param index] value.
[b]Note:[/b] This method is implemented on macOS.
[b]Supported system menu IDs:[/b]
[codeblock]
- "" - Main menu (macOS).
+ "_main" - Main menu (macOS).
"_dock" - Dock popup menu (macOS).
[/codeblock]
</description>
</method>
<method name="global_menu_add_icon_radio_check_item">
- <return type="void" />
+ <return type="int" />
<param index="0" name="menu_root" type="String" />
<param index="1" name="icon" type="Texture2D" />
<param index="2" name="label" type="String" />
<param index="3" name="callback" type="Callable" />
- <param index="4" name="tag" type="Variant" default="null" />
- <param index="5" name="accelerator" type="int" enum="Key" default="0" />
- <param index="6" name="index" type="int" default="-1" />
+ <param index="4" name="key_callback" type="Callable" />
+ <param index="5" name="tag" type="Variant" default="null" />
+ <param index="6" name="accelerator" type="int" enum="Key" default="0" />
+ <param index="7" name="index" type="int" default="-1" />
<description>
- Adds a new radio-checkable item with text [code]label[/code] and icon [code]icon[/code] to the global menu with ID [code]menu_root[/code].
+ Adds a new radio-checkable item with text [param label] and icon [param icon] to the global menu with ID [param menu_root].
+ Returns index of the inserted item, it's not guaranteed to be the same as [param index] value.
[b]Note:[/b] Radio-checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. See [method global_menu_set_item_checked] for more info on how to control it.
[b]Note:[/b] This method is implemented on macOS.
[b]Supported system menu IDs:[/b]
[codeblock]
- "" - Main menu (macOS).
+ "_main" - Main menu (macOS).
"_dock" - Dock popup menu (macOS).
[/codeblock]
</description>
</method>
<method name="global_menu_add_item">
- <return type="void" />
+ <return type="int" />
<param index="0" name="menu_root" type="String" />
<param index="1" name="label" type="String" />
<param index="2" name="callback" type="Callable" />
- <param index="3" name="tag" type="Variant" default="null" />
- <param index="4" name="accelerator" type="int" enum="Key" default="0" />
- <param index="5" name="index" type="int" default="-1" />
+ <param index="3" name="key_callback" type="Callable" />
+ <param index="4" name="tag" type="Variant" default="null" />
+ <param index="5" name="accelerator" type="int" enum="Key" default="0" />
+ <param index="6" name="index" type="int" default="-1" />
<description>
- Adds a new item with text [code]label[/code] to the global menu with ID [code]menu_root[/code].
+ Adds a new item with text [param label] to the global menu with ID [param menu_root].
+ Returns index of the inserted item, it's not guaranteed to be the same as [param index] value.
[b]Note:[/b] This method is implemented on macOS.
[b]Supported system menu IDs:[/b]
[codeblock]
- "" - Main menu (macOS).
+ "_main" - Main menu (macOS).
"_dock" - Dock popup menu (macOS).
[/codeblock]
</description>
</method>
<method name="global_menu_add_multistate_item">
- <return type="void" />
+ <return type="int" />
<param index="0" name="menu_root" type="String" />
<param index="1" name="labe" type="String" />
<param index="2" name="max_states" type="int" />
<param index="3" name="default_state" type="int" />
<param index="4" name="callback" type="Callable" />
- <param index="5" name="tag" type="Variant" default="null" />
- <param index="6" name="accelerator" type="int" enum="Key" default="0" />
- <param index="7" name="index" type="int" default="-1" />
- <description>
- Adds a new item with text [code]label[/code] to the global menu with ID [code]menu_root[/code].
- Contrarily to normal binary items, multistate items can have more than two states, as defined by [code]max_states[/code]. Each press or activate of the item will increase the state by one. The default value is defined by [code]default_state[/code].
+ <param index="5" name="key_callback" type="Callable" />
+ <param index="6" name="tag" type="Variant" default="null" />
+ <param index="7" name="accelerator" type="int" enum="Key" default="0" />
+ <param index="8" name="index" type="int" default="-1" />
+ <description>
+ Adds a new item with text [param labe] to the global menu with ID [param menu_root].
+ Contrarily to normal binary items, multistate items can have more than two states, as defined by [param max_states]. Each press or activate of the item will increase the state by one. The default value is defined by [param default_state].
+ Returns index of the inserted item, it's not guaranteed to be the same as [param index] value.
+ [b]Note:[/b] By default, there's no indication of the current item state, it should be changed manually.
[b]Note:[/b] This method is implemented on macOS.
[b]Supported system menu IDs:[/b]
[codeblock]
- "" - Main menu (macOS).
+ "_main" - Main menu (macOS).
"_dock" - Dock popup menu (macOS).
[/codeblock]
</description>
</method>
<method name="global_menu_add_radio_check_item">
- <return type="void" />
+ <return type="int" />
<param index="0" name="menu_root" type="String" />
<param index="1" name="label" type="String" />
<param index="2" name="callback" type="Callable" />
- <param index="3" name="tag" type="Variant" default="null" />
- <param index="4" name="accelerator" type="int" enum="Key" default="0" />
- <param index="5" name="index" type="int" default="-1" />
+ <param index="3" name="key_callback" type="Callable" />
+ <param index="4" name="tag" type="Variant" default="null" />
+ <param index="5" name="accelerator" type="int" enum="Key" default="0" />
+ <param index="6" name="index" type="int" default="-1" />
<description>
- Adds a new radio-checkable item with text [code]label[/code] to the global menu with ID [code]menu_root[/code].
+ Adds a new radio-checkable item with text [param label] to the global menu with ID [param menu_root].
+ Returns index of the inserted item, it's not guaranteed to be the same as [param index] value.
[b]Note:[/b] Radio-checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. See [method global_menu_set_item_checked] for more info on how to control it.
[b]Note:[/b] This method is implemented on macOS.
[b]Supported system menu IDs:[/b]
[codeblock]
- "" - Main menu (macOS).
+ "_main" - Main menu (macOS).
"_dock" - Dock popup menu (macOS).
[/codeblock]
</description>
</method>
<method name="global_menu_add_separator">
- <return type="void" />
+ <return type="int" />
<param index="0" name="menu_root" type="String" />
<param index="1" name="index" type="int" default="-1" />
<description>
- Adds a separator between items to the global menu with ID [code]menu_root[/code]. Separators also occupy an index.
+ Adds a separator between items to the global menu with ID [param menu_root]. Separators also occupy an index.
+ Returns index of the inserted item, it's not guaranteed to be the same as [param index] value.
[b]Note:[/b] This method is implemented on macOS.
[b]Supported system menu IDs:[/b]
[codeblock]
- "" - Main menu (macOS).
+ "_main" - Main menu (macOS).
"_dock" - Dock popup menu (macOS).
[/codeblock]
</description>
</method>
<method name="global_menu_add_submenu_item">
- <return type="void" />
+ <return type="int" />
<param index="0" name="menu_root" type="String" />
<param index="1" name="label" type="String" />
<param index="2" name="submenu" type="String" />
<param index="3" name="index" type="int" default="-1" />
<description>
- Adds an item that will act as a submenu of the global menu [code]menu_root[/code]. The [code]submenu[/code] argument is the ID of the global menu root that will be shown when the item is clicked.
+ Adds an item that will act as a submenu of the global menu [param menu_root]. The [param submenu] argument is the ID of the global menu root that will be shown when the item is clicked.
+ Returns index of the inserted item, it's not guaranteed to be the same as [param index] value.
[b]Note:[/b] This method is implemented on macOS.
[b]Supported system menu IDs:[/b]
[codeblock]
- "" - Main menu (macOS).
+ "_main" - Main menu (macOS).
"_dock" - Dock popup menu (macOS).
[/codeblock]
</description>
@@ -311,11 +350,11 @@
<return type="void" />
<param index="0" name="menu_root" type="String" />
<description>
- Removes all items from the global menu with ID [code]menu_root[/code].
+ Removes all items from the global menu with ID [param menu_root].
[b]Note:[/b] This method is implemented on macOS.
[b]Supported system menu IDs:[/b]
[codeblock]
- "" - Main menu (macOS).
+ "_main" - Main menu (macOS).
"_dock" - Dock popup menu (macOS).
[/codeblock]
</description>
@@ -325,7 +364,7 @@
<param index="0" name="menu_root" type="String" />
<param index="1" name="idx" type="int" />
<description>
- Returns the accelerator of the item at index [code]idx[/code]. Accelerators are special combinations of keys that activate the item, no matter which control is focused.
+ Returns the accelerator of the item at index [param idx]. Accelerators are special combinations of keys that activate the item, no matter which control is focused.
[b]Note:[/b] This method is implemented on macOS.
</description>
</method>
@@ -334,7 +373,15 @@
<param index="0" name="menu_root" type="String" />
<param index="1" name="idx" type="int" />
<description>
- Returns the callback of the item at index [code]idx[/code].
+ Returns the callback of the item at index [param idx].
+ [b]Note:[/b] This method is implemented on macOS.
+ </description>
+ </method>
+ <method name="global_menu_get_item_count" qualifiers="const">
+ <return type="int" />
+ <param index="0" name="menu_root" type="String" />
+ <description>
+ Returns number of items in the global menu with ID [param menu_root].
[b]Note:[/b] This method is implemented on macOS.
</description>
</method>
@@ -343,7 +390,16 @@
<param index="0" name="menu_root" type="String" />
<param index="1" name="idx" type="int" />
<description>
- Returns the icon of the item at index [code]idx[/code].
+ Returns the icon of the item at index [param idx].
+ [b]Note:[/b] This method is implemented on macOS.
+ </description>
+ </method>
+ <method name="global_menu_get_item_indentation_level" qualifiers="const">
+ <return type="int" />
+ <param index="0" name="menu_root" type="String" />
+ <param index="1" name="idx" type="int" />
+ <description>
+ Returns the horizontal offset of the item at the given [param idx].
[b]Note:[/b] This method is implemented on macOS.
</description>
</method>
@@ -352,7 +408,7 @@
<param index="0" name="menu_root" type="String" />
<param index="1" name="tag" type="Variant" />
<description>
- Returns the index of the item with the specified [code]tag[/code]. Index is automatically assigned to each item by the engine. Index can not be set manually.
+ Returns the index of the item with the specified [param tag]. Index is automatically assigned to each item by the engine. Index can not be set manually.
[b]Note:[/b] This method is implemented on macOS.
</description>
</method>
@@ -361,7 +417,16 @@
<param index="0" name="menu_root" type="String" />
<param index="1" name="text" type="String" />
<description>
- Returns the index of the item with the specified [code]text[/code]. Index is automatically assigned to each item by the engine. Index can not be set manually.
+ Returns the index of the item with the specified [param text]. Index is automatically assigned to each item by the engine. Index can not be set manually.
+ [b]Note:[/b] This method is implemented on macOS.
+ </description>
+ </method>
+ <method name="global_menu_get_item_key_callback" qualifiers="const">
+ <return type="Callable" />
+ <param index="0" name="menu_root" type="String" />
+ <param index="1" name="idx" type="int" />
+ <description>
+ Returns the callback of the item accelerator at index [param idx].
[b]Note:[/b] This method is implemented on macOS.
</description>
</method>
@@ -388,7 +453,7 @@
<param index="0" name="menu_root" type="String" />
<param index="1" name="idx" type="int" />
<description>
- Returns the submenu ID of the item at index [code]idx[/code]. See [method global_menu_add_submenu_item] for more info on how to add a submenu.
+ Returns the submenu ID of the item at index [param idx]. See [method global_menu_add_submenu_item] for more info on how to add a submenu.
[b]Note:[/b] This method is implemented on macOS.
</description>
</method>
@@ -406,7 +471,7 @@
<param index="0" name="menu_root" type="String" />
<param index="1" name="idx" type="int" />
<description>
- Returns the text of the item at index [code]idx[/code].
+ Returns the text of the item at index [param idx].
[b]Note:[/b] This method is implemented on macOS.
</description>
</method>
@@ -415,7 +480,7 @@
<param index="0" name="menu_root" type="String" />
<param index="1" name="idx" type="int" />
<description>
- Returns the tooltip associated with the specified index index [code]idx[/code].
+ Returns the tooltip associated with the specified index index [param idx].
[b]Note:[/b] This method is implemented on macOS.
</description>
</method>
@@ -424,7 +489,7 @@
<param index="0" name="menu_root" type="String" />
<param index="1" name="idx" type="int" />
<description>
- Returns [code]true[/code] if the item at index [code]idx[/code] is checkable in some way, i.e. if it has a checkbox or radio button.
+ Returns [code]true[/code] if the item at index [param idx] is checkable in some way, i.e. if it has a checkbox or radio button.
[b]Note:[/b] This method is implemented on macOS.
</description>
</method>
@@ -433,7 +498,7 @@
<param index="0" name="menu_root" type="String" />
<param index="1" name="idx" type="int" />
<description>
- Returns [code]true[/code] if the item at index [code]idx[/code] is checked.
+ Returns [code]true[/code] if the item at index [param idx] is checked.
[b]Note:[/b] This method is implemented on macOS.
</description>
</method>
@@ -442,7 +507,7 @@
<param index="0" name="menu_root" type="String" />
<param index="1" name="idx" type="int" />
<description>
- Returns [code]true[/code] if the item at index [code]idx[/code] is disabled. When it is disabled it can't be selected, or its action invoked.
+ Returns [code]true[/code] if the item at index [param idx] is disabled. When it is disabled it can't be selected, or its action invoked.
See [method global_menu_set_item_disabled] for more info on how to disable an item.
[b]Note:[/b] This method is implemented on macOS.
</description>
@@ -452,7 +517,7 @@
<param index="0" name="menu_root" type="String" />
<param index="1" name="idx" type="int" />
<description>
- Returns [code]true[/code] if the item at index [code]idx[/code] has radio button-style checkability.
+ Returns [code]true[/code] if the item at index [param idx] has radio button-style checkability.
[b]Note:[/b] This is purely cosmetic; you must add the logic for checking/unchecking items in radio groups.
[b]Note:[/b] This method is implemented on macOS.
</description>
@@ -462,7 +527,7 @@
<param index="0" name="menu_root" type="String" />
<param index="1" name="idx" type="int" />
<description>
- Removes the item at index [code]idx[/code] from the global menu [code]menu_root[/code].
+ Removes the item at index [param idx] from the global menu [param menu_root].
[b]Note:[/b] The indices of items after the removed item will be shifted by one.
[b]Note:[/b] This method is implemented on macOS.
</description>
@@ -473,7 +538,7 @@
<param index="1" name="idx" type="int" />
<param index="2" name="keycode" type="int" enum="Key" />
<description>
- Sets the accelerator of the item at index [code]idx[/code].
+ Sets the accelerator of the item at index [param idx].
[b]Note:[/b] This method is implemented on macOS.
</description>
</method>
@@ -483,7 +548,7 @@
<param index="1" name="idx" type="int" />
<param index="2" name="callback" type="Callable" />
<description>
- Sets the callback of the item at index [code]idx[/code]. Callback is emitted when an item is pressed or its accelerator is activated.
+ Sets the callback of the item at index [param idx]. Callback is emitted when an item is pressed.
[b]Note:[/b] This method is implemented on macOS.
</description>
</method>
@@ -493,7 +558,7 @@
<param index="1" name="idx" type="int" />
<param index="2" name="checkable" type="bool" />
<description>
- Sets whether the item at index [code]idx[/code] has a checkbox. If [code]false[/code], sets the type of the item to plain text.
+ Sets whether the item at index [param idx] has a checkbox. If [code]false[/code], sets the type of the item to plain text.
[b]Note:[/b] This method is implemented on macOS.
</description>
</method>
@@ -503,7 +568,7 @@
<param index="1" name="idx" type="int" />
<param index="2" name="checked" type="bool" />
<description>
- Sets the checkstate status of the item at index [code]idx[/code].
+ Sets the checkstate status of the item at index [param idx].
[b]Note:[/b] This method is implemented on macOS.
</description>
</method>
@@ -513,7 +578,7 @@
<param index="1" name="idx" type="int" />
<param index="2" name="disabled" type="bool" />
<description>
- Enables/disables the item at index [code]idx[/code]. When it is disabled, it can't be selected and its action can't be invoked.
+ Enables/disables the item at index [param idx]. When it is disabled, it can't be selected and its action can't be invoked.
[b]Note:[/b] This method is implemented on macOS.
</description>
</method>
@@ -523,11 +588,31 @@
<param index="1" name="idx" type="int" />
<param index="2" name="icon" type="Texture2D" />
<description>
- Replaces the [Texture2D] icon of the specified [code]idx[/code].
+ Replaces the [Texture2D] icon of the specified [param idx].
[b]Note:[/b] This method is implemented on macOS.
[b]Note:[/b] This method is not supported by macOS "_dock" menu items.
</description>
</method>
+ <method name="global_menu_set_item_indentation_level">
+ <return type="void" />
+ <param index="0" name="menu_root" type="String" />
+ <param index="1" name="idx" type="int" />
+ <param index="2" name="level" type="int" />
+ <description>
+ Sets the horizontal offset of the item at the given [param idx].
+ [b]Note:[/b] This method is implemented on macOS.
+ </description>
+ </method>
+ <method name="global_menu_set_item_key_callback">
+ <return type="void" />
+ <param index="0" name="menu_root" type="String" />
+ <param index="1" name="idx" type="int" />
+ <param index="2" name="key_callback" type="Callable" />
+ <description>
+ Sets the callback of the item at index [param idx]. Callback is emitted when its accelerator is activated.
+ [b]Note:[/b] This method is implemented on macOS.
+ </description>
+ </method>
<method name="global_menu_set_item_max_states">
<return type="void" />
<param index="0" name="menu_root" type="String" />
@@ -544,7 +629,7 @@
<param index="1" name="idx" type="int" />
<param index="2" name="checkable" type="bool" />
<description>
- Sets the type of the item at the specified index [code]idx[/code] to radio button. If [code]false[/code], sets the type of the item to plain text
+ Sets the type of the item at the specified index [param idx] to radio button. If [code]false[/code], sets the type of the item to plain text
[b]Note:[/b] This is purely cosmetic; you must add the logic for checking/unchecking items in radio groups.
[b]Note:[/b] This method is implemented on macOS.
</description>
@@ -565,7 +650,7 @@
<param index="1" name="idx" type="int" />
<param index="2" name="submenu" type="String" />
<description>
- Sets the submenu of the item at index [code]idx[/code]. The submenu is the ID of a global menu root that would be shown when the item is clicked.
+ Sets the submenu of the item at index [param idx]. The submenu is the ID of a global menu root that would be shown when the item is clicked.
[b]Note:[/b] This method is implemented on macOS.
</description>
</method>
@@ -585,7 +670,7 @@
<param index="1" name="idx" type="int" />
<param index="2" name="text" type="String" />
<description>
- Sets the text of the item at index [code]idx[/code].
+ Sets the text of the item at index [param idx].
[b]Note:[/b] This method is implemented on macOS.
</description>
</method>
@@ -595,7 +680,7 @@
<param index="1" name="idx" type="int" />
<param index="2" name="tooltip" type="String" />
<description>
- Sets the [String] tooltip of the item at the specified index [code]idx[/code].
+ Sets the [String] tooltip of the item at the specified index [param idx].
[b]Note:[/b] This method is implemented on macOS.
</description>
</method>
@@ -603,72 +688,93 @@
<return type="bool" />
<param index="0" name="feature" type="int" enum="DisplayServer.Feature" />
<description>
+ Returns [code]true[/code] if the specified [param feature] is supported by the current [DisplayServer], [code]false[/code] otherwise.
</description>
</method>
<method name="ime_get_selection" qualifiers="const">
<return type="Vector2i" />
<description>
+ Returns the text selection in the [url=https://en.wikipedia.org/wiki/Input_method]Input Method Editor[/url] composition string, with the [Vector2i]'s [code]x[/code] component being the caret position and [code]y[/code] being the length of the selection.
+ [b]Note:[/b] This method is implemented on macOS.
</description>
</method>
<method name="ime_get_text" qualifiers="const">
<return type="String" />
<description>
+ Returns the composition string contained within the [url=https://en.wikipedia.org/wiki/Input_method]Input Method Editor[/url] window.
+ [b]Note:[/b] This method is implemented on macOS.
+ </description>
+ </method>
+ <method name="is_dark_mode" qualifiers="const">
+ <return type="bool" />
+ <description>
+ Returns [code]true[/code] if OS is using dark mode.
+ [b]Note:[/b] This method is implemented on macOS, Windows and Linux (X11).
+ </description>
+ </method>
+ <method name="is_dark_mode_supported" qualifiers="const">
+ <return type="bool" />
+ <description>
+ Returns [code]true[/code] if OS supports dark mode.
+ [b]Note:[/b] This method is implemented on macOS, Windows and Linux (X11).
</description>
</method>
<method name="keyboard_get_current_layout" qualifiers="const">
<return type="int" />
<description>
Returns active keyboard layout index.
- [b]Note:[/b] This method is implemented on Linux, macOS and Windows.
+ [b]Note:[/b] This method is implemented on Linux (X11), macOS and Windows.
</description>
</method>
<method name="keyboard_get_keycode_from_physical" qualifiers="const">
<return type="int" enum="Key" />
<param index="0" name="keycode" type="int" enum="Key" />
<description>
- Converts a physical (US QWERTY) [code]keycode[/code] to one in the active keyboard layout.
- [b]Note:[/b] This method is implemented on Linux, macOS and Windows.
+ Converts a physical (US QWERTY) [param keycode] to one in the active keyboard layout.
+ [b]Note:[/b] This method is implemented on Linux (X11), macOS and Windows.
</description>
</method>
<method name="keyboard_get_layout_count" qualifiers="const">
<return type="int" />
<description>
Returns the number of keyboard layouts.
- [b]Note:[/b] This method is implemented on Linux, macOS and Windows.
+ [b]Note:[/b] This method is implemented on Linux (X11), macOS and Windows.
</description>
</method>
<method name="keyboard_get_layout_language" qualifiers="const">
<return type="String" />
<param index="0" name="index" type="int" />
<description>
- Returns the ISO-639/BCP-47 language code of the keyboard layout at position [code]index[/code].
- [b]Note:[/b] This method is implemented on Linux, macOS and Windows.
+ Returns the ISO-639/BCP-47 language code of the keyboard layout at position [param index].
+ [b]Note:[/b] This method is implemented on Linux (X11), macOS and Windows.
</description>
</method>
<method name="keyboard_get_layout_name" qualifiers="const">
<return type="String" />
<param index="0" name="index" type="int" />
<description>
- Returns the localized name of the keyboard layout at position [code]index[/code].
- [b]Note:[/b] This method is implemented on Linux, macOS and Windows.
+ Returns the localized name of the keyboard layout at position [param index].
+ [b]Note:[/b] This method is implemented on Linux (X11), macOS and Windows.
</description>
</method>
<method name="keyboard_set_current_layout">
<return type="void" />
<param index="0" name="index" type="int" />
<description>
- Sets active keyboard layout.
- [b]Note:[/b] This method is implemented on Linux, macOS and Windows.
+ Sets the active keyboard layout.
+ [b]Note:[/b] This method is implemented on Linux (X11), macOS and Windows.
</description>
</method>
<method name="mouse_get_button_state" qualifiers="const">
<return type="int" enum="MouseButton" />
<description>
+ Returns the current state of mouse buttons (whether each button is pressed) as a bitmask. If multiple mouse buttons are pressed at the same time, the bits are added together. Equivalent to [method Input.get_mouse_button_mask].
</description>
</method>
<method name="mouse_get_mode" qualifiers="const">
<return type="int" enum="DisplayServer.MouseMode" />
<description>
+ Returns the current mouse mode. See also [method mouse_set_mode].
</description>
</method>
<method name="mouse_get_position" qualifiers="const">
@@ -681,18 +787,20 @@
<return type="void" />
<param index="0" name="mouse_mode" type="int" enum="DisplayServer.MouseMode" />
<description>
+ Sets the current mouse mode. See also [method mouse_get_mode].
</description>
</method>
<method name="process_events">
<return type="void" />
<description>
+ Perform window manager processing, including input flushing. See also [method force_process_and_drop_events], [method Input.flush_buffered_events] and [member Input.use_accumulated_input].
</description>
</method>
<method name="screen_get_dpi" qualifiers="const">
<return type="int" />
<param index="0" name="screen" type="int" default="-1" />
<description>
- Returns the dots per inch density of the specified screen. If [code]screen[/code] is [/code]SCREEN_OF_MAIN_WINDOW[/code] (the default value), a screen with the main window will be used.
+ Returns the dots per inch density of the specified screen. If [param screen] is [constant SCREEN_OF_MAIN_WINDOW] (the default value), a screen with the main window will be used.
[b]Note:[/b] On macOS, returned value is inaccurate if fractional display scaling mode is used.
[b]Note:[/b] On Android devices, the actual screen densities are grouped into six generalized densities:
[codeblock]
@@ -703,7 +811,7 @@
xxhdpi - 480 dpi
xxxhdpi - 640 dpi
[/codeblock]
- [b]Note:[/b] This method is implemented on Android, Linux, macOS and Windows. Returns [code]72[/code] on unsupported platforms.
+ [b]Note:[/b] This method is implemented on Android, Linux (X11), macOS and Windows. Returns [code]72[/code] on unsupported platforms.
</description>
</method>
<method name="screen_get_max_scale" qualifiers="const">
@@ -718,20 +826,32 @@
<return type="int" enum="DisplayServer.ScreenOrientation" />
<param index="0" name="screen" type="int" default="-1" />
<description>
+ Returns the [param screen]'s current orientation. See also [method screen_set_orientation].
+ [b]Note:[/b] This method is implemented on Android and iOS.
</description>
</method>
<method name="screen_get_position" qualifiers="const">
<return type="Vector2i" />
<param index="0" name="screen" type="int" default="-1" />
<description>
+ Returns the screen's top-left corner position in pixels. On multi-monitor setups, the screen position is relative to the virtual desktop area. On multi-monitor setups with different screen resolutions or orientations, the origin may be located outside any display like this:
+ [codeblock]
+ * (0, 0) +-------+
+ | |
+ +-------------+ | |
+ | | | |
+ | | | |
+ +-------------+ +-------+
+ [/codeblock]
+ See also [method screen_get_size].
</description>
</method>
<method name="screen_get_refresh_rate" qualifiers="const">
<return type="float" />
<param index="0" name="screen" type="int" default="-1" />
<description>
- Returns the current refresh rate of the specified screen. If [code]screen[/code] is [constant SCREEN_OF_MAIN_WINDOW] (the default value), a screen with the main window will be used.
- [b]Note:[/b] Returns [code]-1.0[/code] if the DisplayServer fails to find the refresh rate for the specified screen. On HTML5, [method screen_get_refresh_rate] will always return [code]-1.0[/code] as there is no way to retrieve the refresh rate on that platform.
+ Returns the current refresh rate of the specified screen. If [param screen] is [constant SCREEN_OF_MAIN_WINDOW] (the default value), a screen with the main window will be used.
+ [b]Note:[/b] Returns [code]-1.0[/code] if the DisplayServer fails to find the refresh rate for the specified screen. On Web, [method screen_get_refresh_rate] will always return [code]-1.0[/code] as there is no way to retrieve the refresh rate on that platform.
To fallback to a default refresh rate if the method fails, try:
[codeblock]
var refresh_rate = DisplayServer.screen_get_refresh_rate()
@@ -753,29 +873,34 @@
<return type="Vector2i" />
<param index="0" name="screen" type="int" default="-1" />
<description>
+ Returns the screen's size in pixels. See also [method screen_get_position] and [method screen_get_usable_rect].
</description>
</method>
<method name="screen_get_usable_rect" qualifiers="const">
<return type="Rect2i" />
<param index="0" name="screen" type="int" default="-1" />
<description>
+ Returns the portion of the screen that is not obstructed by a status bar in pixels. See also [method screen_get_size].
</description>
</method>
<method name="screen_is_kept_on" qualifiers="const">
<return type="bool" />
<description>
+ Returns [code]true[/code] if the screen should never be turned off by the operating system's power-saving measures. See also [method screen_set_keep_on].
</description>
</method>
<method name="screen_is_touchscreen" qualifiers="const">
<return type="bool" />
<param index="0" name="screen" type="int" default="-1" />
<description>
+ Returns [code]true[/code] if the screen can send touch events or if [member ProjectSettings.input_devices/pointing/emulate_touch_from_mouse] is [code]true[/code].
</description>
</method>
<method name="screen_set_keep_on">
<return type="void" />
<param index="0" name="enable" type="bool" />
<description>
+ Sets whether the screen should never be turned off by the operating system's power-saving measures. See also [method screen_is_kept_on].
</description>
</method>
<method name="screen_set_orientation">
@@ -783,18 +908,21 @@
<param index="0" name="orientation" type="int" enum="DisplayServer.ScreenOrientation" />
<param index="1" name="screen" type="int" default="-1" />
<description>
+ Sets the [param screen]'s [param orientation]. See also [method screen_get_orientation].
</description>
</method>
<method name="set_icon">
<return type="void" />
<param index="0" name="image" type="Image" />
<description>
+ Sets the window icon (usually displayed in the top-left corner) in the operating system's [i]native[/i] format. To use icons in the operating system's native format, use [method set_native_icon] instead.
</description>
</method>
<method name="set_native_icon">
<return type="void" />
<param index="0" name="filename" type="String" />
<description>
+ Sets the window icon (usually displayed in the top-left corner) in the operating system's [i]native[/i] format. The file at [param filename] must be in [code].ico[/code] format on Windows or [code].icns[/code] on macOS. By using specially crafted [code].ico[/code] or [code].icns[/code] icons, [method set_native_icon] allows specifying different icons depending on the size the icon is displayed at. This size is determined by the operating system and user preferences (including the display scale factor). To use icons in other formats, use [method set_icon] instead.
</description>
</method>
<method name="tablet_get_current_driver" qualifiers="const">
@@ -828,50 +956,50 @@
</description>
</method>
<method name="tts_get_voices" qualifiers="const">
- <return type="Array" />
+ <return type="Dictionary[]" />
<description>
Returns an [Array] of voice information dictionaries.
Each [Dictionary] contains two [String] entries:
- [code]name[/code] is voice name.
- [code]id[/code] is voice identifier.
- [code]language[/code] is language code in [code]lang_Variant[/code] format. [code]lang[/code] part is a 2 or 3-letter code based on the ISO-639 standard, in lowercase. And [code]Variant[/code] part is an engine dependent string describing country, region or/and dialect.
- [b]Note:[/b] This method is implemented on Android, iOS, HTML5, Linux, macOS, and Windows.
+ [b]Note:[/b] This method is implemented on Android, iOS, Web, Linux (X11), macOS, and Windows.
</description>
</method>
<method name="tts_get_voices_for_language" qualifiers="const">
<return type="PackedStringArray" />
<param index="0" name="language" type="String" />
<description>
- Returns an [PackedStringArray] of voice identifiers for the [code]language[/code].
- [b]Note:[/b] This method is implemented on Android, iOS, HTML5, Linux, macOS, and Windows.
+ Returns an [PackedStringArray] of voice identifiers for the [param language].
+ [b]Note:[/b] This method is implemented on Android, iOS, Web, Linux (X11), macOS, and Windows.
</description>
</method>
<method name="tts_is_paused" qualifiers="const">
<return type="bool" />
<description>
Returns [code]true[/code] if the synthesizer is in a paused state.
- [b]Note:[/b] This method is implemented on Android, iOS, HTML5, Linux, macOS, and Windows.
+ [b]Note:[/b] This method is implemented on Android, iOS, Web, Linux (X11), macOS, and Windows.
</description>
</method>
<method name="tts_is_speaking" qualifiers="const">
<return type="bool" />
<description>
Returns [code]true[/code] if the synthesizer is generating speech, or have utterance waiting in the queue.
- [b]Note:[/b] This method is implemented on Android, iOS, HTML5, Linux, macOS, and Windows.
+ [b]Note:[/b] This method is implemented on Android, iOS, Web, Linux (X11), macOS, and Windows.
</description>
</method>
<method name="tts_pause">
<return type="void" />
<description>
Puts the synthesizer into a paused state.
- [b]Note:[/b] This method is implemented on Android, iOS, HTML5, Linux, macOS, and Windows.
+ [b]Note:[/b] This method is implemented on Android, iOS, Web, Linux (X11), macOS, and Windows.
</description>
</method>
<method name="tts_resume">
<return type="void" />
<description>
Resumes the synthesizer if it was paused.
- [b]Note:[/b] This method is implemented on Android, iOS, HTML5, Linux, macOS, and Windows.
+ [b]Note:[/b] This method is implemented on Android, iOS, Web, Linux (X11), macOS, and Windows.
</description>
</method>
<method name="tts_set_utterance_callback">
@@ -880,10 +1008,10 @@
<param index="1" name="callable" type="Callable" />
<description>
Adds a callback, which is called when the utterance has started, finished, canceled or reached a text boundary.
- - [code]TTS_UTTERANCE_STARTED[/code], [code]TTS_UTTERANCE_ENDED[/code], and [code]TTS_UTTERANCE_CANCELED[/code] callable's method should take one [int] parameter, the utterance id.
- - [code]TTS_UTTERANCE_BOUNDARY[/code] callable's method should take two [int] parameters, the index of the character and the utterance id.
+ - [constant TTS_UTTERANCE_STARTED], [constant TTS_UTTERANCE_ENDED], and [constant TTS_UTTERANCE_CANCELED] callable's method should take one [int] parameter, the utterance id.
+ - [constant TTS_UTTERANCE_BOUNDARY] callable's method should take two [int] parameters, the index of the character and the utterance id.
[b]Note:[/b] The granularity of the boundary callbacks is engine dependent.
- [b]Note:[/b] This method is implemented on Android, iOS, HTML5, Linux, macOS, and Windows.
+ [b]Note:[/b] This method is implemented on Android, iOS, Web, Linux (X11), macOS, and Windows.
</description>
</method>
<method name="tts_speak">
@@ -896,22 +1024,22 @@
<param index="5" name="utterance_id" type="int" default="0" />
<param index="6" name="interrupt" type="bool" default="false" />
<description>
- Adds an utterance to the queue. If [code]interrupt[/code] is [code]true[/code], the queue is cleared first.
- - [code]voice[/code] identifier is one of the [code]"id"[/code] values returned by [method tts_get_voices] or one of the values returned by [method tts_get_voices_for_language].
- - [code]volume[/code] ranges from [code]0[/code] (lowest) to [code]100[/code] (highest).
- - [code]pitch[/code] ranges from [code]0.0[/code] (lowest) to [code]2.0[/code] (highest), [code]1.0[/code] is default pitch for the current voice.
- - [code]rate[/code] ranges from [code]0.1[/code] (lowest) to [code]10.0[/code] (highest), [code]1.0[/code] is a normal speaking rate. Other values act as a percentage relative.
- - [code]utterance_id[/code] is passed as a parameter to the callback functions.
- [b]Note:[/b] On Windows and Linux, utterance [code]text[/code] can use SSML markup. SSML support is engine and voice dependent. If the engine does not support SSML, you should strip out all XML markup before calling [method tts_speak].
+ Adds an utterance to the queue. If [param interrupt] is [code]true[/code], the queue is cleared first.
+ - [param voice] identifier is one of the [code]"id"[/code] values returned by [method tts_get_voices] or one of the values returned by [method tts_get_voices_for_language].
+ - [param volume] ranges from [code]0[/code] (lowest) to [code]100[/code] (highest).
+ - [param pitch] ranges from [code]0.0[/code] (lowest) to [code]2.0[/code] (highest), [code]1.0[/code] is default pitch for the current voice.
+ - [param rate] ranges from [code]0.1[/code] (lowest) to [code]10.0[/code] (highest), [code]1.0[/code] is a normal speaking rate. Other values act as a percentage relative.
+ - [param utterance_id] is passed as a parameter to the callback functions.
+ [b]Note:[/b] On Windows and Linux (X11), utterance [param text] can use SSML markup. SSML support is engine and voice dependent. If the engine does not support SSML, you should strip out all XML markup before calling [method tts_speak].
[b]Note:[/b] The granularity of pitch, rate, and volume is engine and voice dependent. Values may be truncated.
- [b]Note:[/b] This method is implemented on Android, iOS, HTML5, Linux, macOS, and Windows.
+ [b]Note:[/b] This method is implemented on Android, iOS, Web, Linux (X11), macOS, and Windows.
</description>
</method>
<method name="tts_stop">
<return type="void" />
<description>
Stops synthesis in progress and removes all utterances from the queue.
- [b]Note:[/b] This method is implemented on Android, iOS, HTML5, Linux, macOS, and Windows.
+ [b]Note:[/b] This method is implemented on Android, iOS, Web, Linux (X11), macOS, and Windows.
</description>
</method>
<method name="virtual_keyboard_get_height" qualifiers="const">
@@ -936,33 +1064,27 @@
<param index="5" name="cursor_end" type="int" default="-1" />
<description>
Shows the virtual keyboard if the platform has one.
- [code]existing_text[/code] parameter is useful for implementing your own [LineEdit] or [TextEdit], as it tells the virtual keyboard what text has already been typed (the virtual keyboard uses it for auto-correct and predictions).
- [code]position[/code] parameter is the screen space [Rect2] of the edited text.
- [code]type[/code] parameter allows configuring which type of virtual keyboard to show.
- [code]max_length[/code] limits the number of characters that can be entered if different from [code]-1[/code].
- [code]cursor_start[/code] can optionally define the current text cursor position if [code]cursor_end[/code] is not set.
- [code]cursor_start[/code] and [code]cursor_end[/code] can optionally define the current text selection.
- [b]Note:[/b] This method is implemented on Android, iOS and HTML5.
+ [param existing_text] parameter is useful for implementing your own [LineEdit] or [TextEdit], as it tells the virtual keyboard what text has already been typed (the virtual keyboard uses it for auto-correct and predictions).
+ [param position] parameter is the screen space [Rect2] of the edited text.
+ [param type] parameter allows configuring which type of virtual keyboard to show.
+ [param max_length] limits the number of characters that can be entered if different from [code]-1[/code].
+ [param cursor_start] can optionally define the current text cursor position if [param cursor_end] is not set.
+ [param cursor_start] and [param cursor_end] can optionally define the current text selection.
+ [b]Note:[/b] This method is implemented on Android, iOS and Web.
</description>
</method>
<method name="warp_mouse">
<return type="void" />
<param index="0" name="position" type="Vector2i" />
<description>
- Sets the mouse cursor position to the given [code]position[/code] relative to an origin at the upper left corner of the currently focused game Window Manager window.
- </description>
- </method>
- <method name="window_attach_instance_id">
- <return type="void" />
- <param index="0" name="instance_id" type="int" />
- <param index="1" name="window_id" type="int" default="0" />
- <description>
+ Sets the mouse cursor position to the given [param position] relative to an origin at the upper left corner of the currently focused game Window Manager window.
</description>
</method>
<method name="window_can_draw" qualifiers="const">
<return type="bool" />
<param index="0" name="window_id" type="int" default="0" />
<description>
+ Returns [code]true[/code] if anything can be drawn in the window specified by [param window_id], [code]false[/code] otherwise. Using the [code]--disable-render-loop[/code] command line argument or a headless build will return [code]false[/code].
</description>
</method>
<method name="window_get_active_popup" qualifiers="const">
@@ -975,12 +1097,14 @@
<return type="int" />
<param index="0" name="window_id" type="int" default="0" />
<description>
+ Returns the [method Object.get_instance_id] of the [Window] the [param window_id] is attached to. also [method window_get_attached_instance_id].
</description>
</method>
<method name="window_get_current_screen" qualifiers="const">
<return type="int" />
<param index="0" name="window_id" type="int" default="0" />
<description>
+ Returns the screen the window specified by [param window_id] is currently positioned on. If the screen overlaps multiple displays, the screen where the window's center is located is returned. See also [method window_set_current_screen].
</description>
</method>
<method name="window_get_flag" qualifiers="const">
@@ -988,19 +1112,21 @@
<param index="0" name="flag" type="int" enum="DisplayServer.WindowFlags" />
<param index="1" name="window_id" type="int" default="0" />
<description>
- Returns the current value of the given window's [code]flag[/code].
+ Returns the current value of the given window's [param flag].
</description>
</method>
<method name="window_get_max_size" qualifiers="const">
<return type="Vector2i" />
<param index="0" name="window_id" type="int" default="0" />
<description>
+ Returns the window's maximum size (in pixels). See also [method window_set_max_size].
</description>
</method>
<method name="window_get_min_size" qualifiers="const">
<return type="Vector2i" />
<param index="0" name="window_id" type="int" default="0" />
<description>
+ Returns the window's minimum size (in pixels). See also [method window_set_min_size].
</description>
</method>
<method name="window_get_mode" qualifiers="const">
@@ -1016,7 +1142,7 @@
<param index="1" name="window_id" type="int" default="0" />
<description>
Returns internal structure pointers for use in plugins.
- [b]Note:[/b] This method is implemented on Android, Linux, macOS and Windows.
+ [b]Note:[/b] This method is implemented on Android, Linux (X11), macOS and Windows.
</description>
</method>
<method name="window_get_popup_safe_rect" qualifiers="const">
@@ -1037,12 +1163,21 @@
<return type="Vector2i" />
<param index="0" name="window_id" type="int" default="0" />
<description>
+ Returns the size of the window specified by [param window_id] (in pixels), including the borders drawn by the operating system. See also [method window_get_size].
+ </description>
+ </method>
+ <method name="window_get_safe_title_margins" qualifiers="const">
+ <return type="Vector3i" />
+ <param index="0" name="window_id" type="int" default="0" />
+ <description>
+ Returns left margins ([code]x[/code]), right margins ([code]y[/code]) and height ([code]z[/code]) of the title that are safe to use (contains no buttons or other elements) when [constant WINDOW_FLAG_EXTEND_TO_TITLE] flag is set.
</description>
</method>
<method name="window_get_size" qualifiers="const">
<return type="Vector2i" />
<param index="0" name="window_id" type="int" default="0" />
<description>
+ Returns the size of the window specified by [param window_id] (in pixels), excluding the borders drawn by the operating system. This is also called the "client area". See also [method window_get_real_size], [method window_set_size] and [method window_get_position].
</description>
</method>
<method name="window_get_vsync_mode" qualifiers="const">
@@ -1052,16 +1187,39 @@
Returns the V-Sync mode of the given window.
</description>
</method>
+ <method name="window_is_maximize_allowed" qualifiers="const">
+ <return type="bool" />
+ <param index="0" name="window_id" type="int" default="0" />
+ <description>
+ Returns [code]true[/code] if the given window can be maximized (the maximize button is enabled).
+ </description>
+ </method>
+ <method name="window_maximize_on_title_dbl_click" qualifiers="const">
+ <return type="bool" />
+ <description>
+ Returns [code]true[/code], if double-click on a window title should maximize it.
+ [b]Note:[/b] This method is implemented on macOS.
+ </description>
+ </method>
+ <method name="window_minimize_on_title_dbl_click" qualifiers="const">
+ <return type="bool" />
+ <description>
+ Returns [code]true[/code], if double-click on a window title should minimize it.
+ [b]Note:[/b] This method is implemented on macOS.
+ </description>
+ </method>
<method name="window_move_to_foreground">
<return type="void" />
<param index="0" name="window_id" type="int" default="0" />
<description>
+ Moves the window specified by [param window_id] to the foreground, so that it is visible over other windows.
</description>
</method>
<method name="window_request_attention">
<return type="void" />
<param index="0" name="window_id" type="int" default="0" />
<description>
+ Makes the window specified by [param window_id] request attention, which is materialized by the window title and taskbar entry blinking until the window is focused. This usually has no visible effect if the window is currently focused. The exact behavior varies depending on the operating system.
</description>
</method>
<method name="window_set_current_screen">
@@ -1069,6 +1227,7 @@
<param index="0" name="screen" type="int" />
<param index="1" name="window_id" type="int" default="0" />
<description>
+ Moves the window specified by [param window_id] to the specified [param screen]. See also [method window_get_current_screen].
</description>
</method>
<method name="window_set_drop_files_callback">
@@ -1076,6 +1235,8 @@
<param index="0" name="callback" type="Callable" />
<param index="1" name="window_id" type="int" default="0" />
<description>
+ Sets the [param callback] that should be called when files are dropped from the operating system's file manager to the window specified by [param window_id].
+ [b]Note:[/b] This method is implemented on Windows, macOS, Linux (X11) and Web.
</description>
</method>
<method name="window_set_exclusive">
@@ -1094,7 +1255,7 @@
<param index="1" name="enabled" type="bool" />
<param index="2" name="window_id" type="int" default="0" />
<description>
- Enables or disables the given window's given [code]flag[/code]. See [enum WindowFlags] for possible values and their behavior.
+ Enables or disables the given window's given [param flag]. See [enum WindowFlags] for possible values and their behavior.
</description>
</method>
<method name="window_set_ime_active">
@@ -1102,6 +1263,7 @@
<param index="0" name="active" type="bool" />
<param index="1" name="window_id" type="int" default="0" />
<description>
+ Sets whether [url=https://en.wikipedia.org/wiki/Input_method]Input Method Editor[/url] should be enabled for the window specified by [param window_id]. See also [method window_set_ime_position].
</description>
</method>
<method name="window_set_ime_position">
@@ -1109,6 +1271,7 @@
<param index="0" name="position" type="Vector2i" />
<param index="1" name="window_id" type="int" default="0" />
<description>
+ Sets the position of the [url=https://en.wikipedia.org/wiki/Input_method]Input Method Editor[/url] popup for the specified [param window_id]. Only effective if [method window_set_ime_active] was set to [code]true[/code] for the specified [param window_id].
</description>
</method>
<method name="window_set_input_event_callback">
@@ -1116,6 +1279,7 @@
<param index="0" name="callback" type="Callable" />
<param index="1" name="window_id" type="int" default="0" />
<description>
+ Sets the [param callback] that should be called when any [InputEvent] is sent to the window specified by [param window_id].
</description>
</method>
<method name="window_set_input_text_callback">
@@ -1123,6 +1287,7 @@
<param index="0" name="callback" type="Callable" />
<param index="1" name="window_id" type="int" default="0" />
<description>
+ Sets the [param callback] that should be called when text is entered using the virtual keyboard to the window specified by [param window_id].
</description>
</method>
<method name="window_set_max_size">
@@ -1130,6 +1295,8 @@
<param index="0" name="max_size" type="Vector2i" />
<param index="1" name="window_id" type="int" default="0" />
<description>
+ Sets the maximum size of the window specified by [param window_id] in pixels. Normally, the user will not be able to drag the window to make it smaller than the specified size. See also [method window_get_max_size].
+ [b]Note:[/b] Using third-party tools, it is possible for users to disable window geometry restrictions and therefore bypass this limit.
</description>
</method>
<method name="window_set_min_size">
@@ -1137,8 +1304,9 @@
<param index="0" name="min_size" type="Vector2i" />
<param index="1" name="window_id" type="int" default="0" />
<description>
- Sets the minimum size for the given window to [code]min_size[/code] (in pixels).
+ Sets the minimum size for the given window to [param min_size] (in pixels). Normally, the user will not be able to drag the window to make it larger than the specified size. See also [method window_get_min_size].
[b]Note:[/b] By default, the main window has a minimum size of [code]Vector2i(64, 64)[/code]. This prevents issues that can arise when the window is resized to a near-zero size.
+ [b]Note:[/b] Using third-party tools, it is possible for users to disable window geometry restrictions and therefore bypass this limit.
</description>
</method>
<method name="window_set_mode">
@@ -1146,8 +1314,8 @@
<param index="0" name="mode" type="int" enum="DisplayServer.WindowMode" />
<param index="1" name="window_id" type="int" default="0" />
<description>
- Sets window mode for the given window to [code]mode[/code]. See [enum WindowMode] for possible values and how each mode behaves.
- [b]Note:[/b] Setting the window to fullscreen forcibly sets the borderless flag to [code]true[/code], so make sure to set it back to [code]false[/code] when not wanted.
+ Sets window mode for the given window to [param mode]. See [enum WindowMode] for possible values and how each mode behaves.
+ [b]Note:[/b] Setting the window to full screen forcibly sets the borderless flag to [code]true[/code], so make sure to set it back to [code]false[/code] when not wanted.
</description>
</method>
<method name="window_set_mouse_passthrough">
@@ -1179,8 +1347,8 @@
DisplayServer.WindowSetMousePassthrough(new Vector2[] {});
[/csharp]
[/codeblocks]
- [b]Note:[/b] On Windows, the portion of a window that lies outside the region is not drawn, while on Linux and macOS it is.
- [b]Note:[/b] This method is implemented on Linux, macOS and Windows.
+ [b]Note:[/b] On Windows, the portion of a window that lies outside the region is not drawn, while on Linux (X11) and macOS it is.
+ [b]Note:[/b] This method is implemented on Linux (X11), macOS and Windows.
</description>
</method>
<method name="window_set_popup_safe_rect">
@@ -1196,7 +1364,16 @@
<param index="0" name="position" type="Vector2i" />
<param index="1" name="window_id" type="int" default="0" />
<description>
- Sets the position of the given window to [code]position[/code].
+ Sets the position of the given window to [param position]. On multi-monitor setups, the screen position is relative to the virtual desktop area. On multi-monitor setups with different screen resolutions or orientations, the origin may be located outside any display like this:
+ [codeblock]
+ * (0, 0) +-------+
+ | |
+ +-------------+ | |
+ | | | |
+ | | | |
+ +-------------+ +-------+
+ [/codeblock]
+ See also [method window_get_position] and [method window_set_size].
</description>
</method>
<method name="window_set_rect_changed_callback">
@@ -1204,6 +1381,7 @@
<param index="0" name="callback" type="Callable" />
<param index="1" name="window_id" type="int" default="0" />
<description>
+ Sets the [param callback] that will be called when the window specified by [param window_id] is moved or resized.
</description>
</method>
<method name="window_set_size">
@@ -1211,7 +1389,7 @@
<param index="0" name="size" type="Vector2i" />
<param index="1" name="window_id" type="int" default="0" />
<description>
- Sets the size of the given window to [code]size[/code].
+ Sets the size of the given window to [param size] (in pixels). See also [method window_get_size] and [method window_get_position].
</description>
</method>
<method name="window_set_title">
@@ -1219,7 +1397,8 @@
<param index="0" name="title" type="String" />
<param index="1" name="window_id" type="int" default="0" />
<description>
- Sets the title of the given window to [code]title[/code].
+ Sets the title of the given window to [param title].
+ [b]Note:[/b] Avoid changing the window title every frame, as this can cause performance issues on certain window managers. Try to change the window title only a few times per second at most.
</description>
</method>
<method name="window_set_transient">
@@ -1227,6 +1406,8 @@
<param index="0" name="window_id" type="int" />
<param index="1" name="parent_window_id" type="int" />
<description>
+ Sets window transient parent. Transient window is will be destroyed with its transient parent and will return focus to their parent when closed. The transient window is displayed on top of a non-exclusive full-screen parent window. Transient windows can't enter full-screen mode.
+ Note that behavior might be different depending on the platform.
</description>
</method>
<method name="window_set_vsync_mode">
@@ -1239,53 +1420,84 @@
Depending on the platform and used renderer, the engine will fall back to [constant VSYNC_ENABLED], if the desired mode is not supported.
</description>
</method>
+ <method name="window_set_window_buttons_offset">
+ <return type="void" />
+ <param index="0" name="offset" type="Vector2i" />
+ <param index="1" name="window_id" type="int" default="0" />
+ <description>
+ When [constant WINDOW_FLAG_EXTEND_TO_TITLE] flag is set, set offset to the center of the first titlebar button.
+ [b]Note:[/b] This flag is implemented on macOS.
+ </description>
+ </method>
<method name="window_set_window_event_callback">
<return type="void" />
<param index="0" name="callback" type="Callable" />
<param index="1" name="window_id" type="int" default="0" />
<description>
+ Sets the [param callback] that will be called when an event occurs in the window specified by [param window_id].
</description>
</method>
</methods>
<constants>
<constant name="FEATURE_GLOBAL_MENU" value="0" enum="Feature">
+ Display server supports global menu. This allows the application to display its menu items in the operating system's top bar. [b]macOS[/b]
</constant>
<constant name="FEATURE_SUBWINDOWS" value="1" enum="Feature">
+ Display server supports multiple windows that can be moved outside of the main window. [b]Windows, macOS, Linux (X11)[/b]
</constant>
<constant name="FEATURE_TOUCHSCREEN" value="2" enum="Feature">
+ Display server supports touchscreen input. [b]Windows, Linux (X11), Android, iOS, Web[/b]
</constant>
<constant name="FEATURE_MOUSE" value="3" enum="Feature">
+ Display server supports mouse input. [b]Windows, macOS, Linux (X11), Android, Web[/b]
</constant>
<constant name="FEATURE_MOUSE_WARP" value="4" enum="Feature">
+ Display server supports warping mouse coordinates to keep the mouse cursor constrained within an area, but looping when one of the edges is reached. [b]Windows, macOS, Linux (X11)[/b]
</constant>
<constant name="FEATURE_CLIPBOARD" value="5" enum="Feature">
+ Display server supports setting and getting clipboard data. See also [constant FEATURE_CLIPBOARD_PRIMARY]. [b]Windows, macOS, Linux (X11), Android, iOS, Web[/b]
</constant>
<constant name="FEATURE_VIRTUAL_KEYBOARD" value="6" enum="Feature">
+ Display server supports popping up a virtual keyboard when requested to input text without a physical keyboard. [b]Android, iOS, Web[/b]
</constant>
<constant name="FEATURE_CURSOR_SHAPE" value="7" enum="Feature">
+ Display server supports setting the mouse cursor shape to be different from the default. [b]Windows, macOS, Linux (X11), Android, Web[/b]
</constant>
<constant name="FEATURE_CUSTOM_CURSOR_SHAPE" value="8" enum="Feature">
+ Display server supports setting the mouse cursor shape to a custom image. [b]Windows, macOS, Linux (X11), Web[/b]
</constant>
<constant name="FEATURE_NATIVE_DIALOG" value="9" enum="Feature">
+ Display server supports spawning dialogs using the operating system's native look-and-feel. [b]macOS[/b]
</constant>
<constant name="FEATURE_IME" value="10" enum="Feature">
+ Display server supports [url=https://en.wikipedia.org/wiki/Input_method]Input Method Editor[/url], which is commonly used for inputting Chinese/Japanese/Korean text. This is handled by the operating system, rather than by Godot. [b]Windows, macOS, Linux (X11)[/b]
</constant>
<constant name="FEATURE_WINDOW_TRANSPARENCY" value="11" enum="Feature">
+ Display server supports windows can use per-pixel transparency to make windows behind them partially or fully visible. [b]Windows, macOS, Linux (X11)[/b]
</constant>
<constant name="FEATURE_HIDPI" value="12" enum="Feature">
+ Display server supports querying the operating system's display scale factor. This allows for [i]reliable[/i] automatic hiDPI display detection, as opposed to guessing based on the screen resolution and reported display DPI (which can be unreliable due to broken monitor EDID). [b]Windows, macOS[/b]
</constant>
<constant name="FEATURE_ICON" value="13" enum="Feature">
+ Display server supports changing the window icon (usually displayed in the top-left corner). [b]Windows, macOS, Linux (X11)[/b]
</constant>
<constant name="FEATURE_NATIVE_ICON" value="14" enum="Feature">
+ Display server supports changing the window icon (usually displayed in the top-left corner). [b]Windows, macOS[/b]
</constant>
<constant name="FEATURE_ORIENTATION" value="15" enum="Feature">
+ Display server supports changing the screen orientation. [b]Android, iOS[/b]
</constant>
<constant name="FEATURE_SWAP_BUFFERS" value="16" enum="Feature">
+ Display server supports V-Sync status can be changed from the default (which is forced to be enabled platforms not supporting this feature). [b]Windows, macOS, Linux (X11)[/b]
</constant>
<constant name="FEATURE_CLIPBOARD_PRIMARY" value="18" enum="Feature">
+ Display server supports Primary clipboard can be used. This is a different clipboard from [constant FEATURE_CLIPBOARD]. [b]Linux (X11)[/b]
</constant>
<constant name="FEATURE_TEXT_TO_SPEECH" value="19" enum="Feature">
- Display server supports text-to-speech. See [code]tts_*[/code] methods.
+ Display server supports text-to-speech. See [code]tts_*[/code] methods. [b]Windows, macOS, Linux (X11), Android, iOS, Web[/b]
+ </constant>
+ <constant name="FEATURE_EXTEND_TO_TITLE" value="20" enum="Feature">
+ Display server supports expanding window content to the title. See [constant WINDOW_FLAG_EXTEND_TO_TITLE]. [b]macOS[/b]
</constant>
<constant name="MOUSE_MODE_VISIBLE" value="0" enum="MouseMode">
Makes the mouse cursor visible if it is hidden.
@@ -1304,24 +1516,34 @@
Confines the mouse cursor to the game window, and make it hidden.
</constant>
<constant name="SCREEN_OF_MAIN_WINDOW" value="-1">
+ Represents the screen where the main window is located. This is usually the default value in functions that allow specifying one of several screens.
</constant>
<constant name="MAIN_WINDOW_ID" value="0">
+ The ID of the main window spawned by the engine, which can be passed to methods expecting a [code]window_id[/code].
</constant>
<constant name="INVALID_WINDOW_ID" value="-1">
+ The ID that refers to a nonexisting window. This is be returned by some [DisplayServer] methods if no window matches the requested result.
</constant>
<constant name="SCREEN_LANDSCAPE" value="0" enum="ScreenOrientation">
+ Default landscape orientation.
</constant>
<constant name="SCREEN_PORTRAIT" value="1" enum="ScreenOrientation">
+ Default portrait orienstation.
</constant>
<constant name="SCREEN_REVERSE_LANDSCAPE" value="2" enum="ScreenOrientation">
+ Reverse landscape orientation (upside down).
</constant>
<constant name="SCREEN_REVERSE_PORTRAIT" value="3" enum="ScreenOrientation">
+ Reverse portrait orientation (upside down).
</constant>
<constant name="SCREEN_SENSOR_LANDSCAPE" value="4" enum="ScreenOrientation">
+ Automatic landscape orientation (default or reverse depending on sensor).
</constant>
<constant name="SCREEN_SENSOR_PORTRAIT" value="5" enum="ScreenOrientation">
+ Automatic portrait orientation (default or reverse depending on sensor).
</constant>
<constant name="SCREEN_SENSOR" value="6" enum="ScreenOrientation">
+ Automatic landscape or portrait orientation (default or reverse depending on sensor).
</constant>
<constant name="KEYBOARD_TYPE_DEFAULT" value="0" enum="VirtualKeyboardType">
Default text virtual keyboard.
@@ -1343,126 +1565,178 @@
</constant>
<constant name="KEYBOARD_TYPE_PASSWORD" value="6" enum="VirtualKeyboardType">
Virtual keyboard for entering a password. On most platforms, this should disable autocomplete and autocapitalization.
- [b]Note:[/b] This is not supported on HTML5. Instead, this behaves identically to [constant KEYBOARD_TYPE_DEFAULT].
+ [b]Note:[/b] This is not supported on Web. Instead, this behaves identically to [constant KEYBOARD_TYPE_DEFAULT].
</constant>
<constant name="KEYBOARD_TYPE_URL" value="7" enum="VirtualKeyboardType">
Virtual keyboard with additional keys to assist with typing URLs.
</constant>
<constant name="CURSOR_ARROW" value="0" enum="CursorShape">
+ Arrow cursor shape. This is the default when not pointing anything that overrides the mouse cursor, such as a [LineEdit] or [TextEdit].
</constant>
<constant name="CURSOR_IBEAM" value="1" enum="CursorShape">
+ I-beam cursor shape. This is used by default when hovering a control that accepts text input, such as [LineEdit] or [TextEdit].
</constant>
<constant name="CURSOR_POINTING_HAND" value="2" enum="CursorShape">
+ Pointing hand cursor shape. This is used by default when hovering a [LinkButton] or an URL tag in a [RichTextLabel].â‹…
</constant>
<constant name="CURSOR_CROSS" value="3" enum="CursorShape">
+ Crosshair cursor. This is intended to be displayed when the user needs precise aim over an element, such as a rectangle selection tool or a color picker.
</constant>
<constant name="CURSOR_WAIT" value="4" enum="CursorShape">
+ Wait cursor. On most cursor themes, this displays a spinning icon [i]besides[/i] the arrow. Intended to be used for non-blocking operations (when the user can do something else at the moment). See also [constant CURSOR_BUSY].
</constant>
<constant name="CURSOR_BUSY" value="5" enum="CursorShape">
+ Wait cursor. On most cursor themes, this [i]replaces[/i] the arrow with a spinning icon. Intended to be used for blocking operations (when the user can't do anything else at the moment). See also [constant CURSOR_WAIT].
</constant>
<constant name="CURSOR_DRAG" value="6" enum="CursorShape">
+ Dragging hand cursor. This is displayed during drag-and-drop operations. See also [constant CURSOR_CAN_DROP].
</constant>
<constant name="CURSOR_CAN_DROP" value="7" enum="CursorShape">
+ "Can drop" cursor. This is displayed during drag-and-drop operations if hovering over a [Control] that can accept the drag-and-drop event. On most cursor themes, this displays a dragging hand with an arrow symbol besides it. See also [constant CURSOR_DRAG].
</constant>
<constant name="CURSOR_FORBIDDEN" value="8" enum="CursorShape">
+ Forbidden cursor. This is displayed during drag-and-drop operations if the hovered [Control] can't accept the drag-and-drop event.
</constant>
<constant name="CURSOR_VSIZE" value="9" enum="CursorShape">
+ Vertical resize cursor. Intended to be displayed when the hovered [Control] can be vertically resized using the mouse. See also [constant CURSOR_VSPLIT].
</constant>
<constant name="CURSOR_HSIZE" value="10" enum="CursorShape">
+ Horizontal resize cursor. Intended to be displayed when the hovered [Control] can be horizontally resized using the mouse. See also [constant CURSOR_HSPLIT].
</constant>
<constant name="CURSOR_BDIAGSIZE" value="11" enum="CursorShape">
+ Secondary diagonal resize cursor (top-right/bottom-left). Intended to be displayed when the hovered [Control] can be resized on both axes at once using the mouse.
</constant>
<constant name="CURSOR_FDIAGSIZE" value="12" enum="CursorShape">
+ Main diagonal resize cursor (top-left/bottom-right). Intended to be displayed when the hovered [Control] can be resized on both axes at once using the mouse.
</constant>
<constant name="CURSOR_MOVE" value="13" enum="CursorShape">
+ Move cursor. Intended to be displayed when the hovered [Control] can be moved using the mouse.
</constant>
<constant name="CURSOR_VSPLIT" value="14" enum="CursorShape">
+ Vertical split cursor. This is displayed when hovering a [Control] with splits that can be vertically resized using the mouse, such as [VSplitContainer]. On some cursor themes, this cursor may have the same appearance as [constant CURSOR_VSIZE].
</constant>
<constant name="CURSOR_HSPLIT" value="15" enum="CursorShape">
+ Horizontal split cursor. This is displayed when hovering a [Control] with splits that can be horizontally resized using the mouse, such as [HSplitContainer]. On some cursor themes, this cursor may have the same appearance as [constant CURSOR_HSIZE].
</constant>
<constant name="CURSOR_HELP" value="16" enum="CursorShape">
+ Help cursor. On most cursor themes, this displays a question mark icon instead of the mouse cursor. Intended to be used when the user has requested help on the next element that will be clicked.
</constant>
<constant name="CURSOR_MAX" value="17" enum="CursorShape">
+ Represents the size of the [enum CursorShape] enum.
</constant>
<constant name="WINDOW_MODE_WINDOWED" value="0" enum="WindowMode">
+ Windowed mode, i.e. [Window] doesn't occupy the whole screen (unless set to the size of the screen).
</constant>
<constant name="WINDOW_MODE_MINIMIZED" value="1" enum="WindowMode">
+ Minimized window mode, i.e. [Window] is not visible and available on window manager's window list. Normally happens when the minimize button is pressed.
</constant>
<constant name="WINDOW_MODE_MAXIMIZED" value="2" enum="WindowMode">
+ Maximized window mode, i.e. [Window] will occupy whole screen area except task bar and still display its borders. Normally happens when the minimize button is pressed.
</constant>
<constant name="WINDOW_MODE_FULLSCREEN" value="3" enum="WindowMode">
- Fullscreen window mode. Note that this is not [i]exclusive[/i] fullscreen. On Windows and Linux, a borderless window is used to emulate fullscreen. On macOS, a new desktop is used to display the running project.
- Regardless of the platform, enabling fullscreen will change the window size to match the monitor's size. Therefore, make sure your project supports [url=$DOCS_URL/tutorials/rendering/multiple_resolutions.html]multiple resolutions[/url] when enabling fullscreen mode.
+ Full screen window mode. Note that this is not [i]exclusive[/i] full screen. On Windows and Linux (X11), a borderless window is used to emulate full screen. On macOS, a new desktop is used to display the running project.
+ Regardless of the platform, enabling full screen will change the window size to match the monitor's size. Therefore, make sure your project supports [url=$DOCS_URL/tutorials/rendering/multiple_resolutions.html]multiple resolutions[/url] when enabling full screen mode.
</constant>
<constant name="WINDOW_MODE_EXCLUSIVE_FULLSCREEN" value="4" enum="WindowMode">
- Exclusive fullscreen window mode. This mode is implemented on Windows only. On other platforms, it is equivalent to [constant WINDOW_MODE_FULLSCREEN].
- Only one window in exclusive fullscreen mode can be visible on a given screen at a time. If multiple windows are in exclusive fullscreen mode for the same screen, the last one being set to this mode takes precedence.
- Regardless of the platform, enabling fullscreen will change the window size to match the monitor's size. Therefore, make sure your project supports [url=$DOCS_URL/tutorials/rendering/multiple_resolutions.html]multiple resolutions[/url] when enabling fullscreen mode.
+ Exclusive full screen window mode. This mode is implemented on Windows and macOS only. On other platforms, it is equivalent to [constant WINDOW_MODE_FULLSCREEN].
+ [b]On Windows:[/b] Only one window in exclusive full screen mode can be visible on a given screen at a time. If multiple windows are in exclusive full screen mode for the same screen, the last one being set to this mode takes precedence.
+ [b]On macOS:[/b] Exclusive full-screen mode prevents Dock and Menu from showing up when the mouse pointer is hovering the edge of the screen.
+ Regardless of the platform, enabling full screen will change the window size to match the monitor's size. Therefore, make sure your project supports [url=$DOCS_URL/tutorials/rendering/multiple_resolutions.html]multiple resolutions[/url] when enabling full screen mode.
</constant>
<constant name="WINDOW_FLAG_RESIZE_DISABLED" value="0" enum="WindowFlags">
- Window can't be resizing by dragging its resize grip. It's still possible to resize the window using [method window_set_size]. This flag is ignored for full screen windows.
+ The window can't be resizing by dragging its resize grip. It's still possible to resize the window using [method window_set_size]. This flag is ignored for full screen windows.
</constant>
<constant name="WINDOW_FLAG_BORDERLESS" value="1" enum="WindowFlags">
- Window do not have native title bar and other decorations. This flag is ignored for full-screen windows.
+ The window do not have native title bar and other decorations. This flag is ignored for full-screen windows.
</constant>
<constant name="WINDOW_FLAG_ALWAYS_ON_TOP" value="2" enum="WindowFlags">
- Window is floating above other regular windows. This flag is ignored for full-screen windows.
+ The window is floating on top of all other windows. This flag is ignored for full-screen windows.
</constant>
<constant name="WINDOW_FLAG_TRANSPARENT" value="3" enum="WindowFlags">
- Window is will be destroyed with its transient parent and displayed on top of non-exclusive full-screen parent window. Transient windows can't enter full-screen mode.
+ The window background can be transparent.
+ [b]Note:[/b] This flag has no effect if [member ProjectSettings.display/window/per_pixel_transparency/allowed] is set to [code]false[/code].
+ [b]Note:[/b] Transparency support is implemented on Linux (X11), macOS and Windows, but availability might vary depending on GPU driver, display manager, and compositor capabilities.
</constant>
<constant name="WINDOW_FLAG_NO_FOCUS" value="4" enum="WindowFlags">
- Window can't be focused. No-focus window will ignore all input, except mouse clicks.
+ The window can't be focused. No-focus window will ignore all input, except mouse clicks.
</constant>
<constant name="WINDOW_FLAG_POPUP" value="5" enum="WindowFlags">
- Window is part of menu or [OptionButton] dropdown. This flag can't be changed when window is visible. An active popup window will exclusively receive all input, without stealing focus from its parent. Popup windows are automatically closed when uses click outside it, or when an application is switched. Popup window must have [constant WINDOW_FLAG_TRANSPARENT] set.
+ Window is part of menu or [OptionButton] dropdown. This flag can't be changed when the window is visible. An active popup window will exclusively receive all input, without stealing focus from its parent. Popup windows are automatically closed when uses click outside it, or when an application is switched. Popup window must have [code]transient parent[/code] set (see [method window_set_transient]).
+ </constant>
+ <constant name="WINDOW_FLAG_EXTEND_TO_TITLE" value="6" enum="WindowFlags">
+ Window content is expanded to the full size of the window. Unlike borderless window, the frame is left intact and can be used to resize the window, title bar is transparent, but have minimize/maximize/close buttons.
+ Use [method window_set_window_buttons_offset] to adjust minimize/maximize/close buttons offset.
+ Use [method window_get_safe_title_margins] to determine area under the title bar that is not covered by decorations.
+ [b]Note:[/b] This flag is implemented on macOS.
</constant>
- <constant name="WINDOW_FLAG_MAX" value="6" enum="WindowFlags">
+ <constant name="WINDOW_FLAG_MAX" value="7" enum="WindowFlags">
+ Max value of the [enum WindowFlags].
</constant>
<constant name="WINDOW_EVENT_MOUSE_ENTER" value="0" enum="WindowEvent">
+ Sent when the mouse pointer enters the window, see [method window_set_window_event_callback].
</constant>
<constant name="WINDOW_EVENT_MOUSE_EXIT" value="1" enum="WindowEvent">
+ Sent when the mouse pointer exits the window, see [method window_set_window_event_callback].
</constant>
<constant name="WINDOW_EVENT_FOCUS_IN" value="2" enum="WindowEvent">
+ Sent when the window grabs focus, see [method window_set_window_event_callback].
</constant>
<constant name="WINDOW_EVENT_FOCUS_OUT" value="3" enum="WindowEvent">
+ Sent when the window loses focus, see [method window_set_window_event_callback].
</constant>
<constant name="WINDOW_EVENT_CLOSE_REQUEST" value="4" enum="WindowEvent">
+ Sent when the user has attempted to close the window (e.g. close button is pressed), see [method window_set_window_event_callback].
</constant>
<constant name="WINDOW_EVENT_GO_BACK_REQUEST" value="5" enum="WindowEvent">
+ Sent when the device "Back" button is pressed, see [method window_set_window_event_callback].
+ [b]Note:[/b] This event is implemented on Android.
</constant>
<constant name="WINDOW_EVENT_DPI_CHANGE" value="6" enum="WindowEvent">
+ Sent when the window is moved to the display with different DPI, or display DPI is changed, see [method window_set_window_event_callback].
+ [b]Note:[/b] This flag is implemented on macOS.
+ </constant>
+ <constant name="WINDOW_EVENT_TITLEBAR_CHANGE" value="7" enum="WindowEvent">
+ Sent when the window title bar decoration is changed (e.g. [constant WINDOW_FLAG_EXTEND_TO_TITLE] is set or window entered/exited full screen mode), see [method window_set_window_event_callback].
+ [b]Note:[/b] This flag is implemented on macOS.
</constant>
<constant name="VSYNC_DISABLED" value="0" enum="VSyncMode">
- No vertical synchronization, which means the engine will display frames as fast as possible (tearing may be visible).
+ No vertical synchronization, which means the engine will display frames as fast as possible (tearing may be visible). Framerate is unlimited (nonwithstanding [member Engine.max_fps]).
</constant>
<constant name="VSYNC_ENABLED" value="1" enum="VSyncMode">
- Default vertical synchronization mode, the image is displayed only on vertical blanking intervals (no tearing is visible).
+ Default vertical synchronization mode, the image is displayed only on vertical blanking intervals (no tearing is visible). Framerate is limited by the monitor refresh rate (nonwithstanding [member Engine.max_fps]).
</constant>
<constant name="VSYNC_ADAPTIVE" value="2" enum="VSyncMode">
- Behaves like [constant VSYNC_DISABLED] when the framerate drops below the screen's refresh rate to reduce stuttering (tearing may be visible), otherwise vertical synchronization is enabled to avoid tearing.
+ Behaves like [constant VSYNC_DISABLED] when the framerate drops below the screen's refresh rate to reduce stuttering (tearing may be visible). Otherwise, vertical synchronization is enabled to avoid tearing. Framerate is limited by the monitor refresh rate (nonwithstanding [member Engine.max_fps]).
</constant>
<constant name="VSYNC_MAILBOX" value="3" enum="VSyncMode">
- Displays the most recent image in the queue on vertical blanking intervals, while rendering to the other images (no tearing is visible).
- Although not guaranteed, the images can be rendered as fast as possible, which may reduce input lag.
+ Displays the most recent image in the queue on vertical blanking intervals, while rendering to the other images (no tearing is visible). Framerate is unlimited (nonwithstanding [member Engine.max_fps]).
+ Although not guaranteed, the images can be rendered as fast as possible, which may reduce input lag (also called "Fast" V-Sync mode). [constant VSYNC_MAILBOX] works best when at least twice as many frames as the display refresh rate are rendered.
</constant>
<constant name="DISPLAY_HANDLE" value="0" enum="HandleType">
Display handle:
- - Linux: [code]X11::Display*[/code] for the display.
+ - Linux (X11): [code]X11::Display*[/code] for the display.
</constant>
<constant name="WINDOW_HANDLE" value="1" enum="HandleType">
Window handle:
- Windows: [code]HWND[/code] for the window.
- - Linux: [code]X11::Window*[/code] for the window.
- - MacOS: [code]NSWindow*[/code] for the window.
+ - Linux (X11): [code]X11::Window*[/code] for the window.
+ - macOS: [code]NSWindow*[/code] for the window.
- iOS: [code]UIViewController*[/code] for the view controller.
- Android: [code]jObject[/code] for the activity.
</constant>
<constant name="WINDOW_VIEW" value="2" enum="HandleType">
Window view:
- - MacOS: [code]NSView*[/code] for the window main view.
+ - Windows: [code]HDC[/code] for the window (only with the GL Compatibility renderer).
+ - macOS: [code]NSView*[/code] for the window main view.
- iOS: [code]UIView*[/code] for the window main view.
</constant>
+ <constant name="OPENGL_CONTEXT" value="3" enum="HandleType">
+ OpenGL context (only with the GL Compatibility renderer):
+ - Windows: [code]HGLRC[/code] for the window.
+ - Linux: [code]GLXContext*[/code] for the window.
+ - MacOS: [code]NSOpenGLContext*[/code] for the window.
+ - Android: [code]EGLContext[/code] for the window.
+ </constant>
<constant name="TTS_UTTERANCE_STARTED" value="0" enum="TTSUtteranceEvent">
Utterance has begun to be spoken.
</constant>
diff --git a/doc/classes/EditorCommandPalette.xml b/doc/classes/EditorCommandPalette.xml
index 23e9349cb5..380c79fc1a 100644
--- a/doc/classes/EditorCommandPalette.xml
+++ b/doc/classes/EditorCommandPalette.xml
@@ -5,7 +5,7 @@
</brief_description>
<description>
Object that holds all the available Commands and their shortcuts text. These Commands can be accessed through [b]Editor &gt; Command Palette[/b] menu.
- Command key names use slash delimiters to distinguish sections Example: [code]"example/command1"[/code] then [code]example[/code] will be the section name.
+ Command key names use slash delimiters to distinguish sections, for example: [code]"example/command1"[/code] then [code]example[/code] will be the section name.
[codeblocks]
[gdscript]
var command_palette = get_editor_interface().get_command_palette()
@@ -33,10 +33,10 @@
<param index="3" name="shortcut_text" type="String" default="&quot;None&quot;" />
<description>
Adds a custom command to EditorCommandPalette.
- - [code]command_name[/code]: [String] (Name of the [b]Command[/b]. This is displayed to the user.)
- - [code]key_name[/code]: [String] (Name of the key for a particular [b]Command[/b]. This is used to uniquely identify the [b]Command[/b].)
- - [code]binded_callable[/code]: [Callable] (Callable of the [b]Command[/b]. This will be executed when the [b]Command[/b] is selected.)
- - [code]shortcut_text[/code]: [String] (Shortcut text of the [b]Command[/b] if available.)
+ - [param command_name]: [String] (Name of the [b]Command[/b]. This is displayed to the user.)
+ - [param key_name]: [String] (Name of the key for a particular [b]Command[/b]. This is used to uniquely identify the [b]Command[/b].)
+ - [param binded_callable]: [Callable] (Callable of the [b]Command[/b]. This will be executed when the [b]Command[/b] is selected.)
+ - [param shortcut_text]: [String] (Shortcut text of the [b]Command[/b] if available.)
</description>
</method>
<method name="remove_command">
@@ -44,7 +44,7 @@
<param index="0" name="key_name" type="String" />
<description>
Removes the custom command from EditorCommandPalette.
- - [code]key_name[/code]: [String] (Name of the key for a particular [b]Command[/b].)
+ - [param key_name]: [String] (Name of the key for a particular [b]Command[/b].)
</description>
</method>
</methods>
diff --git a/doc/classes/EditorDebuggerPlugin.xml b/doc/classes/EditorDebuggerPlugin.xml
index 0b208fb921..10da1edd56 100644
--- a/doc/classes/EditorDebuggerPlugin.xml
+++ b/doc/classes/EditorDebuggerPlugin.xml
@@ -1,88 +1,88 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EditorDebuggerPlugin" inherits="Control" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+<class name="EditorDebuggerPlugin" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A base class to implement debugger plugins.
</brief_description>
<description>
[EditorDebuggerPlugin] provides functions related to the editor side of the debugger.
- You don't need to instantiate this class; that is automatically handled by the debugger. [Control] nodes can be added as child nodes to provide a GUI for the plugin.
- Do not free or reparent this node, otherwise it becomes unusable.
- To use [EditorDebuggerPlugin], register it using the [method EditorPlugin.add_debugger_plugin] method first.
+ To interact with the debugger, an instance of this class must be added to the editor via [method EditorPlugin.add_debugger_plugin].
+ Once added, the [method _setup_session] callback will be called for every [EditorDebuggerSession] available to the plugin, and when new ones are created (the sessions may be inactive during this stage).
+ You can retrieve the available [EditorDebuggerSession]s via [method get_sessions] or get a specific one via [method get_session].
+ [codeblocks]
+ [gdscript]
+ @tool
+ extends EditorPlugin
+
+ class ExampleEditorDebugger extends EditorDebuggerPlugin:
+
+ func _has_capture(prefix):
+ # Return true if you wish to handle message with this prefix.
+ return prefix == "my_plugin"
+
+ func _capture(message, data, session_id):
+ if message == "my_plugin:ping":
+ get_session(session_id).send_message("my_plugin:echo", data)
+
+ func _setup_session(session_id):
+ # Add a new tab in the debugger session UI containing a label.
+ var label = Label.new()
+ label.name = "Example plugin"
+ label.text = "Example plugin"
+ var session = get_session(session_id)
+ # Listens to the session started and stopped signals.
+ session.started.connect(func (): print("Session started"))
+ session.stopped.connect(func (): print("Session stopped"))
+ session.add_session_tab(label)
+
+ var debugger = ExampleEditorDebugger.new()
+
+ func _enter_tree():
+ add_debugger_plugin(debugger)
+
+ func _exit_tree():
+ remove_debugger_plugin(debugger)
+ [/gdscript]
+ [/codeblocks]
</description>
<tutorials>
</tutorials>
<methods>
- <method name="has_capture">
- <return type="bool" />
- <param index="0" name="name" type="StringName" />
- <description>
- Returns [code]true[/code] if a message capture with given name is present otherwise [code]false[/code].
- </description>
- </method>
- <method name="is_breaked">
- <return type="bool" />
- <description>
- Returns [code]true[/code] if the game is in break state otherwise [code]false[/code].
- </description>
- </method>
- <method name="is_debuggable">
+ <method name="_capture" qualifiers="virtual">
<return type="bool" />
+ <param index="0" name="message" type="String" />
+ <param index="1" name="data" type="Array" />
+ <param index="2" name="session_id" type="int" />
<description>
- Returns [code]true[/code] if the game can be debugged otherwise [code]false[/code].
+ Override this method to process incoming messages. The [param session_id] is the ID of the [EditorDebuggerSession] that received the message (which you can retrieve via [method get_session]).
</description>
</method>
- <method name="is_session_active">
+ <method name="_has_capture" qualifiers="virtual const">
<return type="bool" />
+ <param index="0" name="capture" type="String" />
<description>
- Returns [code]true[/code] if there is an instance of the game running with the attached debugger otherwise [code]false[/code].
+ Override this method to enable receiving messages from the debugger. If [param capture] is "my_message" then messages starting with "my_message:" will be passes to the [method _capture] method.
</description>
</method>
- <method name="register_message_capture">
+ <method name="_setup_session" qualifiers="virtual">
<return type="void" />
- <param index="0" name="name" type="StringName" />
- <param index="1" name="callable" type="Callable" />
+ <param index="0" name="session_id" type="int" />
<description>
- Registers a message capture with given [code]name[/code]. If [code]name[/code] is "my_message" then messages starting with "my_message:" will be called with the given callable.
- Callable must accept a message string and a data array as argument. If the message and data are valid then callable must return [code]true[/code] otherwise [code]false[/code].
+ Override this method to be notified whenever a new [EditorDebuggerSession] is created (the session may be inactive during this stage).
</description>
</method>
- <method name="send_message">
- <return type="void" />
- <param index="0" name="message" type="String" />
- <param index="1" name="data" type="Array" />
+ <method name="get_session">
+ <return type="EditorDebuggerSession" />
+ <param index="0" name="id" type="int" />
<description>
- Sends a message with given [code]message[/code] and [code]data[/code] array.
+ Returns the [EditorDebuggerSession] with the given [param id].
</description>
</method>
- <method name="unregister_message_capture">
- <return type="void" />
- <param index="0" name="name" type="StringName" />
+ <method name="get_sessions">
+ <return type="Array" />
<description>
- Unregisters the message capture with given name.
+ Returns an array of [EditorDebuggerSession] currently available to this debugger plugin.
+ Note: Not sessions in the array may be inactive, check their state via [method EditorDebuggerSession.is_active]
</description>
</method>
</methods>
- <signals>
- <signal name="breaked">
- <param index="0" name="can_debug" type="bool" />
- <description>
- Emitted when the game enters a break state.
- </description>
- </signal>
- <signal name="continued">
- <description>
- Emitted when the game exists a break state.
- </description>
- </signal>
- <signal name="started">
- <description>
- Emitted when the debugging starts.
- </description>
- </signal>
- <signal name="stopped">
- <description>
- Emitted when the debugging stops.
- </description>
- </signal>
- </signals>
</class>
diff --git a/doc/classes/EditorDebuggerSession.xml b/doc/classes/EditorDebuggerSession.xml
new file mode 100644
index 0000000000..faf528c143
--- /dev/null
+++ b/doc/classes/EditorDebuggerSession.xml
@@ -0,0 +1,86 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="EditorDebuggerSession" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ A class to interact with the editor debugger.
+ </brief_description>
+ <description>
+ This class cannot be directly instantiated and must be retrieved via a [EditorDebuggerPlugin].
+ You can add tabs to the session UI via [method add_session_tab], send messages via [method send_message], and toggle [EngineProfiler]s via [method toggle_profiler].
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="add_session_tab">
+ <return type="void" />
+ <param index="0" name="control" type="Control" />
+ <description>
+ Adds the given [param control] to the debug session UI in the debugger bottom panel.
+ </description>
+ </method>
+ <method name="is_active">
+ <return type="bool" />
+ <description>
+ Returns [code]true[/code] if the debug session is currently attached to a remote instance.
+ </description>
+ </method>
+ <method name="is_breaked">
+ <return type="bool" />
+ <description>
+ Returns [code]true[/code] if the attached remote instance is currently in the debug loop.
+ </description>
+ </method>
+ <method name="is_debuggable">
+ <return type="bool" />
+ <description>
+ Returns [code]true[/code] if the attached remote instance can be debugged.
+ </description>
+ </method>
+ <method name="remove_session_tab">
+ <return type="void" />
+ <param index="0" name="control" type="Control" />
+ <description>
+ Removes the given [param control] from the debug session UI in the debugger bottom panel.
+ </description>
+ </method>
+ <method name="send_message">
+ <return type="void" />
+ <param index="0" name="message" type="String" />
+ <param index="1" name="data" type="Array" default="[]" />
+ <description>
+ Sends the given [param message] to the attached remote instance, optionally passing additionally [param data]. See [EngineDebugger] for how to retrieve those messages.
+ </description>
+ </method>
+ <method name="toggle_profiler">
+ <return type="void" />
+ <param index="0" name="profiler" type="String" />
+ <param index="1" name="enable" type="bool" />
+ <param index="2" name="data" type="Array" default="[]" />
+ <description>
+ Toggle the given [param profiler] on the attached remote instance, optionally passing additionally [param data]. See [EngineProfiler] for more details.
+ </description>
+ </method>
+ </methods>
+ <signals>
+ <signal name="breaked">
+ <param index="0" name="can_debug" type="bool" />
+ <description>
+ Emitted when the attached remote instance enters a break state. If [param can_debug] is [code]true[/code], the remote instance will enter the debug loop.
+ </description>
+ </signal>
+ <signal name="continued">
+ <description>
+ Emitted when the attached remote instance exits a break state.
+ </description>
+ </signal>
+ <signal name="started">
+ <description>
+ Emitted when a remote instance is attached to this session (i.e. the session becomes active).
+ </description>
+ </signal>
+ <signal name="stopped">
+ <description>
+ Emitted when a remote instance is detached from this session (i.e. the session becomes inactive).
+ </description>
+ </signal>
+ </signals>
+</class>
diff --git a/doc/classes/EditorExportPlatform.xml b/doc/classes/EditorExportPlatform.xml
new file mode 100644
index 0000000000..1d63af9233
--- /dev/null
+++ b/doc/classes/EditorExportPlatform.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="EditorExportPlatform" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+</class>
diff --git a/doc/classes/EditorExportPlugin.xml b/doc/classes/EditorExportPlugin.xml
index 17697cb20b..3e8ce10aa5 100644
--- a/doc/classes/EditorExportPlugin.xml
+++ b/doc/classes/EditorExportPlugin.xml
@@ -10,6 +10,51 @@
<tutorials>
</tutorials>
<methods>
+ <method name="_begin_customize_resources" qualifiers="virtual const">
+ <return type="bool" />
+ <param index="0" name="platform" type="EditorExportPlatform" />
+ <param index="1" name="features" type="PackedStringArray" />
+ <description>
+ Return true if this plugin will customize resources based on the platform and features used.
+ </description>
+ </method>
+ <method name="_begin_customize_scenes" qualifiers="virtual const">
+ <return type="bool" />
+ <param index="0" name="platform" type="EditorExportPlatform" />
+ <param index="1" name="features" type="PackedStringArray" />
+ <description>
+ Return true if this plugin will customize scenes based on the platform and features used.
+ </description>
+ </method>
+ <method name="_customize_resource" qualifiers="virtual">
+ <return type="Resource" />
+ <param index="0" name="resource" type="Resource" />
+ <param index="1" name="path" type="String" />
+ <description>
+ Customize a resource. If changes are made to it, return the same or a new resource. Otherwise, return [code]null[/code].
+ The [i]path[/i] argument is only used when customizing an actual file, otherwise this means that this resource is part of another one and it will be empty.
+ </description>
+ </method>
+ <method name="_customize_scene" qualifiers="virtual">
+ <return type="Node" />
+ <param index="0" name="scene" type="Node" />
+ <param index="1" name="path" type="String" />
+ <description>
+ Customize a scene. If changes are made to it, return the same or a new scene. Otherwise, return [code]null[/code]. If a new scene is returned, it is up to you to dispose of the old one.
+ </description>
+ </method>
+ <method name="_end_customize_resources" qualifiers="virtual">
+ <return type="void" />
+ <description>
+ This is called when the customization process for resources ends.
+ </description>
+ </method>
+ <method name="_end_customize_scenes" qualifiers="virtual">
+ <return type="void" />
+ <description>
+ This is called when the customization process for scenes ends.
+ </description>
+ </method>
<method name="_export_begin" qualifiers="virtual">
<return type="void" />
<param index="0" name="features" type="PackedStringArray" />
@@ -17,7 +62,7 @@
<param index="2" name="path" type="String" />
<param index="3" name="flags" type="int" />
<description>
- Virtual method to be overridden by the user. It is called when the export starts and provides all information about the export. [code]features[/code] is the list of features for the export, [code]is_debug[/code] is [code]true[/code] for debug builds, [code]path[/code] is the target path for the exported project. [code]flags[/code] is only used when running a runnable profile, e.g. when using native run on Android.
+ Virtual method to be overridden by the user. It is called when the export starts and provides all information about the export. [param features] is the list of features for the export, [param is_debug] is [code]true[/code] for debug builds, [param path] is the target path for the exported project. [param flags] is only used when running a runnable profile, e.g. when using native run on Android.
</description>
</method>
<method name="_export_end" qualifiers="virtual">
@@ -32,24 +77,36 @@
<param index="1" name="type" type="String" />
<param index="2" name="features" type="PackedStringArray" />
<description>
- Virtual method to be overridden by the user. Called for each exported file, providing arguments that can be used to identify the file. [code]path[/code] is the path of the file, [code]type[/code] is the [Resource] represented by the file (e.g. [PackedScene]) and [code]features[/code] is the list of features for the export.
+ Virtual method to be overridden by the user. Called for each exported file, providing arguments that can be used to identify the file. [param path] is the path of the file, [param type] is the [Resource] represented by the file (e.g. [PackedScene]) and [param features] is the list of features for the export.
Calling [method skip] inside this callback will make the file not included in the export.
</description>
</method>
+ <method name="_get_customization_configuration_hash" qualifiers="virtual const">
+ <return type="int" />
+ <description>
+ Return a hash based on the configuration passed (for both scenes and resources). This helps keep separate caches for separate export configurations.
+ </description>
+ </method>
+ <method name="_get_name" qualifiers="virtual const">
+ <return type="String" />
+ <description>
+ Return the name identifier of this plugin (for future identification by the exporter).
+ </description>
+ </method>
<method name="add_file">
<return type="void" />
<param index="0" name="path" type="String" />
<param index="1" name="file" type="PackedByteArray" />
<param index="2" name="remap" type="bool" />
<description>
- Adds a custom file to be exported. [code]path[/code] is the virtual path that can be used to load the file, [code]file[/code] is the binary data of the file. If [code]remap[/code] is [code]true[/code], file will not be exported, but instead remapped to the given [code]path[/code].
+ Adds a custom file to be exported. [param path] is the virtual path that can be used to load the file, [param file] is the binary data of the file. If [param remap] is [code]true[/code], file will not be exported, but instead remapped to the given [param path].
</description>
</method>
<method name="add_ios_bundle_file">
<return type="void" />
<param index="0" name="path" type="String" />
<description>
- Adds an iOS bundle file from the given [code]path[/code] to the exported project.
+ Adds an iOS bundle file from the given [param path] to the exported project.
</description>
</method>
<method name="add_ios_cpp_code">
@@ -93,14 +150,14 @@
<return type="void" />
<param index="0" name="path" type="String" />
<description>
- Adds a static lib from the given [code]path[/code] to the iOS project.
+ Adds a static lib from the given [param path] to the iOS project.
</description>
</method>
<method name="add_macos_plugin_file">
<return type="void" />
<param index="0" name="path" type="String" />
<description>
- Adds file or directory matching [code]path[/code] to [code]PlugIns[/code] directory of macOS app bundle.
+ Adds file or directory matching [param path] to [code]PlugIns[/code] directory of macOS app bundle.
[b]Note:[/b] This is useful only for macOS exports.
</description>
</method>
@@ -110,7 +167,7 @@
<param index="1" name="tags" type="PackedStringArray" />
<param index="2" name="target" type="String" />
<description>
- Adds a shared object or a directory containing only shared objects with the given [code]tags[/code] and destination [code]path[/code].
+ Adds a shared object or a directory containing only shared objects with the given [param tags] and destination [param path].
[b]Note:[/b] In case of macOS exports, those shared objects will be added to [code]Frameworks[/code] directory of app bundle.
In case of a directory code-sign will error if you place non code object in directory.
</description>
diff --git a/doc/classes/EditorFeatureProfile.xml b/doc/classes/EditorFeatureProfile.xml
index f5d6763bce..27f61f1bd8 100644
--- a/doc/classes/EditorFeatureProfile.xml
+++ b/doc/classes/EditorFeatureProfile.xml
@@ -14,21 +14,21 @@
<return type="String" />
<param index="0" name="feature" type="int" enum="EditorFeatureProfile.Feature" />
<description>
- Returns the specified [code]feature[/code]'s human-readable name.
+ Returns the specified [param feature]'s human-readable name.
</description>
</method>
<method name="is_class_disabled" qualifiers="const">
<return type="bool" />
<param index="0" name="class_name" type="StringName" />
<description>
- Returns [code]true[/code] if the class specified by [code]class_name[/code] is disabled. When disabled, the class won't appear in the Create New Node dialog.
+ Returns [code]true[/code] if the class specified by [param class_name] is disabled. When disabled, the class won't appear in the Create New Node dialog.
</description>
</method>
<method name="is_class_editor_disabled" qualifiers="const">
<return type="bool" />
<param index="0" name="class_name" type="StringName" />
<description>
- Returns [code]true[/code] if editing for the class specified by [code]class_name[/code] is disabled. When disabled, the class will still appear in the Create New Node dialog but the inspector will be read-only when selecting a node that extends the class.
+ Returns [code]true[/code] if editing for the class specified by [param class_name] is disabled. When disabled, the class will still appear in the Create New Node dialog but the Inspector will be read-only when selecting a node that extends the class.
</description>
</method>
<method name="is_class_property_disabled" qualifiers="const">
@@ -36,14 +36,14 @@
<param index="0" name="class_name" type="StringName" />
<param index="1" name="property" type="StringName" />
<description>
- Returns [code]true[/code] if [code]property[/code] is disabled in the class specified by [code]class_name[/code]. When a property is disabled, it won't appear in the inspector when selecting a node that extends the class specified by [code]class_name[/code].
+ Returns [code]true[/code] if [param property] is disabled in the class specified by [param class_name]. When a property is disabled, it won't appear in the Inspector when selecting a node that extends the class specified by [param class_name].
</description>
</method>
<method name="is_feature_disabled" qualifiers="const">
<return type="bool" />
<param index="0" name="feature" type="int" enum="EditorFeatureProfile.Feature" />
<description>
- Returns [code]true[/code] if the [code]feature[/code] is disabled. When a feature is disabled, it will disappear from the editor entirely.
+ Returns [code]true[/code] if the [param feature] is disabled. When a feature is disabled, it will disappear from the editor entirely.
</description>
</method>
<method name="load_from_file">
@@ -65,7 +65,7 @@
<param index="0" name="class_name" type="StringName" />
<param index="1" name="disable" type="bool" />
<description>
- If [code]disable[/code] is [code]true[/code], disables the class specified by [code]class_name[/code]. When disabled, the class won't appear in the Create New Node dialog.
+ If [param disable] is [code]true[/code], disables the class specified by [param class_name]. When disabled, the class won't appear in the Create New Node dialog.
</description>
</method>
<method name="set_disable_class_editor">
@@ -73,7 +73,7 @@
<param index="0" name="class_name" type="StringName" />
<param index="1" name="disable" type="bool" />
<description>
- If [code]disable[/code] is [code]true[/code], disables editing for the class specified by [code]class_name[/code]. When disabled, the class will still appear in the Create New Node dialog but the inspector will be read-only when selecting a node that extends the class.
+ If [param disable] is [code]true[/code], disables editing for the class specified by [param class_name]. When disabled, the class will still appear in the Create New Node dialog but the Inspector will be read-only when selecting a node that extends the class.
</description>
</method>
<method name="set_disable_class_property">
@@ -82,7 +82,7 @@
<param index="1" name="property" type="StringName" />
<param index="2" name="disable" type="bool" />
<description>
- If [code]disable[/code] is [code]true[/code], disables editing for [code]property[/code] in the class specified by [code]class_name[/code]. When a property is disabled, it won't appear in the inspector when selecting a node that extends the class specified by [code]class_name[/code].
+ If [param disable] is [code]true[/code], disables editing for [param property] in the class specified by [param class_name]. When a property is disabled, it won't appear in the Inspector when selecting a node that extends the class specified by [param class_name].
</description>
</method>
<method name="set_disable_feature">
@@ -90,7 +90,7 @@
<param index="0" name="feature" type="int" enum="EditorFeatureProfile.Feature" />
<param index="1" name="disable" type="bool" />
<description>
- If [code]disable[/code] is [code]true[/code], disables the editor feature specified in [code]feature[/code]. When a feature is disabled, it will disappear from the editor entirely.
+ If [param disable] is [code]true[/code], disables the editor feature specified in [param feature]. When a feature is disabled, it will disappear from the editor entirely.
</description>
</method>
</methods>
@@ -116,7 +116,10 @@
<constant name="FEATURE_IMPORT_DOCK" value="6" enum="Feature">
The Import dock. If this feature is disabled, the Import dock won't be visible.
</constant>
- <constant name="FEATURE_MAX" value="7" enum="Feature">
+ <constant name="FEATURE_HISTORY_DOCK" value="7" enum="Feature">
+ The History dock. If this feature is disabled, the History dock won't be visible.
+ </constant>
+ <constant name="FEATURE_MAX" value="8" enum="Feature">
Represents the size of the [enum Feature] enum.
</constant>
</constants>
diff --git a/doc/classes/EditorFileDialog.xml b/doc/classes/EditorFileDialog.xml
index 0b1a85ebd1..29a8f470a1 100644
--- a/doc/classes/EditorFileDialog.xml
+++ b/doc/classes/EditorFileDialog.xml
@@ -4,6 +4,7 @@
A modified version of [FileDialog] used by the editor.
</brief_description>
<description>
+ [EditorFileDialog] is an enhanced version of [FileDialog] available only to editor plugins. Additional features include list of favorited/recent files and ability to see files as thumbnails grid instead of list.
</description>
<tutorials>
</tutorials>
@@ -13,9 +14,9 @@
<param index="0" name="filter" type="String" />
<param index="1" name="description" type="String" default="&quot;&quot;" />
<description>
- Adds a comma-delimited file name [code]filter[/code] option to the [EditorFileDialog] with an optional [code]description[/code], which restricts what files can be picked.
- A [code]filter[/code] should be of the form [code]"filename.extension"[/code], where filename and extension can be [code]*[/code] to match any string. Filters starting with [code].[/code] (i.e. empty filenames) are not allowed.
- For example, a [code]filter[/code] of [code]"*.tscn, *.scn"[/code] and a [code]description[/code] of [code]"Scenes"[/code] results in filter text "Scenes (*.tscn, *.scn)".
+ Adds a comma-delimited file name [param filter] option to the [EditorFileDialog] with an optional [param description], which restricts what files can be picked.
+ A [param filter] should be of the form [code]"filename.extension"[/code], where filename and extension can be [code]*[/code] to match any string. Filters starting with [code].[/code] (i.e. empty filenames) are not allowed.
+ For example, a [param filter] of [code]"*.tscn, *.scn"[/code] and a [param description] of [code]"Scenes"[/code] results in filter text "Scenes (*.tscn, *.scn)".
</description>
</method>
<method name="clear_filters">
@@ -62,7 +63,7 @@
The dialog's open or save mode, which affects the selection behavior. See [enum FileMode]
</member>
<member name="show_hidden_files" type="bool" setter="set_show_hidden_files" getter="is_showing_hidden_files" default="false">
- If [code]true[/code], hidden files and directories will be visible in the [EditorFileDialog].
+ If [code]true[/code], hidden files and directories will be visible in the [EditorFileDialog]. This property is synchronized with [member EditorSettings.filesystem/file_dialog/show_hidden_files].
</member>
<member name="title" type="String" setter="set_title" getter="get_title" overrides="Window" default="&quot;Save a File&quot;" />
</members>
diff --git a/doc/classes/EditorFileSystem.xml b/doc/classes/EditorFileSystem.xml
index 5a14dd0672..e8df6ae7fe 100644
--- a/doc/classes/EditorFileSystem.xml
+++ b/doc/classes/EditorFileSystem.xml
@@ -27,7 +27,7 @@
<return type="EditorFileSystemDirectory" />
<param index="0" name="path" type="String" />
<description>
- Returns a view into the filesystem at [code]path[/code].
+ Returns a view into the filesystem at [param path].
</description>
</method>
<method name="get_scanning_progress" qualifiers="const">
diff --git a/doc/classes/EditorFileSystemDirectory.xml b/doc/classes/EditorFileSystemDirectory.xml
index 3bc004e522..e9a0e3310c 100644
--- a/doc/classes/EditorFileSystemDirectory.xml
+++ b/doc/classes/EditorFileSystemDirectory.xml
@@ -13,21 +13,21 @@
<return type="int" />
<param index="0" name="name" type="String" />
<description>
- Returns the index of the directory with name [code]name[/code] or [code]-1[/code] if not found.
+ Returns the index of the directory with name [param name] or [code]-1[/code] if not found.
</description>
</method>
<method name="find_file_index" qualifiers="const">
<return type="int" />
<param index="0" name="name" type="String" />
<description>
- Returns the index of the file with name [code]name[/code] or [code]-1[/code] if not found.
+ Returns the index of the file with name [param name] or [code]-1[/code] if not found.
</description>
</method>
<method name="get_file" qualifiers="const">
<return type="String" />
<param index="0" name="idx" type="int" />
<description>
- Returns the name of the file at index [code]idx[/code].
+ Returns the name of the file at index [param idx].
</description>
</method>
<method name="get_file_count" qualifiers="const">
@@ -40,35 +40,35 @@
<return type="bool" />
<param index="0" name="idx" type="int" />
<description>
- Returns [code]true[/code] if the file at index [code]idx[/code] imported properly.
+ Returns [code]true[/code] if the file at index [param idx] imported properly.
</description>
</method>
<method name="get_file_path" qualifiers="const">
<return type="String" />
<param index="0" name="idx" type="int" />
<description>
- Returns the path to the file at index [code]idx[/code].
+ Returns the path to the file at index [param idx].
</description>
</method>
<method name="get_file_script_class_extends" qualifiers="const">
<return type="String" />
<param index="0" name="idx" type="int" />
<description>
- Returns the base class of the script class defined in the file at index [code]idx[/code]. If the file doesn't define a script class using the [code]class_name[/code] syntax, this will return an empty string.
+ Returns the base class of the script class defined in the file at index [param idx]. If the file doesn't define a script class using the [code]class_name[/code] syntax, this will return an empty string.
</description>
</method>
<method name="get_file_script_class_name" qualifiers="const">
<return type="String" />
<param index="0" name="idx" type="int" />
<description>
- Returns the name of the script class defined in the file at index [code]idx[/code]. If the file doesn't define a script class using the [code]class_name[/code] syntax, this will return an empty string.
+ Returns the name of the script class defined in the file at index [param idx]. If the file doesn't define a script class using the [code]class_name[/code] syntax, this will return an empty string.
</description>
</method>
<method name="get_file_type" qualifiers="const">
<return type="StringName" />
<param index="0" name="idx" type="int" />
<description>
- Returns the resource type of the file at index [code]idx[/code]. This returns a string such as [code]"Resource"[/code] or [code]"GDScript"[/code], [i]not[/i] a file extension such as [code]".gd"[/code].
+ Returns the resource type of the file at index [param idx]. This returns a string such as [code]"Resource"[/code] or [code]"GDScript"[/code], [i]not[/i] a file extension such as [code]".gd"[/code].
</description>
</method>
<method name="get_name">
@@ -93,7 +93,7 @@
<return type="EditorFileSystemDirectory" />
<param index="0" name="idx" type="int" />
<description>
- Returns the subdirectory at index [code]idx[/code].
+ Returns the subdirectory at index [param idx].
</description>
</method>
<method name="get_subdir_count" qualifiers="const">
diff --git a/doc/classes/EditorImportPlugin.xml b/doc/classes/EditorImportPlugin.xml
index d3af6c1269..c395815117 100644
--- a/doc/classes/EditorImportPlugin.xml
+++ b/doc/classes/EditorImportPlugin.xml
@@ -9,7 +9,7 @@
Below is an example EditorImportPlugin that imports a [Mesh] from a file with the extension ".special" or ".spec":
[codeblocks]
[gdscript]
- tool
+ @tool
extends EditorImportPlugin
func _get_importer_name():
@@ -44,7 +44,7 @@
# Fill the Mesh with data read in "file", left as an exercise to the reader.
var filename = save_path + "." + _get_save_extension()
- return ResourceSaver.save(filename, mesh)
+ return ResourceSaver.save(mesh, filename)
[/gdscript]
[csharp]
using Godot;
@@ -103,7 +103,7 @@
var mesh = new ArrayMesh();
// Fill the Mesh with data read in "file", left as an exercise to the reader.
String filename = savePath + "." + GetSaveExtension();
- return (int)ResourceSaver.Save(filename, mesh);
+ return (int)ResourceSaver.Save(mesh, filename);
}
}
[/csharp]
@@ -115,7 +115,7 @@
</tutorials>
<methods>
<method name="_get_import_options" qualifiers="virtual const">
- <return type="Array" />
+ <return type="Dictionary[]" />
<param index="0" name="path" type="String" />
<param index="1" name="preset_index" type="int" />
<description>
@@ -214,10 +214,10 @@
<param index="0" name="source_file" type="String" />
<param index="1" name="save_path" type="String" />
<param index="2" name="options" type="Dictionary" />
- <param index="3" name="platform_variants" type="Array" />
- <param index="4" name="gen_files" type="Array" />
+ <param index="3" name="platform_variants" type="String[]" />
+ <param index="4" name="gen_files" type="String[]" />
<description>
- Imports [code]source_file[/code] into [code]save_path[/code] with the import [code]options[/code] specified. The [code]platform_variants[/code] and [code]gen_files[/code] arrays will be modified by this function.
+ Imports [param source_file] into [param save_path] with the import [param options] specified. The [param platform_variants] and [param gen_files] arrays will be modified by this function.
This method must be overridden to do the actual importing work. See this class' description for an example of overriding this method.
</description>
</method>
diff --git a/doc/classes/EditorInspector.xml b/doc/classes/EditorInspector.xml
index 280a7bf34a..0cda49f1bf 100644
--- a/doc/classes/EditorInspector.xml
+++ b/doc/classes/EditorInspector.xml
@@ -7,12 +7,20 @@
This is the control that implements property editing in the editor's Settings dialogs, the Inspector dock, etc. To get the [EditorInspector] used in the editor's Inspector dock, use [method EditorInterface.get_inspector].
[EditorInspector] will show properties in the same order as the array returned by [method Object.get_property_list].
If a property's name is path-like (i.e. if it contains forward slashes), [EditorInspector] will create nested sections for "directories" along the path. For example, if a property is named [code]highlighting/gdscript/node_path_color[/code], it will be shown as "Node Path Color" inside the "GDScript" section nested inside the "Highlighting" section.
- If a property has [constant @GlobalScope.PROPERTY_USAGE_GROUP] usage, it will group subsequent properties whose name starts with the property's hint string. The group ends when a property does not start with that hint string or when a new group starts. An empty group name effectively ends the current group. [EditorInspector] will create a top-level section for each group. For example, if a property with group usage is named [code]Collide With[/code] and its hint string is [code]collide_with_[/code], a subsequent [code]collide_with_area[/code] property will be shown as "Area" inside the "Collide With" section.
- If a property has [constant @GlobalScope.PROPERTY_USAGE_SUBGROUP] usage, a subgroup will be created in the same way as a group, and a second-level section will be created for each subgroup.
+ If a property has [constant PROPERTY_USAGE_GROUP] usage, it will group subsequent properties whose name starts with the property's hint string. The group ends when a property does not start with that hint string or when a new group starts. An empty group name effectively ends the current group. [EditorInspector] will create a top-level section for each group. For example, if a property with group usage is named [code]Collide With[/code] and its hint string is [code]collide_with_[/code], a subsequent [code]collide_with_area[/code] property will be shown as "Area" inside the "Collide With" section.
+ If a property has [constant PROPERTY_USAGE_SUBGROUP] usage, a subgroup will be created in the same way as a group, and a second-level section will be created for each subgroup.
[b]Note:[/b] Unlike sections created from path-like property names, [EditorInspector] won't capitalize the name for sections created from groups. So properties with group usage usually use capitalized names instead of snake_cased names.
</description>
<tutorials>
</tutorials>
+ <methods>
+ <method name="get_selected_path" qualifiers="const">
+ <return type="String" />
+ <description>
+ Gets the path of the currently selected property.
+ </description>
+ </method>
+ </methods>
<members>
<member name="horizontal_scroll_mode" type="int" setter="set_horizontal_scroll_mode" getter="get_horizontal_scroll_mode" overrides="ScrollContainer" enum="ScrollContainer.ScrollMode" default="0" />
</members>
@@ -25,7 +33,7 @@
<signal name="object_id_selected">
<param index="0" name="id" type="int" />
<description>
- Emitted when the Edit button of an [Object] has been pressed in the inspector. This is mainly used in the remote scene tree inspector.
+ Emitted when the Edit button of an [Object] has been pressed in the inspector. This is mainly used in the remote scene tree Inspector.
</description>
</signal>
<signal name="property_deleted">
diff --git a/doc/classes/EditorInspectorPlugin.xml b/doc/classes/EditorInspectorPlugin.xml
index e52046f8c2..ba2f7b24bf 100644
--- a/doc/classes/EditorInspectorPlugin.xml
+++ b/doc/classes/EditorInspectorPlugin.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="EditorInspectorPlugin" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
- Plugin for adding custom property editors on inspector.
+ Plugin for adding custom property editors on the inspector.
</brief_description>
<description>
[EditorInspectorPlugin] allows adding custom property editors to [EditorInspector].
@@ -27,7 +27,7 @@
<return type="void" />
<param index="0" name="object" type="Object" />
<description>
- Called to allow adding controls at the beginning of the property list for [code]object[/code].
+ Called to allow adding controls at the beginning of the property list for [param object].
</description>
</method>
<method name="_parse_category" qualifiers="virtual">
@@ -35,14 +35,14 @@
<param index="0" name="object" type="Object" />
<param index="1" name="category" type="String" />
<description>
- Called to allow adding controls at the beginning of a category in the property list for [code]object[/code].
+ Called to allow adding controls at the beginning of a category in the property list for [param object].
</description>
</method>
<method name="_parse_end" qualifiers="virtual">
<return type="void" />
<param index="0" name="object" type="Object" />
<description>
- Called to allow adding controls at the end of the property list for [code]object[/code].
+ Called to allow adding controls at the end of the property list for [param object].
</description>
</method>
<method name="_parse_group" qualifiers="virtual">
@@ -50,7 +50,7 @@
<param index="0" name="object" type="Object" />
<param index="1" name="group" type="String" />
<description>
- Called to allow adding controls at the beginning of a group or a sub-group in the property list for [code]object[/code].
+ Called to allow adding controls at the beginning of a group or a sub-group in the property list for [param object].
</description>
</method>
<method name="_parse_property" qualifiers="virtual">
@@ -63,7 +63,7 @@
<param index="5" name="usage_flags" type="int" />
<param index="6" name="wide" type="bool" />
<description>
- Called to allow adding property-specific editors to the property list for [code]object[/code]. The added editor control must extend [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.
+ Called to allow adding property-specific editors to the property list for [param object]. The added editor control must extend [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="add_custom_control">
@@ -79,7 +79,7 @@
<param index="1" name="editor" type="Control" />
<param index="2" name="add_to_end" type="bool" default="false" />
<description>
- Adds a property editor for an individual property. The [code]editor[/code] control must extend [EditorProperty].
+ Adds a property editor for an individual property. The [param editor] control must extend [EditorProperty].
</description>
</method>
<method name="add_property_editor_for_multiple_properties">
@@ -88,7 +88,7 @@
<param index="1" name="properties" type="PackedStringArray" />
<param index="2" name="editor" type="Control" />
<description>
- Adds an editor that allows modifying multiple properties. The [code]editor[/code] control must extend [EditorProperty].
+ Adds an editor that allows modifying multiple properties. The [param editor] control must extend [EditorProperty].
</description>
</method>
</methods>
diff --git a/doc/classes/EditorInterface.xml b/doc/classes/EditorInterface.xml
index bdd5b87cd8..5d4b83bc27 100644
--- a/doc/classes/EditorInterface.xml
+++ b/doc/classes/EditorInterface.xml
@@ -48,6 +48,12 @@
[b]Warning:[/b] Removing and freeing this node will render a part of the editor useless and may cause a crash.
</description>
</method>
+ <method name="get_current_directory" qualifiers="const">
+ <return type="String" />
+ <description>
+ Returns the current directory being viewed in the [FileSystemDock]. If a file is selected, its base directory will be returned using [method String.get_base_dir] instead.
+ </description>
+ </method>
<method name="get_current_path" qualifiers="const">
<return type="String" />
<description>
@@ -60,17 +66,17 @@
Returns the edited (current) scene's root [Node].
</description>
</method>
- <method name="get_editor_main_control">
- <return type="Control" />
+ <method name="get_editor_main_screen">
+ <return type="VBoxContainer" />
<description>
- Returns the main editor control. Use this as a parent for main screens.
- [b]Note:[/b] This returns the main editor control containing the whole editor, not the 2D or 3D viewports specifically.
+ Returns the editor control responsible for main screen plugins and tools. Use it with plugins that implement [method EditorPlugin._has_main_screen].
[b]Warning:[/b] Removing and freeing this node will render a part of the editor useless and may cause a crash.
</description>
</method>
<method name="get_editor_paths">
<return type="EditorPaths" />
<description>
+ Returns the [EditorPaths] singleton.
</description>
</method>
<method name="get_editor_scale" qualifiers="const">
@@ -101,7 +107,7 @@
</description>
</method>
<method name="get_open_scenes" qualifiers="const">
- <return type="Array" />
+ <return type="PackedStringArray" />
<description>
Returns an [Array] with the file paths of the currently opened scenes.
</description>
@@ -131,10 +137,10 @@
[b]Warning:[/b] Removing and freeing this node will render a part of the editor useless and may cause a crash.
</description>
</method>
- <method name="get_selected_path" qualifiers="const">
- <return type="String" />
+ <method name="get_selected_paths" qualifiers="const">
+ <return type="PackedStringArray" />
<description>
- Returns the path of the directory currently selected in the [FileSystemDock]. If a file is selected, its base directory will be returned using [method String.get_base_dir] instead.
+ Returns an array containing the paths of the currently selected files (and directories) in the [FileSystemDock].
</description>
</method>
<method name="get_selection">
@@ -149,7 +155,13 @@
<param index="1" name="for_property" type="String" default="&quot;&quot;" />
<param index="2" name="inspector_only" type="bool" default="false" />
<description>
- Shows the given property on the given [code]object[/code] in the editor's Inspector dock. If [code]inspector_only[/code] is [code]true[/code], plugins will not attempt to edit [code]object[/code].
+ Shows the given property on the given [param object] in the editor's Inspector dock. If [param inspector_only] is [code]true[/code], plugins will not attempt to edit [param object].
+ </description>
+ </method>
+ <method name="is_movie_maker_enabled" qualifiers="const">
+ <return type="bool" />
+ <description>
+ Returns [code]true[/code] if Movie Maker mode is enabled in the editor. See also [method set_movie_maker_enabled]. See [MovieWriter] for more information.
</description>
</method>
<method name="is_playing_scene" qualifiers="const">
@@ -162,12 +174,12 @@
<return type="bool" />
<param index="0" name="plugin" type="String" />
<description>
- Returns [code]true[/code] if the specified [code]plugin[/code] is enabled. The plugin name is the same as its directory name.
+ Returns [code]true[/code] if the specified [param plugin] is enabled. The plugin name is the same as its directory name.
</description>
</method>
<method name="make_mesh_previews">
- <return type="Array" />
- <param index="0" name="meshes" type="Array" />
+ <return type="Texture2D[]" />
+ <param index="0" name="meshes" type="Mesh[]" />
<param index="1" name="preview_size" type="int" />
<description>
Returns mesh previews rendered at the given size as an [Array] of [Texture2D]s.
@@ -206,10 +218,17 @@
Reloads the scene at the given path.
</description>
</method>
+ <method name="restart_editor">
+ <return type="void" />
+ <param index="0" name="save" type="bool" default="true" />
+ <description>
+ Restarts the editor. This closes the editor and then opens the same project. If [param save] is [code]true[/code], the project will be saved before restarting.
+ </description>
+ </method>
<method name="save_scene">
<return type="int" enum="Error" />
<description>
- Saves the scene. Returns either [code]OK[/code] or [code]ERR_CANT_CREATE[/code] (see [@GlobalScope] constants).
+ Saves the scene. Returns either [constant OK] or [constant ERR_CANT_CREATE].
</description>
</method>
<method name="save_scene_as">
@@ -217,21 +236,28 @@
<param index="0" name="path" type="String" />
<param index="1" name="with_preview" type="bool" default="true" />
<description>
- Saves the scene as a file at [code]path[/code].
+ Saves the scene as a file at [param path].
</description>
</method>
<method name="select_file">
<return type="void" />
<param index="0" name="file" type="String" />
<description>
- Selects the file, with the path provided by [code]file[/code], in the FileSystem dock.
+ Selects the file, with the path provided by [param file], in the FileSystem dock.
</description>
</method>
<method name="set_main_screen_editor">
<return type="void" />
<param index="0" name="name" type="String" />
<description>
- Sets the editor's current main screen to the one specified in [code]name[/code]. [code]name[/code] must match the text of the tab in question exactly ([code]2D[/code], [code]3D[/code], [code]Script[/code], [code]AssetLib[/code]).
+ Sets the editor's current main screen to the one specified in [param name]. [param name] must match the text of the tab in question exactly ([code]2D[/code], [code]3D[/code], [code]Script[/code], [code]AssetLib[/code]).
+ </description>
+ </method>
+ <method name="set_movie_maker_enabled">
+ <return type="void" />
+ <param index="0" name="enabled" type="bool" />
+ <description>
+ Sets whether Movie Maker mode is enabled in the editor. See also [method is_movie_maker_enabled]. See [MovieWriter] for more information.
</description>
</method>
<method name="set_plugin_enabled">
diff --git a/doc/classes/EditorNode3DGizmo.xml b/doc/classes/EditorNode3DGizmo.xml
index 13bf9e3028..561ccdc6e7 100644
--- a/doc/classes/EditorNode3DGizmo.xml
+++ b/doc/classes/EditorNode3DGizmo.xml
@@ -16,9 +16,9 @@
<param index="2" name="restore" type="Variant" />
<param index="3" name="cancel" type="bool" />
<description>
- Override this method to commit a handle being edited (handles must have been previously added by [method add_handles]). This usually means creating an [UndoRedo] action for the change, using the current handle value as "do" and the [code]restore[/code] argument as "undo".
- If the [code]cancel[/code] argument is [code]true[/code], the [code]restore[/code] value should be directly set, without any [UndoRedo] action.
- The [code]secondary[/code] argument is [code]true[/code] when the committed handle is secondary (see [method add_handles] for more information).
+ Override this method to commit a handle being edited (handles must have been previously added by [method add_handles]). This usually means creating an [UndoRedo] action for the change, using the current handle value as "do" and the [param restore] argument as "undo".
+ If the [param cancel] argument is [code]true[/code], the [param restore] value should be directly set, without any [UndoRedo] action.
+ The [param secondary] argument is [code]true[/code] when the committed handle is secondary (see [method add_handles] for more information).
</description>
</method>
<method name="_commit_subgizmos" qualifiers="virtual">
@@ -27,8 +27,8 @@
<param index="1" name="restores" type="Transform3D[]" />
<param index="2" name="cancel" type="bool" />
<description>
- Override this method to commit a group of subgizmos being edited (see [method _subgizmos_intersect_ray] and [method _subgizmos_intersect_frustum]). This usually means creating an [UndoRedo] action for the change, using the current transforms as "do" and the [code]restore[/code] transforms as "undo".
- If the [code]cancel[/code] argument is [code]true[/code], the [code]restore[/code] transforms should be directly set, without any [UndoRedo] action.
+ Override this method to commit a group of subgizmos being edited (see [method _subgizmos_intersect_ray] and [method _subgizmos_intersect_frustum]). This usually means creating an [UndoRedo] action for the change, using the current transforms as "do" and the [param restores] transforms as "undo".
+ If the [param cancel] argument is [code]true[/code], the [param restores] transforms should be directly set, without any [UndoRedo] action.
</description>
</method>
<method name="_get_handle_name" qualifiers="virtual const">
@@ -37,7 +37,7 @@
<param index="1" name="secondary" type="bool" />
<description>
Override this method to return 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.
- The [code]secondary[/code] argument is [code]true[/code] when the requested handle is secondary (see [method add_handles] for more information).
+ The [param secondary] argument is [code]true[/code] when the requested handle is secondary (see [method add_handles] for more information).
</description>
</method>
<method name="_get_handle_value" qualifiers="virtual const">
@@ -46,7 +46,7 @@
<param index="1" name="secondary" type="bool" />
<description>
Override this method to return the current value of a handle. This value will be requested at the start of an edit and used as the [code]restore[/code] argument in [method _commit_handle].
- The [code]secondary[/code] argument is [code]true[/code] when the requested handle is secondary (see [method add_handles] for more information).
+ The [param secondary] argument is [code]true[/code] when the requested handle is secondary (see [method add_handles] for more information).
</description>
</method>
<method name="_get_subgizmo_transform" qualifiers="virtual const">
@@ -62,7 +62,7 @@
<param index="1" name="secondary" type="bool" />
<description>
Override this method to return [code]true[/code] whenever the given handle should be highlighted in the editor.
- The [code]secondary[/code] argument is [code]true[/code] when the requested handle is secondary (see [method add_handles] for more information).
+ The [param secondary] argument is [code]true[/code] when the requested handle is secondary (see [method add_handles] for more information).
</description>
</method>
<method name="_redraw" qualifiers="virtual">
@@ -78,8 +78,8 @@
<param index="2" name="camera" type="Camera3D" />
<param index="3" name="point" type="Vector2" />
<description>
- Override this method to update the node properties when the user drags a gizmo handle (previously added with [method add_handles]). The provided [code]point[/code] is the mouse position in screen coordinates and the [code]camera[/code] can be used to convert it to raycasts.
- The [code]secondary[/code] argument is [code]true[/code] when the edited handle is secondary (see [method add_handles] for more information).
+ Override this method to update the node properties when the user drags a gizmo handle (previously added with [method add_handles]). The provided [param point] is the mouse position in screen coordinates and the [param camera] can be used to convert it to raycasts.
+ The [param secondary] argument is [code]true[/code] when the edited handle is secondary (see [method add_handles] for more information).
</description>
</method>
<method name="_set_subgizmo_transform" qualifiers="virtual">
@@ -87,7 +87,7 @@
<param index="0" name="id" type="int" />
<param index="1" name="transform" type="Transform3D" />
<description>
- Override this method to update the node properties during subgizmo editing (see [method _subgizmos_intersect_ray] and [method _subgizmos_intersect_frustum]). The [code]transform[/code] is given in the Node3D's local coordinate system.
+ Override this method to update the node properties during subgizmo editing (see [method _subgizmos_intersect_ray] and [method _subgizmos_intersect_frustum]). The [param transform] is given in the Node3D's local coordinate system.
</description>
</method>
<method name="_subgizmos_intersect_frustum" qualifiers="virtual const">
@@ -95,7 +95,7 @@
<param index="0" name="camera" type="Camera3D" />
<param index="1" name="frustum" type="Plane[]" />
<description>
- Override this method to allow selecting subgizmos using mouse drag box selection. Given a [code]camera[/code] and a [code]frustum[/code], this method should return which subgizmos are contained within the frustum. The [code]frustum[/code] argument consists of an [code]Array[/code] with all the [code]Plane[/code]s that make up the selection frustum. The returned value should contain a list of unique subgizmo identifiers, which can have any non-negative value and will be used in other virtual methods like [method _get_subgizmo_transform] or [method _commit_subgizmos].
+ Override this method to allow selecting subgizmos using mouse drag box selection. Given a [param camera] and a [param frustum], this method should return which subgizmos are contained within the frustum. The [param frustum] argument consists of an [code]Array[/code] with all the [code]Plane[/code]s that make up the selection frustum. The returned value should contain a list of unique subgizmo identifiers, which can have any non-negative value and will be used in other virtual methods like [method _get_subgizmo_transform] or [method _commit_subgizmos].
</description>
</method>
<method name="_subgizmos_intersect_ray" qualifiers="virtual const">
@@ -103,14 +103,14 @@
<param index="0" name="camera" type="Camera3D" />
<param index="1" name="point" type="Vector2" />
<description>
- Override this method to allow selecting subgizmos using mouse clicks. Given a [code]camera[/code] and a [code]point[/code] in screen coordinates, this method should return which subgizmo should be selected. The returned value should be a unique subgizmo identifier, which can have any non-negative value and will be used in other virtual methods like [method _get_subgizmo_transform] or [method _commit_subgizmos].
+ Override this method to allow selecting subgizmos using mouse clicks. Given a [param camera] and a [param point] in screen coordinates, this method should return which subgizmo should be selected. The returned value should be a unique subgizmo identifier, which can have any non-negative value and will be used in other virtual methods like [method _get_subgizmo_transform] or [method _commit_subgizmos].
</description>
</method>
<method name="add_collision_segments">
<return type="void" />
<param index="0" name="segments" type="PackedVector3Array" />
<description>
- Adds the specified [code]segments[/code] to the gizmo's collision shape for picking. Call this method during [method _redraw].
+ Adds the specified [param segments] to the gizmo's collision shape for picking. Call this method during [method _redraw].
</description>
</method>
<method name="add_collision_triangles">
@@ -128,8 +128,8 @@
<param index="3" name="billboard" type="bool" default="false" />
<param index="4" name="secondary" type="bool" default="false" />
<description>
- Adds a list of handles (points) which can be used to edit the properties of the gizmo's Node3D. The [code]ids[/code] argument can be used to specify a custom identifier for each handle, if an empty [code]Array[/code] is passed, the ids will be assigned automatically from the [code]handles[/code] argument order.
- The [code]secondary[/code] argument marks the added handles as secondary, meaning they will normally have less selection priority than regular handles. When the user is holding the shift key secondary handles will switch to have higher priority than regular handles. This change in priority can be used to place multiple handles at the same point while still giving the user control on their selection.
+ Adds a list of handles (points) which can be used to edit the properties of the gizmo's Node3D. The [param ids] argument can be used to specify a custom identifier for each handle, if an empty [code]Array[/code] is passed, the ids will be assigned automatically from the [param handles] argument order.
+ The [param secondary] argument marks the added handles as secondary, meaning they will normally have lower selection priority than regular handles. When the user is holding the shift key secondary handles will switch to have higher priority than regular handles. This change in priority can be used to place multiple handles at the same point while still giving the user control on their selection.
There are virtual methods which will be called upon editing of these handles. Call this method during [method _redraw].
</description>
</method>
@@ -150,7 +150,7 @@
<param index="2" name="transform" type="Transform3D" default="Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)" />
<param index="3" name="skeleton" type="SkinReference" default="null" />
<description>
- Adds a mesh to the gizmo with the specified [code]material[/code], local [code]transform[/code] and [code]skeleton[/code]. Call this method during [method _redraw].
+ Adds a mesh to the gizmo with the specified [param material], local [param transform] and [param skeleton]. Call this method during [method _redraw].
</description>
</method>
<method name="add_unscaled_billboard">
@@ -168,16 +168,16 @@
Removes everything in the gizmo including meshes, collisions and handles.
</description>
</method>
- <method name="get_plugin" qualifiers="const">
- <return type="EditorNode3DGizmoPlugin" />
+ <method name="get_node_3d" qualifiers="const">
+ <return type="Node3D" />
<description>
- Returns the [EditorNode3DGizmoPlugin] that owns this gizmo. It's useful to retrieve materials using [method EditorNode3DGizmoPlugin.get_material].
+ Returns the [Node3D] node associated with this gizmo.
</description>
</method>
- <method name="get_spatial_node" qualifiers="const">
- <return type="Node3D" />
+ <method name="get_plugin" qualifiers="const">
+ <return type="EditorNode3DGizmoPlugin" />
<description>
- Returns the Node3D node associated with this gizmo.
+ Returns the [EditorNode3DGizmoPlugin] that owns this gizmo. It's useful to retrieve materials using [method EditorNode3DGizmoPlugin.get_material].
</description>
</method>
<method name="get_subgizmo_selection" qualifiers="const">
@@ -200,11 +200,11 @@
Sets the gizmo's hidden state. If [code]true[/code], the gizmo will be hidden. If [code]false[/code], it will be shown.
</description>
</method>
- <method name="set_spatial_node">
+ <method name="set_node_3d">
<return type="void" />
<param index="0" name="node" type="Node" />
<description>
- Sets the reference [Node3D] node for the gizmo. [code]node[/code] must inherit from [Node3D].
+ Sets the reference [Node3D] node for the gizmo. [param node] must inherit from [Node3D].
</description>
</method>
</methods>
diff --git a/doc/classes/EditorNode3DGizmoPlugin.xml b/doc/classes/EditorNode3DGizmoPlugin.xml
index a6f4a3a0f5..3ab13ec5c0 100644
--- a/doc/classes/EditorNode3DGizmoPlugin.xml
+++ b/doc/classes/EditorNode3DGizmoPlugin.xml
@@ -5,10 +5,10 @@
</brief_description>
<description>
[EditorNode3DGizmoPlugin] allows you to define a new type of Gizmo. There are two main ways to do so: extending [EditorNode3DGizmoPlugin] for the simpler gizmos, or creating a new [EditorNode3DGizmo] type. See the tutorial in the documentation for more info.
- To use [EditorNode3DGizmoPlugin], register it using the [method EditorPlugin.add_spatial_gizmo_plugin] method first.
+ To use [EditorNode3DGizmoPlugin], register it using the [method EditorPlugin.add_node_3d_gizmo_plugin] method first.
</description>
<tutorials>
- <link title="Spatial gizmo plugins">$DOCS_URL/tutorials/plugins/editor/spatial_gizmos.html</link>
+ <link title="Node3D gizmo plugins">$DOCS_URL/tutorials/plugins/editor/3d_gizmos.html</link>
</tutorials>
<methods>
<method name="_can_be_hidden" qualifiers="virtual const">
@@ -25,9 +25,9 @@
<param index="3" name="restore" type="Variant" />
<param index="4" name="cancel" type="bool" />
<description>
- Override this method to commit a handle being edited (handles must have been previously added by [method EditorNode3DGizmo.add_handles] during [method _redraw]). This usually means creating an [UndoRedo] action for the change, using the current handle value as "do" and the [code]restore[/code] argument as "undo".
- If the [code]cancel[/code] argument is [code]true[/code], the [code]restore[/code] value should be directly set, without any [UndoRedo] action.
- The [code]secondary[/code] argument is [code]true[/code] when the committed handle is secondary (see [method EditorNode3DGizmo.add_handles] for more information).
+ Override this method to commit a handle being edited (handles must have been previously added by [method EditorNode3DGizmo.add_handles] during [method _redraw]). This usually means creating an [UndoRedo] action for the change, using the current handle value as "do" and the [param restore] argument as "undo".
+ If the [param cancel] argument is [code]true[/code], the [param restore] value should be directly set, without any [UndoRedo] action.
+ The [param secondary] argument is [code]true[/code] when the committed handle is secondary (see [method EditorNode3DGizmo.add_handles] for more information).
Called for this plugin's active gizmos.
</description>
</method>
@@ -38,8 +38,8 @@
<param index="2" name="restores" type="Transform3D[]" />
<param index="3" name="cancel" type="bool" />
<description>
- Override this method to commit a group of subgizmos being edited (see [method _subgizmos_intersect_ray] and [method _subgizmos_intersect_frustum]). This usually means creating an [UndoRedo] action for the change, using the current transforms as "do" and the [code]restore[/code] transforms as "undo".
- If the [code]cancel[/code] argument is [code]true[/code], the [code]restore[/code] transforms should be directly set, without any [UndoRedo] action. As with all subgizmo methods, transforms are given in local space respect to the gizmo's Node3D. Called for this plugin's active gizmos.
+ Override this method to commit a group of subgizmos being edited (see [method _subgizmos_intersect_ray] and [method _subgizmos_intersect_frustum]). This usually means creating an [UndoRedo] action for the change, using the current transforms as "do" and the [param restores] transforms as "undo".
+ If the [param cancel] argument is [code]true[/code], the [param restores] transforms should be directly set, without any [UndoRedo] action. As with all subgizmo methods, transforms are given in local space respect to the gizmo's Node3D. Called for this plugin's active gizmos.
</description>
</method>
<method name="_create_gizmo" qualifiers="virtual const">
@@ -61,7 +61,7 @@
<param index="1" name="handle_id" type="int" />
<param index="2" name="secondary" type="bool" />
<description>
- Override this method to provide gizmo's handle names. The [code]secondary[/code] argument is [code]true[/code] when the requested handle is secondary (see [method EditorNode3DGizmo.add_handles] for more information). Called for this plugin's active gizmos.
+ Override this method to provide gizmo's handle names. The [param secondary] argument is [code]true[/code] when the requested handle is secondary (see [method EditorNode3DGizmo.add_handles] for more information). Called for this plugin's active gizmos.
</description>
</method>
<method name="_get_handle_value" qualifiers="virtual const">
@@ -71,7 +71,7 @@
<param index="2" name="secondary" type="bool" />
<description>
Override this method to return the current value of a handle. This value will be requested at the start of an edit and used as the [code]restore[/code] argument in [method _commit_handle].
- The [code]secondary[/code] argument is [code]true[/code] when the requested handle is secondary (see [method EditorNode3DGizmo.add_handles] for more information).
+ The [param secondary] argument is [code]true[/code] when the requested handle is secondary (see [method EditorNode3DGizmo.add_handles] for more information).
Called for this plugin's active gizmos.
</description>
</method>
@@ -103,7 +103,7 @@
<param index="1" name="handle_id" type="int" />
<param index="2" name="secondary" type="bool" />
<description>
- Override this method to return [code]true[/code] whenever to given handle should be highlighted in the editor. The [code]secondary[/code] argument is [code]true[/code] when the requested handle is secondary (see [method EditorNode3DGizmo.add_handles] for more information). Called for this plugin's active gizmos.
+ Override this method to return [code]true[/code] whenever to given handle should be highlighted in the editor. The [param secondary] argument is [code]true[/code] when the requested handle is secondary (see [method EditorNode3DGizmo.add_handles] for more information). Called for this plugin's active gizmos.
</description>
</method>
<method name="_is_selectable_when_hidden" qualifiers="virtual const">
@@ -127,8 +127,8 @@
<param index="3" name="camera" type="Camera3D" />
<param index="4" name="screen_pos" type="Vector2" />
<description>
- Override this method to update the node's properties when the user drags a gizmo handle (previously added with [method EditorNode3DGizmo.add_handles]). The provided [code]point[/code] is the mouse position in screen coordinates and the [code]camera[/code] can be used to convert it to raycasts.
- The [code]secondary[/code] argument is [code]true[/code] when the edited handle is secondary (see [method EditorNode3DGizmo.add_handles] for more information).
+ Override this method to update the node's properties when the user drags a gizmo handle (previously added with [method EditorNode3DGizmo.add_handles]). The provided [param screen_pos] is the mouse position in screen coordinates and the [param camera] can be used to convert it to raycasts.
+ The [param secondary] argument is [code]true[/code] when the edited handle is secondary (see [method EditorNode3DGizmo.add_handles] for more information).
Called for this plugin's active gizmos.
</description>
</method>
@@ -138,7 +138,7 @@
<param index="1" name="subgizmo_id" type="int" />
<param index="2" name="transform" type="Transform3D" />
<description>
- Override this method to update the node properties during subgizmo editing (see [method _subgizmos_intersect_ray] and [method _subgizmos_intersect_frustum]). The [code]transform[/code] is given in the Node3D's local coordinate system. Called for this plugin's active gizmos.
+ Override this method to update the node properties during subgizmo editing (see [method _subgizmos_intersect_ray] and [method _subgizmos_intersect_frustum]). The [param transform] is given in the Node3D's local coordinate system. Called for this plugin's active gizmos.
</description>
</method>
<method name="_subgizmos_intersect_frustum" qualifiers="virtual const">
@@ -147,7 +147,7 @@
<param index="1" name="camera" type="Camera3D" />
<param index="2" name="frustum_planes" type="Plane[]" />
<description>
- Override this method to allow selecting subgizmos using mouse drag box selection. Given a [code]camera[/code] and a [code]frustum[/code], this method should return which subgizmos are contained within the frustum. The [code]frustum[/code] argument consists of an [code]Array[/code] with all the [code]Plane[/code]s that make up the selection frustum. The returned value should contain a list of unique subgizmo identifiers, these identifiers can have any non-negative value and will be used in other virtual methods like [method _get_subgizmo_transform] or [method _commit_subgizmos]. Called for this plugin's active gizmos.
+ Override this method to allow selecting subgizmos using mouse drag box selection. Given a [param camera] and [param frustum_planes], this method should return which subgizmos are contained within the frustums. The [param frustum_planes] argument consists of an [code]Array[/code] with all the [code]Plane[/code]s that make up the selection frustum. The returned value should contain a list of unique subgizmo identifiers, these identifiers can have any non-negative value and will be used in other virtual methods like [method _get_subgizmo_transform] or [method _commit_subgizmos]. Called for this plugin's active gizmos.
</description>
</method>
<method name="_subgizmos_intersect_ray" qualifiers="virtual const">
@@ -156,7 +156,7 @@
<param index="1" name="camera" type="Camera3D" />
<param index="2" name="screen_pos" type="Vector2" />
<description>
- Override this method to allow selecting subgizmos using mouse clicks. Given a [code]camera[/code] and a [code]point[/code] in screen coordinates, this method should return which subgizmo should be selected. The returned value should be a unique subgizmo identifier, which can have any non-negative value and will be used in other virtual methods like [method _get_subgizmo_transform] or [method _commit_subgizmos]. Called for this plugin's active gizmos.
+ Override this method to allow selecting subgizmos using mouse clicks. Given a [param camera] and a [param screen_pos] in screen coordinates, this method should return which subgizmo should be selected. The returned value should be a unique subgizmo identifier, which can have any non-negative value and will be used in other virtual methods like [method _get_subgizmo_transform] or [method _commit_subgizmos]. Called for this plugin's active gizmos.
</description>
</method>
<method name="add_material">
diff --git a/doc/classes/EditorPlugin.xml b/doc/classes/EditorPlugin.xml
index ab41c1c493..806588d100 100644
--- a/doc/classes/EditorPlugin.xml
+++ b/doc/classes/EditorPlugin.xml
@@ -64,8 +64,8 @@
if event is InputEventMouseMotion:
# Redraw viewport when cursor is moved.
update_overlays()
- return true
- return false
+ return EditorPlugin.AFTER_GUI_INPUT_STOP
+ return EditorPlugin.AFTER_GUI_INPUT_PASS
[/gdscript]
[csharp]
public override void _Forward3dDrawOverViewport(Godot.Control overlay)
@@ -74,15 +74,15 @@
overlay.DrawCircle(overlay.GetLocalMousePosition(), 64, Colors.White);
}
- public override bool _Forward3dGuiInput(Godot.Camera3D camera, InputEvent @event)
+ public override EditorPlugin.AfterGUIInput _Forward3dGuiInput(Godot.Camera3D camera, InputEvent @event)
{
if (@event is InputEventMouseMotion)
{
// Redraw viewport when cursor is moved.
UpdateOverlays();
- return true;
+ return EditorPlugin.AFTER_GUI_INPUT_STOP;
}
- return false;
+ return EditorPlugin.AFTER_GUI_INPUT_PASS;
[/csharp]
[/codeblocks]
</description>
@@ -100,33 +100,35 @@
<param index="0" name="viewport_camera" type="Camera3D" />
<param index="1" name="event" type="InputEvent" />
<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. The return value decides whether the [InputEvent] is consumed or forwarded to other [EditorPlugin]s. See [enum AfterGUIInput] for options.
+ [b]Example:[/b]
[codeblocks]
[gdscript]
- # Prevents the InputEvent to reach other Editor classes.
+ # Prevents the InputEvent from reaching other Editor classes.
func _forward_3d_gui_input(camera, event):
return EditorPlugin.AFTER_GUI_INPUT_STOP
[/gdscript]
[csharp]
- // Prevents the InputEvent to reach other Editor classes.
- public override bool _Forward3dGuiInput(Camera3D camera, InputEvent @event)
+ // Prevents the InputEvent from reaching other Editor classes.
+ public override EditorPlugin.AfterGUIInput _Forward3dGuiInput(Camera3D camera, InputEvent @event)
{
return EditorPlugin.AFTER_GUI_INPUT_STOP;
}
[/csharp]
[/codeblocks]
- Must [code]return false[/code] in order to forward the [InputEvent] to other Editor classes. Example:
+ Must [code]return EditorPlugin.AFTER_GUI_INPUT_PASS[/code] in order to forward the [InputEvent] to other Editor classes.
+ [b]Example:[/b]
[codeblocks]
[gdscript]
# Consumes InputEventMouseMotion and forwards other InputEvent types.
func _forward_3d_gui_input(camera, event):
- return event is InputEventMouseMotion
+ return EditorPlugin.AFTER_GUI_INPUT_STOP if event is InputEventMouseMotion else EditorPlugin.AFTER_GUI_INPUT_PASS
[/gdscript]
[csharp]
// Consumes InputEventMouseMotion and forwards other InputEvent types.
- public override bool _Forward3dGuiInput(Camera3D camera, InputEvent @event)
+ public override EditorPlugin.AfterGUIInput _Forward3dGuiInput(Camera3D camera, InputEvent @event)
{
- return @event is InputEventMouseMotion;
+ return @event is InputEventMouseMotion ? EditorPlugin.AFTER_GUI_INPUT_STOP : EditorPlugin.AFTER_GUI_INPUT_PASS;
}
[/csharp]
[/codeblocks]
@@ -182,22 +184,24 @@
<return type="bool" />
<param index="0" name="event" type="InputEvent" />
<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 [param event], otherwise forwards [param event] to other Editor classes.
+ [b]Example:[/b]
[codeblocks]
[gdscript]
- # Prevents the InputEvent to reach other Editor classes.
+ # Prevents the InputEvent from reaching other Editor classes.
func _forward_canvas_gui_input(event):
return true
[/gdscript]
[csharp]
- // Prevents the InputEvent to reach other Editor classes.
+ // Prevents the InputEvent from reaching other Editor classes.
public override bool ForwardCanvasGuiInput(InputEvent @event)
{
return true;
}
[/csharp]
[/codeblocks]
- Must [code]return false[/code] in order to forward the [InputEvent] to other Editor classes. Example:
+ Must [code]return false[/code] in order to forward the [InputEvent] to other Editor classes.
+ [b]Example:[/b]
[codeblocks]
[gdscript]
# Consumes InputEventMouseMotion and forwards other InputEvent types.
@@ -237,7 +241,7 @@
# You can use a custom icon:
return preload("res://addons/my_plugin/my_plugin_icon.svg")
# Or use a built-in icon:
- return get_editor_interface().get_base_control().get_icon("Node", "EditorIcons")
+ return get_editor_interface().get_base_control().get_theme_icon("Node", "EditorIcons")
[/gdscript]
[csharp]
public override Texture2D GetPluginIcon()
@@ -245,7 +249,7 @@
// You can use a custom icon:
return ResourceLoader.Load&lt;Texture2D&gt;("res://addons/my_plugin/my_plugin_icon.svg");
// Or use a built-in icon:
- return GetEditorInterface().GetBaseControl().GetIcon("Node", "EditorIcons");
+ return GetEditorInterface().GetBaseControl().GetThemeIcon("Node", "EditorIcons");
}
[/csharp]
[/codeblocks]
@@ -303,7 +307,7 @@
func _enter_tree():
plugin_control = preload("my_plugin_control.tscn").instantiate()
- get_editor_interface().get_editor_main_control().add_child(plugin_control)
+ get_editor_interface().get_editor_main_screen().add_child(plugin_control)
plugin_control.hide()
func _has_main_screen():
@@ -351,7 +355,7 @@
<return type="void" />
<param index="0" name="configuration" type="ConfigFile" />
<description>
- Restore the plugin GUI layout and data saved by [method _get_window_layout]. This method is called for every plugin on editor startup. Use the provided [code]configuration[/code] file to read your saved data.
+ Restore the plugin GUI layout and data saved by [method _get_window_layout]. This method is called for every plugin on editor startup. Use the provided [param configuration] file to read your saved data.
[codeblock]
func _set_window_layout(configuration):
$Window.position = configuration.get_value("MyPlugin", "window_position", Vector2())
@@ -364,7 +368,7 @@
<param index="0" name="name" type="String" />
<param index="1" name="path" type="String" />
<description>
- Adds a script at [code]path[/code] to the Autoload list as [code]name[/code].
+ Adds a script at [param path] to the Autoload list as [param name].
</description>
</method>
<method name="add_control_to_bottom_panel">
@@ -406,11 +410,12 @@
When a 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.
+ [b]Note:[/b] Custom types added this way are not true classes. They are just a helper to create a node with specific script.
</description>
</method>
<method name="add_debugger_plugin">
<return type="void" />
- <param index="0" name="script" type="Script" />
+ <param index="0" name="script" type="EditorDebuggerPlugin" />
<description>
Adds a [Script] as debugger plugin to the Debugger. The script must extend [EditorDebuggerPlugin].
</description>
@@ -429,7 +434,7 @@
<param index="1" name="first_priority" type="bool" default="false" />
<description>
Registers a new [EditorImportPlugin]. Import plugins are used to import custom and unsupported assets as a custom [Resource] type.
- If [code]first_priority[/code] is [code]true[/code], the new import plugin is inserted first in the list and takes precedence over pre-existing plugins.
+ If [param first_priority] is [code]true[/code], the new import plugin is inserted first in the list and takes precedence over pre-existing plugins.
[b]Note:[/b] If you want to import custom 3D asset formats use [method add_scene_format_importer_plugin] instead.
See [method add_inspector_plugin] for an example of how to register a plugin.
</description>
@@ -454,13 +459,21 @@
[/codeblocks]
</description>
</method>
+ <method name="add_node_3d_gizmo_plugin">
+ <return type="void" />
+ <param index="0" name="plugin" type="EditorNode3DGizmoPlugin" />
+ <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_scene_format_importer_plugin">
<return type="void" />
<param index="0" name="scene_format_importer" type="EditorSceneFormatImporter" />
<param index="1" name="first_priority" type="bool" default="false" />
<description>
Registers a new [EditorSceneFormatImporter]. Scene importers are used to import custom 3D asset formats as scenes.
- If [code]first_priority[/code] is [code]true[/code], the new import plugin is inserted first in the list and takes precedence over pre-existing plugins.
+ If [param first_priority] is [code]true[/code], the new import plugin is inserted first in the list and takes precedence over pre-existing plugins.
</description>
</method>
<method name="add_scene_post_import_plugin">
@@ -469,15 +482,7 @@
<param index="1" name="first_priority" type="bool" default="false" />
<description>
Add a [EditorScenePostImportPlugin]. These plugins allow customizing the import process of 3D assets by adding new options to the import dialogs.
- If [code]first_priority[/code] is [code]true[/code], the new import plugin is inserted first in the list and takes precedence over pre-existing plugins.
- </description>
- </method>
- <method name="add_spatial_gizmo_plugin">
- <return type="void" />
- <param index="0" name="plugin" type="EditorNode3DGizmoPlugin" />
- <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.
+ If [param first_priority] is [code]true[/code], the new import plugin is inserted first in the list and takes precedence over pre-existing plugins.
</description>
</method>
<method name="add_tool_menu_item">
@@ -485,7 +490,7 @@
<param index="0" name="name" type="String" />
<param index="1" name="callable" type="Callable" />
<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.
+ Adds a custom menu item to [b]Project &gt; Tools[/b] named [param name]. When clicked, the provided [param callable] will be called.
</description>
</method>
<method name="add_tool_submenu_item">
@@ -493,7 +498,7 @@
<param index="0" name="name" type="String" />
<param index="1" name="submenu" type="PopupMenu" />
<description>
- Adds a custom [PopupMenu] submenu under [b]Project &gt; Tools &gt;[/b] [code]name[/code]. Use [code]remove_tool_menu_item(name)[/code] on plugin clean up to remove the menu.
+ Adds a custom [PopupMenu] submenu under [b]Project &gt; Tools &gt;[/b] [param name]. Use [code]remove_tool_menu_item(name)[/code] on plugin clean up to remove the menu.
</description>
</method>
<method name="add_translation_parser_plugin">
@@ -532,7 +537,7 @@
</description>
</method>
<method name="get_undo_redo">
- <return type="UndoRedo" />
+ <return type="EditorUndoRedoManager" />
<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>
@@ -560,7 +565,7 @@
<return type="void" />
<param index="0" name="name" type="String" />
<description>
- Removes an Autoload [code]name[/code] from the list.
+ Removes an Autoload [param name] from the list.
</description>
</method>
<method name="remove_control_from_bottom_panel">
@@ -594,7 +599,7 @@
</method>
<method name="remove_debugger_plugin">
<return type="void" />
- <param index="0" name="script" type="Script" />
+ <param index="0" name="script" type="EditorDebuggerPlugin" />
<description>
Removes the debugger plugin with given script from the Debugger.
</description>
@@ -620,6 +625,13 @@
Removes an inspector plugin registered by [method add_import_plugin]
</description>
</method>
+ <method name="remove_node_3d_gizmo_plugin">
+ <return type="void" />
+ <param index="0" name="plugin" type="EditorNode3DGizmoPlugin" />
+ <description>
+ Removes a gizmo plugin registered by [method add_node_3d_gizmo_plugin].
+ </description>
+ </method>
<method name="remove_scene_format_importer_plugin">
<return type="void" />
<param index="0" name="scene_format_importer" type="EditorSceneFormatImporter" />
@@ -634,18 +646,11 @@
Remove the [EditorScenePostImportPlugin], added with [method add_scene_post_import_plugin].
</description>
</method>
- <method name="remove_spatial_gizmo_plugin">
- <return type="void" />
- <param index="0" name="plugin" type="EditorNode3DGizmoPlugin" />
- <description>
- Removes a gizmo plugin registered by [method add_spatial_gizmo_plugin].
- </description>
- </method>
<method name="remove_tool_menu_item">
<return type="void" />
<param index="0" name="name" type="String" />
<description>
- Removes a menu [code]name[/code] from [b]Project &gt; Tools[/b].
+ Removes a menu [param name] from [b]Project &gt; Tools[/b].
</description>
</method>
<method name="remove_translation_parser_plugin">
@@ -690,11 +695,13 @@
</signal>
<signal name="project_settings_changed">
<description>
+ Emitted when any project setting has changed.
</description>
</signal>
<signal name="resource_saved">
<param index="0" name="resource" type="Resource" />
<description>
+ Emitted when the given [param resource] was saved on disc.
</description>
</signal>
<signal name="scene_changed">
@@ -729,7 +736,7 @@
</constant>
<constant name="CONTAINER_CANVAS_EDITOR_BOTTOM" value="8" enum="CustomControlContainer">
</constant>
- <constant name="CONTAINER_PROPERTY_EDITOR_BOTTOM" value="9" enum="CustomControlContainer">
+ <constant name="CONTAINER_INSPECTOR_BOTTOM" value="9" enum="CustomControlContainer">
</constant>
<constant name="CONTAINER_PROJECT_SETTING_TAB_LEFT" value="10" enum="CustomControlContainer">
</constant>
@@ -754,5 +761,14 @@
<constant name="DOCK_SLOT_MAX" value="8" enum="DockSlot">
Represents the size of the [enum DockSlot] enum.
</constant>
+ <constant name="AFTER_GUI_INPUT_PASS" value="0" enum="AfterGUIInput">
+ Forwards the [InputEvent] to other EditorPlugins.
+ </constant>
+ <constant name="AFTER_GUI_INPUT_STOP" value="1" enum="AfterGUIInput">
+ Prevents the [InputEvent] from reaching other Editor classes.
+ </constant>
+ <constant name="AFTER_GUI_INPUT_CUSTOM" value="2" enum="AfterGUIInput">
+ Pass the [InputEvent] to other editor plugins except the main [Node3D] one. This can be used to prevent node selection changes and work with sub-gizmos instead.
+ </constant>
</constants>
</class>
diff --git a/doc/classes/EditorProperty.xml b/doc/classes/EditorProperty.xml
index 0badcf1639..e18bea1f67 100644
--- a/doc/classes/EditorProperty.xml
+++ b/doc/classes/EditorProperty.xml
@@ -9,6 +9,13 @@
<tutorials>
</tutorials>
<methods>
+ <method name="_set_read_only" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="read_only" type="bool" />
+ <description>
+ Called when the read-only status of the property is changed. It may be used to change custom controls into a read-only or modifiable state.
+ </description>
+ </method>
<method name="_update_property" qualifiers="virtual">
<return type="void" />
<description>
@@ -29,7 +36,7 @@
<param index="2" name="field" type="StringName" default="&amp;&quot;&quot;" />
<param index="3" name="changing" type="bool" default="false" />
<description>
- If one or several properties have changed, this must be called. [code]field[/code] is used in case your editor can modify fields separately (as an example, Vector3.x). The [code]changing[/code] argument avoids the editor requesting this property to be refreshed (leave as [code]false[/code] if unsure).
+ If one or several properties have changed, this must be called. [param field] is used in case your editor can modify fields separately (as an example, Vector3.x). The [param changing] argument avoids the editor requesting this property to be refreshed (leave as [code]false[/code] if unsure).
</description>
</method>
<method name="get_edited_object">
@@ -44,22 +51,17 @@
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">
- <return type="String" />
- <description>
- Must be implemented to provide a custom tooltip to the property editor.
- </description>
- </method>
<method name="set_bottom_editor">
<return type="void" />
<param index="0" name="editor" type="Control" />
<description>
- Puts the [code]editor[/code] control below the property label. The control must be previously added using [method Node.add_child].
+ Puts the [param editor] control below the property label. The control must be previously added using [method Node.add_child].
</description>
</method>
<method name="update_property">
<return type="void" />
<description>
+ Forces refresh of the property display.
</description>
</method>
</methods>
@@ -111,6 +113,8 @@
<signal name="property_changed">
<param index="0" name="property" type="StringName" />
<param index="1" name="value" type="Variant" />
+ <param index="2" name="field" type="StringName" />
+ <param index="3" name="changing" type="bool" />
<description>
Do not emit this manually, use the [method emit_changed] method instead.
</description>
@@ -146,7 +150,7 @@
<param index="1" name="pinned" type="bool" />
<description>
Emit it if you want to mark (or unmark) the value of a property for being saved regardless of being equal to the default value.
- The default value is the one the property will get when the node is just instantiated and can come from an ancestor scene in the inheritance/instancing chain, a script or a builtin class.
+ The default value is the one the property will get when the node is just instantiated and can come from an ancestor scene in the inheritance/instantiation chain, a script or a builtin class.
</description>
</signal>
<signal name="resource_selected">
diff --git a/doc/classes/EditorResourcePicker.xml b/doc/classes/EditorResourcePicker.xml
index f531037f59..4182ab3c16 100644
--- a/doc/classes/EditorResourcePicker.xml
+++ b/doc/classes/EditorResourcePicker.xml
@@ -21,7 +21,7 @@
<return type="void" />
<param index="0" name="menu_node" type="Object" />
<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.
+ This virtual method is called when updating the context menu of [EditorResourcePicker]. Implement this method to override the "New ..." items with your own options. [param menu_node] is a reference to the [PopupMenu] node.
[b]Note:[/b] Implement [method _handle_menu_selected] to handle these custom items.
</description>
</method>
@@ -62,9 +62,9 @@
</signal>
<signal name="resource_selected">
<param index="0" name="resource" type="Resource" />
- <param index="1" name="edit" type="bool" />
+ <param index="1" name="inspect" type="bool" />
<description>
- Emitted when the resource value was set and user clicked to edit it. When [code]edit[/code] is [code]true[/code], the signal was caused by the context menu "Edit" option.
+ Emitted when the resource value was set and user clicked to edit it. When [param inspect] is [code]true[/code], the signal was caused by the context menu "Edit" or "Inspect" option.
</description>
</signal>
</signals>
diff --git a/doc/classes/EditorResourcePreview.xml b/doc/classes/EditorResourcePreview.xml
index 2953c19761..68ead12c03 100644
--- a/doc/classes/EditorResourcePreview.xml
+++ b/doc/classes/EditorResourcePreview.xml
@@ -31,8 +31,8 @@
<param index="2" name="receiver_func" type="StringName" />
<param index="3" name="userdata" type="Variant" />
<description>
- 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.
+ Queue the [param resource] being edited for preview. Once the preview is ready, the [param receiver]'s [param receiver_func] will be called. The [param receiver_func] must take the following four arguments: [String] path, [Texture2D] preview, [Texture2D] thumbnail_preview, [Variant] userdata. [param userdata] can be anything, and will be returned when [param receiver_func] is called.
+ [b]Note:[/b] If it was not possible to create the preview the [param receiver_func] will still be called, but the preview will be null.
</description>
</method>
<method name="queue_resource_preview">
@@ -42,8 +42,8 @@
<param index="2" name="receiver_func" type="StringName" />
<param index="3" name="userdata" type="Variant" />
<description>
- 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.
+ Queue a resource file located at [param path] for preview. Once the preview is ready, the [param receiver]'s [param receiver_func] will be called. The [param receiver_func] must take the following four arguments: [String] path, [Texture2D] preview, [Texture2D] thumbnail_preview, [Variant] userdata. [param userdata] can be anything, and will be returned when [param receiver_func] is called.
+ [b]Note:[/b] If it was not possible to create the preview the [param receiver_func] will still be called, but the preview will be null.
</description>
</method>
<method name="remove_preview_generator">
@@ -58,7 +58,7 @@
<signal name="preview_invalidated">
<param index="0" name="path" type="String" />
<description>
- Emitted if a preview was invalidated (changed). [code]path[/code] corresponds to the path of the preview.
+ Emitted if a preview was invalidated (changed). [param path] corresponds to the path of the preview.
</description>
</signal>
</signals>
diff --git a/doc/classes/EditorResourcePreviewGenerator.xml b/doc/classes/EditorResourcePreviewGenerator.xml
index f24260cd1b..75628beae9 100644
--- a/doc/classes/EditorResourcePreviewGenerator.xml
+++ b/doc/classes/EditorResourcePreviewGenerator.xml
@@ -47,7 +47,7 @@
<return type="bool" />
<param index="0" name="type" type="String" />
<description>
- Returns [code]true[/code] if your generator supports the resource of type [code]type[/code].
+ Returns [code]true[/code] if your generator supports the resource of type [param type].
</description>
</method>
</methods>
diff --git a/doc/classes/EditorScenePostImport.xml b/doc/classes/EditorScenePostImport.xml
index 395b094bf2..2bf2accf17 100644
--- a/doc/classes/EditorScenePostImport.xml
+++ b/doc/classes/EditorScenePostImport.xml
@@ -8,7 +8,7 @@
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.
+ @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.
diff --git a/doc/classes/EditorScript.xml b/doc/classes/EditorScript.xml
index b39972694b..a02fd215d8 100644
--- a/doc/classes/EditorScript.xml
+++ b/doc/classes/EditorScript.xml
@@ -9,7 +9,7 @@
[b]Example script:[/b]
[codeblocks]
[gdscript]
- tool
+ @tool
extends EditorScript
func _run():
@@ -30,6 +30,7 @@
[/csharp]
[/codeblocks]
[b]Note:[/b] The script is run in the Editor context, which means the output is visible in the console window started with the Editor (stdout) instead of the usual Godot [b]Output[/b] dock.
+ [b]Note:[/b] EditorScript is [RefCounted], meaning it is destroyed when nothing references it. This can cause errors during asynchronous operations if there are no references to the script.
</description>
<tutorials>
</tutorials>
@@ -44,7 +45,7 @@
<return type="void" />
<param index="0" name="node" type="Node" />
<description>
- Adds [code]node[/code] as a child of the root node in the editor context.
+ Adds [param node] as a child of the root node in the editor context.
[b]Warning:[/b] The implementation of this method is currently disabled.
</description>
</method>
diff --git a/doc/classes/EditorSelection.xml b/doc/classes/EditorSelection.xml
index 9c3e87ddb0..54029c2ccf 100644
--- a/doc/classes/EditorSelection.xml
+++ b/doc/classes/EditorSelection.xml
@@ -31,7 +31,7 @@
</description>
</method>
<method name="get_transformable_selected_nodes">
- <return type="Array" />
+ <return type="Node[]" />
<description>
Gets the list of selected nodes, optimized for transform operations (i.e. moving them, rotating, etc). This list avoids situations where a node is selected and also child/grandchild.
</description>
diff --git a/doc/classes/EditorSettings.xml b/doc/classes/EditorSettings.xml
index 2362213109..07457387a0 100644
--- a/doc/classes/EditorSettings.xml
+++ b/doc/classes/EditorSettings.xml
@@ -74,18 +74,18 @@
<return type="bool" />
<param index="0" name="setting_prefix" type="String" />
<description>
- Checks if any settings with the prefix [code]setting_prefix[/code] exist in the set of changed settings. See also [method get_changed_settings].
+ Checks if any settings with the prefix [param setting_prefix] exist in the set of changed settings. See also [method get_changed_settings].
</description>
</method>
<method name="erase">
<return type="void" />
<param index="0" name="property" type="String" />
<description>
- Erases the setting whose name is specified by [code]property[/code].
+ Erases the setting whose name is specified by [param property].
</description>
</method>
<method name="get_changed_settings" qualifiers="const">
- <return type="Array" />
+ <return type="PackedStringArray" />
<description>
Gets an array of the settings which have been changed since the last save. Note that internally [code]changed_settings[/code] is cleared after a successful save, so generally the most appropriate place to use this method is when processing [constant NOTIFICATION_EDITOR_SETTINGS_CHANGED]
</description>
@@ -102,7 +102,7 @@
<param index="1" name="key" type="String" />
<param index="2" name="default" type="Variant" default="null" />
<description>
- Returns project-specific metadata for the [code]section[/code] and [code]key[/code] specified. If the metadata doesn't exist, [code]default[/code] will be returned instead. See also [method set_project_metadata].
+ Returns project-specific metadata for the [param section] and [param key] specified. If the metadata doesn't exist, [param default] will be returned instead. See also [method set_project_metadata].
</description>
</method>
<method name="get_recent_dirs" qualifiers="const">
@@ -115,14 +115,14 @@
<return type="Variant" />
<param index="0" name="name" type="String" />
<description>
- Returns the value of the setting specified by [code]name[/code]. This is equivalent to using [method Object.get] on the EditorSettings instance.
+ Returns the value of the setting specified by [param name]. This is equivalent to using [method Object.get] on the EditorSettings instance.
</description>
</method>
<method name="has_setting" qualifiers="const">
<return type="bool" />
<param index="0" name="name" type="String" />
<description>
- Returns [code]true[/code] if the setting specified by [code]name[/code] exists, [code]false[/code] otherwise.
+ Returns [code]true[/code] if the setting specified by [param name] exists, [code]false[/code] otherwise.
</description>
</method>
<method name="mark_setting_changed">
@@ -132,26 +132,12 @@
Marks the passed editor setting as being changed, see [method get_changed_settings]. Only settings which exist (see [method has_setting]) will be accepted.
</description>
</method>
- <method name="property_can_revert">
- <return type="bool" />
- <param index="0" name="name" type="String" />
- <description>
- Returns [code]true[/code] if the setting specified by [code]name[/code] can have its value reverted to the default value, [code]false[/code] otherwise. When this method returns [code]true[/code], a Revert button will display next to the setting in the Editor Settings.
- </description>
- </method>
- <method name="property_get_revert">
- <return type="Variant" />
- <param index="0" name="name" type="String" />
- <description>
- Returns the default value of the setting specified by [code]name[/code]. This is the value that would be applied when clicking the Revert button in the Editor Settings.
- </description>
- </method>
<method name="set_builtin_action_override">
<return type="void" />
<param index="0" name="name" type="String" />
- <param index="1" name="actions_list" type="Array" />
+ <param index="1" name="actions_list" type="InputEvent[]" />
<description>
- Overrides the built-in editor action [code]name[/code] with the input actions defined in [code]actions_list[/code].
+ Overrides the built-in editor action [param name] with the input actions defined in [param actions_list].
</description>
</method>
<method name="set_favorites">
@@ -167,7 +153,7 @@
<param index="1" name="value" type="Variant" />
<param index="2" name="update_current" type="bool" />
<description>
- Sets the initial value of the setting specified by [code]name[/code] to [code]value[/code]. This is used to provide a value for the Revert button in the Editor Settings. If [code]update_current[/code] is true, the current value of the setting will be set to [code]value[/code] as well.
+ Sets the initial value of the setting specified by [param name] to [param value]. This is used to provide a value for the Revert button in the Editor Settings. If [param update_current] is true, the current value of the setting will be set to [param value] as well.
</description>
</method>
<method name="set_project_metadata">
@@ -176,7 +162,7 @@
<param index="1" name="key" type="String" />
<param index="2" name="data" type="Variant" />
<description>
- Sets project-specific metadata with the [code]section[/code], [code]key[/code] and [code]data[/code] specified. This metadata is stored outside the project folder and therefore won't be checked into version control. See also [method get_project_metadata].
+ Sets project-specific metadata with the [param section], [param key] and [param data] specified. This metadata is stored outside the project folder and therefore won't be checked into version control. See also [method get_project_metadata].
</description>
</method>
<method name="set_recent_dirs">
@@ -191,7 +177,7 @@
<param index="0" name="name" type="String" />
<param index="1" name="value" type="Variant" />
<description>
- Sets the [code]value[/code] of the setting specified by [code]name[/code]. This is equivalent to using [method Object.set] on the EditorSettings instance.
+ Sets the [param value] of the setting specified by [param name]. This is equivalent to using [method Object.set] on the EditorSettings instance.
</description>
</method>
</methods>
@@ -210,10 +196,10 @@
The thumbnail size to use in the FileSystem dock (in pixels). See also [member filesystem/file_dialog/thumbnail_size].
</member>
<member name="docks/property_editor/auto_refresh_interval" type="float" setter="" getter="">
- The refresh interval to use for the inspector dock's properties. The effect of this setting is mainly noticeable when adjusting gizmos in the 2D/3D editor and looking at the inspector at the same time. Lower values make the inspector more often, but take up more CPU time.
+ The refresh interval to use for the Inspector dock's properties. The effect of this setting is mainly noticeable when adjusting gizmos in the 2D/3D editor and looking at the inspector at the same time. Lower values make the inspector more often, but take up more CPU time.
</member>
<member name="docks/property_editor/subresource_hue_tint" type="float" setter="" getter="">
- The tint intensity to use for the subresources background in the inspector dock. The tint is used to distinguish between different subresources in the inspector. Higher values result in a more noticeable background color difference.
+ The tint intensity to use for the subresources background in the Inspector dock. The tint is used to distinguish between different subresources in the inspector. Higher values result in a more noticeable background color difference.
</member>
<member name="docks/scene_tree/auto_expand_to_selected" type="bool" setter="" getter="">
If [code]true[/code], the scene tree dock will automatically unfold nodes when a node that has folded parents is selected.
@@ -328,8 +314,8 @@
<member name="editors/3d/navigation/navigation_scheme" type="int" setter="" getter="">
The navigation scheme to use in the 3D editor. Changing this setting will affect the mouse buttons that must be held down to perform certain operations in the 3D editor viewport.
- [b]Godot[/b] Middle mouse button to orbit, [kbd]Shift + Middle mouse button[/kbd] to pan. [kbd]Mouse wheel[/kbd] to zoom.
- - [b]Maya:[/b] [kbd]Alt + Left mouse buttton[/kbd] to orbit. [kbd]Middle mouse button[/kbd] to pan, [kbd]Shift + Middle mouse button[/kbd] to pan 10 times faster. [kbd]Mouse wheel[/kbd] to zoom.
- - [b]Modo:[/b] [kbd]Alt + Left mouse buttton[/kbd] to orbit. [kbd]Alt + Shift + Left mouse button[/kbd] to pan. [kbd]Ctrl + Alt + Left mouse button[/kbd] to zoom.
+ - [b]Maya:[/b] [kbd]Alt + Left mouse button[/kbd] to orbit. [kbd]Middle mouse button[/kbd] to pan, [kbd]Shift + Middle mouse button[/kbd] to pan 10 times faster. [kbd]Mouse wheel[/kbd] to zoom.
+ - [b]Modo:[/b] [kbd]Alt + Left mouse button[/kbd] to orbit. [kbd]Alt + Shift + Left mouse button[/kbd] to pan. [kbd]Ctrl + Alt + Left mouse button[/kbd] to zoom.
See also [member editors/3d/freelook/freelook_navigation_scheme].
[b]Note:[/b] On certain window managers on Linux, the [kbd]Alt[/kbd] key will be intercepted by the window manager when clicking a mouse button at the same time. This means Godot will not see the modifier key as being pressed.
</member>
@@ -377,7 +363,7 @@
The color to use for the selection box that surrounds selected nodes in the 3D editor viewport. The color's alpha channel influences the selection box's opacity.
</member>
<member name="editors/3d_gizmos/gizmo_colors/instantiated" type="Color" setter="" getter="">
- The color override to use for 3D editor gizmos if the [Node3D] in question is part of an instanced scene file (from the perspective of the current scene).
+ The color override to use for 3D editor gizmos if the [Node3D] in question is part of an instantiated scene file (from the perspective of the current scene).
</member>
<member name="editors/3d_gizmos/gizmo_colors/joint" type="Color" setter="" getter="">
The 3D editor gizmo color for [Joint3D]s and [PhysicalBone3D]s.
@@ -419,7 +405,7 @@
If [code]true[/code], allows panning by holding down [kbd]Space[/kbd] in the 2D editor viewport (in addition to panning with the middle or right mouse buttons). If [code]false[/code], the left mouse button must be held down while holding down [kbd]Space[/kbd] to pan in the 2D editor viewport.
</member>
<member name="editors/panning/sub_editors_panning_scheme" type="int" setter="" getter="">
- Controls whether the mouse wheel scroll zooms or pans in subeditors. The list of affected subeditors is: animation blend tree editor, [Polygon2D] editor, tileset editor, texture region editor, visual shader editor and visual script editor. See also [member editors/panning/2d_editor_panning_scheme] and [member editors/panning/animation_editors_panning_scheme].
+ Controls whether the mouse wheel scroll zooms or pans in subeditors. The list of affected subeditors is: animation blend tree editor, [Polygon2D] editor, tileset editor, texture region editor and visual shader editor. See also [member editors/panning/2d_editor_panning_scheme] and [member editors/panning/animation_editors_panning_scheme].
</member>
<member name="editors/panning/warped_mouse_panning" type="bool" setter="" getter="">
If [code]true[/code], warps the mouse around the 2D viewport while panning in the 2D editor. This makes it possible to pan over a large area without having to exit panning then mouse the mouse back constantly.
@@ -438,10 +424,10 @@
[b]Note:[/b] Only effective if [member editors/tiles_editor/display_grid] is [code]true[/code].
</member>
<member name="editors/visual_editors/lines_curvature" type="float" setter="" getter="">
- The curvature to use for connection lines in the visual script and visual shader editors. Higher values will make connection lines appear more curved, with values above [code]0.5[/code] resulting in more "angular" turns in the middle of connection lines.
+ The curvature to use for connection lines in the visual shader editor. Higher values will make connection lines appear more curved, with values above [code]0.5[/code] resulting in more "angular" turns in the middle of connection lines.
</member>
<member name="editors/visual_editors/minimap_opacity" type="float" setter="" getter="">
- The opacity of the minimap displayed in the bottom-right corner of the visual script and visual shader editors.
+ The opacity of the minimap displayed in the bottom-right corner of the visual shader editor.
</member>
<member name="editors/visual_editors/visual_shader/port_preview_size" type="int" setter="" getter="">
The size to use for port previews in the visual shader uniforms (toggled by clicking the "eye" icon next to an output). The value is defined in pixels at 100% zoom, and will scale with zoom automatically.
@@ -471,6 +457,12 @@
If [code]true[/code], when saving a file, the editor will rename the old file to a different name, save a new file, then only remove the old file once the new file has been saved. This makes loss of data less likely to happen if the editor or operating system exits unexpectedly while saving (e.g. due to a crash or power outage).
[b]Note:[/b] On Windows, this feature can interact negatively with certain antivirus programs. In this case, you may have to set this to [code]false[/code] to prevent file locking issues.
</member>
+ <member name="interface/editor/accept_dialog_cancel_ok_buttons" type="int" setter="" getter="">
+ How to position the Cancel and OK buttons in the editor's [AcceptDialog]s. Different platforms have different standard behaviors for this, which can be overridden using this setting. This is useful if you use Godot both on Windows and macOS/Linux and your Godot muscle memory is stronger than your OS specific one.
+ - [b]Auto[/b] follows the platform convention: Cancel first on macOS and Linux, OK first on Windows.
+ - [b]Cancel First[/b] forces the ordering Cancel/OK.
+ - [b]OK First[/b] forces the ordering OK/Cancel.
+ </member>
<member name="interface/editor/automatically_open_screenshots" type="bool" setter="" getter="">
If [code]true[/code], automatically opens screenshots with the default program associated to [code].png[/code] files after a screenshot is taken using the [b]Editor &gt; Take Screenshot[/b] action.
</member>
@@ -479,15 +471,15 @@
</member>
<member name="interface/editor/code_font_contextual_ligatures" type="int" setter="" getter="">
The font ligatures to enable for the currently configured code font. Not all fonts include support for ligatures.
- [b]Note:[/b] The default editor code font (Hack) does not have contextual ligatures in its font file.
+ [b]Note:[/b] The default editor code font ([url=https://www.jetbrains.com/lp/mono/]JetBrains Mono[/url]) has contextual ligatures in its font file.
</member>
<member name="interface/editor/code_font_custom_opentype_features" type="String" setter="" getter="">
List of custom OpenType features to use, if supported by the currently configured code font. Not all fonts include support for custom OpenType features. The string should follow the OpenType specification.
- [b]Note:[/b] The default editor code font (Hack) does not have custom OpenType features in its font file.
+ [b]Note:[/b] The default editor code font ([url=https://www.jetbrains.com/lp/mono/]JetBrains Mono[/url]) has custom OpenType features in its font file, but there is no documented list yet.
</member>
<member name="interface/editor/code_font_custom_variations" type="String" setter="" getter="">
List of alternative characters to use, if supported by the currently configured code font. Not all fonts include support for custom variations. The string should follow the OpenType specification.
- [b]Note:[/b] The default editor code font (Hack) does not have alternate characters in its font file.
+ [b]Note:[/b] The default editor code font ([url=https://www.jetbrains.com/lp/mono/]JetBrains Mono[/url]) has alternate characters in its font file, but there is no documented list yet.
</member>
<member name="interface/editor/code_font_size" type="int" setter="" getter="">
The size of the font in the script editor. This setting does not impact the font size of the Output panel (see [member run/output/font_size]).
@@ -509,8 +501,12 @@
The language to use for the editor interface.
Translations are provided by the community. If you spot a mistake, [url=https://docs.godotengine.org/en/latest/community/contributing/editor_and_docs_localization.html]contribute to editor translations on Weblate![/url]
</member>
- <member name="interface/editor/font_antialiased" type="bool" setter="" getter="">
- If [code]true[/code], enables FreeType's font antialiasing on the editor fonts. Most fonts are not designed to look good with antialiasing disabled, so it's recommended to leave this enabled unless you're using a pixel art font.
+ <member name="interface/editor/expand_to_title" type="bool" setter="" getter="">
+ Expanding main editor window content to the title, if supported by [DisplayServer]. See [constant DisplayServer.WINDOW_FLAG_EXTEND_TO_TITLE].
+ Specific to the macOS platform.
+ </member>
+ <member name="interface/editor/font_antialiasing" type="int" setter="" getter="">
+ FreeType's font anti-aliasing mode used to render the editor fonts. Most fonts are not designed to look good with anti-aliasing disabled, so it's recommended to leave this enabled unless you're using a pixel art font.
</member>
<member name="interface/editor/font_hinting" type="int" setter="" getter="">
The font hinting mode to use for the editor fonts. FreeType supports the following font hinting modes:
@@ -520,7 +516,7 @@
If set to [b]Auto[/b], the font hinting mode will be set to match the current operating system in use. This means the [b]Light[/b] hinting mode will be used on Windows and Linux, and the [b]None[/b] hinting mode will be used on macOS.
</member>
<member name="interface/editor/font_subpixel_positioning" type="int" setter="" getter="">
- The subpixel positioning mode to use when rendering editor font glyphs. This affects both the main and code fonts. [b]Disabled[/b] is the fastest to render and uses the least memory. [b]Auto[/b] only uses subpixel positioning for small font sizes (where the benefit is the most noticeable). [b]One half of a pixel[/b] and [b]One quarter of a pixel[/b] force the same subpixel positioning mode for all editor fonts, regardless of their size (with [b]One quarter of a pixel[/b] being the highest-quality option).
+ The subpixel positioning mode to use when rendering editor font glyphs. This affects both the main and code fonts. [b]Disabled[/b] is the fastest to render and uses the least memory. [b]Auto[/b] only uses subpixel positioning for small font sizes (where the benefit is the most noticeable). [b]One Half of a Pixel[/b] and [b]One Quarter of a Pixel[/b] force the same subpixel positioning mode for all editor fonts, regardless of their size (with [b]One Quarter of a Pixel[/b] being the highest-quality option).
</member>
<member name="interface/editor/low_processor_mode_sleep_usec" type="float" setter="" getter="">
The amount of sleeping between frames when the low-processor usage mode is enabled (in microseconds). Higher values will result in lower CPU/GPU usage, which can improve battery life on laptops. However, higher values will result in a less responsive editor. The default value is set to allow for maximum smoothness on monitors up to 144 Hz. See also [member interface/editor/unfocused_low_processor_mode_sleep_usec].
@@ -553,6 +549,10 @@
<member name="interface/editor/unfocused_low_processor_mode_sleep_usec" type="float" setter="" getter="">
When the editor window is unfocused, the amount of sleeping between frames when the low-processor usage mode is enabled (in microseconds). Higher values will result in lower CPU/GPU usage, which can improve battery life on laptops (in addition to improving the running project's performance if the editor has to redraw continuously). However, higher values will result in a less responsive editor. The default value is set to limit the editor to 20 FPS when the editor window is unfocused. See also [member interface/editor/low_processor_mode_sleep_usec].
</member>
+ <member name="interface/editor/use_embedded_menu" type="bool" setter="" getter="">
+ If [code]true[/code], editor main menu is using embedded [MenuBar] instead of system global menu.
+ Specific to the macOS platform.
+ </member>
<member name="interface/inspector/max_array_dictionary_items_per_page" type="int" setter="" getter="">
The number of [Array] or [Dictionary] items to display on each "page" in the inspector. Higher values allow viewing more values per page, but take more time to load. This increased load time is noticeable when selecting nodes that have array or dictionary properties in the editor.
</member>
@@ -622,8 +622,8 @@
The port number to use to contact the HTTP and HTTPS proxy in the editor (for the asset library and export template downloads). See also [member network/http_proxy/host].
[b]Note:[/b] Godot currently doesn't automatically use system proxy settings, so you have to enter them manually here if needed.
</member>
- <member name="network/ssl/editor_ssl_certificates" type="String" setter="" getter="">
- The SSL certificate bundle to use for HTTP requests made within the editor (e.g. from the AssetLib tab). If left empty, the [url=https://github.com/godotengine/godot/blob/master/thirdparty/certs/ca-certificates.crt]included Mozilla certificate bundle[/url] will be used.
+ <member name="network/tls/editor_tls_certificates" type="String" setter="" getter="">
+ The TLS certificate bundle to use for HTTP requests made within the editor (e.g. from the AssetLib tab). If left empty, the [url=https://github.com/godotengine/godot/blob/master/thirdparty/certs/ca-certificates.crt]included Mozilla certificate bundle[/url] will be used.
</member>
<member name="project_manager/sorting_order" type="int" setter="" getter="">
The sorting order to use in the project manager. When changing the sorting order in the project manager, this setting is set permanently in the editor settings.
@@ -653,9 +653,9 @@
The monitor to display the project on when starting the project from the editor.
</member>
<member name="text_editor/appearance/caret/caret_blink" type="bool" setter="" getter="">
- If [code]true[/code], makes the caret blink according to [member text_editor/appearance/caret/caret_blink_speed]. Disabling this setting can improve battery life on laptops if you spend long amounts of time in the script editor, since it will reduce the frequency at which the editor needs to be redrawn.
+ If [code]true[/code], makes the caret blink according to [member text_editor/appearance/caret/caret_blink_interval]. Disabling this setting can improve battery life on laptops if you spend long amounts of time in the script editor, since it will reduce the frequency at which the editor needs to be redrawn.
</member>
- <member name="text_editor/appearance/caret/caret_blink_speed" type="float" setter="" getter="">
+ <member name="text_editor/appearance/caret/caret_blink_interval" type="float" setter="" getter="">
The interval at which to blink the caret (in seconds). See also [member text_editor/appearance/caret/caret_blink].
</member>
<member name="text_editor/appearance/caret/highlight_all_occurrences" type="bool" setter="" getter="">
@@ -677,19 +677,19 @@
If [code]true[/code], displays line length guidelines to help you keep line lengths in check. See also [member text_editor/appearance/guidelines/line_length_guideline_soft_column] and [member text_editor/appearance/guidelines/line_length_guideline_hard_column].
</member>
<member name="text_editor/appearance/gutters/highlight_type_safe_lines" type="bool" setter="" getter="">
- If [code]true[/code], highlights type-safe lines by displaying their line number color with [member text_editor/theme/highlighting/safe_line_number_color] instead of [member text_editor/theme/highlighting/line_number_color]. Type-safe lines are lines of code where the type of all variables is known at compile-time. These type-safe lines will run faster in Godot 4.0 and later thanks to typed instructions.
+ If [code]true[/code], highlights type-safe lines by displaying their line number color with [member text_editor/theme/highlighting/safe_line_number_color] instead of [member text_editor/theme/highlighting/line_number_color]. Type-safe lines are lines of code where the type of all variables is known at compile-time. These type-safe lines may run faster thanks to typed instructions.
</member>
<member name="text_editor/appearance/gutters/line_numbers_zero_padded" type="bool" setter="" getter="">
If [code]true[/code], displays line numbers with zero padding (e.g. [code]007[/code] instead of [code]7[/code]).
</member>
<member name="text_editor/appearance/gutters/show_bookmark_gutter" type="bool" setter="" getter="">
- If [code]true[/code], displays a gutter at the left containing icons for bookmarks.
+ If [code]true[/code], displays icons for bookmarks in a gutter at the left. Bookmarks remain functional when this setting is disabled.
</member>
<member name="text_editor/appearance/gutters/show_info_gutter" type="bool" setter="" getter="">
If [code]true[/code], displays a gutter at the left containing icons for methods with signal connections.
</member>
<member name="text_editor/appearance/gutters/show_line_numbers" type="bool" setter="" getter="">
- If [code]true[/code], displays line numbers in the gutter at the left.
+ If [code]true[/code], displays line numbers in a gutter at the left.
</member>
<member name="text_editor/appearance/lines/code_folding" type="bool" setter="" getter="">
If [code]true[/code], displays the folding arrows next to indented code sections and allows code folding. If [code]false[/code], hides the folding arrows next to indented code sections and disallows code folding.
@@ -710,7 +710,7 @@
If [code]true[/code], draws tab characters as chevrons.
</member>
<member name="text_editor/appearance/whitespace/line_spacing" type="int" setter="" getter="">
- The space to add between lines (in pixels). Greater line spacing can help improve readability at the cost of displaying less lines on screen.
+ The space to add between lines (in pixels). Greater line spacing can help improve readability at the cost of displaying fewer lines on screen.
</member>
<member name="text_editor/behavior/files/auto_reload_scripts_on_external_change" type="bool" setter="" getter="">
If [code]true[/code], automatically reloads scripts in the editor when they have been modified and saved by external editors.
@@ -758,7 +758,7 @@
[b]Note:[/b] You can hold down [kbd]Alt[/kbd] while using the mouse wheel to temporarily scroll 5 times faster.
</member>
<member name="text_editor/completion/add_type_hints" type="bool" setter="" getter="">
- If [code]true[/code], adds static typing hints such as [code]-&gt; void[/code] and [code]: int[/code] when performing method definition autocompletion.
+ If [code]true[/code], adds static typing hints such as [code]-&gt; void[/code] and [code]: int[/code] when using code autocompletion or when creating onready variables by drag and dropping nodes into the script editor while pressing the [kbd]Ctrl[/kbd] key.
</member>
<member name="text_editor/completion/auto_brace_complete" type="bool" setter="" getter="">
If [code]true[/code], automatically completes braces when making use of code completion.
@@ -809,7 +809,7 @@
The script editor's background color. If set to a translucent color, the editor theme's base color will be visible behind.
</member>
<member name="text_editor/theme/highlighting/base_type_color" type="Color" setter="" getter="">
- The script editor's base type color (used for types like [Vector2], [Vector3], ...).
+ The script editor's base type color (used for types like [Vector2], [Vector3], [Color], ...).
</member>
<member name="text_editor/theme/highlighting/bookmark_color" type="Color" setter="" getter="">
The script editor's bookmark icon color (displayed in the gutter).
@@ -866,13 +866,13 @@
</member>
<member name="text_editor/theme/highlighting/function_color" type="Color" setter="" getter="">
The script editor's function call color.
- [b]Note:[/b] When using the GDScript syntax highlighter, this is replaced by the function declaration color configured in the syntax theme for function declarations (e.g. [code]func _ready():[/code]).
+ [b]Note:[/b] When using the GDScript syntax highlighter, this is replaced by the function definition color configured in the syntax theme for function definitions (e.g. [code]func _ready():[/code]).
</member>
<member name="text_editor/theme/highlighting/keyword_color" type="Color" setter="" getter="">
- The script editor's non-control flow keyword color (used for keywords like [code]var[/code], [code]func[/code], some built-in methods, ...).
+ The script editor's non-control flow keyword color (used for keywords like [code]var[/code], [code]func[/code], [code]extends[/code], ...).
</member>
<member name="text_editor/theme/highlighting/line_length_guideline_color" type="Color" setter="" getter="">
- The script editor's color for the line length guideline. The "hard" line length guideline will be drawn with this color, whereas the "soft" line length guideline will be drawn with an opacity twice as low.
+ The script editor's color for the line length guideline. The "hard" line length guideline will be drawn with this color, whereas the "soft" line length guideline will be drawn with half of its opacity.
</member>
<member name="text_editor/theme/highlighting/line_number_color" type="Color" setter="" getter="">
The script editor's color for line numbers. See also [member text_editor/theme/highlighting/safe_line_number_color].
@@ -913,7 +913,7 @@
The script editor's background color for text. This should be set to a translucent color so that it can display on top of other line color modifiers such as [member text_editor/theme/highlighting/current_line_color].
</member>
<member name="text_editor/theme/highlighting/user_type_color" type="Color" setter="" getter="">
- The script editor's color for user-defined types (using [code]@class_name[/code]).
+ The script editor's color for user-defined types (using [code]class_name[/code]).
</member>
<member name="text_editor/theme/highlighting/word_highlighted_color" type="Color" setter="" getter="">
The script editor's color for words highlighted by selecting them. Only visible if [member text_editor/appearance/caret/highlight_all_occurrences] is [code]true[/code].
diff --git a/doc/classes/EditorSpinSlider.xml b/doc/classes/EditorSpinSlider.xml
index 2ada211dab..de105b32e1 100644
--- a/doc/classes/EditorSpinSlider.xml
+++ b/doc/classes/EditorSpinSlider.xml
@@ -10,14 +10,20 @@
</tutorials>
<members>
<member name="flat" type="bool" setter="set_flat" getter="is_flat" default="false">
+ If [code]true[/code], the slider will not draw background.
</member>
+ <member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" overrides="Control" enum="Control.FocusMode" default="2" />
<member name="hide_slider" type="bool" setter="set_hide_slider" getter="is_hiding_slider" default="false">
If [code]true[/code], the slider is hidden.
</member>
<member name="label" type="String" setter="set_label" getter="get_label" default="&quot;&quot;">
+ The text that displays to the left of the value.
</member>
<member name="read_only" type="bool" setter="set_read_only" getter="is_read_only" default="false">
+ If [code]true[/code], the slider can't be interacted with.
</member>
+ <member name="size_flags_vertical" type="int" setter="set_v_size_flags" getter="get_v_size_flags" overrides="Control" default="1" />
+ <member name="step" type="float" setter="set_step" getter="get_step" overrides="Range" default="1.0" />
<member name="suffix" type="String" setter="set_suffix" getter="get_suffix" default="&quot;&quot;">
The suffix to display after the value (in a faded color). This should generally be a plural word. You may have to use an abbreviation if the suffix is too long to be displayed.
</member>
diff --git a/doc/classes/EditorSyntaxHighlighter.xml b/doc/classes/EditorSyntaxHighlighter.xml
index 15b730acb4..51f4474fe7 100644
--- a/doc/classes/EditorSyntaxHighlighter.xml
+++ b/doc/classes/EditorSyntaxHighlighter.xml
@@ -17,7 +17,7 @@
</description>
</method>
<method name="_get_supported_languages" qualifiers="virtual const">
- <return type="Array" />
+ <return type="PackedStringArray" />
<description>
Virtual method which can be overridden to return the supported language names.
</description>
diff --git a/doc/classes/EditorTranslationParserPlugin.xml b/doc/classes/EditorTranslationParserPlugin.xml
index bbae06899c..df10c645ef 100644
--- a/doc/classes/EditorTranslationParserPlugin.xml
+++ b/doc/classes/EditorTranslationParserPlugin.xml
@@ -11,7 +11,7 @@
Below shows an example of a custom parser that extracts strings from a CSV file to write into a POT.
[codeblocks]
[gdscript]
- tool
+ @tool
extends EditorTranslationParserPlugin
func _parse_file(path, msgids, msgids_context_plural):
@@ -72,7 +72,7 @@
msgidsContextPlural.Add(new Godot.Collections.Array{"Only with context", "a friendly context", ""});
[/csharp]
[/codeblocks]
- [b]Note:[/b] If you override parsing logic for standard script types (GDScript, C#, etc.), it would be better to load the [code]path[/code] argument using [method ResourceLoader.load]. This is because built-in scripts are loaded as [Resource] type, not [File] type.
+ [b]Note:[/b] If you override parsing logic for standard script types (GDScript, C#, etc.), it would be better to load the [code]path[/code] argument using [method ResourceLoader.load]. This is because built-in scripts are loaded as [Resource] type, not [FileAccess] type.
For example:
[codeblocks]
[gdscript]
@@ -112,8 +112,8 @@
<method name="_parse_file" qualifiers="virtual">
<return type="void" />
<param index="0" name="path" type="String" />
- <param index="1" name="msgids" type="Array" />
- <param index="2" name="msgids_context_plural" type="Array" />
+ <param index="1" name="msgids" type="String[]" />
+ <param index="2" name="msgids_context_plural" type="Array[]" />
<description>
Override this method to define a custom parsing logic to extract the translatable strings.
</description>
diff --git a/doc/classes/EditorUndoRedoManager.xml b/doc/classes/EditorUndoRedoManager.xml
new file mode 100644
index 0000000000..133ee9db0d
--- /dev/null
+++ b/doc/classes/EditorUndoRedoManager.xml
@@ -0,0 +1,130 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="EditorUndoRedoManager" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ Manages undo history of scenes opened in the editor.
+ </brief_description>
+ <description>
+ [EditorUndoRedoManager] is a manager for [UndoRedo] objects associated with edited scenes. Each scene has its own undo history and [EditorUndoRedoManager] ensures that each action performed in the editor gets associated with a proper scene. For actions not related to scenes ([ProjectSettings] edits, external resources, etc.), a separate global history is used.
+ The usage is mostly the same as [UndoRedo]. You create and commit actions and the manager automatically decides under-the-hood what scenes it belongs to. The scene is deduced based on the first operation in an action, using the object from the operation. The rules are as follows:
+ - If the object is a [Node], use the currently edited scene;
+ - If the object is a built-in resource, use the scene from its path;
+ - If the object is external resource or anything else, use global history.
+ This guessing can sometimes yield false results, so you can provide a custom context object when creating an action.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="add_do_method" qualifiers="vararg">
+ <return type="void" />
+ <param index="0" name="object" type="Object" />
+ <param index="1" name="method" type="StringName" />
+ <description>
+ Register a method that will be called when the action is committed (i.e. the "do" action).
+ If this is the first operation, the [param object] will be used to deduce target undo history.
+ </description>
+ </method>
+ <method name="add_do_property">
+ <return type="void" />
+ <param index="0" name="object" type="Object" />
+ <param index="1" name="property" type="StringName" />
+ <param index="2" name="value" type="Variant" />
+ <description>
+ Register a property value change for "do".
+ If this is the first operation, the [param object] will be used to deduce target undo history.
+ </description>
+ </method>
+ <method name="add_do_reference">
+ <return type="void" />
+ <param index="0" name="object" type="Object" />
+ <description>
+ Register a reference for "do" that will be erased if the "do" history is lost. This is useful mostly for new nodes created for the "do" call. Do not use for resources.
+ </description>
+ </method>
+ <method name="add_undo_method" qualifiers="vararg">
+ <return type="void" />
+ <param index="0" name="object" type="Object" />
+ <param index="1" name="method" type="StringName" />
+ <description>
+ Register a method that will be called when the action is undone (i.e. the "undo" action).
+ If this is the first operation, the [param object] will be used to deduce target undo history.
+ </description>
+ </method>
+ <method name="add_undo_property">
+ <return type="void" />
+ <param index="0" name="object" type="Object" />
+ <param index="1" name="property" type="StringName" />
+ <param index="2" name="value" type="Variant" />
+ <description>
+ Register a property value change for "undo".
+ If this is the first operation, the [param object] will be used to deduce target undo history.
+ </description>
+ </method>
+ <method name="add_undo_reference">
+ <return type="void" />
+ <param index="0" name="object" type="Object" />
+ <description>
+ Register a reference for "undo" that will be erased if the "undo" history is lost. This is useful mostly for nodes removed with the "do" call (not the "undo" call!).
+ </description>
+ </method>
+ <method name="commit_action">
+ <return type="void" />
+ <param index="0" name="execute" type="bool" default="true" />
+ <description>
+ Commit the action. If [param execute] is true (default), all "do" methods/properties are called/set when this function is called.
+ </description>
+ </method>
+ <method name="create_action">
+ <return type="void" />
+ <param index="0" name="name" type="String" />
+ <param index="1" name="merge_mode" type="int" enum="UndoRedo.MergeMode" default="0" />
+ <param index="2" name="custom_context" type="Object" default="null" />
+ <description>
+ Create a new action. After this is called, do all your calls to [method add_do_method], [method add_undo_method], [method add_do_property], and [method add_undo_property], then commit the action with [method commit_action].
+ The way actions are merged is dictated by the [param merge_mode] argument. See [enum UndoRedo.MergeMode] for details.
+ If [param custom_context] object is provided, it will be used for deducing target history (instead of using the first operation).
+ </description>
+ </method>
+ <method name="get_history_undo_redo" qualifiers="const">
+ <return type="UndoRedo" />
+ <param index="0" name="id" type="int" />
+ <description>
+ Returns the [UndoRedo] object associated with the given history [param id].
+ [param id] above [code]0[/code] are mapped to the opened scene tabs (but it doesn't match their order). [param id] of [code]0[/code] or lower have special meaning (see [enum SpecialHistory]).
+ Best used with [method get_object_history_id]. This method is only provided in case you need some more advanced methods of [UndoRedo] (but keep in mind that directly operating on the [UndoRedo] object might affect editor's stability).
+ </description>
+ </method>
+ <method name="get_object_history_id" qualifiers="const">
+ <return type="int" />
+ <param index="0" name="object" type="Object" />
+ <description>
+ Returns the history ID deduced from the given [param object]. It can be used with [method get_history_undo_redo].
+ </description>
+ </method>
+ <method name="is_committing_action" qualifiers="const">
+ <return type="bool" />
+ <description>
+ Returns [code]true[/code] if the [EditorUndoRedoManager] is currently committing the action, i.e. running its "do" method or property change (see [method commit_action]).
+ </description>
+ </method>
+ </methods>
+ <signals>
+ <signal name="history_changed">
+ <description>
+ Emitted when the list of actions in any history has changed, either when an action is committed or a history is cleared.
+ </description>
+ </signal>
+ <signal name="version_changed">
+ <description>
+ Emitted when the version of any history has changed as a result of undo or redo call.
+ </description>
+ </signal>
+ </signals>
+ <constants>
+ <constant name="GLOBAL_HISTORY" value="0" enum="SpecialHistory">
+ Global history not associated with any scene, but with external resources etc.
+ </constant>
+ <constant name="INVALID_HISTORY" value="-99" enum="SpecialHistory">
+ Invalid "null" history. It's a special value, not associated with any object.
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/EditorVCSInterface.xml b/doc/classes/EditorVCSInterface.xml
index cc75861130..b766978c04 100644
--- a/doc/classes/EditorVCSInterface.xml
+++ b/doc/classes/EditorVCSInterface.xml
@@ -1,97 +1,276 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="EditorVCSInterface" inherits="Object" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
- Version Control System (VCS) interface which reads and writes to the local VCS in use.
+ Version Control System (VCS) interface, which reads and writes to the local VCS in use.
</brief_description>
<description>
- Used by the editor to display VCS extracted information in the editor. The implementation of this API is included in VCS addons, which are essentially GDExtension plugins that need to be put into the project folder. These VCS addons are scripts which are attached (on demand) to the object instance of [code]EditorVCSInterface[/code]. All the functions listed below, instead of performing the task themselves, they call the internally defined functions in the VCS addons to provide a plug-n-play experience.
+ Defines the API that the editor uses to extract information from the underlying VCS. The implementation of this API is included in VCS plugins, which are GDExtension plugins that inherit [EditorVCSInterface] and are attached (on demand) to the singleton instance of [EditorVCSInterface]. Instead of performing the task themselves, all the virtual functions listed below are calling the internally overridden functions in the VCS plugins to provide a plug-n-play experience. A custom VCS plugin is supposed to inherit from [EditorVCSInterface] and override each of these virtual functions.
</description>
<tutorials>
</tutorials>
<methods>
- <method name="commit">
+ <method name="_checkout_branch" qualifiers="virtual">
+ <return type="bool" />
+ <param index="0" name="branch_name" type="String" />
+ <description>
+ Checks out a [code]branch_name[/code] in the VCS.
+ </description>
+ </method>
+ <method name="_commit" qualifiers="virtual">
<return type="void" />
<param index="0" name="msg" type="String" />
<description>
- Creates a version commit if the addon is initialized, else returns without doing anything. Uses the files which have been staged previously, with the commit message set to a value as provided as in the argument.
+ Commits the currently staged changes and applies the commit [code]msg[/code] to the resulting commit.
+ </description>
+ </method>
+ <method name="_create_branch" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="branch_name" type="String" />
+ <description>
+ Creates a new branch named [code]branch_name[/code] in the VCS.
+ </description>
+ </method>
+ <method name="_create_remote" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="remote_name" type="String" />
+ <param index="1" name="remote_url" type="String" />
+ <description>
+ Creates a new remote destination with name [code]remote_name[/code] and points it to [code]remote_url[/code]. This can be an HTTPS remote or an SSH remote.
</description>
</method>
- <method name="get_file_diff">
- <return type="Array" />
+ <method name="_discard_file" qualifiers="virtual">
+ <return type="void" />
<param index="0" name="file_path" type="String" />
<description>
- Returns an [Array] of [Dictionary] objects containing the diff output from the VCS in use, if a VCS addon is initialized, else returns an empty [Array] object. The diff contents also consist of some contextual lines which provide context to the observed line change in the file.
- Each [Dictionary] object has the line diff contents under the keys:
- - [code]"content"[/code] to store a [String] containing the line contents
- - [code]"status"[/code] to store a [String] which contains [code]"+"[/code] in case the content is a line addition but it stores a [code]"-"[/code] in case of deletion and an empty string in the case the line content is neither an addition nor a deletion.
- - [code]"new_line_number"[/code] to store an integer containing the new line number of the line content.
- - [code]"line_count"[/code] to store an integer containing the number of lines in the line content.
- - [code]"old_line_number"[/code] to store an integer containing the old line number of the line content.
- - [code]"offset"[/code] to store the offset of the line change since the first contextual line content.
+ Discards the changes made in a file present at [code]file_path[/code].
</description>
</method>
- <method name="get_modified_files_data">
- <return type="Dictionary" />
+ <method name="_fetch" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="remote" type="String" />
<description>
- Returns a [Dictionary] containing the path of the detected file change mapped to an integer signifying what kind of change the corresponding file has experienced.
- The following integer values are being used to signify that the detected file is:
- - [code]0[/code]: New to the VCS working directory
- - [code]1[/code]: Modified
- - [code]2[/code]: Renamed
- - [code]3[/code]: Deleted
- - [code]4[/code]: Typechanged
+ Fetches new changes from the remote, but doesn't write changes to the current working directory. Equivalent to [code]git fetch[/code].
</description>
</method>
- <method name="get_project_name">
+ <method name="_get_branch_list" qualifiers="virtual">
+ <return type="Dictionary[]" />
+ <description>
+ Gets an instance of an [Array] of [String]s containing available branch names in the VCS.
+ </description>
+ </method>
+ <method name="_get_current_branch_name" qualifiers="virtual">
<return type="String" />
<description>
- Returns the project name of the VCS working directory.
+ Gets the current branch name defined in the VCS.
</description>
</method>
- <method name="get_vcs_name">
+ <method name="_get_diff" qualifiers="virtual">
+ <return type="Dictionary[]" />
+ <param index="0" name="identifier" type="String" />
+ <param index="1" name="area" type="int" />
+ <description>
+ Returns an array of [Dictionary] items (see [method create_diff_file], [method create_diff_hunk], [method create_diff_line], [method add_line_diffs_into_diff_hunk] and [method add_diff_hunks_into_diff_file]), each containing information about a diff. If [code]identifier[/code] is a file path, returns a file diff, and if it is a commit identifier, then returns a commit diff.
+ </description>
+ </method>
+ <method name="_get_line_diff" qualifiers="virtual">
+ <return type="Dictionary[]" />
+ <param index="0" name="file_path" type="String" />
+ <param index="1" name="text" type="String" />
+ <description>
+ Returns an [Array] of [Dictionary] items (see [method create_diff_hunk]), each containing a line diff between a file at [code]file_path[/code] and the [code]text[/code] which is passed in.
+ </description>
+ </method>
+ <method name="_get_modified_files_data" qualifiers="virtual">
+ <return type="Dictionary[]" />
+ <description>
+ Returns an [Array] of [Dictionary] items (see [method create_status_file]), each containing the status data of every modified file in the project folder.
+ </description>
+ </method>
+ <method name="_get_previous_commits" qualifiers="virtual">
+ <return type="Dictionary[]" />
+ <param index="0" name="max_commits" type="int" />
+ <description>
+ Returns an [Array] of [Dictionary] items (see [method create_commit]), each containing the data for a past commit.
+ </description>
+ </method>
+ <method name="_get_remotes" qualifiers="virtual">
+ <return type="Dictionary[]" />
+ <description>
+ Returns an [Array] of [String]s, each containing the name of a remote configured in the VCS.
+ </description>
+ </method>
+ <method name="_get_vcs_name" qualifiers="virtual">
<return type="String" />
<description>
- Returns the name of the VCS if the VCS has been initialized, else return an empty string.
+ Returns the name of the underlying VCS provider.
</description>
</method>
- <method name="initialize">
+ <method name="_initialize" qualifiers="virtual">
<return type="bool" />
- <param index="0" name="project_root_path" type="String" />
+ <param index="0" name="project_path" type="String" />
<description>
- Initializes the VCS addon if not already. Uses the argument value as the path to the working directory of the project. Creates the initial commit if required. Returns [code]true[/code] if no failure occurs, else returns [code]false[/code].
+ Initializes the VCS plugin when called from the editor. Returns whether or not the plugin was successfully initialized. A VCS project is initialized at [code]project_path[/code].
</description>
</method>
- <method name="is_addon_ready">
- <return type="bool" />
+ <method name="_pull" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="remote" type="String" />
<description>
- Returns [code]true[/code] if the addon is ready to respond to function calls, else returns [code]false[/code].
+ Pulls changes from the remote. This can give rise to merge conflicts.
</description>
</method>
- <method name="is_vcs_initialized">
- <return type="bool" />
+ <method name="_push" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="remote" type="String" />
+ <param index="1" name="force" type="bool" />
<description>
- Returns [code]true[/code] if the VCS addon has been initialized, else returns [code]false[/code].
+ Pushes changes to the [code]remote[/code]. Optionally, if [code]force[/code] is set to true, a force push will override the change history already present on the remote.
</description>
</method>
- <method name="shut_down">
+ <method name="_remove_branch" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="branch_name" type="String" />
+ <description>
+ Remove a branch from the local VCS.
+ </description>
+ </method>
+ <method name="_remove_remote" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="remote_name" type="String" />
+ <description>
+ Remove a remote from the local VCS.
+ </description>
+ </method>
+ <method name="_set_credentials" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="username" type="String" />
+ <param index="1" name="password" type="String" />
+ <param index="2" name="ssh_public_key_path" type="String" />
+ <param index="3" name="ssh_private_key_path" type="String" />
+ <param index="4" name="ssh_passphrase" type="String" />
+ <description>
+ Set user credentials in the underlying VCS. [code]username[/code] and [code]password[/code] are used only during HTTPS authentication unless not already mentioned in the remote URL. [code]ssh_public_key_path[/code], [code]ssh_private_key_path[/code], and [code]ssh_passphrase[/code] are only used during SSH authentication.
+ </description>
+ </method>
+ <method name="_shut_down" qualifiers="virtual">
<return type="bool" />
<description>
- Shuts down the VCS addon to allow cleanup code to run on call. Returns [code]true[/code] is no failure occurs, else returns [code]false[/code].
+ Shuts down VCS plugin instance. Called when the user either closes the editor or shuts down the VCS plugin through the editor UI.
</description>
</method>
- <method name="stage_file">
+ <method name="_stage_file" qualifiers="virtual">
<return type="void" />
<param index="0" name="file_path" type="String" />
<description>
- Stages the file which should be committed when [method EditorVCSInterface.commit] is called. Argument should contain the absolute path.
+ Stages the file present at [code]file_path[/code] to the staged area.
</description>
</method>
- <method name="unstage_file">
+ <method name="_unstage_file" qualifiers="virtual">
<return type="void" />
<param index="0" name="file_path" type="String" />
<description>
- Unstages the file which was staged previously to be committed, so that it is no longer committed when [method EditorVCSInterface.commit] is called. Argument should contain the absolute path.
+ Unstages the file present at [code]file_path[/code] from the staged area to the unstaged area.
+ </description>
+ </method>
+ <method name="add_diff_hunks_into_diff_file">
+ <return type="Dictionary" />
+ <param index="0" name="diff_file" type="Dictionary" />
+ <param index="1" name="diff_hunks" type="Dictionary[]" />
+ <description>
+ Helper function to add an array of [code]diff_hunks[/code] into a [code]diff_file[/code].
+ </description>
+ </method>
+ <method name="add_line_diffs_into_diff_hunk">
+ <return type="Dictionary" />
+ <param index="0" name="diff_hunk" type="Dictionary" />
+ <param index="1" name="line_diffs" type="Dictionary[]" />
+ <description>
+ Helper function to add an array of [code]line_diffs[/code] into a [code]diff_hunk[/code].
+ </description>
+ </method>
+ <method name="create_commit">
+ <return type="Dictionary" />
+ <param index="0" name="msg" type="String" />
+ <param index="1" name="author" type="String" />
+ <param index="2" name="id" type="String" />
+ <param index="3" name="unix_timestamp" type="int" />
+ <param index="4" name="offset_minutes" type="int" />
+ <description>
+ Helper function to create a commit [Dictionary] item. [code]msg[/code] is the commit message of the commit. [code]author[/code] is a single human-readable string containing all the author's details, e.g. the email and name configured in the VCS. [code]id[/code] is the identifier of the commit, in whichever format your VCS may provide an identifier to commits. [code]unix_timestamp[/code] is the UTC Unix timestamp of when the commit was created. [code]offset_minutes[/code] is the timezone offset in minutes, recorded from the system timezone where the commit was created.
+ </description>
+ </method>
+ <method name="create_diff_file">
+ <return type="Dictionary" />
+ <param index="0" name="new_file" type="String" />
+ <param index="1" name="old_file" type="String" />
+ <description>
+ Helper function to create a [code]Dictionary[/code] for storing old and new diff file paths.
+ </description>
+ </method>
+ <method name="create_diff_hunk">
+ <return type="Dictionary" />
+ <param index="0" name="old_start" type="int" />
+ <param index="1" name="new_start" type="int" />
+ <param index="2" name="old_lines" type="int" />
+ <param index="3" name="new_lines" type="int" />
+ <description>
+ Helper function to create a [code]Dictionary[/code] for storing diff hunk data. [code]old_start[/code] is the starting line number in old file. [code]new_start[/code] is the starting line number in new file. [code]old_lines[/code] is the number of lines in the old file. [code]new_lines[/code] is the number of lines in the new file.
+ </description>
+ </method>
+ <method name="create_diff_line">
+ <return type="Dictionary" />
+ <param index="0" name="new_line_no" type="int" />
+ <param index="1" name="old_line_no" type="int" />
+ <param index="2" name="content" type="String" />
+ <param index="3" name="status" type="String" />
+ <description>
+ Helper function to create a [code]Dictionary[/code] for storing a line diff. [code]new_line_no[/code] is the line number in the new file (can be [code]-1[/code] if the line is deleted). [code]old_line_no[/code] is the line number in the old file (can be [code]-1[/code] if the line is added). [code]content[/code] is the diff text. [code]status[/code] is a single character string which stores the line origin.
+ </description>
+ </method>
+ <method name="create_status_file">
+ <return type="Dictionary" />
+ <param index="0" name="file_path" type="String" />
+ <param index="1" name="change_type" type="int" enum="EditorVCSInterface.ChangeType" />
+ <param index="2" name="area" type="int" enum="EditorVCSInterface.TreeArea" />
+ <description>
+ Helper function to create a [code]Dictionary[/code] used by editor to read the status of a file.
+ </description>
+ </method>
+ <method name="popup_error">
+ <return type="void" />
+ <param index="0" name="msg" type="String" />
+ <description>
+ Pops up an error message in the edior which is shown as coming from the underlying VCS. Use this to show VCS specific error messages.
</description>
</method>
</methods>
+ <constants>
+ <constant name="CHANGE_TYPE_NEW" value="0" enum="ChangeType">
+ A new file has been added.
+ </constant>
+ <constant name="CHANGE_TYPE_MODIFIED" value="1" enum="ChangeType">
+ An earlier added file has been modified.
+ </constant>
+ <constant name="CHANGE_TYPE_RENAMED" value="2" enum="ChangeType">
+ An earlier added file has been renamed.
+ </constant>
+ <constant name="CHANGE_TYPE_DELETED" value="3" enum="ChangeType">
+ An earlier added file has been deleted.
+ </constant>
+ <constant name="CHANGE_TYPE_TYPECHANGE" value="4" enum="ChangeType">
+ An earlier added file has been typechanged.
+ </constant>
+ <constant name="CHANGE_TYPE_UNMERGED" value="5" enum="ChangeType">
+ A file is left unmerged.
+ </constant>
+ <constant name="TREE_AREA_COMMIT" value="0" enum="TreeArea">
+ A commit is encountered from the commit area.
+ </constant>
+ <constant name="TREE_AREA_STAGED" value="1" enum="TreeArea">
+ A file is encountered from the staged area.
+ </constant>
+ <constant name="TREE_AREA_UNSTAGED" value="2" enum="TreeArea">
+ A file is encountered from the unstaged area.
+ </constant>
+ </constants>
</class>
diff --git a/doc/classes/Engine.xml b/doc/classes/Engine.xml
index a982d69b07..d583e07f59 100644
--- a/doc/classes/Engine.xml
+++ b/doc/classes/Engine.xml
@@ -14,12 +14,20 @@
<description>
Returns the name of the CPU architecture the Godot binary was built for. Possible return values are [code]x86_64[/code], [code]x86_32[/code], [code]arm64[/code], [code]armv7[/code], [code]rv64[/code], [code]riscv[/code], [code]ppc64[/code], [code]ppc[/code], [code]wasm64[/code] and [code]wasm32[/code].
To detect whether the current CPU architecture is 64-bit, you can use the fact that all 64-bit architecture names have [code]64[/code] in their name:
- [codeblock]
+ [codeblocks]
+ [gdscript]
if "64" in Engine.get_architecture_name():
print("Running on 64-bit CPU.")
else:
print("Running on 32-bit CPU.")
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ if (Engine.GetArchitectureName().Contains("64"))
+ GD.Print("Running on 64-bit CPU.");
+ else
+ GD.Print("Running on 32-bit CPU.");
+ [/csharp]
+ [/codeblocks]
[b]Note:[/b] [method get_architecture_name] does [i]not[/i] return the name of the host CPU architecture. For example, if running an x86_32 Godot binary on a x86_64 system, the returned value will be [code]x86_32[/code].
</description>
</method>
@@ -34,7 +42,7 @@
</description>
</method>
<method name="get_copyright_info" qualifiers="const">
- <return type="Array" />
+ <return type="Dictionary[]" />
<description>
Returns an Array of copyright information Dictionaries.
[code]name[/code] - String, component name
@@ -83,11 +91,24 @@
<description>
Returns the total number of frames passed since engine initialization which is advanced on each [b]physics frame[/b]. See also [method get_process_frames].
[method get_physics_frames] can be used to run expensive logic less often without relying on a [Timer]:
- [codeblock]
+ [codeblocks]
+ [gdscript]
func _physics_process(_delta):
if Engine.get_physics_frames() % 2 == 0:
pass # Run expensive logic only once every 2 physics frames here.
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ public override void _PhysicsProcess(double delta)
+ {
+ base._PhysicsProcess(delta);
+
+ if (Engine.GetPhysicsFrames() % 2 == 0)
+ {
+ // Run expensive logic only once every 2 physics frames here.
+ }
+ }
+ [/csharp]
+ [/codeblocks]
</description>
</method>
<method name="get_physics_interpolation_fraction" qualifiers="const">
@@ -101,34 +122,50 @@
<description>
Returns the total number of frames passed since engine initialization which is advanced on each [b]process frame[/b], regardless of whether the render loop is enabled. See also [method get_frames_drawn] and [method get_physics_frames].
[method get_process_frames] can be used to run expensive logic less often without relying on a [Timer]:
- [codeblock]
+ [codeblocks]
+ [gdscript]
func _process(_delta):
if Engine.get_process_frames() % 2 == 0:
pass # Run expensive logic only once every 2 process (render) frames here.
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ public override void _Process(double delta)
+ {
+ base._Process(delta);
+
+ if (Engine.GetProcessFrames() % 2 == 0)
+ {
+ // Run expensive logic only once every 2 physics frames here.
+ }
+ }
+ [/csharp]
+ [/codeblocks]
</description>
</method>
<method name="get_script_language" qualifiers="const">
<return type="ScriptLanguage" />
<param index="0" name="index" type="int" />
<description>
+ Returns an instance of a [ScriptLanguage] with the given index.
</description>
</method>
<method name="get_script_language_count">
<return type="int" />
<description>
+ Returns the number of available script languages. Use with [method get_script_language].
</description>
</method>
<method name="get_singleton" qualifiers="const">
<return type="Object" />
<param index="0" name="name" type="StringName" />
<description>
- Returns a global singleton with given [code]name[/code]. Often used for plugins, e.g. GodotPayments.
+ Returns a global singleton with given [param name]. Often used for plugins, e.g. GodotPayments.
</description>
</method>
<method name="get_singleton_list" qualifiers="const">
<return type="PackedStringArray" />
<description>
+ Returns a list of available global singletons.
</description>
</method>
<method name="get_version_info" qualifiers="const">
@@ -175,19 +212,27 @@
<return type="bool" />
<param index="0" name="name" type="StringName" />
<description>
- Returns [code]true[/code] if a singleton with given [code]name[/code] exists in global scope.
+ Returns [code]true[/code] if a singleton with given [param name] exists in global scope.
</description>
</method>
<method name="is_editor_hint" qualifiers="const">
<return type="bool" />
<description>
Returns [code]true[/code] if the script is currently running inside the editor, [code]false[/code] otherwise. This is useful for [code]@tool[/code] scripts to conditionally draw editor helpers, or prevent accidentally running "game" code that would affect the scene state while in the editor:
- [codeblock]
+ [codeblocks]
+ [gdscript]
if Engine.is_editor_hint():
draw_gizmos()
else:
simulate_physics()
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ if (Engine.IsEditorHint())
+ DrawGizmos();
+ else
+ SimulatePhysics();
+ [/csharp]
+ [/codeblocks]
See [url=$DOCS_URL/tutorials/plugins/running_code_in_the_editor.html]Running code in the editor[/url] in the documentation for more information.
[b]Note:[/b] To detect whether the script is run from an editor [i]build[/i] (e.g. when pressing [kbd]F5[/kbd]), use [method OS.has_feature] with the [code]"editor"[/code] argument instead. [code]OS.has_feature("editor")[/code] will evaluate to [code]true[/code] both when the code is running in the editor and when running the project from the editor, but it will evaluate to [code]false[/code] when the code is run from an exported project.
</description>
@@ -202,6 +247,7 @@
<return type="void" />
<param index="0" name="language" type="ScriptLanguage" />
<description>
+ Registers a [ScriptLanguage] instance to be available with [code]ScriptServer[/code].
</description>
</method>
<method name="register_singleton">
@@ -209,32 +255,42 @@
<param index="0" name="name" type="StringName" />
<param index="1" name="instance" type="Object" />
<description>
+ Registers the given object as a singleton, globally available under [param name].
</description>
</method>
<method name="unregister_singleton">
<return type="void" />
<param index="0" name="name" type="StringName" />
<description>
+ Unregisters the singleton registered under [param name]. The singleton object is not freed. Only works with user-defined singletons created with [method register_singleton].
</description>
</method>
</methods>
<members>
+ <member name="max_fps" type="int" setter="set_max_fps" getter="get_max_fps" default="0">
+ The maximum number of frames per second that can be rendered. A value of [code]0[/code] means "no limit". The actual number of frames per second may still be below this value if the CPU or GPU cannot keep up with the project logic and rendering.
+ Limiting the FPS can be useful to reduce system power consumption, which reduces heat and noise emissions (and improves battery life on mobile devices).
+ If [member ProjectSettings.display/window/vsync/vsync_mode] is [code]Enabled[/code] or [code]Adaptive[/code], it takes precedence and the forced FPS number cannot exceed the monitor's refresh rate.
+ If [member ProjectSettings.display/window/vsync/vsync_mode] is [code]Enabled[/code], on monitors with variable refresh rate enabled (G-Sync/FreeSync), using a FPS limit a few frames lower than the monitor's refresh rate will [url=https://blurbusters.com/howto-low-lag-vsync-on/]reduce input lag while avoiding tearing[/url].
+ If [member ProjectSettings.display/window/vsync/vsync_mode] is [code]Disabled[/code], limiting the FPS to a high value that can be consistently reached on the system can reduce input lag compared to an uncapped framerate. Since this works by ensuring the GPU load is lower than 100%, this latency reduction is only effective in GPU-bottlenecked scenarios, not CPU-bottlenecked scenarios.
+ See also [member physics_ticks_per_second] and [member ProjectSettings.application/run/max_fps].
+ </member>
+ <member name="max_physics_steps_per_frame" type="int" setter="set_max_physics_steps_per_frame" getter="get_max_physics_steps_per_frame" default="8">
+ Controls the maximum number of physics steps that can be simulated each rendered frame. The default value is tuned to avoid "spiral of death" situations where expensive physics simulations trigger more expensive simulations indefinitely. However, the game will appear to slow down if the rendering FPS is less than [code]1 / max_physics_steps_per_frame[/code] of [member physics_ticks_per_second]. This occurs even if [code]delta[/code] is consistently used in physics calculations. To avoid this, increase [member max_physics_steps_per_frame] if you have increased [member physics_ticks_per_second] significantly above its default value.
+ </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 the in-game clock and real clock but smooth 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="physics_ticks_per_second" type="int" setter="set_physics_ticks_per_second" getter="get_physics_ticks_per_second" default="60">
- The number of fixed iterations per second. This controls how often physics simulation and [method Node._physics_process] methods are run. This value should generally always be set to [code]60[/code] or above, as Godot doesn't interpolate the physics step. As a result, values lower than [code]60[/code] will look stuttery. This value can be increased to make input more reactive or work around collision tunneling issues, but keep in mind doing so will increase CPU usage. See also [member target_fps] and [member ProjectSettings.physics/common/physics_ticks_per_second].
- [b]Note:[/b] Only 8 physics ticks may be simulated per rendered frame at most. If more than 8 physics ticks have to be simulated per rendered frame to keep up with rendering, the game will appear to slow down (even if [code]delta[/code] is used consistently in physics calculations). Therefore, it is recommended not to increase [member physics_ticks_per_second] above 240. Otherwise, the game will slow down when the rendering framerate goes below 30 FPS.
+ The number of fixed iterations per second. This controls how often physics simulation and [method Node._physics_process] methods are run. This value should generally always be set to [code]60[/code] or above, as Godot doesn't interpolate the physics step. As a result, values lower than [code]60[/code] will look stuttery. This value can be increased to make input more reactive or work around collision tunneling issues, but keep in mind doing so will increase CPU usage. See also [member max_fps] and [member ProjectSettings.physics/common/physics_ticks_per_second].
+ [b]Note:[/b] Only [member max_physics_steps_per_frame] physics ticks may be simulated per rendered frame at most. If more physics ticks have to be simulated per rendered frame to keep up with rendering, the project will appear to slow down (even if [code]delta[/code] is used consistently in physics calculations). Therefore, it is recommended to also increase [member max_physics_steps_per_frame] if increasing [member physics_ticks_per_second] significantly above its default value.
</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.
[b]Warning:[/b] If you set this to [code]false[/code] anywhere in the project, important error messages may be hidden even if they are emitted from other scripts. If this is set to [code]false[/code] in a [code]@tool[/code] script, this will also impact the editor itself. Do [i]not[/i] report bugs before ensuring error messages are enabled (as they are by default).
[b]Note:[/b] This property does not impact the editor's Errors tab when running a project from the editor.
</member>
- <member name="target_fps" type="int" setter="set_target_fps" getter="get_target_fps" default="0">
- The desired frames per second. If the hardware cannot keep up, this setting may not be respected. A value of 0 means no limit. See also [member physics_ticks_per_second] and [member ProjectSettings.debug/settings/fps/force_fps].
- </member>
<member name="time_scale" type="float" setter="set_time_scale" getter="get_time_scale" default="1.0">
Controls how fast or slow the in-game clock ticks versus the real life one. It defaults to 1.0. A value of 2.0 means the game moves twice as fast as real life, whilst a value of 0.5 means the game moves at half the regular speed.
</member>
diff --git a/doc/classes/EngineDebugger.xml b/doc/classes/EngineDebugger.xml
index c3e76b8cad..176bc1f135 100644
--- a/doc/classes/EngineDebugger.xml
+++ b/doc/classes/EngineDebugger.xml
@@ -41,7 +41,7 @@
<param index="0" name="name" type="StringName" />
<param index="1" name="data" type="Array" />
<description>
- Calls the [code]add[/code] callable of the profiler with given [code]name[/code] and [code]data[/code].
+ Calls the [code]add[/code] callable of the profiler with given [param name] and [param data].
</description>
</method>
<method name="profiler_enable">
@@ -50,7 +50,7 @@
<param index="1" name="enable" type="bool" />
<param index="2" name="arguments" type="Array" default="[]" />
<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.
+ Calls the [code]toggle[/code] callable of the profiler with given [param name] and [param arguments]. Enables/Disables the same profiler depending on [code]enable[/code] argument.
</description>
</method>
<method name="register_message_capture">
@@ -58,7 +58,7 @@
<param index="0" name="name" type="StringName" />
<param index="1" name="callable" type="Callable" />
<description>
- Registers a message capture with given [code]name[/code]. If [code]name[/code] is "my_message" then messages starting with "my_message:" will be called with the given callable.
+ Registers a message capture with given [param name]. If [param name] is "my_message" then messages starting with "my_message:" will be called with the given callable.
Callable must accept a message string and a data array as argument. If the message and data are valid then callable must return [code]true[/code] otherwise [code]false[/code].
</description>
</method>
@@ -67,7 +67,7 @@
<param index="0" name="name" type="StringName" />
<param index="1" name="profiler" type="EngineProfiler" />
<description>
- Registers a profiler with the given [code]name[/code]. See [EngineProfiler] for more information.
+ Registers a profiler with the given [param name]. See [EngineProfiler] for more information.
</description>
</method>
<method name="send_message">
@@ -75,21 +75,21 @@
<param index="0" name="message" type="String" />
<param index="1" name="data" type="Array" />
<description>
- Sends a message with given [code]message[/code] and [code]data[/code] array.
+ Sends a message with given [param message] and [param data] array.
</description>
</method>
<method name="unregister_message_capture">
<return type="void" />
<param index="0" name="name" type="StringName" />
<description>
- Unregisters the message capture with given [code]name[/code].
+ Unregisters the message capture with given [param name].
</description>
</method>
<method name="unregister_profiler">
<return type="void" />
<param index="0" name="name" type="StringName" />
<description>
- Unregisters a profiler with given [code]name[/code].
+ Unregisters a profiler with given [param name].
</description>
</method>
</methods>
diff --git a/doc/classes/EngineProfiler.xml b/doc/classes/EngineProfiler.xml
index d8fb193761..a7a66c4564 100644
--- a/doc/classes/EngineProfiler.xml
+++ b/doc/classes/EngineProfiler.xml
@@ -32,7 +32,7 @@
<param index="0" name="enable" type="bool" />
<param index="1" name="options" type="Array" />
<description>
- Called when the profiler is enabled/disabled, along with a set of [code]options[/code].
+ Called when the profiler is enabled/disabled, along with a set of [param options].
</description>
</method>
</methods>
diff --git a/doc/classes/Environment.xml b/doc/classes/Environment.xml
index fce12b3602..33b6a786ae 100644
--- a/doc/classes/Environment.xml
+++ b/doc/classes/Environment.xml
@@ -22,7 +22,7 @@
<return type="float" />
<param index="0" name="idx" type="int" />
<description>
- Returns the intensity of the glow level [code]idx[/code].
+ Returns the intensity of the glow level [param idx].
</description>
</method>
<method name="set_glow_level">
@@ -30,7 +30,7 @@
<param index="0" name="idx" type="int" />
<param index="1" name="intensity" type="float" />
<description>
- Sets the intensity of the glow level [code]idx[/code]. A value above [code]0.0[/code] enables the level. Each level relies on the previous level. This means that enabling higher glow levels will slow down the glow effect rendering, even if previous levels aren't enabled.
+ Sets the intensity of the glow level [param idx]. A value above [code]0.0[/code] enables the level. Each level relies on the previous level. This means that enabling higher glow levels will slow down the glow effect rendering, even if previous levels aren't enabled.
</description>
</method>
</methods>
@@ -63,21 +63,6 @@
<member name="ambient_light_source" type="int" setter="set_ambient_source" getter="get_ambient_source" enum="Environment.AmbientSource" default="0">
The ambient light source to use for rendering materials and global illumination.
</member>
- <member name="auto_exposure_enabled" type="bool" setter="set_tonemap_auto_exposure_enabled" getter="is_tonemap_auto_exposure_enabled" default="false">
- If [code]true[/code], enables the tonemapping auto exposure mode of the scene renderer. If [code]true[/code], the renderer will automatically determine the exposure setting to adapt to the scene's illumination and the observed light.
- </member>
- <member name="auto_exposure_max_luma" type="float" setter="set_tonemap_auto_exposure_max" getter="get_tonemap_auto_exposure_max" default="8.0">
- The maximum luminance value for the auto exposure.
- </member>
- <member name="auto_exposure_min_luma" type="float" setter="set_tonemap_auto_exposure_min" getter="get_tonemap_auto_exposure_min" default="0.05">
- The minimum luminance value for the auto exposure.
- </member>
- <member name="auto_exposure_scale" type="float" setter="set_tonemap_auto_exposure_grey" getter="get_tonemap_auto_exposure_grey" default="0.4">
- The scale of the auto exposure effect. Affects the intensity of auto exposure.
- </member>
- <member name="auto_exposure_speed" type="float" setter="set_tonemap_auto_exposure_speed" getter="get_tonemap_auto_exposure_speed" default="0.5">
- The speed of the auto exposure effect. Affects the time needed for the camera to perform auto exposure.
- </member>
<member name="background_camera_feed_id" type="int" setter="set_camera_feed_id" getter="get_camera_feed_id" default="1">
The ID of the camera feed to show in the background.
</member>
@@ -87,18 +72,21 @@
<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">
- The power of the light emitted by the background.
+ <member name="background_energy_multiplier" type="float" setter="set_bg_energy_multiplier" getter="get_bg_energy_multiplier" default="1.0">
+ Multiplier for background energy. Increase to make background brighter, decrease to make background dimmer.
+ </member>
+ <member name="background_intensity" type="float" setter="set_bg_intensity" getter="get_bg_intensity" default="30000.0">
+ Luminance of background measured in nits (candela per square meter). Only used when [member ProjectSettings.rendering/lights_and_shadows/use_physical_light_units] is enabled. The default value is roughly equivalent to the sky at midday.
</member>
<member name="background_mode" type="int" setter="set_background" getter="get_background" enum="Environment.BGMode" default="0">
The background mode. See [enum BGMode] for possible values.
</member>
<member name="fog_aerial_perspective" type="float" setter="set_fog_aerial_perspective" getter="get_fog_aerial_perspective" default="0.0">
- Blend factor between the fog's color and the color of the background [Sky]. Must have [member background_mode] set to [constant BG_SKY].
+ If set above [code]0.0[/code] (exclusive), blends between the fog's color and the color of the background [Sky]. This has a small performance cost when set above [code]0.0[/code]. Must have [member background_mode] set to [constant BG_SKY].
This is useful to simulate [url=https://en.wikipedia.org/wiki/Aerial_perspective]aerial perspective[/url] in large scenes with low density fog. However, it is not very useful for high-density fog, as the sky will shine through. When set to [code]1.0[/code], the fog color comes completely from the [Sky]. If set to [code]0.0[/code], aerial perspective is disabled.
</member>
<member name="fog_density" type="float" setter="set_fog_density" getter="get_fog_density" default="0.01">
- The exponential fog density to use. Higher values result in a more dense fog.
+ The [i]exponential[/i] fog density to use. Higher values result in a more dense fog. Fog rendering is exponential as in real life.
</member>
<member name="fog_enabled" type="bool" setter="set_fog_enabled" getter="is_fog_enabled" default="false">
If [code]true[/code], fog effects are enabled.
@@ -115,6 +103,10 @@
<member name="fog_light_energy" type="float" setter="set_fog_light_energy" getter="get_fog_light_energy" default="1.0">
The fog's brightness. Higher values result in brighter fog.
</member>
+ <member name="fog_sky_affect" type="float" setter="set_fog_sky_affect" getter="get_fog_sky_affect" default="1.0">
+ The factor to use when affecting the sky with non-volumetric fog. [code]1.0[/code] means that fog can fully obscure the sky. Lower values reduce the impact of fog on sky rendering, with [code]0.0[/code] not affecting sky rendering at all.
+ [b]Note:[/b] [member fog_sky_affect] has no visual effect if [member fog_aerial_perspective] is [code]1.0[/code].
+ </member>
<member name="fog_sun_scatter" type="float" setter="set_fog_sun_scatter" getter="get_fog_sun_scatter" default="0.0">
If set above [code]0.0[/code], renders the scene's directional light(s) in the fog color depending on the view angle. This can be used to give the impression that the sun is "piercing" through the fog.
</member>
@@ -300,13 +292,16 @@
The [Color] of the volumetric fog when interacting with lights. Mist and fog have an albedo close to [code]Color(1, 1, 1, 1)[/code] while smoke has a darker albedo.
</member>
<member name="volumetric_fog_ambient_inject" type="float" setter="set_volumetric_fog_ambient_inject" getter="get_volumetric_fog_ambient_inject" default="0.0">
- Scales the strength of ambient light used in the volumetric fog. A value of [code]0[/code] means that ambient light will not impact the volumetric fog.
+ Scales the strength of ambient light used in the volumetric fog. A value of [code]0.0[/code] means that ambient light will not impact the volumetric fog. [member volumetric_fog_ambient_inject] has a small performance cost when set above [code]0.0[/code].
+ [b]Note:[/b] This has no visible effect if [member volumetric_fog_density] is [code]0.0[/code] or if [member volumetric_fog_albedo] is a fully black color.
</member>
<member name="volumetric_fog_anisotropy" type="float" setter="set_volumetric_fog_anisotropy" getter="get_volumetric_fog_anisotropy" default="0.2">
- The direction of scattered light as it goes through the volumetric fog. A value close [code]1[/code] means almost all light is scattered forward. A value close to [code]0[/code] means light is scattered equally in all directions. A value close to [code]-1[/code] means light is scattered mostly backward. Fog and mist scatter light slightly forward, while smoke scatters light equally in all directions.
+ The direction of scattered light as it goes through the volumetric fog. A value close to [code]1.0[/code] means almost all light is scattered forward. A value close to [code]0.0[/code] means light is scattered equally in all directions. A value close to [code]-1.0[/code] means light is scattered mostly backward. Fog and mist scatter light slightly forward, while smoke scatters light equally in all directions.
</member>
<member name="volumetric_fog_density" type="float" setter="set_volumetric_fog_density" getter="get_volumetric_fog_density" default="0.05">
- The base density of the volumetric fog. Set this to the lowest density you want to have globally.
+ The base [i]exponential[/i] density of the volumetric fog. Set this to the lowest density you want to have globally. [FogVolume]s can be used to add to or subtract from this density in specific areas. Fog rendering is exponential as in real life.
+ A value of [code]0.0[/code] disables global volumetric fog while allowing [FogVolume]s to display volumetric fog in specific areas.
+ To make volumetric fog work as a volumetric [i]lighting[/i] solution, set [member volumetric_fog_density] to the lowest non-zero value ([code]0.0001[/code]) then increase lights' [member Light3D.light_volumetric_fog_energy] to values between [code]10000[/code] and [code]100000[/code] to compensate for the very low density.
</member>
<member name="volumetric_fog_detail_spread" type="float" setter="set_volumetric_fog_detail_spread" getter="get_volumetric_fog_detail_spread" default="2.0">
The distribution of size down the length of the froxel buffer. A higher value compresses the froxels closer to the camera and places more detail closer to the camera.
@@ -319,19 +314,25 @@
</member>
<member name="volumetric_fog_enabled" type="bool" setter="set_volumetric_fog_enabled" getter="is_volumetric_fog_enabled" default="false">
Enables the volumetric fog effect. Volumetric fog uses a screen-aligned froxel buffer to calculate accurate volumetric scattering in the short to medium range. Volumetric fog interacts with [FogVolume]s and lights to calculate localized and global fog. Volumetric fog uses a PBR single-scattering model based on extinction, scattering, and emission which it exposes to users as density, albedo, and emission.
+ [b]Note:[/b] Volumetric fog is only available in the forward plus renderer. It is not available in the mobile renderer or the compatibility renderer.
</member>
<member name="volumetric_fog_gi_inject" type="float" setter="set_volumetric_fog_gi_inject" getter="get_volumetric_fog_gi_inject" default="1.0">
- Scales the strength of Global Illumination used in the volumetric fog. A value of [code]0.0[/code] means that Global Illumination will not impact the volumetric fog.
+ Scales the strength of Global Illumination used in the volumetric fog's albedo color. A value of [code]0.0[/code] means that Global Illumination will not impact the volumetric fog. [member volumetric_fog_gi_inject] has a small performance cost when set above [code]0.0[/code].
+ [b]Note:[/b] This has no visible effect if [member volumetric_fog_density] is [code]0.0[/code] or if [member volumetric_fog_albedo] is a fully black color.
[b]Note:[/b] Only [VoxelGI] and SDFGI ([member Environment.sdfgi_enabled]) are taken into account when using [member volumetric_fog_gi_inject]. Global illumination from [LightmapGI], [ReflectionProbe] and SSIL (see [member ssil_enabled]) will be ignored by volumetric fog.
</member>
<member name="volumetric_fog_length" type="float" setter="set_volumetric_fog_length" getter="get_volumetric_fog_length" default="64.0">
- The distance over which the volumetric fog is computed. Increase to compute fog over a greater range, decrease to add more detail when a long range is not needed. For best quality fog, keep this as low as possible.
+ The distance over which the volumetric fog is computed. Increase to compute fog over a greater range, decrease to add more detail when a long range is not needed. For best quality fog, keep this as low as possible. See also [member ProjectSettings.rendering/environment/volumetric_fog/volume_depth].
+ </member>
+ <member name="volumetric_fog_sky_affect" type="float" setter="set_volumetric_fog_sky_affect" getter="get_volumetric_fog_sky_affect" default="1.0">
+ The factor to use when affecting the sky with volumetric fog. [code]1.0[/code] means that volumetric fog can fully obscure the sky. Lower values reduce the impact of volumetric fog on sky rendering, with [code]0.0[/code] not affecting sky rendering at all.
+ [b]Note:[/b] [member volumetric_fog_sky_affect] also affects [FogVolume]s, even if [member volumetric_fog_density] is [code]0.0[/code]. If you notice [FogVolume]s are disappearing when looking towards the sky, set [member volumetric_fog_sky_affect] to [code]1.0[/code].
</member>
<member name="volumetric_fog_temporal_reprojection_amount" type="float" setter="set_volumetric_fog_temporal_reprojection_amount" getter="get_volumetric_fog_temporal_reprojection_amount" default="0.9">
The amount by which to blend the last frame with the current frame. A higher number results in smoother volumetric fog, but makes "ghosting" much worse. A lower value reduces ghosting but can result in the per-frame temporal jitter becoming visible.
</member>
<member name="volumetric_fog_temporal_reprojection_enabled" type="bool" setter="set_volumetric_fog_temporal_reprojection_enabled" getter="is_volumetric_fog_temporal_reprojection_enabled" default="true">
- Enables temporal reprojection in the volumetric fog. Temporal reprojection blends the current frame's volumetric fog with the last frame's volumetric fog to smooth out jagged edges. The performance cost is minimal, however it does lead to moving [FogVolume]s and [Light3D]s "ghosting" and leaving a trail behind them. When temporal reprojection is enabled, try to avoid moving [FogVolume]s or [Light3D]s too fast.
+ Enables temporal reprojection in the volumetric fog. Temporal reprojection blends the current frame's volumetric fog with the last frame's volumetric fog to smooth out jagged edges. The performance cost is minimal; however, it leads to moving [FogVolume]s and [Light3D]s "ghosting" and leaving a trail behind them. When temporal reprojection is enabled, try to avoid moving [FogVolume]s or [Light3D]s too fast. Short-lived dynamic lighting effects should have [member Light3D.light_volumetric_fog_energy] set to [code]0.0[/code] to avoid ghosting.
</member>
</members>
<constants>
diff --git a/doc/classes/Expression.xml b/doc/classes/Expression.xml
index 130f2f2272..4670e0c382 100644
--- a/doc/classes/Expression.xml
+++ b/doc/classes/Expression.xml
@@ -12,7 +12,7 @@
var expression = Expression.new()
func _ready():
- $LineEdit.connect("text_submitted", self, "_on_text_submitted")
+ $LineEdit.text_submitted.connect(self._on_text_submitted)
func _on_text_submitted(command):
var error = expression.parse(command)
@@ -28,7 +28,7 @@
public override void _Ready()
{
- GetNode("LineEdit").Connect("text_submitted", this, nameof(OnTextEntered));
+ GetNode("LineEdit").TextSubmitted += OnTextEntered;
}
private void OnTextEntered(string command)
@@ -80,7 +80,7 @@
<param index="1" name="input_names" type="PackedStringArray" default="PackedStringArray()" />
<description>
Parses the expression and returns an [enum Error] code.
- You can optionally specify names of variables that may appear in the expression with [code]input_names[/code], so that you can bind them when it gets executed.
+ You can optionally specify names of variables that may appear in the expression with [param input_names], so that you can bind them when it gets executed.
</description>
</method>
</methods>
diff --git a/doc/classes/File.xml b/doc/classes/FileAccess.xml
index 0c6310c09f..e52f897164 100644
--- a/doc/classes/File.xml
+++ b/doc/classes/FileAccess.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="File" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+<class name="FileAccess" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Type to handle file reading and writing operations.
</brief_description>
@@ -9,39 +9,42 @@
[codeblocks]
[gdscript]
func save(content):
- var file = File.new()
- file.open("user://save_game.dat", File.WRITE)
+ var file = FileAccess.open("user://save_game.dat", FileAccess.WRITE)
file.store_string(content)
- file.close()
func load():
- var file = File.new()
- file.open("user://save_game.dat", File.READ)
+ var file = FileAccess.open("user://save_game.dat", FileAccess.READ)
var content = file.get_as_text()
- file.close()
return content
[/gdscript]
[csharp]
public void Save(string content)
{
- var file = new File();
- file.Open("user://save_game.dat", File.ModeFlags.Write);
+ using var file = FileAccess.Open("user://save_game.dat", FileAccess.ModeFlags.Write);
file.StoreString(content);
- file.Close();
}
public string Load()
{
- var file = new File();
- file.Open("user://save_game.dat", File.ModeFlags.Read);
+ using var file = FileAccess.Open("user://save_game.dat", FileAccess.ModeFlags.Read);
string content = file.GetAsText();
- file.Close();
return content;
}
[/csharp]
[/codeblocks]
In the example above, the file will be saved in the user data folder as specified in the [url=$DOCS_URL/tutorials/io/data_paths.html]Data paths[/url] documentation.
- [b]Note:[/b] To access project resources once exported, it is recommended to use [ResourceLoader] instead of the [File] API, as some files are converted to engine-specific formats and their original source files might not be present in the exported PCK package.
+ There is no method to close a file in order to free it from use. Instead, [FileAccess] will close when it's freed, which happens when it goes out of scope or when it gets assigned with [code]null[/code]. In C# the reference must be disposed after we are done using it, this can be done with the [code]using[/code] statement or calling the [code]Dispose[/code] method directly.
+ [codeblocks]
+ [gdscript]
+ var file = FileAccess.open("res://something") # File is opened and locked for use.
+ file = null # File is closed.
+ [/gdscript]
+ [csharp]
+ using var file = FileAccess.Open("res://something"); // File is opened and locked for use.
+ // The using statement calls Dispose when going out of scope.
+ [/csharp]
+ [/codeblocks]
+ [b]Note:[/b] To access project resources once exported, it is recommended to use [ResourceLoader] instead of the [FileAccess] API, as some files are converted to engine-specific formats and their original source files might not be present in the exported PCK package.
[b]Note:[/b] Files are automatically closed only if the process exits "normally" (such as by clicking the window manager's close button or pressing [b]Alt + F4[/b]). If you stop the project execution by pressing [b]F8[/b] while the project is running, the file won't be closed as the game process will be killed. You can work around this by calling [method flush] at regular intervals.
</description>
<tutorials>
@@ -49,12 +52,6 @@
<link title="3D Voxel Demo">https://godotengine.org/asset-library/asset/676</link>
</tutorials>
<methods>
- <method name="close">
- <return type="void" />
- <description>
- Closes the currently opened file and prevents subsequent read/write operations. Use [method flush] to persist the data to disk without closing the file.
- </description>
- </method>
<method name="eof_reached" qualifiers="const">
<return type="bool" />
<description>
@@ -80,12 +77,13 @@
<description>
Returns [code]true[/code] if the file exists in the given path.
[b]Note:[/b] Many resources types are imported (e.g. textures or sound files), and their source asset will not be included in the exported game, as only the imported version is used. See [method ResourceLoader.exists] for an alternative approach that takes resource remapping into account.
+ For a non-static, relative equivalent, use [method DirAccess.file_exists].
</description>
</method>
<method name="flush">
<return type="void" />
<description>
- Writes the file's buffer to disk. Flushing is automatically performed when the file is closed. This means you don't need to call [method flush] manually before closing a file using [method close]. Still, calling [method flush] can be used to ensure the data is safe even if the project crashes instead of being closed gracefully.
+ Writes the file's buffer to disk. Flushing is automatically performed when the file is closed. This means you don't need to call [method flush] manually before closing a file. Still, calling [method flush] can be used to ensure the data is safe even if the project crashes instead of being closed gracefully.
[b]Note:[/b] Only call [method flush] when you actually need it. Otherwise, it will decrease performance due to constant disk writes.
</description>
</method>
@@ -118,21 +116,21 @@
<param index="0" name="skip_cr" type="bool" default="false" />
<description>
Returns the whole file as a [String]. Text is interpreted as being UTF-8 encoded.
- If [code]skip_cr[/code] is [code]true[/code], carriage return characters ([code]\r[/code], CR) will be ignored when parsing the UTF-8, so that only line feed characters ([code]\n[/code], LF) represent a new line (Unix convention).
+ If [param skip_cr] is [code]true[/code], carriage return characters ([code]\r[/code], CR) will be ignored when parsing the UTF-8, so that only line feed characters ([code]\n[/code], LF) represent a new line (Unix convention).
</description>
</method>
<method name="get_buffer" qualifiers="const">
<return type="PackedByteArray" />
<param index="0" name="length" type="int" />
<description>
- Returns next [code]length[/code] bytes of the file as a [PackedByteArray].
+ Returns next [param length] bytes of the file as a [PackedByteArray].
</description>
</method>
<method name="get_csv_line" qualifiers="const">
<return type="PackedStringArray" />
<param index="0" name="delim" type="String" default="&quot;,&quot;" />
<description>
- Returns the next value of the file in CSV (Comma-Separated Values) format. You can pass a different delimiter [code]delim[/code] to use other than the default [code]","[/code] (comma). This delimiter must be one-character long, and cannot be a double quotation mark.
+ Returns the next value of the file in CSV (Comma-Separated Values) format. You can pass a different delimiter [param delim] to use other than the default [code]","[/code] (comma). This delimiter must be one-character long, and cannot be a double quotation mark.
Text is interpreted as being UTF-8 encoded. Text values must be enclosed in double quotes if they include the delimiter character. Double quotes within a text value can be escaped by doubling their occurrence.
For example, the following CSV lines are valid and will be properly parsed as two strings each:
[codeblock]
@@ -174,18 +172,24 @@
Text is interpreted as being UTF-8 encoded.
</description>
</method>
- <method name="get_md5" qualifiers="const">
+ <method name="get_md5" qualifiers="static">
<return type="String" />
<param index="0" name="path" type="String" />
<description>
Returns an MD5 String representing the file at the given path or an empty [String] on failure.
</description>
</method>
- <method name="get_modified_time" qualifiers="const">
+ <method name="get_modified_time" qualifiers="static">
<return type="int" />
<param index="0" name="file" type="String" />
<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 another format using the [Time] singleton.
+ Returns the last time the [param file] 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_open_error" qualifiers="static">
+ <return type="int" enum="Error" />
+ <description>
+ Returns the result of the last [method open] call in the current thread.
</description>
</method>
<method name="get_pascal_string">
@@ -219,7 +223,7 @@
Returns the next bits from the file as a floating-point number.
</description>
</method>
- <method name="get_sha256" qualifiers="const">
+ <method name="get_sha256" qualifiers="static">
<return type="String" />
<param index="0" name="path" type="String" />
<description>
@@ -230,7 +234,7 @@
<return type="Variant" />
<param index="0" name="allow_objects" type="bool" default="false" />
<description>
- Returns the next [Variant] value from the file. If [code]allow_objects[/code] is [code]true[/code], decoding objects is allowed.
+ Returns the next [Variant] value from the file. If [param allow_objects] is [code]true[/code], decoding objects is allowed.
[b]Warning:[/b] Deserialized objects can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats such as remote code execution.
</description>
</method>
@@ -240,41 +244,45 @@
Returns [code]true[/code] if the file is currently opened.
</description>
</method>
- <method name="open">
- <return type="int" enum="Error" />
+ <method name="open" qualifiers="static">
+ <return type="FileAccess" />
<param index="0" name="path" type="String" />
- <param index="1" name="flags" type="int" enum="File.ModeFlags" />
+ <param index="1" name="flags" type="int" enum="FileAccess.ModeFlags" />
<description>
- Opens the file for writing or reading, depending on the flags.
+ Creates a new [FileAccess] object and opens the file for writing or reading, depending on the flags.
+ Returns [code]null[/code] if opening the file failed. You can use [method get_open_error] to check the error that occurred.
</description>
</method>
- <method name="open_compressed">
- <return type="int" enum="Error" />
+ <method name="open_compressed" qualifiers="static">
+ <return type="FileAccess" />
<param index="0" name="path" type="String" />
- <param index="1" name="mode_flags" type="int" enum="File.ModeFlags" />
- <param index="2" name="compression_mode" type="int" enum="File.CompressionMode" default="0" />
+ <param index="1" name="mode_flags" type="int" enum="FileAccess.ModeFlags" />
+ <param index="2" name="compression_mode" type="int" enum="FileAccess.CompressionMode" default="0" />
<description>
- Opens a compressed file for reading or writing.
+ Creates a new [FileAccess] object and 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.
+ Returns [code]null[/code] if opening the file failed. You can use [method get_open_error] to check the error that occurred.
</description>
</method>
- <method name="open_encrypted">
- <return type="int" enum="Error" />
+ <method name="open_encrypted" qualifiers="static">
+ <return type="FileAccess" />
<param index="0" name="path" type="String" />
- <param index="1" name="mode_flags" type="int" enum="File.ModeFlags" />
+ <param index="1" name="mode_flags" type="int" enum="FileAccess.ModeFlags" />
<param index="2" name="key" type="PackedByteArray" />
<description>
- Opens an encrypted file in write or read mode. You need to pass a binary key to encrypt/decrypt it.
+ Creates a new [FileAccess] object and opens an encrypted file in write or read mode. You need to pass a binary key to encrypt/decrypt it.
[b]Note:[/b] The provided key must be 32 bytes long.
+ Returns [code]null[/code] if opening the file failed. You can use [method get_open_error] to check the error that occurred.
</description>
</method>
- <method name="open_encrypted_with_pass">
- <return type="int" enum="Error" />
+ <method name="open_encrypted_with_pass" qualifiers="static">
+ <return type="FileAccess" />
<param index="0" name="path" type="String" />
- <param index="1" name="mode_flags" type="int" enum="File.ModeFlags" />
+ <param index="1" name="mode_flags" type="int" enum="FileAccess.ModeFlags" />
<param index="2" name="pass" type="String" />
<description>
- Opens an encrypted file in write or read mode. You need to pass a password to encrypt/decrypt it.
+ Creates a new [FileAccess] object and opens an encrypted file in write or read mode. You need to pass a password to encrypt/decrypt it.
+ Returns [code]null[/code] if opening the file failed. You can use [method get_open_error] to check the error that occurred.
</description>
</method>
<method name="seek">
@@ -297,7 +305,7 @@
<param index="0" name="value" type="int" />
<description>
Stores an integer as 16 bits in the file.
- [b]Note:[/b] The [code]value[/code] should lie in the interval [code][0, 2^16 - 1][/code]. Any other value will overflow and wrap around.
+ [b]Note:[/b] The [param value] should lie in the interval [code][0, 2^16 - 1][/code]. Any other value will overflow and wrap around.
To store a signed integer, use [method store_64] or store a signed integer from the interval [code][-2^15, 2^15 - 1][/code] (i.e. keeping one bit for the signedness) and compute its sign manually when reading. For example:
[codeblocks]
[gdscript]
@@ -308,8 +316,7 @@
return (unsigned + MAX_15B) % MAX_16B - MAX_15B
func _ready():
- var f = File.new()
- f.open("user://file.dat", File.WRITE_READ)
+ var f = FileAccess.open("user://file.dat", FileAccess.WRITE_READ)
f.store_16(-42) # This wraps around and stores 65494 (2^16 - 42).
f.store_16(121) # In bounds, will store 121.
f.seek(0) # Go back to start to read the stored value.
@@ -321,8 +328,7 @@
[csharp]
public override void _Ready()
{
- var f = new File();
- f.Open("user://file.dat", File.ModeFlags.WriteRead);
+ using var f = FileAccess.Open("user://file.dat", FileAccess.ModeFlags.WriteRead);
f.Store16(unchecked((ushort)-42)); // This wraps around and stores 65494 (2^16 - 42).
f.Store16(121); // In bounds, will store 121.
f.Seek(0); // Go back to start to read the stored value.
@@ -340,7 +346,7 @@
<param index="0" name="value" type="int" />
<description>
Stores an integer as 32 bits in the file.
- [b]Note:[/b] The [code]value[/code] should lie in the interval [code][0, 2^32 - 1][/code]. Any other value will overflow and wrap around.
+ [b]Note:[/b] The [param value] should lie in the interval [code][0, 2^32 - 1][/code]. Any other value will overflow and wrap around.
To store a signed integer, use [method store_64], or convert it manually (see [method store_16] for an example).
</description>
</method>
@@ -349,7 +355,7 @@
<param index="0" name="value" type="int" />
<description>
Stores an integer as 64 bits in the file.
- [b]Note:[/b] The [code]value[/code] must lie in the interval [code][-2^63, 2^63 - 1][/code] (i.e. be a valid [int] value).
+ [b]Note:[/b] The [param value] must lie in the interval [code][-2^63, 2^63 - 1][/code] (i.e. be a valid [int] value).
</description>
</method>
<method name="store_8">
@@ -357,7 +363,7 @@
<param index="0" name="value" type="int" />
<description>
Stores an integer as 8 bits in the file.
- [b]Note:[/b] The [code]value[/code] should lie in the interval [code][0, 255][/code]. Any other value will overflow and wrap around.
+ [b]Note:[/b] The [param value] should lie in the interval [code][0, 255][/code]. Any other value will overflow and wrap around.
To store a signed integer, use [method store_64], or convert it manually (see [method store_16] for an example).
</description>
</method>
@@ -373,7 +379,7 @@
<param index="0" name="values" type="PackedStringArray" />
<param index="1" name="delim" type="String" default="&quot;,&quot;" />
<description>
- Store the given [PackedStringArray] in the file as a line formatted in the CSV (Comma-Separated Values) format. You can pass a different delimiter [code]delim[/code] to use other than the default [code]","[/code] (comma). This delimiter must be one-character long.
+ Store the given [PackedStringArray] in the file as a line formatted in the CSV (Comma-Separated Values) format. You can pass a different delimiter [param delim] to use other than the default [code]","[/code] (comma). This delimiter must be one-character long.
Text will be encoded as UTF-8.
</description>
</method>
@@ -395,7 +401,7 @@
<return type="void" />
<param index="0" name="line" type="String" />
<description>
- Appends [code]line[/code] to the file followed by a line return character ([code]\n[/code]), encoding the text as UTF-8.
+ Appends [param line] to the file followed by a line return character ([code]\n[/code]), encoding the text as UTF-8.
</description>
</method>
<method name="store_pascal_string">
@@ -417,7 +423,7 @@
<return type="void" />
<param index="0" name="string" type="String" />
<description>
- Appends [code]string[/code] to the file without a line return, encoding the text as UTF-8.
+ Appends [param string] to the file without a line return, encoding the text as UTF-8.
[b]Note:[/b] This method is intended to be used to write text files. The string is stored as a UTF-8 encoded buffer without string length or terminating zero, which means that it can't be loaded back easily. If you want to store a retrievable string in a binary file, consider using [method store_pascal_string] instead. For retrieving strings from a text file, you can use [code]get_buffer(length).get_string_from_utf8()[/code] (if you know the length) or [method get_as_text].
</description>
</method>
@@ -426,13 +432,13 @@
<param index="0" name="value" type="Variant" />
<param index="1" name="full_objects" type="bool" default="false" />
<description>
- Stores any Variant value in the file. If [code]full_objects[/code] is [code]true[/code], encoding objects is allowed (and can potentially include code).
+ Stores any Variant value in the file. If [param full_objects] is [code]true[/code], encoding objects is allowed (and can potentially include code).
[b]Note:[/b] Not all properties are included. Only properties that are configured with the [constant PROPERTY_USAGE_STORAGE] flag set will be serialized. You can add a new usage flag to a property by overriding the [method Object._get_property_list] method in your class. You can also check how property usage is configured by calling [method Object._get_property_list]. See [enum PropertyUsageFlags] for the possible usage flags.
</description>
</method>
</methods>
<members>
- <member name="big_endian" type="bool" setter="set_big_endian" getter="is_big_endian" default="false">
+ <member name="big_endian" type="bool" setter="set_big_endian" getter="is_big_endian">
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 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.
diff --git a/doc/classes/FileDialog.xml b/doc/classes/FileDialog.xml
index 00a1028c5e..af04956e61 100644
--- a/doc/classes/FileDialog.xml
+++ b/doc/classes/FileDialog.xml
@@ -14,9 +14,9 @@
<param index="0" name="filter" type="String" />
<param index="1" name="description" type="String" default="&quot;&quot;" />
<description>
- Adds a comma-delimited file name [code]filter[/code] option to the [FileDialog] with an optional [code]description[/code], which restricts what files can be picked.
- A [code]filter[/code] should be of the form [code]"filename.extension"[/code], where filename and extension can be [code]*[/code] to match any string. Filters starting with [code].[/code] (i.e. empty filenames) are not allowed.
- For example, a [code]filter[/code] of [code]"*.png, *.jpg"[/code] and a [code]description[/code] of [code]"Images"[/code] results in filter text "Images (*.png, *.jpg)".
+ Adds a comma-delimited file name [param filter] option to the [FileDialog] with an optional [param description], which restricts what files can be picked.
+ A [param filter] should be of the form [code]"filename.extension"[/code], where filename and extension can be [code]*[/code] to match any string. Filters starting with [code].[/code] (i.e. empty filenames) are not allowed.
+ For example, a [param filter] of [code]"*.png, *.jpg"[/code] and a [param description] of [code]"Images"[/code] results in filter text "Images (*.png, *.jpg)".
</description>
</method>
<method name="clear_filters">
@@ -55,7 +55,7 @@
<members>
<member name="access" type="int" setter="set_access" getter="get_access" enum="FileDialog.Access" default="0">
The file system access scope. See enum [code]Access[/code] constants.
- [b]Warning:[/b] Currently, in sandboxed environments such as HTML5 builds or sandboxed macOS apps, FileDialog cannot access the host file system. See [url=https://github.com/godotengine/godot-proposals/issues/1123]godot-proposals#1123[/url].
+ [b]Warning:[/b] Currently, in sandboxed environments such as Web builds or sandboxed macOS apps, FileDialog cannot access the host file system. See [url=https://github.com/godotengine/godot-proposals/issues/1123]godot-proposals#1123[/url].
</member>
<member name="current_dir" type="String" setter="set_current_dir" getter="get_current_dir">
The current working directory of the file dialog.
@@ -131,13 +131,13 @@
</constant>
</constants>
<theme_items>
- <theme_item name="file_icon_modulate" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
- The color modulation applied to the file icon.
- </theme_item>
- <theme_item name="files_disabled" data_type="color" type="Color" default="Color(1, 1, 1, 0.25)">
+ <theme_item name="file_disabled_color" data_type="color" type="Color" default="Color(1, 1, 1, 0.25)">
The color tint for disabled files (when the [FileDialog] is used in open folder mode).
</theme_item>
- <theme_item name="folder_icon_modulate" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
+ <theme_item name="file_icon_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
+ The color modulation applied to the file icon.
+ </theme_item>
+ <theme_item name="folder_icon_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
The color modulation applied to the folder icon.
</theme_item>
<theme_item name="back_folder" data_type="icon" type="Texture2D">
diff --git a/doc/classes/FileSystemDock.xml b/doc/classes/FileSystemDock.xml
index 22048c6761..00f5c7ddff 100644
--- a/doc/classes/FileSystemDock.xml
+++ b/doc/classes/FileSystemDock.xml
@@ -32,7 +32,7 @@
</signal>
<signal name="folder_moved">
<param index="0" name="old_folder" type="String" />
- <param index="1" name="new_file" type="String" />
+ <param index="1" name="new_folder" type="String" />
<description>
</description>
</signal>
@@ -46,7 +46,7 @@
<description>
</description>
</signal>
- <signal name="instance">
+ <signal name="instantiate">
<param index="0" name="files" type="PackedStringArray" />
<description>
</description>
diff --git a/doc/classes/FlowContainer.xml b/doc/classes/FlowContainer.xml
index 256e20447b..7a324160c9 100644
--- a/doc/classes/FlowContainer.xml
+++ b/doc/classes/FlowContainer.xml
@@ -17,4 +17,32 @@
</description>
</method>
</methods>
+ <members>
+ <member name="alignment" type="int" setter="set_alignment" getter="get_alignment" enum="FlowContainer.AlignmentMode" default="0">
+ The alignment of the container's children (must be one of [constant ALIGNMENT_BEGIN], [constant ALIGNMENT_CENTER], or [constant ALIGNMENT_END]).
+ </member>
+ <member name="vertical" type="bool" setter="set_vertical" getter="is_vertical" default="false">
+ If [code]true[/code], the [FlowContainer] will arrange its children vertically, rather than horizontally.
+ Can't be changed when using [HFlowContainer] and [VFlowContainer].
+ </member>
+ </members>
+ <constants>
+ <constant name="ALIGNMENT_BEGIN" value="0" enum="AlignmentMode">
+ The child controls will be arranged at the beginning of the container, i.e. top if orientation is vertical, left if orientation is horizontal (right for RTL layout).
+ </constant>
+ <constant name="ALIGNMENT_CENTER" value="1" enum="AlignmentMode">
+ The child controls will be centered in the container.
+ </constant>
+ <constant name="ALIGNMENT_END" value="2" enum="AlignmentMode">
+ The child controls will be arranged at the end of the container, i.e. bottom if orientation is vertical, right if orientation is horizontal (left for RTL layout).
+ </constant>
+ </constants>
+ <theme_items>
+ <theme_item name="h_separation" data_type="constant" type="int" default="4">
+ The horizontal separation of children nodes.
+ </theme_item>
+ <theme_item name="v_separation" data_type="constant" type="int" default="4">
+ The vertical separation of children nodes.
+ </theme_item>
+ </theme_items>
</class>
diff --git a/doc/classes/FogMaterial.xml b/doc/classes/FogMaterial.xml
index e63d4ddf3e..aab6be4212 100644
--- a/doc/classes/FogMaterial.xml
+++ b/doc/classes/FogMaterial.xml
@@ -5,27 +5,29 @@
</brief_description>
<description>
A [Material] resource that can be used by [FogVolume]s to draw volumetric effects.
+ If you need more advanced effects, use a custom [url=$DOCS_URL/tutorials/shaders/shader_reference/fog_shader.html]fog shader[/url].
</description>
<tutorials>
</tutorials>
<members>
<member name="albedo" type="Color" setter="set_albedo" getter="get_albedo" default="Color(1, 1, 1, 1)">
- Sets the single-scattering [Color] of the [FogVolume]. Internally [member albedo] is converted into single-scattering which is additively blended with other [FogVolume]s and the [member Environment.volumetric_fog_albedo].
+ The single-scattering [Color] of the [FogVolume]. Internally, [member albedo] is converted into single-scattering, which is additively blended with other [FogVolume]s and the [member Environment.volumetric_fog_albedo].
</member>
<member name="density" type="float" setter="set_density" getter="get_density" default="1.0">
- Sets the density of the [FogVolume]. Denser objects are more opaque, but may suffer from under-sampling artifacts that look like stripes.
+ The density of the [FogVolume]. Denser objects are more opaque, but may suffer from under-sampling artifacts that look like stripes. Negative values can be used to subtract fog from other [FogVolume]s or global volumetric fog.
+ [b]Note:[/b] Due to limited precision, [member density] values between [code]-0.001[/code] and [code]0.001[/code] (exclusive) act like [code]0.0[/code]. This does not apply to [member Environment.volumetric_fog_density].
</member>
<member name="density_texture" type="Texture3D" setter="set_density_texture" getter="get_density_texture">
- Sets a 3D texture that is used to scale the [member density] of the [FogVolume].
+ The 3D texture that is used to scale the [member density] of the [FogVolume]. This can be used to vary fog density within the [FogVolume] with any kind of static pattern. For animated effects, consider using a custom [url=$DOCS_URL/tutorials/shaders/shader_reference/fog_shader.html]fog shader[/url].
</member>
<member name="edge_fade" type="float" setter="set_edge_fade" getter="get_edge_fade" default="0.1">
- Sets the hardness of the edges of the [FogVolume]. A higher number will result in softer edges while a lower number will result in harder edges.
+ The hardness of the edges of the [FogVolume]. A higher value will result in softer edges, while a lower value will result in harder edges.
</member>
<member name="emission" type="Color" setter="set_emission" getter="get_emission" default="Color(0, 0, 0, 1)">
- Sets the [Color] of the light emitted by the [FogVolume]. Emitted light will not cast light or shadows on other objects, but can be useful for modulating the [Color] of the [FogVolume] independently from light sources.
+ The [Color] of the light emitted by the [FogVolume]. Emitted light will not cast light or shadows on other objects, but can be useful for modulating the [Color] of the [FogVolume] independently from light sources.
</member>
<member name="height_falloff" type="float" setter="set_height_falloff" getter="get_height_falloff" default="0.0">
- Sets the rate by which the height-based fog decreases in density as height increases in world space. A high falloff will result in a sharp transition, while a low falloff will result in a smoother transition. A value of [code]0[/code] results in uniform-density fog. The height threshold is determined by the height of the associated [FogVolume].
+ The rate by which the height-based fog decreases in density as height increases in world space. A high falloff will result in a sharp transition, while a low falloff will result in a smoother transition. A value of [code]0.0[/code] results in uniform-density fog. The height threshold is determined by the height of the associated [FogVolume].
</member>
</members>
</class>
diff --git a/doc/classes/FogVolume.xml b/doc/classes/FogVolume.xml
index 3f2ee3035c..d9fa2e6ebb 100644
--- a/doc/classes/FogVolume.xml
+++ b/doc/classes/FogVolume.xml
@@ -4,22 +4,23 @@
A node used to add local fog with the volumetric fog effect.
</brief_description>
<description>
- [FogVolume]s are used to add localized fog into the global volumetric fog effect.
+ [FogVolume]s are used to add localized fog into the global volumetric fog effect. [FogVolume]s can also remove volumetric fog from specific areas if using a [FogMaterial] with a negative [member FogMaterial.density].
Performance of [FogVolume]s is directly related to their relative size on the screen and the complexity of their attached [FogMaterial]. It is best to keep [FogVolume]s relatively small and simple where possible.
+ [b]Note:[/b] [FogVolume]s only have a visible effect if [member Environment.volumetric_fog_enabled] is [code]true[/code]. If you don't want fog to be globally visible (but only within [FogVolume] nodes), set [member Environment.volumetric_fog_density] to [code]0.0[/code].
</description>
<tutorials>
</tutorials>
<members>
<member name="extents" type="Vector3" setter="set_extents" getter="get_extents" default="Vector3(1, 1, 1)">
- Sets the size of the [FogVolume] when [member shape] is [constant RenderingServer.FOG_VOLUME_SHAPE_ELLIPSOID], [constant RenderingServer.FOG_VOLUME_SHAPE_CONE], [constant RenderingServer.FOG_VOLUME_SHAPE_CYLINDER] or [constant RenderingServer.FOG_VOLUME_SHAPE_BOX].
+ The size of the [FogVolume] when [member shape] is [constant RenderingServer.FOG_VOLUME_SHAPE_ELLIPSOID], [constant RenderingServer.FOG_VOLUME_SHAPE_CONE], [constant RenderingServer.FOG_VOLUME_SHAPE_CYLINDER] or [constant RenderingServer.FOG_VOLUME_SHAPE_BOX].
[b]Note:[/b] Thin fog volumes may appear to flicker when the camera moves or rotates. This can be alleviated by increasing [member ProjectSettings.rendering/environment/volumetric_fog/volume_depth] (at a performance cost) or by decreasing [member Environment.volumetric_fog_length] (at no performance cost, but at the cost of lower fog range). Alternatively, the [FogVolume] can be made thicker and use a lower density in the [member material].
[b]Note:[/b] If [member shape] is [constant RenderingServer.FOG_VOLUME_SHAPE_CONE] or [constant RenderingServer.FOG_VOLUME_SHAPE_CYLINDER], the cone/cylinder will be adjusted to fit within the extents. Non-uniform scaling of cone/cylinder shapes via the [member extents] property is not supported, but you can scale the [FogVolume] node instead.
</member>
<member name="material" type="Material" setter="set_material" getter="get_material">
- Sets the [Material] to be used by the [FogVolume]. Can be either a [FogMaterial] or a custom [ShaderMaterial].
+ The [Material] used by the [FogVolume]. Can be either a built-in [FogMaterial] or a custom [ShaderMaterial].
</member>
<member name="shape" type="int" setter="set_shape" getter="get_shape" enum="RenderingServer.FogVolumeShape" default="3">
- Sets the shape of the [FogVolume] to either [constant RenderingServer.FOG_VOLUME_SHAPE_ELLIPSOID], [constant RenderingServer.FOG_VOLUME_SHAPE_CONE], [constant RenderingServer.FOG_VOLUME_SHAPE_CYLINDER], [constant RenderingServer.FOG_VOLUME_SHAPE_BOX] or [constant RenderingServer.FOG_VOLUME_SHAPE_WORLD].
+ The shape of the [FogVolume]. This can be set to either [constant RenderingServer.FOG_VOLUME_SHAPE_ELLIPSOID], [constant RenderingServer.FOG_VOLUME_SHAPE_CONE], [constant RenderingServer.FOG_VOLUME_SHAPE_CYLINDER], [constant RenderingServer.FOG_VOLUME_SHAPE_BOX] or [constant RenderingServer.FOG_VOLUME_SHAPE_WORLD].
</member>
</members>
</class>
diff --git a/doc/classes/Font.xml b/doc/classes/Font.xml
index 9e9c592400..6a42b62bcf 100644
--- a/doc/classes/Font.xml
+++ b/doc/classes/Font.xml
@@ -17,7 +17,7 @@
<param index="3" name="font_size" type="int" />
<param index="4" name="modulate" type="Color" default="Color(1, 1, 1, 1)" />
<description>
- Draw a single Unicode character [code]char[/code] into a canvas item using the font, at a given position, with [code]modulate[/code] color. [code]position[/code] specifies the baseline, not the top. To draw from the top, [i]ascent[/i] must be added to the Y axis.
+ Draw a single Unicode character [param char] into a canvas item using the font, at a given position, with [param modulate] color. [param pos] specifies the baseline, not the top. To draw from the top, [i]ascent[/i] must be added to the Y axis.
[b]Note:[/b] Do not use this function to draw strings character by character, use [method draw_string] or [TextLine] instead.
</description>
</method>
@@ -30,7 +30,7 @@
<param index="4" name="size" type="int" default="-1" />
<param index="5" name="modulate" type="Color" default="Color(1, 1, 1, 1)" />
<description>
- Draw a single Unicode character [code]char[/code] outline into a canvas item using the font, at a given position, with [code]modulate[/code] color and [code]size[/code] outline size. [code]position[/code] specifies the baseline, not the top. To draw from the top, [i]ascent[/i] must be added to the Y axis.
+ Draw a single Unicode character [param char] outline into a canvas item using the font, at a given position, with [param modulate] color and [param size] outline size. [param pos] specifies the baseline, not the top. To draw from the top, [i]ascent[/i] must be added to the Y axis.
[b]Note:[/b] Do not use this function to draw strings character by character, use [method draw_string] or [TextLine] instead.
</description>
</method>
@@ -49,7 +49,7 @@
<param index="10" name="direction" type="int" enum="TextServer.Direction" default="0" />
<param index="11" name="orientation" type="int" enum="TextServer.Orientation" default="0" />
<description>
- Breaks [code]text[/code] to the lines using rules specified by [code]flags[/code] and draws it into a canvas item using the font, at a given position, with [code]modulate[/code] color, optionally clipping the width and aligning horizontally. [code]position[/code] specifies the baseline of the first line, not the top. To draw from the top, [i]ascent[/i] must be added to the Y axis.
+ Breaks [param text] into lines using rules specified by [param brk_flags] and draws it into a canvas item using the font, at a given position, with [param modulate] color, optionally clipping the width and aligning horizontally. [param pos] specifies the baseline of the first line, not the top. To draw from the top, [i]ascent[/i] must be added to the Y axis.
See also [method CanvasItem.draw_multiline_string].
</description>
</method>
@@ -69,7 +69,7 @@
<param index="11" name="direction" type="int" enum="TextServer.Direction" default="0" />
<param index="12" name="orientation" type="int" enum="TextServer.Orientation" default="0" />
<description>
- Breaks [code]text[/code] to the lines using rules specified by [code]flags[/code] and draws text outline into a canvas item using the font, at a given position, with [code]modulate[/code] color and [code]size[/code] outline size, optionally clipping the width and aligning horizontally. [code]position[/code] specifies the baseline of the first line, not the top. To draw from the top, [i]ascent[/i] must be added to the Y axis.
+ Breaks [param text] to the lines using rules specified by [param brk_flags] and draws text outline into a canvas item using the font, at a given position, with [param modulate] color and [param size] outline size, optionally clipping the width and aligning horizontally. [param pos] specifies the baseline of the first line, not the top. To draw from the top, [i]ascent[/i] must be added to the Y axis.
See also [method CanvasItem.draw_multiline_string_outline].
</description>
</method>
@@ -86,7 +86,7 @@
<param index="8" name="direction" type="int" enum="TextServer.Direction" default="0" />
<param index="9" name="orientation" type="int" enum="TextServer.Orientation" default="0" />
<description>
- Draw [code]text[/code] into a canvas item using the font, at a given position, with [code]modulate[/code] color, optionally clipping the width and aligning horizontally. [code]position[/code] specifies the baseline, not the top. To draw from the top, [i]ascent[/i] must be added to the Y axis.
+ Draw [param text] into a canvas item using the font, at a given position, with [param modulate] color, optionally clipping the width and aligning horizontally. [param pos] specifies the baseline, not the top. To draw from the top, [i]ascent[/i] must be added to the Y axis.
See also [method CanvasItem.draw_string].
</description>
</method>
@@ -104,7 +104,7 @@
<param index="9" name="direction" type="int" enum="TextServer.Direction" default="0" />
<param index="10" name="orientation" type="int" enum="TextServer.Orientation" default="0" />
<description>
- Draw [code]text[/code] outline into a canvas item using the font, at a given position, with [code]modulate[/code] color and [code]size[/code] outline size, optionally clipping the width and aligning horizontally. [code]position[/code] specifies the baseline, not the top. To draw from the top, [i]ascent[/i] must be added to the Y axis.
+ Draw [param text] outline into a canvas item using the font, at a given position, with [param modulate] color and [param size] outline size, optionally clipping the width and aligning horizontally. [param pos] specifies the baseline, not the top. To draw from the top, [i]ascent[/i] must be added to the Y axis.
See also [method CanvasItem.draw_string_outline].
</description>
</method>
@@ -228,9 +228,15 @@
<description>
Returns the size of a bounding box of a single-line string, taking kerning and advance into account. See also [method get_multiline_string_size] and [method draw_string].
For example, to get the string size as displayed by a single-line Label, use:
- [codeblock]
+ [codeblocks]
+ [gdscript]
var string_size = $Label.get_theme_font("font").get_string_size($Label.text, HORIZONTAL_ALIGNMENT_LEFT, -1, $Label.get_theme_font_size("font_size"))
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ Label label = GetNode&lt;Label&gt;("Label");
+ Vector2 stringSize = label.GetThemeFont("font").GetStringSize(label.Text, HorizontalAlignment.Left, -1, label.GetThemeFontSize("font_size"));
+ [/csharp]
+ [/codeblocks]
[b]Note:[/b] Real height of the string is context-dependent and can be significantly different from the value returned by [method get_height].
</description>
</method>
@@ -274,7 +280,7 @@
<return type="bool" />
<param index="0" name="char" type="int" />
<description>
- Returns [code]true[/code] if a Unicode [code]char[/code] is available in the font.
+ Returns [code]true[/code] if a Unicode [param char] is available in the font.
</description>
</method>
<method name="is_language_supported" qualifiers="const">
diff --git a/doc/classes/FontFile.xml b/doc/classes/FontFile.xml
index 622bb17e59..271f6a13e0 100644
--- a/doc/classes/FontFile.xml
+++ b/doc/classes/FontFile.xml
@@ -14,7 +14,6 @@
[b]Note:[/b] A character is a symbol that represents an item (letter, digit etc.) in an abstract way.
[b]Note:[/b] A glyph is a bitmap or shape used to draw a one or more characters in a context-dependent manner. Glyph indices are bound to the specific font data source.
[b]Note:[/b] If a none of the font data sources contain glyphs for a character used in a string, the character in question will be replaced with a box displaying its hexadecimal code.
-
[codeblocks]
[gdscript]
var f = load("res://BarlowCondensed-Bold.ttf")
@@ -142,11 +141,11 @@
<param index="1" name="char" type="int" />
<param index="2" name="variation_selector" type="int" />
<description>
- Returns the glyph index of a [code]char[/code], optionally modified by the [code]variation_selector[/code].
+ Returns the glyph index of a [param char], optionally modified by the [param variation_selector].
</description>
</method>
<method name="get_glyph_list" qualifiers="const">
- <return type="Array" />
+ <return type="PackedInt32Array" />
<param index="0" name="cache_index" type="int" />
<param index="1" name="size" type="Vector2i" />
<description>
@@ -199,7 +198,7 @@
</description>
</method>
<method name="get_kerning_list" qualifiers="const">
- <return type="Array" />
+ <return type="Vector2i[]" />
<param index="0" name="cache_index" type="int" />
<param index="1" name="size" type="int" />
<description>
@@ -210,7 +209,7 @@
<return type="bool" />
<param index="0" name="language" type="String" />
<description>
- Returns [code]true[/code] if support override is enabled for the [code]language[/code].
+ Returns [code]true[/code] if support override is enabled for the [param language].
</description>
</method>
<method name="get_language_support_overrides" qualifiers="const">
@@ -223,7 +222,7 @@
<return type="bool" />
<param index="0" name="script" type="String" />
<description>
- Returns [code]true[/code] if support override is enabled for the [code]script[/code].
+ Returns [code]true[/code] if support override is enabled for the [param script].
</description>
</method>
<method name="get_script_support_overrides" qualifiers="const">
@@ -233,7 +232,7 @@
</description>
</method>
<method name="get_size_cache_list" qualifiers="const">
- <return type="Array" />
+ <return type="Vector2i[]" />
<param index="0" name="cache_index" type="int" />
<description>
Returns list of the font sizes in the cache. Each size is [code]Vector2i[/code] with font size and outline size.
@@ -262,7 +261,7 @@
<param index="1" name="size" type="Vector2i" />
<param index="2" name="texture_index" type="int" />
<description>
- Returns a copy of the array containing the first free pixel in the each column of texture. Should be the same size as texture width or empty.
+ Returns a copy of the array containing glyph packing data.
</description>
</method>
<method name="get_transform" qualifiers="const">
@@ -283,7 +282,7 @@
<return type="int" enum="Error" />
<param index="0" name="path" type="String" />
<description>
- Loads an AngelCode BMFont (.fnt, .font) bitmap font from file [code]path[/code].
+ Loads an AngelCode BMFont (.fnt, .font) bitmap font from file [param path].
[b]Warning:[/b] This method should only be used in the editor or in cases when you need to load external fonts at run-time, such as fonts located at the [code]user://[/code] directory.
</description>
</method>
@@ -291,7 +290,7 @@
<return type="int" enum="Error" />
<param index="0" name="path" type="String" />
<description>
- Loads a TrueType (.ttf), OpenType (.otf), WOFF (.woff), WOFF2 (.woff2) or Type 1 (.pfb, .pfm) dynamic font from file [code]path[/code].
+ Loads a TrueType (.ttf), OpenType (.otf), WOFF (.woff), WOFF2 (.woff2) or Type 1 (.pfb, .pfm) dynamic font from file [param path].
[b]Warning:[/b] This method should only be used in the editor or in cases when you need to load external fonts at run-time, such as fonts located at the [code]user://[/code] directory.
</description>
</method>
@@ -522,7 +521,7 @@
<param index="2" name="texture_index" type="int" />
<param index="3" name="offset" type="PackedInt32Array" />
<description>
- Sets array containing the first free pixel in the each column of texture. Should be the same size as texture width or empty (for the fonts without dynamic glyph generation support).
+ Sets array containing glyph packing data.
</description>
</method>
<method name="set_transform">
@@ -543,8 +542,8 @@
</method>
</methods>
<members>
- <member name="antialiased" type="bool" setter="set_antialiased" getter="is_antialiased" default="true">
- If set to [code]true[/code], font 8-bit anitialiased glyph rendering is supported and enabled.
+ <member name="antialiasing" type="int" setter="set_antialiasing" getter="get_antialiasing" enum="TextServer.FontAntialiasing" default="1">
+ Font anti-aliasing mode.
</member>
<member name="data" type="PackedByteArray" setter="set_data" getter="get_data" default="PackedByteArray()">
Contents of the dynamic font source file.
@@ -589,7 +588,7 @@
Font style name.
</member>
<member name="subpixel_positioning" type="int" setter="set_subpixel_positioning" getter="get_subpixel_positioning" enum="TextServer.SubpixelPositioning" default="1">
- Font glyph sub-pixel positioning mode. Subpixel positioning provides shaper text and better kerning for smaller font sizes, at the cost of memory usage and font rasterization speed. Use [constant TextServer.SUBPIXEL_POSITIONING_AUTO] to automatically enable it based on the font size.
+ Font glyph subpixel positioning mode. Subpixel positioning provides shaper text and better kerning for smaller font sizes, at the cost of memory usage and font rasterization speed. Use [constant TextServer.SUBPIXEL_POSITIONING_AUTO] to automatically enable it based on the font size.
</member>
</members>
</class>
diff --git a/doc/classes/FontVariation.xml b/doc/classes/FontVariation.xml
index 30cb732751..e0fad126b9 100644
--- a/doc/classes/FontVariation.xml
+++ b/doc/classes/FontVariation.xml
@@ -5,7 +5,6 @@
</brief_description>
<description>
OpenType variations, simulated bold / slant, and additional font settings like OpenType features and extra spacing.
-
To use simulated bold font variant:
[codeblocks]
[gdscript]
@@ -32,7 +31,7 @@
<param index="0" name="spacing" type="int" enum="TextServer.SpacingType" />
<param index="1" name="value" type="int" />
<description>
- Sets the spacing for [code]type[/code] (see [enum TextServer.SpacingType]) to [code]value[/code] in pixels (not relative to the font size).
+ Sets the spacing for [code]type[/code] (see [enum TextServer.SpacingType]) to [param value] in pixels (not relative to the font size).
</description>
</method>
</methods>
diff --git a/doc/classes/GPUParticles2D.xml b/doc/classes/GPUParticles2D.xml
index 7c2966bd4f..c7d10078e8 100644
--- a/doc/classes/GPUParticles2D.xml
+++ b/doc/classes/GPUParticles2D.xml
@@ -5,11 +5,12 @@
</brief_description>
<description>
2D particle node used to create a variety of particle systems and effects. [GPUParticles2D] features an emitter that generates some number of particles at a given rate.
- Use the [code]process_material[/code] property to add a [ParticlesMaterial] to configure particle appearance and behavior. Alternatively, you can add a [ShaderMaterial] which will be applied to all particles.
+ Use the [code]process_material[/code] property to add a [ParticleProcessMaterial] to configure particle appearance and behavior. Alternatively, you can add a [ShaderMaterial] which will be applied to all particles.
</description>
<tutorials>
<link title="Particle systems (2D)">$DOCS_URL/tutorials/2d/particle_systems_2d.html</link>
- <link title="2D Dodge The Creeps Demo">https://godotengine.org/asset-library/asset/515</link>
+ <link title="2D Particles Demo">https://godotengine.org/asset-library/asset/118</link>
+ <link title="2D Dodge The Creeps Demo (uses GPUParticles2D for the trail behind the player)">https://godotengine.org/asset-library/asset/515</link>
</tutorials>
<methods>
<method name="capture_rect" qualifiers="const">
@@ -26,7 +27,7 @@
<param index="3" name="custom" type="Color" />
<param index="4" name="flags" type="int" />
<description>
- Emits a single particle. Whether [code]xform[/code], [code]velocity[/code], [code]color[/code] and [code]custom[/code] are applied depends on the value of [code]flags[/code]. See [enum EmitFlags].
+ Emits a single particle. Whether [param xform], [param velocity], [param color] and [param custom] are applied depends on the value of [param flags]. See [enum EmitFlags].
</description>
</method>
<method name="restart">
@@ -52,7 +53,7 @@
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="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.
+ The particle system's frame rate is fixed to a value. For example, 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">
If [code]true[/code], results in fractional delta calculation which has a smoother particles display effect.
@@ -73,7 +74,7 @@
Particle system starts as if it had already run for this many seconds.
</member>
<member name="process_material" type="Material" setter="set_process_material" getter="get_process_material">
- [Material] for processing particles. Can be a [ParticlesMaterial] or a [ShaderMaterial].
+ [Material] for processing particles. Can be a [ParticleProcessMaterial] or a [ShaderMaterial].
</member>
<member name="randomness" type="float" setter="set_randomness_ratio" getter="get_randomness_ratio" default="0.0">
Emission lifetime randomness ratio.
@@ -88,12 +89,17 @@
Particle texture. If [code]null[/code], particles will be squares.
</member>
<member name="trail_enabled" type="bool" setter="set_trail_enabled" getter="is_trail_enabled" default="false">
+ If [code]true[/code], enables particle trails using a mesh skinning system.
+ [b]Note:[/b] Unlike [GPUParticles3D], the number of trail sections and subdivisions is set with the [member trail_sections] and [member trail_section_subdivisions] properties.
</member>
- <member name="trail_length_secs" type="float" setter="set_trail_length" getter="get_trail_length" default="0.3">
+ <member name="trail_lifetime" type="float" setter="set_trail_lifetime" getter="get_trail_lifetime" default="0.3">
+ The amount of time the particle's trail should represent (in seconds). Only effective if [member trail_enabled] is [code]true[/code].
</member>
<member name="trail_section_subdivisions" type="int" setter="set_trail_section_subdivisions" getter="get_trail_section_subdivisions" default="4">
+ The number of subdivisions to use for the particle trail rendering. Higher values can result in smoother trail curves, at the cost of performance due to increased mesh complexity. See also [member trail_sections]. Only effective if [member trail_enabled] is [code]true[/code].
</member>
<member name="trail_sections" type="int" setter="set_trail_sections" getter="get_trail_sections" default="8">
+ The number of sections to use for the particle trail rendering. Higher values can result in smoother trail curves, at the cost of performance due to increased mesh complexity. See also [member trail_section_subdivisions]. Only effective if [member trail_enabled] is [code]true[/code].
</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.
diff --git a/doc/classes/GPUParticles3D.xml b/doc/classes/GPUParticles3D.xml
index 4cd95f561f..ea53c5b4b5 100644
--- a/doc/classes/GPUParticles3D.xml
+++ b/doc/classes/GPUParticles3D.xml
@@ -5,7 +5,7 @@
</brief_description>
<description>
3D particle node used to create a variety of particle systems and effects. [GPUParticles3D] features an emitter that generates some number of particles at a given rate.
- Use the [code]process_material[/code] property to add a [ParticlesMaterial] to configure particle appearance and behavior. Alternatively, you can add a [ShaderMaterial] which will be applied to all particles.
+ Use the [code]process_material[/code] property to add a [ParticleProcessMaterial] to configure particle appearance and behavior. Alternatively, you can add a [ShaderMaterial] which will be applied to all particles.
</description>
<tutorials>
<link title="Controlling thousands of fish with Particles">$DOCS_URL/tutorials/performance/vertex_animation/controlling_thousands_of_fish.html</link>
@@ -26,14 +26,14 @@
<param index="3" name="custom" type="Color" />
<param index="4" name="flags" type="int" />
<description>
- Emits a single particle. Whether [code]xform[/code], [code]velocity[/code], [code]color[/code] and [code]custom[/code] are applied depends on the value of [code]flags[/code]. See [enum EmitFlags].
+ Emits a single particle. Whether [param xform], [param velocity], [param color] and [param custom] are applied depends on the value of [param flags]. See [enum EmitFlags].
</description>
</method>
<method name="get_draw_pass_mesh" qualifiers="const">
<return type="Mesh" />
<param index="0" name="pass" type="int" />
<description>
- Returns the [Mesh] that is drawn at index [code]pass[/code].
+ Returns the [Mesh] that is drawn at index [param pass].
</description>
</method>
<method name="restart">
@@ -47,7 +47,7 @@
<param index="0" name="pass" type="int" />
<param index="1" name="mesh" type="Mesh" />
<description>
- Sets the [Mesh] that is drawn at index [code]pass[/code].
+ Sets the [Mesh] that is drawn at index [param pass].
</description>
</method>
</methods>
@@ -84,7 +84,7 @@
Time ratio between each emission. If [code]0[/code], particles are emitted continuously. If [code]1[/code], all particles are emitted simultaneously.
</member>
<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.
+ The particle system's frame rate is fixed to a value. For example, 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">
If [code]true[/code], results in fractional delta calculation which has a smoother particles display effect.
@@ -105,7 +105,7 @@
Amount of time to preprocess the particles before animation starts. Lets you start the animation some time after particles have started emitting.
</member>
<member name="process_material" type="Material" setter="set_process_material" getter="get_process_material">
- [Material] for processing particles. Can be a [ParticlesMaterial] or a [ShaderMaterial].
+ [Material] for processing particles. Can be a [ParticleProcessMaterial] or a [ShaderMaterial].
</member>
<member name="randomness" type="float" setter="set_randomness_ratio" getter="get_randomness_ratio" default="0.0">
Emission randomness ratio.
@@ -116,8 +116,12 @@
<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_trail_enabled" getter="is_trail_enabled" default="false">
+ If [code]true[/code], enables particle trails using a mesh skinning system. Designed to work with [RibbonTrailMesh] and [TubeTrailMesh].
+ [b]Note:[/b] [member BaseMaterial3D.use_particle_trails] must also be enabled on the particle mesh's material. Otherwise, setting [member trail_enabled] to [code]true[/code] will have no effect.
+ [b]Note:[/b] Unlike [GPUParticles2D], the number of trail sections and subdivisions is set in the [RibbonTrailMesh] or the [TubeTrailMesh]'s properties.
</member>
- <member name="trail_length_secs" type="float" setter="set_trail_length" getter="get_trail_length" default="0.3">
+ <member name="trail_lifetime" type="float" setter="set_trail_lifetime" getter="get_trail_lifetime" default="0.3">
+ The amount of time the particle's trail should represent (in seconds). Only effective if [member trail_enabled] is [code]true[/code].
</member>
<member name="transform_align" type="int" setter="set_transform_align" getter="get_transform_align" enum="GPUParticles3D.TransformAlign" default="0">
</member>
diff --git a/doc/classes/GPUParticlesAttractor3D.xml b/doc/classes/GPUParticlesAttractor3D.xml
index e69255cc31..a1c49afcca 100644
--- a/doc/classes/GPUParticlesAttractor3D.xml
+++ b/doc/classes/GPUParticlesAttractor3D.xml
@@ -18,7 +18,7 @@
<member name="cull_mask" type="int" setter="set_cull_mask" getter="get_cull_mask" default="4294967295">
The particle rendering layers ([member VisualInstance3D.layers]) that will be affected by the attractor. By default, all particles are affected by an attractor.
After configuring particle nodes accordingly, specific layers can be unchecked to prevent certain particles from being affected by attractors. For example, this can be used if you're using an attractor as part of a spell effect but don't want the attractor to affect unrelated weather particles at the same position.
- Particle attraction can also be disabled on a per-process material basis by setting [member ParticlesMaterial.attractor_interaction_enabled] on the [GPUParticles3D] node.
+ Particle attraction can also be disabled on a per-process material basis by setting [member ParticleProcessMaterial.attractor_interaction_enabled] on the [GPUParticles3D] node.
</member>
<member name="directionality" type="float" setter="set_directionality" getter="get_directionality" default="0.0">
Adjusts how directional the attractor is. At [code]0.0[/code], the attractor is not directional at all: it will attract particles towards its center. At [code]1.0[/code], the attractor is fully directional: particles will always be pushed towards local -Z (or +Z if [member strength] is negative).
diff --git a/doc/classes/GPUParticlesCollision3D.xml b/doc/classes/GPUParticlesCollision3D.xml
index 435f9781f0..1b744f7ed6 100644
--- a/doc/classes/GPUParticlesCollision3D.xml
+++ b/doc/classes/GPUParticlesCollision3D.xml
@@ -7,7 +7,7 @@
Particle collision shapes can be used to make particles stop or bounce against them.
Particle collision shapes in real-time and can be moved, rotated and scaled during gameplay. Unlike attractors, non-uniform scaling of collision shapes is [i]not[/i] supported.
Particle collision shapes can be temporarily disabled by hiding them.
- [b]Note:[/b] [member ParticlesMaterial.collision_enabled] must be [code]true[/code] on the [GPUParticles3D]'s process material for collision to work.
+ [b]Note:[/b] [member ParticleProcessMaterial.collision_mode] must be [constant ParticleProcessMaterial.COLLISION_RIGID] or [constant ParticleProcessMaterial.COLLISION_HIDE_ON_CONTACT] on the [GPUParticles3D]'s process material for collision to work.
[b]Note:[/b] Particle collision only affects [GPUParticles3D], not [CPUParticles3D].
[b]Note:[/b] Particles pushed by a collider that is being moved will not be interpolated, which can result in visible stuttering. This can be alleviated by setting [member GPUParticles3D.fixed_fps] to [code]0[/code] or a value that matches or exceeds the target framerate.
</description>
@@ -15,9 +15,9 @@
</tutorials>
<members>
<member name="cull_mask" type="int" setter="set_cull_mask" getter="get_cull_mask" default="4294967295">
- The particle rendering layers ([member VisualInstance3D.layers]) that will be affected by the collision shape. By default, all particles that have [member ParticlesMaterial.collision_enabled] set to [code]true[/code] will be affected by a collision shape.
+ The particle rendering layers ([member VisualInstance3D.layers]) that will be affected by the collision shape. By default, all particles that have [member ParticleProcessMaterial.collision_mode] set to [constant ParticleProcessMaterial.COLLISION_RIGID] or [constant ParticleProcessMaterial.COLLISION_HIDE_ON_CONTACT] will be affected by a collision shape.
After configuring particle nodes accordingly, specific layers can be unchecked to prevent certain particles from being affected by attractors. For example, this can be used if you're using an attractor as part of a spell effect but don't want the attractor to affect unrelated weather particles at the same position.
- Particle attraction can also be disabled on a per-process material basis by setting [member ParticlesMaterial.attractor_interaction_enabled] on the [GPUParticles3D] node.
+ Particle attraction can also be disabled on a per-process material basis by setting [member ParticleProcessMaterial.attractor_interaction_enabled] on the [GPUParticles3D] node.
</member>
</members>
</class>
diff --git a/doc/classes/GPUParticlesCollisionBox3D.xml b/doc/classes/GPUParticlesCollisionBox3D.xml
index 60d66ca682..103be18bfd 100644
--- a/doc/classes/GPUParticlesCollisionBox3D.xml
+++ b/doc/classes/GPUParticlesCollisionBox3D.xml
@@ -5,7 +5,7 @@
</brief_description>
<description>
Box-shaped 3D particle collision shape affecting [GPUParticles3D] nodes.
- [b]Note:[/b] [member ParticlesMaterial.collision_enabled] must be [code]true[/code] on the [GPUParticles3D]'s process material for collision to work.
+ [b]Note:[/b] [member ParticleProcessMaterial.collision_mode] must be [constant ParticleProcessMaterial.COLLISION_RIGID] or [constant ParticleProcessMaterial.COLLISION_HIDE_ON_CONTACT] on the [GPUParticles3D]'s process material for collision to work.
[b]Note:[/b] Particle collision only affects [GPUParticles3D], not [CPUParticles3D].
</description>
<tutorials>
diff --git a/doc/classes/GPUParticlesCollisionHeightField3D.xml b/doc/classes/GPUParticlesCollisionHeightField3D.xml
index 3fcad43efb..6e996d5fbd 100644
--- a/doc/classes/GPUParticlesCollisionHeightField3D.xml
+++ b/doc/classes/GPUParticlesCollisionHeightField3D.xml
@@ -7,7 +7,7 @@
Real-time heightmap-shaped 3D particle attractor affecting [GPUParticles3D] nodes.
Heightmap shapes allow for efficiently representing collisions for convex and concave objects with a single "floor" (such as terrain). This is less flexible than [GPUParticlesCollisionSDF3D], but it doesn't require a baking step.
[GPUParticlesCollisionHeightField3D] can also be regenerated in real-time when it is moved, when the camera moves, or even continuously. This makes [GPUParticlesCollisionHeightField3D] a good choice for weather effects such as rain and snow and games with highly dynamic geometry. However, since heightmaps cannot represent overhangs, [GPUParticlesCollisionHeightField3D] is not suited for indoor particle collision.
- [b]Note:[/b] [member ParticlesMaterial.collision_enabled] must be [code]true[/code] on the [GPUParticles3D]'s process material for collision to work.
+ [b]Note:[/b] [member ParticleProcessMaterial.collision_mode] must be [code]true[/code] on the [GPUParticles3D]'s process material for collision to work.
[b]Note:[/b] Particle collision only affects [GPUParticles3D], not [CPUParticles3D].
</description>
<tutorials>
diff --git a/doc/classes/GPUParticlesCollisionSDF3D.xml b/doc/classes/GPUParticlesCollisionSDF3D.xml
index 1a530b2561..8467cfdda1 100644
--- a/doc/classes/GPUParticlesCollisionSDF3D.xml
+++ b/doc/classes/GPUParticlesCollisionSDF3D.xml
@@ -8,7 +8,7 @@
Signed distance fields (SDF) allow for efficiently representing approximate collision shapes for convex and concave objects of any shape. This is more flexible than [GPUParticlesCollisionHeightField3D], but it requires a baking step.
[b]Baking:[/b] The signed distance field texture can be baked by selecting the [GPUParticlesCollisionSDF3D] node in the editor, then clicking [b]Bake SDF[/b] at the top of the 3D viewport. Any [i]visible[/i] [MeshInstance3D]s touching the [member extents] will be taken into account for baking, regardless of their [member GeometryInstance3D.gi_mode].
[b]Note:[/b] Baking a [GPUParticlesCollisionSDF3D]'s [member texture] is only possible within the editor, as there is no bake method exposed for use in exported projects. However, it's still possible to load pre-baked [Texture3D]s into its [member texture] property in an exported project.
- [b]Note:[/b] [member ParticlesMaterial.collision_enabled] must be [code]true[/code] on the [GPUParticles3D]'s process material for collision to work.
+ [b]Note:[/b] [member ParticleProcessMaterial.collision_mode] must be [constant ParticleProcessMaterial.COLLISION_RIGID] or [constant ParticleProcessMaterial.COLLISION_HIDE_ON_CONTACT] on the [GPUParticles3D]'s process material for collision to work.
[b]Note:[/b] Particle collision only affects [GPUParticles3D], not [CPUParticles3D].
</description>
<tutorials>
@@ -18,7 +18,7 @@
<return type="bool" />
<param index="0" name="layer_number" type="int" />
<description>
- Returns whether or not the specified layer of the [member bake_mask] is enabled, given a [code]layer_number[/code] between 1 and 32.
+ Returns whether or not the specified layer of the [member bake_mask] is enabled, given a [param layer_number] between 1 and 32.
</description>
</method>
<method name="set_bake_mask_value">
@@ -26,7 +26,7 @@
<param index="0" name="layer_number" type="int" />
<param index="1" name="value" type="bool" />
<description>
- Based on [code]value[/code], enables or disables the specified layer in the [member bake_mask], given a [code]layer_number[/code] between 1 and 32.
+ Based on [param value], enables or disables the specified layer in the [member bake_mask], given a [param layer_number] between 1 and 32.
</description>
</method>
</methods>
diff --git a/doc/classes/GPUParticlesCollisionSphere3D.xml b/doc/classes/GPUParticlesCollisionSphere3D.xml
index 6651a732da..ee582108dd 100644
--- a/doc/classes/GPUParticlesCollisionSphere3D.xml
+++ b/doc/classes/GPUParticlesCollisionSphere3D.xml
@@ -5,7 +5,7 @@
</brief_description>
<description>
Sphere-shaped 3D particle collision shape affecting [GPUParticles3D] nodes.
- [b]Note:[/b] [member ParticlesMaterial.collision_enabled] must be [code]true[/code] on the [GPUParticles3D]'s process material for collision to work.
+ [b]Note:[/b] [member ParticleProcessMaterial.collision_mode] must be [constant ParticleProcessMaterial.COLLISION_RIGID] or [constant ParticleProcessMaterial.COLLISION_HIDE_ON_CONTACT] on the [GPUParticles3D]'s process material for collision to work.
[b]Note:[/b] Particle collision only affects [GPUParticles3D], not [CPUParticles3D].
</description>
<tutorials>
diff --git a/doc/classes/Generic6DOFJoint3D.xml b/doc/classes/Generic6DOFJoint3D.xml
index 5eec089a6f..e6058b1bf9 100644
--- a/doc/classes/Generic6DOFJoint3D.xml
+++ b/doc/classes/Generic6DOFJoint3D.xml
@@ -102,7 +102,7 @@
<member name="angular_limit_x/force_limit" type="float" setter="set_param_x" getter="get_param_x" default="0.0">
The maximum amount of force that can occur, when rotating around the X axis.
</member>
- <member name="angular_limit_x/lower_angle" type="float" setter="_set_angular_lo_limit_x" getter="_get_angular_lo_limit_x" default="0.0">
+ <member name="angular_limit_x/lower_angle" type="float" setter="set_param_x" getter="get_param_x" default="0.0">
The minimum rotation in negative direction to break loose and rotate around the X axis.
</member>
<member name="angular_limit_x/restitution" type="float" setter="set_param_x" getter="get_param_x" default="0.0">
@@ -111,7 +111,7 @@
<member name="angular_limit_x/softness" type="float" setter="set_param_x" getter="get_param_x" default="0.5">
The speed of all rotations across the X axis.
</member>
- <member name="angular_limit_x/upper_angle" type="float" setter="_set_angular_hi_limit_x" getter="_get_angular_hi_limit_x" default="0.0">
+ <member name="angular_limit_x/upper_angle" type="float" setter="set_param_x" getter="get_param_x" default="0.0">
The minimum rotation in positive direction to break loose and rotate around the X axis.
</member>
<member name="angular_limit_y/damping" type="float" setter="set_param_y" getter="get_param_y" default="1.0">
@@ -126,7 +126,7 @@
<member name="angular_limit_y/force_limit" type="float" setter="set_param_y" getter="get_param_y" default="0.0">
The maximum amount of force that can occur, when rotating around the Y axis.
</member>
- <member name="angular_limit_y/lower_angle" type="float" setter="_set_angular_lo_limit_y" getter="_get_angular_lo_limit_y" default="0.0">
+ <member name="angular_limit_y/lower_angle" type="float" setter="set_param_y" getter="get_param_y" default="0.0">
The minimum rotation in negative direction to break loose and rotate around the Y axis.
</member>
<member name="angular_limit_y/restitution" type="float" setter="set_param_y" getter="get_param_y" default="0.0">
@@ -135,7 +135,7 @@
<member name="angular_limit_y/softness" type="float" setter="set_param_y" getter="get_param_y" default="0.5">
The speed of all rotations across the Y axis.
</member>
- <member name="angular_limit_y/upper_angle" type="float" setter="_set_angular_hi_limit_y" getter="_get_angular_hi_limit_y" default="0.0">
+ <member name="angular_limit_y/upper_angle" type="float" setter="set_param_y" getter="get_param_y" default="0.0">
The minimum rotation in positive direction to break loose and rotate around the Y axis.
</member>
<member name="angular_limit_z/damping" type="float" setter="set_param_z" getter="get_param_z" default="1.0">
@@ -150,7 +150,7 @@
<member name="angular_limit_z/force_limit" type="float" setter="set_param_z" getter="get_param_z" default="0.0">
The maximum amount of force that can occur, when rotating around the Z axis.
</member>
- <member name="angular_limit_z/lower_angle" type="float" setter="_set_angular_lo_limit_z" getter="_get_angular_lo_limit_z" default="0.0">
+ <member name="angular_limit_z/lower_angle" type="float" setter="set_param_z" getter="get_param_z" default="0.0">
The minimum rotation in negative direction to break loose and rotate around the Z axis.
</member>
<member name="angular_limit_z/restitution" type="float" setter="set_param_z" getter="get_param_z" default="0.0">
@@ -159,7 +159,7 @@
<member name="angular_limit_z/softness" type="float" setter="set_param_z" getter="get_param_z" default="0.5">
The speed of all rotations across the Z axis.
</member>
- <member name="angular_limit_z/upper_angle" type="float" setter="_set_angular_hi_limit_z" getter="_get_angular_hi_limit_z" default="0.0">
+ <member name="angular_limit_z/upper_angle" type="float" setter="set_param_z" getter="get_param_z" default="0.0">
The minimum rotation in positive direction to break loose and rotate around the Z axis.
</member>
<member name="angular_motor_x/enabled" type="bool" setter="set_flag_x" getter="get_flag_x" default="false">
diff --git a/doc/classes/Geometry2D.xml b/doc/classes/Geometry2D.xml
index 0926f0acfe..0142018f1a 100644
--- a/doc/classes/Geometry2D.xml
+++ b/doc/classes/Geometry2D.xml
@@ -10,20 +10,20 @@
</tutorials>
<methods>
<method name="clip_polygons">
- <return type="Array" />
+ <return type="PackedVector2Array[]" />
<param index="0" name="polygon_a" type="PackedVector2Array" />
<param index="1" name="polygon_b" type="PackedVector2Array" />
<description>
- Clips [code]polygon_a[/code] against [code]polygon_b[/code] and returns an array of clipped polygons. This performs [constant OPERATION_DIFFERENCE] between polygons. Returns an empty array if [code]polygon_b[/code] completely overlaps [code]polygon_a[/code].
- If [code]polygon_b[/code] is enclosed by [code]polygon_a[/code], returns an outer polygon (boundary) and inner polygon (hole) which could be distinguished by calling [method is_polygon_clockwise].
+ Clips [param polygon_a] against [param polygon_b] and returns an array of clipped polygons. This performs [constant OPERATION_DIFFERENCE] between polygons. Returns an empty array if [param polygon_b] completely overlaps [param polygon_a].
+ If [param polygon_b] is enclosed by [param polygon_a], returns an outer polygon (boundary) and inner polygon (hole) which could be distinguished by calling [method is_polygon_clockwise].
</description>
</method>
<method name="clip_polyline_with_polygon">
- <return type="Array" />
+ <return type="PackedVector2Array[]" />
<param index="0" name="polyline" type="PackedVector2Array" />
<param index="1" name="polygon" type="PackedVector2Array" />
<description>
- Clips [code]polyline[/code] against [code]polygon[/code] and returns an array of clipped polylines. This performs [constant OPERATION_DIFFERENCE] between the polyline and the polygon. This operation can be thought of as cutting a line with a closed shape.
+ Clips [param polyline] against [param polygon] and returns an array of clipped polylines. This performs [constant OPERATION_DIFFERENCE] between the polyline and the polygon. This operation can be thought of as cutting a line with a closed shape.
</description>
</method>
<method name="convex_hull">
@@ -33,12 +33,19 @@
Given an array of [Vector2]s, returns the convex hull as a list of points in counterclockwise order. The last point is the same as the first one.
</description>
</method>
+ <method name="decompose_polygon_in_convex">
+ <return type="PackedVector2Array[]" />
+ <param index="0" name="polygon" type="PackedVector2Array" />
+ <description>
+ Decomposes the [param polygon] into multiple convex hulls and returns an array of [PackedVector2Array].
+ </description>
+ </method>
<method name="exclude_polygons">
- <return type="Array" />
+ <return type="PackedVector2Array[]" />
<param index="0" name="polygon_a" type="PackedVector2Array" />
<param index="1" name="polygon_b" type="PackedVector2Array" />
<description>
- Mutually excludes common area defined by intersection of [code]polygon_a[/code] and [code]polygon_b[/code] (see [method intersect_polygons]) and returns an array of excluded polygons. This performs [constant OPERATION_XOR] between polygons. In other words, returns all but common area between polygons.
+ Mutually excludes common area defined by intersection of [param polygon_a] and [param polygon_b] (see [method intersect_polygons]) and returns an array of excluded polygons. This performs [constant OPERATION_XOR] between polygons. In other words, returns all but common area between polygons.
The operation may result in an outer polygon (boundary) and inner polygon (hole) produced which could be distinguished by calling [method is_polygon_clockwise].
</description>
</method>
@@ -48,7 +55,7 @@
<param index="1" name="s1" type="Vector2" />
<param index="2" name="s2" type="Vector2" />
<description>
- Returns the 2D point on the 2D segment ([code]s1[/code], [code]s2[/code]) that is closest to [code]point[/code]. The returned point will always be inside the specified segment.
+ Returns the 2D point on the 2D segment ([param s1], [param s2]) that is closest to [param point]. The returned point will always be inside the specified segment.
</description>
</method>
<method name="get_closest_point_to_segment_uncapped">
@@ -57,7 +64,7 @@
<param index="1" name="s1" type="Vector2" />
<param index="2" name="s2" type="Vector2" />
<description>
- Returns the 2D point on the 2D line defined by ([code]s1[/code], [code]s2[/code]) that is closest to [code]point[/code]. The returned point can be inside the segment ([code]s1[/code], [code]s2[/code]) or outside of it, i.e. somewhere on the line extending from the segment.
+ Returns the 2D point on the 2D line defined by ([param s1], [param s2]) that is closest to [param point]. The returned point can be inside the segment ([param s1], [param s2]) or outside of it, i.e. somewhere on the line extending from the segment.
</description>
</method>
<method name="get_closest_points_between_segments">
@@ -67,24 +74,24 @@
<param index="2" name="p2" type="Vector2" />
<param index="3" name="q2" type="Vector2" />
<description>
- Given the two 2D segments ([code]p1[/code], [code]q1[/code]) and ([code]p2[/code], [code]q2[/code]), finds those two points on the two segments that are closest to each other. Returns a [PackedVector2Array] that contains this point on ([code]p1[/code], [code]q1[/code]) as well the accompanying point on ([code]p2[/code], [code]q2[/code]).
+ Given the two 2D segments ([param p1], [param q1]) and ([param p2], [param q2]), finds those two points on the two segments that are closest to each other. Returns a [PackedVector2Array] that contains this point on ([param p1], [param q1]) as well the accompanying point on ([param p2], [param q2]).
</description>
</method>
<method name="intersect_polygons">
- <return type="Array" />
+ <return type="PackedVector2Array[]" />
<param index="0" name="polygon_a" type="PackedVector2Array" />
<param index="1" name="polygon_b" type="PackedVector2Array" />
<description>
- Intersects [code]polygon_a[/code] with [code]polygon_b[/code] and returns an array of intersected polygons. This performs [constant OPERATION_INTERSECTION] between polygons. In other words, returns common area shared by polygons. Returns an empty array if no intersection occurs.
+ Intersects [param polygon_a] with [param polygon_b] and returns an array of intersected polygons. This performs [constant OPERATION_INTERSECTION] between polygons. In other words, returns common area shared by polygons. Returns an empty array if no intersection occurs.
The operation may result in an outer polygon (boundary) and inner polygon (hole) produced which could be distinguished by calling [method is_polygon_clockwise].
</description>
</method>
<method name="intersect_polyline_with_polygon">
- <return type="Array" />
+ <return type="PackedVector2Array[]" />
<param index="0" name="polyline" type="PackedVector2Array" />
<param index="1" name="polygon" type="PackedVector2Array" />
<description>
- Intersects [code]polyline[/code] with [code]polygon[/code] and returns an array of intersected polylines. This performs [constant OPERATION_INTERSECTION] between the polyline and the polygon. This operation can be thought of as chopping a line with a closed shape.
+ Intersects [param polyline] with [param polygon] and returns an array of intersected polylines. This performs [constant OPERATION_INTERSECTION] between the polyline and the polygon. This operation can be thought of as chopping a line with a closed shape.
</description>
</method>
<method name="is_point_in_circle">
@@ -93,7 +100,7 @@
<param index="1" name="circle_position" type="Vector2" />
<param index="2" name="circle_radius" type="float" />
<description>
- Returns [code]true[/code] if [code]point[/code] is inside the circle or if it's located exactly [i]on[/i] the circle's boundary, otherwise returns [code]false[/code].
+ Returns [code]true[/code] if [param point] is inside the circle or if it's located exactly [i]on[/i] the circle's boundary, otherwise returns [code]false[/code].
</description>
</method>
<method name="is_point_in_polygon">
@@ -101,14 +108,14 @@
<param index="0" name="point" type="Vector2" />
<param index="1" name="polygon" type="PackedVector2Array" />
<description>
- Returns [code]true[/code] if [code]point[/code] is inside [code]polygon[/code] or if it's located exactly [i]on[/i] polygon's boundary, otherwise returns [code]false[/code].
+ Returns [code]true[/code] if [param point] is inside [param polygon] or if it's located exactly [i]on[/i] polygon's boundary, otherwise returns [code]false[/code].
</description>
</method>
<method name="is_polygon_clockwise">
<return type="bool" />
<param index="0" name="polygon" type="PackedVector2Array" />
<description>
- Returns [code]true[/code] if [code]polygon[/code]'s vertices are ordered in clockwise order, otherwise returns [code]false[/code].
+ Returns [code]true[/code] if [param polygon]'s vertices are ordered in clockwise order, otherwise returns [code]false[/code].
</description>
</method>
<method name="line_intersects_line">
@@ -118,7 +125,7 @@
<param index="2" name="from_b" type="Vector2" />
<param index="3" name="dir_b" type="Vector2" />
<description>
- Checks if the two lines ([code]from_a[/code], [code]dir_a[/code]) and ([code]from_b[/code], [code]dir_b[/code]) intersect. If yes, return the point of intersection as [Vector2]. If no intersection takes place, returns [code]null[/code].
+ Checks if the two lines ([param from_a], [param dir_a]) and ([param from_b], [param dir_b]) intersect. If yes, return the point of intersection as [Vector2]. If no intersection takes place, returns [code]null[/code].
[b]Note:[/b] The lines are specified using direction vectors, not end points.
</description>
</method>
@@ -126,26 +133,26 @@
<return type="Dictionary" />
<param index="0" name="sizes" type="PackedVector2Array" />
<description>
- Given an array of [Vector2]s representing tiles, builds an atlas. The returned dictionary has two keys: [code]points[/code] is an array of [Vector2] that specifies the positions of each tile, [code]size[/code] contains the overall size of the whole atlas as [Vector2].
+ Given an array of [Vector2]s representing tiles, builds an atlas. The returned dictionary has two keys: [code]points[/code] is a [PackedVector2Array] that specifies the positions of each tile, [code]size[/code] contains the overall size of the whole atlas as [Vector2i].
</description>
</method>
<method name="merge_polygons">
- <return type="Array" />
+ <return type="PackedVector2Array[]" />
<param index="0" name="polygon_a" type="PackedVector2Array" />
<param index="1" name="polygon_b" type="PackedVector2Array" />
<description>
- Merges (combines) [code]polygon_a[/code] and [code]polygon_b[/code] and returns an array of merged polygons. This performs [constant OPERATION_UNION] between polygons.
+ Merges (combines) [param polygon_a] and [param polygon_b] and returns an array of merged polygons. This performs [constant OPERATION_UNION] between polygons.
The operation may result in an outer polygon (boundary) and multiple inner polygons (holes) produced which could be distinguished by calling [method is_polygon_clockwise].
</description>
</method>
<method name="offset_polygon">
- <return type="Array" />
+ <return type="PackedVector2Array[]" />
<param index="0" name="polygon" type="PackedVector2Array" />
<param index="1" name="delta" type="float" />
<param index="2" name="join_type" type="int" enum="Geometry2D.PolyJoinType" default="0" />
<description>
- Inflates or deflates [code]polygon[/code] by [code]delta[/code] units (pixels). If [code]delta[/code] is positive, makes the polygon grow outward. If [code]delta[/code] is negative, shrinks the polygon inward. Returns an array of polygons because inflating/deflating may result in multiple discrete polygons. Returns an empty array if [code]delta[/code] is negative and the absolute value of it approximately exceeds the minimum bounding rectangle dimensions of the polygon.
- Each polygon's vertices will be rounded as determined by [code]join_type[/code], see [enum PolyJoinType].
+ Inflates or deflates [param polygon] by [param delta] units (pixels). If [param delta] is positive, makes the polygon grow outward. If [param delta] is negative, shrinks the polygon inward. Returns an array of polygons because inflating/deflating may result in multiple discrete polygons. Returns an empty array if [param delta] is negative and the absolute value of it approximately exceeds the minimum bounding rectangle dimensions of the polygon.
+ Each polygon's vertices will be rounded as determined by [param join_type], see [enum PolyJoinType].
The operation may result in an outer polygon (boundary) and inner polygon (hole) produced which could be distinguished by calling [method is_polygon_clockwise].
[b]Note:[/b] To translate the polygon's vertices specifically, multiply them to a [Transform2D]:
[codeblocks]
@@ -166,15 +173,15 @@
</description>
</method>
<method name="offset_polyline">
- <return type="Array" />
+ <return type="PackedVector2Array[]" />
<param index="0" name="polyline" type="PackedVector2Array" />
<param index="1" name="delta" type="float" />
<param index="2" name="join_type" type="int" enum="Geometry2D.PolyJoinType" default="0" />
<param index="3" name="end_type" type="int" enum="Geometry2D.PolyEndType" default="3" />
<description>
- Inflates or deflates [code]polyline[/code] by [code]delta[/code] units (pixels), producing polygons. If [code]delta[/code] is positive, makes the polyline grow outward. Returns an array of polygons because inflating/deflating may result in multiple discrete polygons. If [code]delta[/code] is negative, returns an empty array.
- Each polygon's vertices will be rounded as determined by [code]join_type[/code], see [enum PolyJoinType].
- Each polygon's endpoints will be rounded as determined by [code]end_type[/code], see [enum PolyEndType].
+ Inflates or deflates [param polyline] by [param delta] units (pixels), producing polygons. If [param delta] is positive, makes the polyline grow outward. Returns an array of polygons because inflating/deflating may result in multiple discrete polygons. If [param delta] is negative, returns an empty array.
+ Each polygon's vertices will be rounded as determined by [param join_type], see [enum PolyJoinType].
+ Each polygon's endpoints will be rounded as determined by [param end_type], see [enum PolyEndType].
The operation may result in an outer polygon (boundary) and inner polygon (hole) produced which could be distinguished by calling [method is_polygon_clockwise].
</description>
</method>
@@ -185,7 +192,7 @@
<param index="2" name="b" type="Vector2" />
<param index="3" name="c" type="Vector2" />
<description>
- Returns if [code]point[/code] is inside the triangle specified by [code]a[/code], [code]b[/code] and [code]c[/code].
+ Returns if [param point] is inside the triangle specified by [param a], [param b] and [param c].
</description>
</method>
<method name="segment_intersects_circle">
@@ -195,7 +202,7 @@
<param index="2" name="circle_position" type="Vector2" />
<param index="3" name="circle_radius" type="float" />
<description>
- Given the 2D segment ([code]segment_from[/code], [code]segment_to[/code]), returns the position on the segment (as a number between 0 and 1) at which the segment hits the circle that is located at position [code]circle_position[/code] and has radius [code]circle_radius[/code]. If the segment does not intersect the circle, -1 is returned (this is also the case if the line extending the segment would intersect the circle, but the segment does not).
+ Given the 2D segment ([param segment_from], [param segment_to]), returns the position on the segment (as a number between 0 and 1) at which the segment hits the circle that is located at position [param circle_position] and has radius [param circle_radius]. If the segment does not intersect the circle, -1 is returned (this is also the case if the line extending the segment would intersect the circle, but the segment does not).
</description>
</method>
<method name="segment_intersects_segment">
@@ -205,21 +212,21 @@
<param index="2" name="from_b" type="Vector2" />
<param index="3" name="to_b" type="Vector2" />
<description>
- Checks if the two segments ([code]from_a[/code], [code]to_a[/code]) and ([code]from_b[/code], [code]to_b[/code]) intersect. If yes, return the point of intersection as [Vector2]. If no intersection takes place, returns [code]null[/code].
+ Checks if the two segments ([param from_a], [param to_a]) and ([param from_b], [param to_b]) intersect. If yes, return the point of intersection as [Vector2]. If no intersection takes place, returns [code]null[/code].
</description>
</method>
<method name="triangulate_delaunay">
<return type="PackedInt32Array" />
<param index="0" name="points" type="PackedVector2Array" />
<description>
- Triangulates the area specified by discrete set of [code]points[/code] such that no point is inside the circumcircle of any resulting triangle. Returns a [PackedInt32Array] where each triangle consists of three consecutive point indices into [code]points[/code] (i.e. the returned array will have [code]n * 3[/code] elements, with [code]n[/code] being the number of found triangles). If the triangulation did not succeed, an empty [PackedInt32Array] is returned.
+ Triangulates the area specified by discrete set of [param points] such that no point is inside the circumcircle of any resulting triangle. Returns a [PackedInt32Array] where each triangle consists of three consecutive point indices into [param points] (i.e. the returned array will have [code]n * 3[/code] elements, with [code]n[/code] being the number of found triangles). If the triangulation did not succeed, an empty [PackedInt32Array] is returned.
</description>
</method>
<method name="triangulate_polygon">
<return type="PackedInt32Array" />
<param index="0" name="polygon" type="PackedVector2Array" />
<description>
- Triangulates the polygon specified by the points in [code]polygon[/code]. Returns a [PackedInt32Array] where each triangle consists of three consecutive point indices into [code]polygon[/code] (i.e. the returned array will have [code]n * 3[/code] elements, with [code]n[/code] being the number of found triangles). Output triangles will always be counter clockwise, and the contour will be flipped if it's clockwise. If the triangulation did not succeed, an empty [PackedInt32Array] is returned.
+ Triangulates the polygon specified by the points in [param polygon]. Returns a [PackedInt32Array] where each triangle consists of three consecutive point indices into [param polygon] (i.e. the returned array will have [code]n * 3[/code] elements, with [code]n[/code] being the number of found triangles). Output triangles will always be counter clockwise, and the contour will be flipped if it's clockwise. If the triangulation did not succeed, an empty [PackedInt32Array] is returned.
</description>
</method>
</methods>
diff --git a/doc/classes/Geometry3D.xml b/doc/classes/Geometry3D.xml
index 654c499c97..d37b0b7b81 100644
--- a/doc/classes/Geometry3D.xml
+++ b/doc/classes/Geometry3D.xml
@@ -10,31 +10,31 @@
</tutorials>
<methods>
<method name="build_box_planes">
- <return type="Array" />
+ <return type="Plane[]" />
<param index="0" name="extents" type="Vector3" />
<description>
- Returns an array with 6 [Plane]s that describe the sides of a box centered at the origin. The box size is defined by [code]extents[/code], which represents one (positive) corner of the box (i.e. half its actual size).
+ Returns an array with 6 [Plane]s that describe the sides of a box centered at the origin. The box size is defined by [param extents], which represents one (positive) corner of the box (i.e. half its actual size).
</description>
</method>
<method name="build_capsule_planes">
- <return type="Array" />
+ <return type="Plane[]" />
<param index="0" name="radius" type="float" />
<param index="1" name="height" type="float" />
<param index="2" name="sides" type="int" />
<param index="3" name="lats" type="int" />
<param index="4" name="axis" type="int" enum="Vector3.Axis" default="2" />
<description>
- Returns an array of [Plane]s closely bounding a faceted capsule centered at the origin with radius [code]radius[/code] and height [code]height[/code]. The parameter [code]sides[/code] defines how many planes will be generated for the side part of the capsule, whereas [code]lats[/code] gives the number of latitudinal steps at the bottom and top of the capsule. The parameter [code]axis[/code] describes the axis along which the capsule is oriented (0 for X, 1 for Y, 2 for Z).
+ Returns an array of [Plane]s closely bounding a faceted capsule centered at the origin with radius [param radius] and height [param height]. The parameter [param sides] defines how many planes will be generated for the side part of the capsule, whereas [param lats] gives the number of latitudinal steps at the bottom and top of the capsule. The parameter [param axis] describes the axis along which the capsule is oriented (0 for X, 1 for Y, 2 for Z).
</description>
</method>
<method name="build_cylinder_planes">
- <return type="Array" />
+ <return type="Plane[]" />
<param index="0" name="radius" type="float" />
<param index="1" name="height" type="float" />
<param index="2" name="sides" type="int" />
<param index="3" name="axis" type="int" enum="Vector3.Axis" default="2" />
<description>
- Returns an array of [Plane]s closely bounding a faceted cylinder centered at the origin with radius [code]radius[/code] and height [code]height[/code]. The parameter [code]sides[/code] defines how many planes will be generated for the round part of the cylinder. The parameter [code]axis[/code] describes the axis along which the cylinder is oriented (0 for X, 1 for Y, 2 for Z).
+ Returns an array of [Plane]s closely bounding a faceted cylinder centered at the origin with radius [param radius] and height [param height]. The parameter [param sides] defines how many planes will be generated for the round part of the cylinder. The parameter [param axis] describes the axis along which the cylinder is oriented (0 for X, 1 for Y, 2 for Z).
</description>
</method>
<method name="clip_polygon">
@@ -42,7 +42,7 @@
<param index="0" name="points" type="PackedVector3Array" />
<param index="1" name="plane" type="Plane" />
<description>
- Clips the polygon defined by the points in [code]points[/code] against the [code]plane[/code] and returns the points of the clipped polygon.
+ Clips the polygon defined by the points in [param points] against the [param plane] and returns the points of the clipped polygon.
</description>
</method>
<method name="get_closest_point_to_segment">
@@ -51,7 +51,7 @@
<param index="1" name="s1" type="Vector3" />
<param index="2" name="s2" type="Vector3" />
<description>
- Returns the 3D point on the 3D segment ([code]s1[/code], [code]s2[/code]) that is closest to [code]point[/code]. The returned point will always be inside the specified segment.
+ Returns the 3D point on the 3D segment ([param s1], [param s2]) that is closest to [param point]. The returned point will always be inside the specified segment.
</description>
</method>
<method name="get_closest_point_to_segment_uncapped">
@@ -60,7 +60,7 @@
<param index="1" name="s1" type="Vector3" />
<param index="2" name="s2" type="Vector3" />
<description>
- Returns the 3D point on the 3D line defined by ([code]s1[/code], [code]s2[/code]) that is closest to [code]point[/code]. The returned point can be inside the segment ([code]s1[/code], [code]s2[/code]) or outside of it, i.e. somewhere on the line extending from the segment.
+ Returns the 3D point on the 3D line defined by ([param s1], [param s2]) that is closest to [param point]. The returned point can be inside the segment ([param s1], [param s2]) or outside of it, i.e. somewhere on the line extending from the segment.
</description>
</method>
<method name="get_closest_points_between_segments">
@@ -70,7 +70,7 @@
<param index="2" name="q1" type="Vector3" />
<param index="3" name="q2" type="Vector3" />
<description>
- Given the two 3D segments ([code]p1[/code], [code]p2[/code]) and ([code]q1[/code], [code]q2[/code]), finds those two points on the two segments that are closest to each other. Returns a [PackedVector3Array] that contains this point on ([code]p1[/code], [code]p2[/code]) as well the accompanying point on ([code]q1[/code], [code]q2[/code]).
+ Given the two 3D segments ([param p1], [param p2]) and ([param q1], [param q2]), finds those two points on the two segments that are closest to each other. Returns a [PackedVector3Array] that contains this point on ([param p1], [param p2]) as well the accompanying point on ([param q1], [param q2]).
</description>
</method>
<method name="ray_intersects_triangle">
@@ -81,7 +81,7 @@
<param index="3" name="b" type="Vector3" />
<param index="4" name="c" type="Vector3" />
<description>
- Tests if the 3D ray starting at [code]from[/code] with the direction of [code]dir[/code] intersects the triangle specified by [code]a[/code], [code]b[/code] and [code]c[/code]. If yes, returns the point of intersection as [Vector3]. If no intersection takes place, returns [code]null[/code].
+ Tests if the 3D ray starting at [param from] with the direction of [param dir] intersects the triangle specified by [param a], [param b] and [param c]. If yes, returns the point of intersection as [Vector3]. If no intersection takes place, returns [code]null[/code].
</description>
</method>
<method name="segment_intersects_convex">
@@ -90,7 +90,7 @@
<param index="1" name="to" type="Vector3" />
<param index="2" name="planes" type="Array" />
<description>
- Given a convex hull defined though the [Plane]s in the array [code]planes[/code], tests if the segment ([code]from[/code], [code]to[/code]) intersects with that hull. If an intersection is found, returns a [PackedVector3Array] containing the point the intersection and the hull's normal. Otherwise, returns an empty array.
+ Given a convex hull defined though the [Plane]s in the array [param planes], tests if the segment ([param from], [param to]) intersects with that hull. If an intersection is found, returns a [PackedVector3Array] containing the point the intersection and the hull's normal. Otherwise, returns an empty array.
</description>
</method>
<method name="segment_intersects_cylinder">
@@ -100,7 +100,7 @@
<param index="2" name="height" type="float" />
<param index="3" name="radius" type="float" />
<description>
- Checks if the segment ([code]from[/code], [code]to[/code]) intersects the cylinder with height [code]height[/code] that is centered at the origin and has radius [code]radius[/code]. If no, returns an empty [PackedVector3Array]. If an intersection takes place, the returned array contains the point of intersection and the cylinder's normal at the point of intersection.
+ Checks if the segment ([param from], [param to]) intersects the cylinder with height [param height] that is centered at the origin and has radius [param radius]. If no, returns an empty [PackedVector3Array]. If an intersection takes place, the returned array contains the point of intersection and the cylinder's normal at the point of intersection.
</description>
</method>
<method name="segment_intersects_sphere">
@@ -110,7 +110,7 @@
<param index="2" name="sphere_position" type="Vector3" />
<param index="3" name="sphere_radius" type="float" />
<description>
- Checks if the segment ([code]from[/code], [code]to[/code]) intersects the sphere that is located at [code]sphere_position[/code] and has radius [code]sphere_radius[/code]. If no, returns an empty [PackedVector3Array]. If yes, returns a [PackedVector3Array] containing the point of intersection and the sphere's normal at the point of intersection.
+ Checks if the segment ([param from], [param to]) intersects the sphere that is located at [param sphere_position] and has radius [param sphere_radius]. If no, returns an empty [PackedVector3Array]. If yes, returns a [PackedVector3Array] containing the point of intersection and the sphere's normal at the point of intersection.
</description>
</method>
<method name="segment_intersects_triangle">
@@ -121,7 +121,7 @@
<param index="3" name="b" type="Vector3" />
<param index="4" name="c" type="Vector3" />
<description>
- Tests if the segment ([code]from[/code], [code]to[/code]) intersects the triangle [code]a[/code], [code]b[/code], [code]c[/code]. If yes, returns the point of intersection as [Vector3]. If no intersection takes place, returns [code]null[/code].
+ Tests if the segment ([param from], [param to]) intersects the triangle [param a], [param b], [param c]. If yes, returns the point of intersection as [Vector3]. If no intersection takes place, returns [code]null[/code].
</description>
</method>
</methods>
diff --git a/doc/classes/GeometryInstance3D.xml b/doc/classes/GeometryInstance3D.xml
index 79a60a9e62..90a983d28b 100644
--- a/doc/classes/GeometryInstance3D.xml
+++ b/doc/classes/GeometryInstance3D.xml
@@ -9,10 +9,11 @@
<tutorials>
</tutorials>
<methods>
- <method name="get_instance_shader_uniform" qualifiers="const">
+ <method name="get_instance_shader_parameter" qualifiers="const">
<return type="Variant" />
- <param index="0" name="uniform" type="StringName" />
+ <param index="0" name="name" type="StringName" />
<description>
+ Get the value of a shader parameter as set on this instance.
</description>
</method>
<method name="set_custom_aabb">
@@ -22,31 +23,35 @@
Overrides the bounding box of this node with a custom one. To remove it, set an [AABB] with all fields set to zero.
</description>
</method>
- <method name="set_instance_shader_uniform">
+ <method name="set_instance_shader_parameter">
<return type="void" />
- <param index="0" name="uniform" type="StringName" />
+ <param index="0" name="name" type="StringName" />
<param index="1" name="value" type="Variant" />
<description>
+ Set the value of a shader parameter for this instance only.
</description>
</method>
</methods>
<members>
- <member name="cast_shadow" type="int" setter="set_cast_shadows_setting" getter="get_cast_shadows_setting" enum="GeometryInstance3D.ShadowCastingSetting">
+ <member name="cast_shadow" type="int" setter="set_cast_shadows_setting" getter="get_cast_shadows_setting" enum="GeometryInstance3D.ShadowCastingSetting" default="1">
The selected shadow casting flag. See [enum ShadowCastingSetting] for possible values.
</member>
- <member name="extra_cull_margin" type="float" setter="set_extra_cull_margin" getter="get_extra_cull_margin">
+ <member name="extra_cull_margin" type="float" setter="set_extra_cull_margin" getter="get_extra_cull_margin" default="0.0">
The extra distance added to the GeometryInstance3D's bounding box ([AABB]) to increase its cull box.
</member>
- <member name="gi_lightmap_scale" type="int" setter="set_lightmap_scale" getter="get_lightmap_scale" enum="GeometryInstance3D.LightmapScale">
+ <member name="gi_lightmap_scale" type="int" setter="set_lightmap_scale" getter="get_lightmap_scale" enum="GeometryInstance3D.LightmapScale" default="0">
The texel density to use for lightmapping in [LightmapGI]. Greater scale values provide higher resolution in the lightmap, which can result in sharper shadows for lights that have both direct and indirect light baked. However, greater scale values will also increase the space taken by the mesh in the lightmap texture, which increases the memory, storage, and bake time requirements. When using a single mesh at different scales, consider adjusting this value to keep the lightmap texel density consistent across meshes.
</member>
- <member name="gi_mode" type="int" setter="set_gi_mode" getter="get_gi_mode" enum="GeometryInstance3D.GIMode">
+ <member name="gi_mode" type="int" setter="set_gi_mode" getter="get_gi_mode" enum="GeometryInstance3D.GIMode" default="1">
The global illumination mode to use for the whole geometry. To avoid inconsistent results, use a mode that matches the purpose of the mesh during gameplay (static/dynamic).
[b]Note:[/b] Lights' bake mode will also affect the global illumination rendering. See [member Light3D.light_bake_mode].
</member>
- <member name="ignore_occlusion_culling" type="bool" setter="set_ignore_occlusion_culling" getter="is_ignoring_occlusion_culling">
+ <member name="ignore_occlusion_culling" type="bool" setter="set_ignore_occlusion_culling" getter="is_ignoring_occlusion_culling" default="false">
+ If [code]true[/code], disables occlusion culling for this instance. Useful for gizmos that must be rendered even when occlusion culling is in use.
</member>
- <member name="lod_bias" type="float" setter="set_lod_bias" getter="get_lod_bias">
+ <member name="lod_bias" type="float" setter="set_lod_bias" getter="get_lod_bias" default="1.0">
+ Changes how quickly the mesh transitions to a lower level of detail. A value of 0 will force the mesh to its lowest level of detail, a value of 1 will use the default settings, and larger values will keep the mesh in a higher level of detail at farther distances.
+ Useful for testing level of detail transitions in the editor.
</member>
<member name="material_overlay" type="Material" setter="set_material_overlay" getter="get_material_overlay">
The material overlay for the whole geometry.
@@ -56,26 +61,26 @@
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="transparency" type="float" setter="set_transparency" getter="get_transparency">
+ <member name="transparency" type="float" setter="set_transparency" getter="get_transparency" default="0.0">
The transparency applied to the whole geometry (as a multiplier of the materials' existing transparency). [code]0.0[/code] is fully opaque, while [code]1.0[/code] is fully transparent. Values greater than [code]0.0[/code] (exclusive) will force the geometry's materials to go through the transparent pipeline, which is slower to render and can exhibit rendering issues due to incorrect transparency sorting. However, unlike using a transparent material, setting [member transparency] to a value greater than [code]0.0[/code] (exclusive) will [i]not[/i] disable shadow rendering.
In spatial shaders, [code]1.0 - transparency[/code] is set as the default value of the [code]ALPHA[/code] built-in.
[b]Note:[/b] [member transparency] is clamped between [code]0.0[/code] and [code]1.0[/code], so this property cannot be used to make transparent materials more opaque than they originally are.
</member>
- <member name="visibility_range_begin" type="float" setter="set_visibility_range_begin" getter="get_visibility_range_begin">
+ <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="visibility_range_begin_margin" type="float" setter="set_visibility_range_begin_margin" getter="get_visibility_range_begin_margin">
+ <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.
If [member visibility_range_fade_mode] is [constant VISIBILITY_RANGE_FADE_DISABLED], this acts as an hysteresis distance. If [member visibility_range_fade_mode] is [constant VISIBILITY_RANGE_FADE_SELF] or [constant VISIBILITY_RANGE_FADE_DEPENDENCIES], this acts as a fade transition distance and must be set to a value greater than [code]0.0[/code] for the effect to be noticeable.
</member>
- <member name="visibility_range_end" type="float" setter="set_visibility_range_end" getter="get_visibility_range_end">
+ <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="visibility_range_end_margin" type="float" setter="set_visibility_range_end_margin" getter="get_visibility_range_end_margin">
+ <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.
If [member visibility_range_fade_mode] is [constant VISIBILITY_RANGE_FADE_DISABLED], this acts as an hysteresis distance. If [member visibility_range_fade_mode] is [constant VISIBILITY_RANGE_FADE_SELF] or [constant VISIBILITY_RANGE_FADE_DEPENDENCIES], this acts as a fade transition distance and must be set to a value greater than [code]0.0[/code] for the effect to be noticeable.
</member>
- <member name="visibility_range_fade_mode" type="int" setter="set_visibility_range_fade_mode" getter="get_visibility_range_fade_mode" enum="GeometryInstance3D.VisibilityRangeFadeMode">
+ <member name="visibility_range_fade_mode" type="int" setter="set_visibility_range_fade_mode" getter="get_visibility_range_fade_mode" enum="GeometryInstance3D.VisibilityRangeFadeMode" default="0">
Controls which instances will be faded when approaching the limits of the visibility range. See [enum VisibilityRangeFadeMode] for possible values.
</member>
</members>
diff --git a/doc/classes/Gradient.xml b/doc/classes/Gradient.xml
index bf64feedda..33f0a7979a 100644
--- a/doc/classes/Gradient.xml
+++ b/doc/classes/Gradient.xml
@@ -22,14 +22,14 @@
<return type="Color" />
<param index="0" name="point" type="int" />
<description>
- Returns the color of the gradient color at index [code]point[/code].
+ Returns the color of the gradient color at index [param point].
</description>
</method>
<method name="get_offset">
<return type="float" />
<param index="0" name="point" type="int" />
<description>
- Returns the offset of the gradient color at index [code]point[/code].
+ Returns the offset of the gradient color at index [param point].
</description>
</method>
<method name="get_point_count" qualifiers="const">
@@ -38,18 +38,11 @@
Returns the number of colors in the gradient.
</description>
</method>
- <method name="interpolate">
- <return type="Color" />
- <param index="0" name="offset" type="float" />
- <description>
- Returns the interpolated color specified by [code]offset[/code].
- </description>
- </method>
<method name="remove_point">
<return type="void" />
<param index="0" name="point" type="int" />
<description>
- Removes the color at the index [code]point[/code].
+ Removes the color at the index [param point].
</description>
</method>
<method name="reverse">
@@ -58,12 +51,19 @@
Reverses/mirrors the gradient.
</description>
</method>
+ <method name="sample">
+ <return type="Color" />
+ <param index="0" name="offset" type="float" />
+ <description>
+ Returns the interpolated color specified by [code]offset[/code].
+ </description>
+ </method>
<method name="set_color">
<return type="void" />
<param index="0" name="point" type="int" />
<param index="1" name="color" type="Color" />
<description>
- Sets the color of the gradient color at index [code]point[/code].
+ Sets the color of the gradient color at index [param point].
</description>
</method>
<method name="set_offset">
@@ -71,7 +71,7 @@
<param index="0" name="point" type="int" />
<param index="1" name="offset" type="float" />
<description>
- Sets the offset for the gradient color at index [code]point[/code].
+ Sets the offset for the gradient color at index [param point].
</description>
</method>
</methods>
diff --git a/doc/classes/GradientTexture1D.xml b/doc/classes/GradientTexture1D.xml
index 3254754ac1..fa572eeed0 100644
--- a/doc/classes/GradientTexture1D.xml
+++ b/doc/classes/GradientTexture1D.xml
@@ -12,6 +12,7 @@
<member name="gradient" type="Gradient" setter="set_gradient" getter="get_gradient">
The [Gradient] that will be used to fill the texture.
</member>
+ <member name="resource_local_to_scene" type="bool" setter="set_local_to_scene" getter="is_local_to_scene" overrides="Resource" default="false" />
<member name="use_hdr" type="bool" setter="set_use_hdr" getter="is_using_hdr" default="false">
If [code]true[/code], the generated texture will support high dynamic range ([constant Image.FORMAT_RGBAF] format). This allows for glow effects to work if [member Environment.glow_enabled] is [code]true[/code]. If [code]false[/code], the generated texture will use low dynamic range; overbright colors will be clamped ([constant Image.FORMAT_RGBA8] format).
</member>
diff --git a/doc/classes/GradientTexture2D.xml b/doc/classes/GradientTexture2D.xml
index 7561f1b947..87d86e7a59 100644
--- a/doc/classes/GradientTexture2D.xml
+++ b/doc/classes/GradientTexture2D.xml
@@ -27,6 +27,7 @@
<member name="repeat" type="int" setter="set_repeat" getter="get_repeat" enum="GradientTexture2D.Repeat" default="0">
The gradient repeat type, one of the [enum Repeat] values. The texture is filled starting from [member fill_from] to [member fill_to] offsets by default, but the gradient fill can be repeated to cover the entire texture.
</member>
+ <member name="resource_local_to_scene" type="bool" setter="set_local_to_scene" getter="is_local_to_scene" overrides="Resource" default="false" />
<member name="use_hdr" type="bool" setter="set_use_hdr" getter="is_using_hdr" default="false">
If [code]true[/code], the generated texture will support high dynamic range ([constant Image.FORMAT_RGBAF] format). This allows for glow effects to work if [member Environment.glow_enabled] is [code]true[/code]. If [code]false[/code], the generated texture will use low dynamic range; overbright colors will be clamped ([constant Image.FORMAT_RGBA8] format).
</member>
diff --git a/doc/classes/GraphEdit.xml b/doc/classes/GraphEdit.xml
index d257e990f7..5050ce7715 100644
--- a/doc/classes/GraphEdit.xml
+++ b/doc/classes/GraphEdit.xml
@@ -1,37 +1,38 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="GraphEdit" inherits="Control" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
- GraphEdit is an area capable of showing various GraphNodes. It manages connection events between them.
+ GraphEdit is a control responsible for displaying and manipulating graph-like data using [GraphNode]s. It provides access to creation, removal, connection, and disconnection of nodes.
</brief_description>
<description>
- GraphEdit manages the showing of GraphNodes it contains, as well as connections and disconnections between them. Signals are sent for each of these two events. Disconnection between GraphNode slots is disabled by default.
- It is greatly advised to enable low-processor usage mode (see [member OS.low_processor_usage_mode]) when using GraphEdits.
+ GraphEdit provides tools for creation, manipulation, and display of various graphs. Its main purpose in the engine is to power the visual programming systems, such as visual shaders, but it is also available for use in user projects.
+ GraphEdit by itself is only an empty container, representing an infinite grid where [GraphNode]s can be placed. Each [GraphNode] represent a node in the graph, a single unit of data in the connected scheme. GraphEdit, in turn, helps to control various interactions with nodes and between nodes. When the user attempts to connect, disconnect, or close a [GraphNode], a signal is emitted in the GraphEdit, but no action is taken by default. It is the responsibility of the programmer utilizing this control to implement the necessary logic to determine how each request should be handled.
+ [b]Performance:[/b] It is greatly advised to enable low-processor usage mode (see [member OS.low_processor_usage_mode]) when using GraphEdits.
</description>
<tutorials>
</tutorials>
<methods>
<method name="_get_connection_line" qualifiers="virtual const">
<return type="PackedVector2Array" />
- <param index="0" name="from" type="Vector2" />
- <param index="1" name="to" type="Vector2" />
+ <param index="0" name="from_position" type="Vector2" />
+ <param index="1" name="to_position" type="Vector2" />
<description>
Virtual method which can be overridden to customize how connections are drawn.
</description>
</method>
<method name="_is_in_input_hotzone" qualifiers="virtual">
<return type="bool" />
- <param index="0" name="graph_node" type="Object" />
- <param index="1" name="slot_index" type="int" />
+ <param index="0" name="in_node" type="Object" />
+ <param index="1" name="in_port" type="int" />
<param index="2" name="mouse_position" type="Vector2" />
<description>
- Returns whether the [code]mouse_position[/code] is in the input hot zone.
- By default, a hot zone is a [Rect2] positioned such that its center is at [code]graph_node[/code].[method GraphNode.get_connection_input_position]([code]slot_index[/code]) (For output's case, call [method GraphNode.get_connection_output_position] instead). The hot zone's width is twice the Theme Property [code]port_grab_distance_horizontal[/code], and its height is twice the [code]port_grab_distance_vertical[/code].
+ Returns whether the [param mouse_position] is in the input hot zone.
+ By default, a hot zone is a [Rect2] positioned such that its center is at [param in_node].[method GraphNode.get_connection_input_position]([param in_port]) (For output's case, call [method GraphNode.get_connection_output_position] instead). The hot zone's width is twice the Theme Property [code]port_grab_distance_horizontal[/code], and its height is twice the [code]port_grab_distance_vertical[/code].
Below is a sample code to help get started:
[codeblock]
- func _is_in_input_hotzone(graph_node, slot_index, mouse_position):
- var slot_size : Vector2 = Vector2(get_theme_constant("port_grab_distance_horizontal"), get_theme_constant("port_grab_distance_vertical"))
- var slot_pos : Vector2 = graph_node.get_position() + graph_node.get_connection_input_position(slot_index) - slot_size / 2
- var rect = Rect2(slot_pos, slot_size)
+ func _is_in_input_hotzone(in_node, in_port, mouse_position):
+ var port_size : Vector2 = Vector2(get_theme_constant("port_grab_distance_horizontal"), get_theme_constant("port_grab_distance_vertical"))
+ var port_pos : Vector2 = in_node.get_position() + in_node.get_connection_input_position(in_port) - port_size / 2
+ var rect = Rect2(port_pos, port_size)
return rect.has_point(mouse_position)
[/codeblock]
@@ -39,17 +40,17 @@
</method>
<method name="_is_in_output_hotzone" qualifiers="virtual">
<return type="bool" />
- <param index="0" name="graph_node" type="Object" />
- <param index="1" name="slot_index" type="int" />
+ <param index="0" name="in_node" type="Object" />
+ <param index="1" name="in_port" type="int" />
<param index="2" name="mouse_position" type="Vector2" />
<description>
- Returns whether the [code]mouse_position[/code] is in the output hot zone. For more information on hot zones, see [method _is_in_input_hotzone].
+ Returns whether the [param mouse_position] is in the output hot zone. For more information on hot zones, see [method _is_in_input_hotzone].
Below is a sample code to help get started:
[codeblock]
- func _is_in_output_hotzone(graph_node, slot_index, mouse_position):
- var slot_size : Vector2 = Vector2(get_theme_constant("port_grab_distance_horizontal"), get_theme_constant("port_grab_distance_vertical"))
- var slot_pos : Vector2 = graph_node.get_position() + graph_node.get_connection_output_position(slot_index) - slot_size / 2
- var rect = Rect2(slot_pos, slot_size)
+ func _is_in_output_hotzone(in_node, in_port, mouse_position):
+ var port_size : Vector2 = Vector2(get_theme_constant("port_grab_distance_horizontal"), get_theme_constant("port_grab_distance_vertical"))
+ var port_pos : Vector2 = in_node.get_position() + in_node.get_connection_output_position(in_port) - port_size / 2
+ var rect = Rect2(port_pos, port_size)
return rect.has_point(mouse_position)
[/codeblock]
@@ -57,17 +58,17 @@
</method>
<method name="_is_node_hover_valid" qualifiers="virtual">
<return type="bool" />
- <param index="0" name="from" type="StringName" />
- <param index="1" name="from_slot" type="int" />
- <param index="2" name="to" type="StringName" />
- <param index="3" name="to_slot" type="int" />
+ <param index="0" name="from_node" type="StringName" />
+ <param index="1" name="from_port" type="int" />
+ <param index="2" name="to_node" type="StringName" />
+ <param index="3" name="to_port" type="int" />
<description>
This virtual method can be used to insert additional error detection while the user is dragging a connection over a valid port.
Return [code]true[/code] if the connection is indeed valid or return [code]false[/code] if the connection is impossible. If the connection is impossible, no snapping to the port and thus no connection request to that port will happen.
In this example a connection to same node is suppressed:
[codeblocks]
[gdscript]
- func _is_node_hover_valid(from, from_slot, to, to_slot):
+ func _is_node_hover_valid(from, from_port, to, to_port):
return from != to
[/gdscript]
[csharp]
@@ -83,21 +84,22 @@
<param index="0" name="from_type" type="int" />
<param index="1" name="to_type" type="int" />
<description>
- Makes possible the connection between two different slot types. The type is defined with the [method GraphNode.set_slot] method.
+ Allows the connection between two different port types. The port type is defined individually for the left and the right port of each slot with the [method GraphNode.set_slot] method.
+ See also [method is_valid_connection_type] and [method remove_valid_connection_type].
</description>
</method>
<method name="add_valid_left_disconnect_type">
<return type="void" />
<param index="0" name="type" type="int" />
<description>
- Makes possible to disconnect nodes when dragging from the slot at the left if it has the specified type.
+ Allows to disconnect nodes when dragging from the left port of the [GraphNode]'s slot if it has the specified type. See also [method remove_valid_left_disconnect_type].
</description>
</method>
<method name="add_valid_right_disconnect_type">
<return type="void" />
<param index="0" name="type" type="int" />
<description>
- Makes possible to disconnect nodes when dragging from the slot at the right if it has the specified type.
+ Allows to disconnect nodes when dragging from the right port of the [GraphNode]'s slot if it has the specified type. See also [method remove_valid_right_disconnect_type].
</description>
</method>
<method name="arrange_nodes">
@@ -114,22 +116,22 @@
</method>
<method name="connect_node">
<return type="int" enum="Error" />
- <param index="0" name="from" type="StringName" />
+ <param index="0" name="from_node" type="StringName" />
<param index="1" name="from_port" type="int" />
- <param index="2" name="to" type="StringName" />
+ <param index="2" name="to_node" type="StringName" />
<param index="3" name="to_port" type="int" />
<description>
- Create a connection between the [code]from_port[/code] slot of the [code]from[/code] GraphNode and the [code]to_port[/code] slot of the [code]to[/code] GraphNode. If the connection already exists, no connection is created.
+ Create a connection between the [param from_port] of the [param from_node] [GraphNode] and the [param to_port] of the [param to_node] [GraphNode]. If the connection already exists, no connection is created.
</description>
</method>
<method name="disconnect_node">
<return type="void" />
- <param index="0" name="from" type="StringName" />
+ <param index="0" name="from_node" type="StringName" />
<param index="1" name="from_port" type="int" />
- <param index="2" name="to" type="StringName" />
+ <param index="2" name="to_node" type="StringName" />
<param index="3" name="to_port" type="int" />
<description>
- Removes the connection between the [code]from_port[/code] slot of the [code]from[/code] GraphNode and the [code]to_port[/code] slot of the [code]to[/code] GraphNode. If the connection does not exist, no connection is removed.
+ Removes the connection between the [param from_port] of the [param from_node] [GraphNode] and the [param to_port] of the [param to_node] [GraphNode]. If the connection does not exist, no connection is removed.
</description>
</method>
<method name="force_connection_drag_end">
@@ -142,14 +144,14 @@
</method>
<method name="get_connection_line">
<return type="PackedVector2Array" />
- <param index="0" name="from" type="Vector2" />
- <param index="1" name="to" type="Vector2" />
+ <param index="0" name="from_node" type="Vector2" />
+ <param index="1" name="to_node" type="Vector2" />
<description>
- Returns the points which would make up a connection between [code]from[/code] and [code]to[/code].
+ Returns the points which would make up a connection between [param from_node] and [param to_node].
</description>
</method>
<method name="get_connection_list" qualifiers="const">
- <return type="Array" />
+ <return type="Dictionary[]" />
<description>
Returns an Array containing the list of connections. A connection consists in a structure of the form [code]{ from_port: 0, from: "GraphNode name 0", to_port: 1, to: "GraphNode name 1" }[/code].
</description>
@@ -163,12 +165,12 @@
</method>
<method name="is_node_connected">
<return type="bool" />
- <param index="0" name="from" type="StringName" />
+ <param index="0" name="from_node" type="StringName" />
<param index="1" name="from_port" type="int" />
- <param index="2" name="to" type="StringName" />
+ <param index="2" name="to_node" type="StringName" />
<param index="3" name="to_port" type="int" />
<description>
- Returns [code]true[/code] if the [code]from_port[/code] slot of the [code]from[/code] GraphNode is connected to the [code]to_port[/code] slot of the [code]to[/code] GraphNode.
+ Returns [code]true[/code] if the [param from_port] of the [param from_node] [GraphNode] is connected to the [param to_port] of the [param to_node] [GraphNode].
</description>
</method>
<method name="is_valid_connection_type" qualifiers="const">
@@ -176,7 +178,8 @@
<param index="0" name="from_type" type="int" />
<param index="1" name="to_type" type="int" />
<description>
- Returns whether it's possible to connect slots of the specified types.
+ Returns whether it's possible to make a connection between two different port types. The port type is defined individually for the left and the right port of each slot with the [method GraphNode.set_slot] method.
+ See also [method add_valid_connection_type] and [method remove_valid_connection_type].
</description>
</method>
<method name="remove_valid_connection_type">
@@ -184,43 +187,47 @@
<param index="0" name="from_type" type="int" />
<param index="1" name="to_type" type="int" />
<description>
- Makes it not possible to connect between two different slot types. The type is defined with the [method GraphNode.set_slot] method.
+ Disallows the connection between two different port types previously allowed by [method add_valid_connection_type]. The port type is defined individually for the left and the right port of each slot with the [method GraphNode.set_slot] method.
+ See also [method is_valid_connection_type].
</description>
</method>
<method name="remove_valid_left_disconnect_type">
<return type="void" />
<param index="0" name="type" type="int" />
<description>
- Removes the possibility to disconnect nodes when dragging from the slot at the left if it has the specified type.
+ Disallows to disconnect nodes when dragging from the left port of the [GraphNode]'s slot if it has the specified type. Use this to disable disconnection previously allowed with [method add_valid_left_disconnect_type].
</description>
</method>
<method name="remove_valid_right_disconnect_type">
<return type="void" />
<param index="0" name="type" type="int" />
<description>
- Removes the possibility to disconnect nodes when dragging from the slot at the right if it has the specified type.
+ Disallows to disconnect nodes when dragging from the right port of the [GraphNode]'s slot if it has the specified type. Use this to disable disconnection previously allowed with [method add_valid_right_disconnect_type].
</description>
</method>
<method name="set_connection_activity">
<return type="void" />
- <param index="0" name="from" type="StringName" />
+ <param index="0" name="from_node" type="StringName" />
<param index="1" name="from_port" type="int" />
- <param index="2" name="to" type="StringName" />
+ <param index="2" name="to_node" type="StringName" />
<param index="3" name="to_port" type="int" />
<param index="4" name="amount" type="float" />
<description>
- Sets the coloration of the connection between [code]from[/code]'s [code]from_port[/code] and [code]to[/code]'s [code]to_port[/code] with the color provided in the [theme_item activity] theme property.
+ Sets the coloration of the connection between [param from_node]'s [param from_port] and [param to_node]'s [param to_port] with the color provided in the [theme_item activity] theme property.
</description>
</method>
<method name="set_selected">
<return type="void" />
<param index="0" name="node" type="Node" />
<description>
- Sets the specified [code]node[/code] as the one selected.
+ Sets the specified [param node] as the one selected.
</description>
</method>
</methods>
<members>
+ <member name="arrange_nodes_button_hidden" type="bool" setter="set_arrange_nodes_button_hidden" getter="is_arrange_nodes_button_hidden" default="false">
+ If [code]true[/code], the Arrange Nodes button is hidden.
+ </member>
<member name="clip_contents" type="bool" setter="set_clip_contents" getter="is_clipping_contents" overrides="Control" default="true" />
<member name="connection_lines_antialiased" type="bool" setter="set_connection_lines_antialiased" getter="is_connection_lines_antialiased" default="true">
If [code]true[/code], the lines between nodes will use antialiasing.
@@ -284,36 +291,36 @@
</description>
</signal>
<signal name="connection_drag_started">
- <param index="0" name="from" type="String" />
- <param index="1" name="slot" type="String" />
+ <param index="0" name="from_node" type="String" />
+ <param index="1" name="from_port" type="int" />
<param index="2" name="is_output" type="bool" />
<description>
Emitted at the beginning of a connection drag.
</description>
</signal>
<signal name="connection_from_empty">
- <param index="0" name="to" type="StringName" />
- <param index="1" name="to_slot" type="int" />
+ <param index="0" name="to_node" type="StringName" />
+ <param index="1" name="to_port" type="int" />
<param index="2" name="release_position" type="Vector2" />
<description>
- Emitted when user dragging connection from input port into empty space of the graph.
+ Emitted when user drags a connection from an input port into the empty space of the graph.
</description>
</signal>
<signal name="connection_request">
- <param index="0" name="from" type="StringName" />
- <param index="1" name="from_slot" type="int" />
- <param index="2" name="to" type="StringName" />
- <param index="3" name="to_slot" type="int" />
+ <param index="0" name="from_node" type="StringName" />
+ <param index="1" name="from_port" type="int" />
+ <param index="2" name="to_node" type="StringName" />
+ <param index="3" name="to_port" type="int" />
<description>
- Emitted to the GraphEdit when the connection between the [code]from_slot[/code] slot of the [code]from[/code] GraphNode and the [code]to_slot[/code] slot of the [code]to[/code] GraphNode is attempted to be created.
+ Emitted to the GraphEdit when the connection between the [param from_port] of the [param from_node] [GraphNode] and the [param to_port] of the [param to_node] [GraphNode] is attempted to be created.
</description>
</signal>
<signal name="connection_to_empty">
- <param index="0" name="from" type="StringName" />
- <param index="1" name="from_slot" type="int" />
+ <param index="0" name="from_node" type="StringName" />
+ <param index="1" name="from_port" type="int" />
<param index="2" name="release_position" type="Vector2" />
<description>
- Emitted when user dragging connection from output port into empty space of the graph.
+ Emitted when user drags a connection from an output port into the empty space of the graph.
</description>
</signal>
<signal name="copy_nodes_request">
@@ -328,12 +335,12 @@
</description>
</signal>
<signal name="disconnection_request">
- <param index="0" name="from" type="StringName" />
- <param index="1" name="from_slot" type="int" />
- <param index="2" name="to" type="StringName" />
- <param index="3" name="to_slot" type="int" />
+ <param index="0" name="from_node" type="StringName" />
+ <param index="1" name="from_port" type="int" />
+ <param index="2" name="to_node" type="StringName" />
+ <param index="3" name="to_port" type="int" />
<description>
- Emitted to the GraphEdit when the connection between [code]from_slot[/code] slot of [code]from[/code] GraphNode and [code]to_slot[/code] slot of [code]to[/code] GraphNode is attempted to be removed.
+ Emitted to the GraphEdit when the connection between [param from_port] of [param from_node] [GraphNode] and [param to_port] of [param to_node] [GraphNode] is attempted to be removed.
</description>
</signal>
<signal name="duplicate_nodes_request">
@@ -365,7 +372,7 @@
<signal name="popup_request">
<param index="0" name="position" type="Vector2" />
<description>
- Emitted when a popup is requested. Happens on right-clicking in the GraphEdit. [code]position[/code] is the position of the mouse pointer when the signal is sent.
+ Emitted when a popup is requested. Happens on right-clicking in the GraphEdit. [param position] is the position of the mouse pointer when the signal is sent.
</description>
</signal>
<signal name="scroll_offset_changed">
diff --git a/doc/classes/GraphNode.xml b/doc/classes/GraphNode.xml
index ac14d5d2a8..16386ff81b 100644
--- a/doc/classes/GraphNode.xml
+++ b/doc/classes/GraphNode.xml
@@ -1,12 +1,13 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="GraphNode" inherits="Container" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
- A GraphNode is a container with potentially several input and output slots allowing connections between GraphNodes. Slots can have different, incompatible types.
+ GraphNode is a [Container] control that represents a single data unit in a [GraphEdit] graph. You can customize the number, type, and color of left- and right-side connection ports.
</brief_description>
<description>
- A GraphNode is a container. Each GraphNode can have several input and output slots, sometimes referred to as ports, allowing connections between GraphNodes. To add a slot to GraphNode, add any [Control]-derived child node to it.
- After adding at least one child to GraphNode new sections will be automatically created in the Inspector called 'Slot'. When 'Slot' is expanded you will see list with index number for each slot. You can click on each of them to expand further.
- In the Inspector you can enable (show) or disable (hide) slots. By default, all slots are disabled so you may not see any slots on your GraphNode initially. You can assign a type to each slot. Only slots of the same type will be able to connect to each other. You can also assign colors to slots. A tuple of input and output slots is defined for each GUI element included in the GraphNode. Input connections are on the left and output connections are on the right side of GraphNode. Only enabled slots are counted as connections.
+ GraphNode allows to create nodes for a [GraphEdit] graph with customizable content based on its child [Control]s. GraphNode is a [Container] and is responsible for placing its children on screen. This works similar to [VBoxContainer]. Children, in turn, provide GraphNode with so-called slots, each of which can have a connection port on either side. This is similar to how [TabContainer] uses children to create the tabs.
+ Each GraphNode slot is defined by its index and can provide the node with up to two ports: one on the left, and one on the right. By convention the left port is also referred to as the input port and the right port is referred to as the output port. Each port can be enabled and configured individually, using different type and color. The type is an arbitrary value that you can define using your own considerations. The parent [GraphEdit] will receive this information on each connect and disconnect request.
+ Slots can be configured in the Inspector dock once you add at least one child [Control]. The properties are grouped by each slot's index in the "Slot" section.
+ [b]Note:[/b] While GraphNode is set up using slots and slot indices, connections are made between the ports which are enabled. Because of that [GraphEdit] uses port's index and not slot's index. You can use [method get_connection_input_slot] and [method get_connection_output_slot] to get the slot index from the port index.
</description>
<tutorials>
</tutorials>
@@ -19,16 +20,16 @@
</method>
<method name="clear_slot">
<return type="void" />
- <param index="0" name="idx" type="int" />
+ <param index="0" name="slot_index" type="int" />
<description>
- Disables input and output slot whose index is [code]idx[/code].
+ Disables input and output slot whose index is [param slot_index].
</description>
</method>
<method name="get_connection_input_color">
<return type="Color" />
- <param index="0" name="idx" type="int" />
+ <param index="0" name="port" type="int" />
<description>
- Returns the [Color] of the input connection [code]idx[/code].
+ Returns the [Color] of the input connection [param port].
</description>
</method>
<method name="get_connection_input_count">
@@ -39,30 +40,37 @@
</method>
<method name="get_connection_input_height">
<return type="int" />
- <param index="0" name="idx" type="int" />
+ <param index="0" name="port" type="int" />
<description>
- Returns the height of the input connection [code]idx[/code].
+ Returns the height of the input connection [param port].
</description>
</method>
<method name="get_connection_input_position">
<return type="Vector2" />
- <param index="0" name="idx" type="int" />
+ <param index="0" name="port" type="int" />
<description>
- Returns the position of the input connection [code]idx[/code].
+ Returns the position of the input connection [param port].
+ </description>
+ </method>
+ <method name="get_connection_input_slot">
+ <return type="int" />
+ <param index="0" name="port" type="int" />
+ <description>
+ Returns the corresponding slot index of the input connection [param port].
</description>
</method>
<method name="get_connection_input_type">
<return type="int" />
- <param index="0" name="idx" type="int" />
+ <param index="0" name="port" type="int" />
<description>
- Returns the type of the input connection [code]idx[/code].
+ Returns the type of the input connection [param port].
</description>
</method>
<method name="get_connection_output_color">
<return type="Color" />
- <param index="0" name="idx" type="int" />
+ <param index="0" name="port" type="int" />
<description>
- Returns the [Color] of the output connection [code]idx[/code].
+ Returns the [Color] of the output connection [param port].
</description>
</method>
<method name="get_connection_output_count">
@@ -73,150 +81,157 @@
</method>
<method name="get_connection_output_height">
<return type="int" />
- <param index="0" name="idx" type="int" />
+ <param index="0" name="port" type="int" />
<description>
- Returns the height of the output connection [code]idx[/code].
+ Returns the height of the output connection [param port].
</description>
</method>
<method name="get_connection_output_position">
<return type="Vector2" />
- <param index="0" name="idx" type="int" />
+ <param index="0" name="port" type="int" />
+ <description>
+ Returns the position of the output connection [param port].
+ </description>
+ </method>
+ <method name="get_connection_output_slot">
+ <return type="int" />
+ <param index="0" name="port" type="int" />
<description>
- Returns the position of the output connection [code]idx[/code].
+ Returns the corresponding slot index of the output connection [param port].
</description>
</method>
<method name="get_connection_output_type">
<return type="int" />
- <param index="0" name="idx" type="int" />
+ <param index="0" name="port" type="int" />
<description>
- Returns the type of the output connection [code]idx[/code].
+ Returns the type of the output connection [param port].
</description>
</method>
<method name="get_slot_color_left" qualifiers="const">
<return type="Color" />
- <param index="0" name="idx" type="int" />
+ <param index="0" name="slot_index" type="int" />
<description>
- Returns the left (input) [Color] of the slot [code]idx[/code].
+ Returns the left (input) [Color] of the slot [param slot_index].
</description>
</method>
<method name="get_slot_color_right" qualifiers="const">
<return type="Color" />
- <param index="0" name="idx" type="int" />
+ <param index="0" name="slot_index" type="int" />
<description>
- Returns the right (output) [Color] of the slot [code]idx[/code].
+ Returns the right (output) [Color] of the slot [param slot_index].
</description>
</method>
<method name="get_slot_type_left" qualifiers="const">
<return type="int" />
- <param index="0" name="idx" type="int" />
+ <param index="0" name="slot_index" type="int" />
<description>
- Returns the left (input) type of the slot [code]idx[/code].
+ Returns the left (input) type of the slot [param slot_index].
</description>
</method>
<method name="get_slot_type_right" qualifiers="const">
<return type="int" />
- <param index="0" name="idx" type="int" />
+ <param index="0" name="slot_index" type="int" />
<description>
- Returns the right (output) type of the slot [code]idx[/code].
+ Returns the right (output) type of the slot [param slot_index].
</description>
</method>
<method name="is_slot_draw_stylebox" qualifiers="const">
<return type="bool" />
- <param index="0" name="idx" type="int" />
+ <param index="0" name="slot_index" type="int" />
<description>
- Returns true if the background [StyleBox] of the slot [code]idx[/code] is drawn.
+ Returns true if the background [StyleBox] of the slot [param slot_index] is drawn.
</description>
</method>
<method name="is_slot_enabled_left" qualifiers="const">
<return type="bool" />
- <param index="0" name="idx" type="int" />
+ <param index="0" name="slot_index" type="int" />
<description>
- Returns [code]true[/code] if left (input) side of the slot [code]idx[/code] is enabled.
+ Returns [code]true[/code] if left (input) side of the slot [param slot_index] is enabled.
</description>
</method>
<method name="is_slot_enabled_right" qualifiers="const">
<return type="bool" />
- <param index="0" name="idx" type="int" />
+ <param index="0" name="slot_index" type="int" />
<description>
- Returns [code]true[/code] if right (output) side of the slot [code]idx[/code] is enabled.
+ Returns [code]true[/code] if right (output) side of the slot [param slot_index] is enabled.
</description>
</method>
<method name="set_slot">
<return type="void" />
- <param index="0" name="idx" type="int" />
- <param index="1" name="enable_left" type="bool" />
+ <param index="0" name="slot_index" type="int" />
+ <param index="1" name="enable_left_port" type="bool" />
<param index="2" name="type_left" type="int" />
<param index="3" name="color_left" type="Color" />
- <param index="4" name="enable_right" type="bool" />
+ <param index="4" name="enable_right_port" type="bool" />
<param index="5" name="type_right" type="int" />
<param index="6" name="color_right" type="Color" />
- <param index="7" name="custom_left" type="Texture2D" default="null" />
- <param index="8" name="custom_right" type="Texture2D" default="null" />
- <param index="9" name="enable" type="bool" default="true" />
- <description>
- Sets properties of the slot with ID [code]idx[/code].
- If [code]enable_left[/code]/[code]right[/code], a port will appear and the slot will be able to be connected from this side.
- [code]type_left[/code]/[code]right[/code] is an arbitrary type of the port. Only ports with the same type values can be connected.
- [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.
+ <param index="7" name="custom_icon_left" type="Texture2D" default="null" />
+ <param index="8" name="custom_icon_right" type="Texture2D" default="null" />
+ <param index="9" name="draw_stylebox" type="bool" default="true" />
+ <description>
+ Sets properties of the slot with the [param slot_index] index.
+ If [param enable_left_port]/[param enable_right_port] is [code]true[/code], a port will appear and the slot will be able to be connected from this side.
+ With [param type_left]/[param type_right] an arbitrary type can be assigned to each port. Two ports can be connected if they share the same type, or if the connection between their types is allowed in the parent [GraphEdit] (see [method GraphEdit.add_valid_connection_type]). Keep in mind that the [GraphEdit] has the final say in accepting the connection. Type compatibility simply allows the [signal GraphEdit.connection_request] signal to be emitted.
+ Ports can be further customized using [param color_left]/[param color_right] and [param custom_icon_left]/[param custom_icon_right]. The color parameter adds a tint to the icon. The custom icon can be used to override the default port dot.
+ Additionally, [param draw_stylebox] can be used to enable or disable drawing of the background stylebox for each slot. See [theme_item slot].
+ Individual properties can also be set using one of the [code]set_slot_*[/code] methods.
+ [b]Note:[/b] This method only sets properties of the slot. To create the slot itself, add a [Control]-derived child to the GraphNode.
</description>
</method>
<method name="set_slot_color_left">
<return type="void" />
- <param index="0" name="idx" type="int" />
- <param index="1" name="color_left" type="Color" />
+ <param index="0" name="slot_index" type="int" />
+ <param index="1" name="color" type="Color" />
<description>
- Sets the [Color] of the left (input) side of the slot [code]idx[/code] to [code]color_left[/code].
+ Sets the [Color] of the left (input) side of the slot [param slot_index] to [param color].
</description>
</method>
<method name="set_slot_color_right">
<return type="void" />
- <param index="0" name="idx" type="int" />
- <param index="1" name="color_right" type="Color" />
+ <param index="0" name="slot_index" type="int" />
+ <param index="1" name="color" type="Color" />
<description>
- Sets the [Color] of the right (output) side of the slot [code]idx[/code] to [code]color_right[/code].
+ Sets the [Color] of the right (output) side of the slot [param slot_index] to [param color].
</description>
</method>
<method name="set_slot_draw_stylebox">
<return type="void" />
- <param index="0" name="idx" type="int" />
- <param index="1" name="draw_stylebox" type="bool" />
+ <param index="0" name="slot_index" type="int" />
+ <param index="1" name="enable" type="bool" />
<description>
- Toggles the background [StyleBox] of the slot [code]idx[/code].
+ Toggles the background [StyleBox] of the slot [param slot_index].
</description>
</method>
<method name="set_slot_enabled_left">
<return type="void" />
- <param index="0" name="idx" type="int" />
- <param index="1" name="enable_left" type="bool" />
+ <param index="0" name="slot_index" type="int" />
+ <param index="1" name="enable" type="bool" />
<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.
+ Toggles the left (input) side of the slot [param slot_index]. If [param enable] 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" />
- <param index="0" name="idx" type="int" />
- <param index="1" name="enable_right" type="bool" />
+ <param index="0" name="slot_index" type="int" />
+ <param index="1" name="enable" type="bool" />
<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.
+ Toggles the right (output) side of the slot [param slot_index]. If [param enable] 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" />
- <param index="0" name="idx" type="int" />
- <param index="1" name="type_left" type="int" />
+ <param index="0" name="slot_index" type="int" />
+ <param index="1" name="type" type="int" />
<description>
- Sets the left (input) type of the slot [code]idx[/code] to [code]type_left[/code].
+ Sets the left (input) type of the slot [param slot_index] to [param type]. If the value is negative, all connections will be disallowed to be created via user inputs.
</description>
</method>
<method name="set_slot_type_right">
<return type="void" />
- <param index="0" name="idx" type="int" />
- <param index="1" name="type_right" type="int" />
+ <param index="0" name="slot_index" type="int" />
+ <param index="1" name="type" type="int" />
<description>
- Sets the right (output) type of the slot [code]idx[/code] to [code]type_right[/code].
+ Sets the right (output) type of the slot [param slot_index] to [param type]. If the value is negative, all connections will be disallowed to be created via user inputs.
</description>
</method>
</methods>
@@ -224,6 +239,9 @@
<member name="comment" type="bool" setter="set_comment" getter="is_comment" default="false">
If [code]true[/code], the GraphNode is a comment node.
</member>
+ <member name="draggable" type="bool" setter="set_draggable" getter="is_draggable" default="true">
+ If [code]true[/code], the user can drag the GraphNode.
+ </member>
<member name="language" type="String" setter="set_language" getter="get_language" default="&quot;&quot;">
Language code used for line-breaking and text shaping algorithms, if left empty current locale is used instead.
</member>
@@ -239,6 +257,9 @@
If [code]true[/code], the user can resize the GraphNode.
[b]Note:[/b] Dragging the handle will only emit the [signal resize_request] signal, the GraphNode needs to be resized manually.
</member>
+ <member name="selectable" type="bool" setter="set_selectable" getter="is_selectable" default="true">
+ If [code]true[/code], the user can select the GraphNode.
+ </member>
<member name="selected" type="bool" setter="set_selected" getter="is_selected" default="false">
If [code]true[/code], the GraphNode is selected.
</member>
@@ -259,6 +280,11 @@
Emitted when the GraphNode is requested to be closed. Happens on clicking the close button (see [member show_close]).
</description>
</signal>
+ <signal name="deselected">
+ <description>
+ Emitted when the GraphNode is deselected.
+ </description>
+ </signal>
<signal name="dragged">
<param index="0" name="from" type="Vector2" />
<param index="1" name="to" type="Vector2" />
@@ -282,6 +308,11 @@
Emitted when the GraphNode is requested to be resized. Happens on dragging the resizer handle (see [member resizable]).
</description>
</signal>
+ <signal name="selected">
+ <description>
+ Emitted when the GraphNode is selected.
+ </description>
+ </signal>
<signal name="slot_updated">
<param index="0" name="idx" type="int" />
<description>
@@ -321,6 +352,9 @@
<theme_item name="separation" data_type="constant" type="int" default="2">
The vertical distance between ports.
</theme_item>
+ <theme_item name="title_h_offset" data_type="constant" type="int" default="0">
+ Horizontal offset of the title text.
+ </theme_item>
<theme_item name="title_offset" data_type="constant" type="int" default="26">
Vertical offset of the title text.
</theme_item>
diff --git a/doc/classes/HMACContext.xml b/doc/classes/HMACContext.xml
index d033738e52..706ee30963 100644
--- a/doc/classes/HMACContext.xml
+++ b/doc/classes/HMACContext.xml
@@ -32,22 +32,22 @@
public class CryptoNode : Node
{
private HMACContext ctx = new HMACContext();
+
public override void _Ready()
{
- PackedByteArray key = String("supersecret").to_utf8();
- Error err = ctx.Start(HashingContext.HASH_SHA256, key);
- GD.Assert(err == OK);
- PackedByteArray msg1 = String("this is ").to_utf8();
- PackedByteArray msg2 = String("super duper secret").to_utf8();
+ byte[] key = "supersecret".ToUTF8();
+ Error err = ctx.Start(HashingContext.HashType.Sha256, key);
+ Debug.Assert(err == Error.Ok);
+ byte[] msg1 = "this is ".ToUTF8();
+ byte[] msg2 = "super duper secret".ToUTF8();
err = ctx.Update(msg1);
- GD.Assert(err == OK);
+ Debug.Assert(err == Error.Ok);
err = ctx.Update(msg2);
- GD.Assert(err == OK);
- PackedByteArray hmac = ctx.Finish();
+ Debug.Assert(err == Error.Ok);
+ byte[] hmac = ctx.Finish();
GD.Print(hmac.HexEncode());
}
}
-
[/csharp]
[/codeblocks]
</description>
@@ -72,7 +72,7 @@
<return type="int" enum="Error" />
<param index="0" name="data" type="PackedByteArray" />
<description>
- Updates the message to be HMACed. This can be called multiple times before [method finish] is called to append [code]data[/code] to the message, but cannot be called until [method start] has been called.
+ Updates the message to be HMACed. This can be called multiple times before [method finish] is called to append [param data] to the message, but cannot be called until [method start] has been called.
</description>
</method>
</methods>
diff --git a/doc/classes/HSlider.xml b/doc/classes/HSlider.xml
index 60208eee0f..cb0a8b34db 100644
--- a/doc/classes/HSlider.xml
+++ b/doc/classes/HSlider.xml
@@ -10,6 +10,9 @@
<tutorials>
</tutorials>
<theme_items>
+ <theme_item name="grabber_offset" data_type="constant" type="int" default="0">
+ Vertical offset of the grabber.
+ </theme_item>
<theme_item name="grabber" data_type="icon" type="Texture2D">
The texture for the grabber (the draggable element).
</theme_item>
diff --git a/doc/classes/HSplitContainer.xml b/doc/classes/HSplitContainer.xml
index 8137e26b8c..13915bd762 100644
--- a/doc/classes/HSplitContainer.xml
+++ b/doc/classes/HSplitContainer.xml
@@ -13,6 +13,9 @@
<theme_item name="autohide" data_type="constant" type="int" default="1">
Boolean value. If 1 ([code]true[/code]), the grabber will hide automatically when it isn't under the cursor. If 0 ([code]false[/code]), it's always visible.
</theme_item>
+ <theme_item name="minimum_grab_thickness" data_type="constant" type="int" default="6">
+ The minimum thickness of the area users can click on to grab the splitting line. If [theme_item separation] or [theme_item grabber]'s thickness are too small, this ensure that the splitting line can still be dragged.
+ </theme_item>
<theme_item name="separation" data_type="constant" type="int" default="12">
The space between sides of the container.
</theme_item>
diff --git a/doc/classes/HTTPClient.xml b/doc/classes/HTTPClient.xml
index 645f328be0..b3ed38d250 100644
--- a/doc/classes/HTTPClient.xml
+++ b/doc/classes/HTTPClient.xml
@@ -7,17 +7,17 @@
Hyper-text transfer protocol client (sometimes called "User Agent"). Used to make HTTP requests to download web content, upload files and other data or to communicate with various services, among other use cases.
See the [HTTPRequest] node for a higher-level alternative.
[b]Note:[/b] This client only needs to connect to a host once (see [method connect_to_host]) to send multiple requests. Because of this, methods that take URLs usually take just the part after the host instead of the full URL, as the client is already connected to a host. See [method request] for a full example and to get started.
- A [HTTPClient] should be reused between multiple requests or to connect to different hosts instead of creating one client per request. Supports SSL and SSL server certificate verification. HTTP status codes in the 2xx range indicate success, 3xx redirection (i.e. "try again, but over here"), 4xx something was wrong with the request, and 5xx something went wrong on the server's side.
+ A [HTTPClient] should be reused between multiple requests or to connect to different hosts instead of creating one client per request. Supports Transport Layer Security (TLS), including server certificate verification. HTTP status codes in the 2xx range indicate success, 3xx redirection (i.e. "try again, but over here"), 4xx something was wrong with the request, and 5xx something went wrong on the server's side.
For more information on HTTP, see https://developer.mozilla.org/en-US/docs/Web/HTTP (or read RFC 2616 to get it straight from the source: https://tools.ietf.org/html/rfc2616).
[b]Note:[/b] When exporting to Android, make sure to enable the [code]INTERNET[/code] permission in the Android export preset before exporting the project or using one-click deploy. Otherwise, network communication of any kind will be blocked by Android.
- [b]Note:[/b] It's recommended to use transport encryption (SSL/TLS) and to avoid sending sensitive information (such as login credentials) in HTTP GET URL parameters. Consider using HTTP POST requests or HTTP headers for such information instead.
- [b]Note:[/b] When performing HTTP requests from a project exported to HTML5, keep in mind the remote server may not allow requests from foreign origins due to [url=https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS]CORS[/url]. If you host the server in question, you should modify its backend to allow requests from foreign origins by adding the [code]Access-Control-Allow-Origin: *[/code] HTTP header.
- [b]Note:[/b] SSL/TLS support is currently limited to TLS 1.0, TLS 1.1, and TLS 1.2. Attempting to connect to a TLS 1.3-only server will return an error.
- [b]Warning:[/b] SSL/TLS certificate revocation and certificate pinning are currently not supported. Revoked certificates are accepted as long as they are otherwise valid. If this is a concern, you may want to use automatically managed certificates with a short validity period.
+ [b]Note:[/b] It's recommended to use transport encryption (TLS) and to avoid sending sensitive information (such as login credentials) in HTTP GET URL parameters. Consider using HTTP POST requests or HTTP headers for such information instead.
+ [b]Note:[/b] When performing HTTP requests from a project exported to Web, keep in mind the remote server may not allow requests from foreign origins due to [url=https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS]CORS[/url]. If you host the server in question, you should modify its backend to allow requests from foreign origins by adding the [code]Access-Control-Allow-Origin: *[/code] HTTP header.
+ [b]Note:[/b] TLS support is currently limited to TLS 1.0, TLS 1.1, and TLS 1.2. Attempting to connect to a TLS 1.3-only server will return an error.
+ [b]Warning:[/b] TLS certificate revocation and certificate pinning are currently not supported. Revoked certificates are accepted as long as they are otherwise valid. If this is a concern, you may want to use automatically managed certificates with a short validity period.
</description>
<tutorials>
<link title="HTTP client class">$DOCS_URL/tutorials/networking/http_client_class.html</link>
- <link title="SSL certificates">$DOCS_URL/tutorials/networking/ssl_certificates.html</link>
+ <link title="TLS certificates">$DOCS_URL/tutorials/networking/ssl_certificates.html</link>
</tutorials>
<methods>
<method name="close">
@@ -30,13 +30,13 @@
<return type="int" enum="Error" />
<param index="0" name="host" type="String" />
<param index="1" name="port" type="int" default="-1" />
- <param index="2" name="use_ssl" type="bool" default="false" />
+ <param index="2" name="use_tls" type="bool" default="false" />
<param index="3" name="verify_host" type="bool" default="true" />
<description>
Connects to a host. This needs to be done before any requests are sent.
The host should not have http:// prepended but will strip the protocol identifier if provided.
- If no [code]port[/code] is specified (or [code]-1[/code] is used), it is automatically set to 80 for HTTP and 443 for HTTPS (if [code]use_ssl[/code] is enabled).
- [code]verify_host[/code] will check the SSL identity of the host if set to [code]true[/code].
+ If no [param port] is specified (or [code]-1[/code] is used), it is automatically set to 80 for HTTP and 443 for HTTPS (if [param use_tls] is enabled).
+ [param verify_host] will check the TLS identity of the host if set to [code]true[/code].
</description>
</method>
<method name="get_response_body_length" qualifiers="const">
@@ -158,7 +158,7 @@
var result = new HTTPClient().Request(HTTPClient.Method.Post, "index.php", headers, queryString);
[/csharp]
[/codeblocks]
- [b]Note:[/b] The [code]request_data[/code] parameter is ignored if [code]method[/code] is [constant HTTPClient.METHOD_GET]. This is because GET methods can't contain request data. As a workaround, you can pass request data as a query string in the URL. See [method String.uri_encode] for an example.
+ [b]Note:[/b] The [param body] parameter is ignored if [param method] is [constant HTTPClient.METHOD_GET]. This is because GET methods can't contain request data. As a workaround, you can pass request data as a query string in the URL. See [method String.uri_encode] for an example.
</description>
</method>
<method name="request_raw">
@@ -180,7 +180,7 @@
<param index="1" name="port" type="int" />
<description>
Sets the proxy server for HTTP requests.
- The proxy server is unset if [code]host[/code] is empty or [code]port[/code] is -1.
+ The proxy server is unset if [param host] is empty or [param port] is -1.
</description>
</method>
<method name="set_https_proxy">
@@ -189,7 +189,7 @@
<param index="1" name="port" type="int" />
<description>
Sets the proxy server for HTTPS requests.
- The proxy server is unset if [code]host[/code] is empty or [code]port[/code] is -1.
+ The proxy server is unset if [param host] is empty or [param port] is -1.
</description>
</method>
</methods>
@@ -262,8 +262,8 @@
<constant name="STATUS_CONNECTION_ERROR" value="8" enum="Status">
Status: Error in HTTP connection.
</constant>
- <constant name="STATUS_SSL_HANDSHAKE_ERROR" value="9" enum="Status">
- Status: Error in SSL handshake.
+ <constant name="STATUS_TLS_HANDSHAKE_ERROR" value="9" enum="Status">
+ Status: Error in TLS handshake.
</constant>
<constant name="RESPONSE_CONTINUE" value="100" enum="ResponseCode">
HTTP status code [code]100 Continue[/code]. Interim response that indicates everything so far is OK and that the client should continue with the request (or ignore this status if already finished).
diff --git a/doc/classes/HTTPRequest.xml b/doc/classes/HTTPRequest.xml
index 2307cf149d..c504e26d58 100644
--- a/doc/classes/HTTPRequest.xml
+++ b/doc/classes/HTTPRequest.xml
@@ -6,7 +6,7 @@
<description>
A node with the ability to send HTTP requests. Uses [HTTPClient] internally.
Can be used to make HTTP requests, i.e. download or upload files or web content via HTTP.
- [b]Warning:[/b] See the notes and warnings on [HTTPClient] for limitations, especially regarding SSL security.
+ [b]Warning:[/b] See the notes and warnings on [HTTPClient] for limitations, especially regarding TLS security.
[b]Note:[/b] When exporting to Android, make sure to enable the [code]INTERNET[/code] permission in the Android export preset before exporting the project or using one-click deploy. Otherwise, network communication of any kind will be blocked by Android.
[b]Example of contacting a REST API and printing one of its returned fields:[/b]
[codeblocks]
@@ -30,7 +30,6 @@
if error != OK:
push_error("An error occurred in the HTTP request.")
-
# Called when the HTTP request is completed.
func _http_request_completed(result, response_code, headers, body):
var json = JSON.new()
@@ -95,7 +94,6 @@
if error != OK:
push_error("An error occurred in the HTTP request.")
-
# Called when the HTTP request is completed.
func _http_request_completed(result, response_code, headers, body):
if result != HTTPRequest.RESULT_SUCCESS:
@@ -157,7 +155,7 @@
</description>
<tutorials>
<link title="Making HTTP requests">$DOCS_URL/tutorials/networking/http_request_class.html</link>
- <link title="SSL certificates">$DOCS_URL/tutorials/networking/ssl_certificates.html</link>
+ <link title="TLS certificates">$DOCS_URL/tutorials/networking/ssl_certificates.html</link>
</tutorials>
<methods>
<method name="cancel_request">
@@ -176,7 +174,7 @@
<method name="get_downloaded_bytes" qualifiers="const">
<return type="int" />
<description>
- Returns the amount of bytes this HTTPRequest downloaded.
+ Returns the number of bytes this HTTPRequest downloaded.
</description>
</method>
<method name="get_http_client_status" qualifiers="const">
@@ -189,21 +187,21 @@
<return type="int" enum="Error" />
<param index="0" name="url" type="String" />
<param index="1" name="custom_headers" type="PackedStringArray" default="PackedStringArray()" />
- <param index="2" name="ssl_validate_domain" type="bool" default="true" />
+ <param index="2" name="tls_validate_domain" type="bool" default="true" />
<param index="3" name="method" type="int" enum="HTTPClient.Method" default="0" />
<param index="4" name="request_data" type="String" default="&quot;&quot;" />
<description>
Creates request on the underlying [HTTPClient]. If there is no configuration errors, it tries to connect using [method HTTPClient.connect_to_host] and passes parameters onto [method HTTPClient.request].
Returns [constant OK] if request is successfully created. (Does not imply that the server has responded), [constant ERR_UNCONFIGURED] if not in the tree, [constant ERR_BUSY] if still processing previous request, [constant ERR_INVALID_PARAMETER] if given string is not a valid URL format, or [constant ERR_CANT_CONNECT] if not using thread and the [HTTPClient] cannot connect to host.
- [b]Note:[/b] When [code]method[/code] is [constant HTTPClient.METHOD_GET], the payload sent via [code]request_data[/code] might be ignored by the server or even cause the server to reject the request (check [url=https://datatracker.ietf.org/doc/html/rfc7231#section-4.3.1]RFC 7231 section 4.3.1[/url] for more details). As a workaround, you can send data as a query string in the URL (see [method String.uri_encode] for an example).
- [b]Note:[/b] It's recommended to use transport encryption (SSL/TLS) and to avoid sending sensitive information (such as login credentials) in HTTP GET URL parameters. Consider using HTTP POST requests or HTTP headers for such information instead.
+ [b]Note:[/b] When [param method] is [constant HTTPClient.METHOD_GET], the payload sent via [param request_data] might be ignored by the server or even cause the server to reject the request (check [url=https://datatracker.ietf.org/doc/html/rfc7231#section-4.3.1]RFC 7231 section 4.3.1[/url] for more details). As a workaround, you can send data as a query string in the URL (see [method String.uri_encode] for an example).
+ [b]Note:[/b] It's recommended to use transport encryption (TLS) and to avoid sending sensitive information (such as login credentials) in HTTP GET URL parameters. Consider using HTTP POST requests or HTTP headers for such information instead.
</description>
</method>
<method name="request_raw">
<return type="int" enum="Error" />
<param index="0" name="url" type="String" />
<param index="1" name="custom_headers" type="PackedStringArray" default="PackedStringArray()" />
- <param index="2" name="ssl_validate_domain" type="bool" default="true" />
+ <param index="2" name="tls_validate_domain" type="bool" default="true" />
<param index="3" name="method" type="int" enum="HTTPClient.Method" default="0" />
<param index="4" name="request_data_raw" type="PackedByteArray" default="PackedByteArray()" />
<description>
@@ -217,7 +215,7 @@
<param index="1" name="port" type="int" />
<description>
Sets the proxy server for HTTP requests.
- The proxy server is unset if [code]host[/code] is empty or [code]port[/code] is -1.
+ The proxy server is unset if [param host] is empty or [param port] is -1.
</description>
</method>
<method name="set_https_proxy">
@@ -226,7 +224,7 @@
<param index="1" name="port" type="int" />
<description>
Sets the proxy server for HTTPS requests.
- The proxy server is unset if [code]host[/code] is empty or [code]port[/code] is -1.
+ The proxy server is unset if [param host] is empty or [param port] is -1.
</description>
</method>
</methods>
@@ -283,8 +281,8 @@
<constant name="RESULT_CONNECTION_ERROR" value="4" enum="Result">
Request failed due to connection (read/write) error.
</constant>
- <constant name="RESULT_SSL_HANDSHAKE_ERROR" value="5" enum="Result">
- Request failed on SSL handshake.
+ <constant name="RESULT_TLS_HANDSHAKE_ERROR" value="5" enum="Result">
+ Request failed on TLS handshake.
</constant>
<constant name="RESULT_NO_RESPONSE" value="6" enum="Result">
Request does not have a response (yet).
diff --git a/doc/classes/HashingContext.xml b/doc/classes/HashingContext.xml
index ea973043db..6e3092e618 100644
--- a/doc/classes/HashingContext.xml
+++ b/doc/classes/HashingContext.xml
@@ -71,14 +71,14 @@
<return type="int" enum="Error" />
<param index="0" name="type" type="int" enum="HashingContext.HashType" />
<description>
- Starts a new hash computation of the given [code]type[/code] (e.g. [constant HASH_SHA256] to start computation of a SHA-256).
+ Starts a new hash computation of the given [param type] (e.g. [constant HASH_SHA256] to start computation of a SHA-256).
</description>
</method>
<method name="update">
<return type="int" enum="Error" />
<param index="0" name="chunk" type="PackedByteArray" />
<description>
- Updates the computation with the given [code]chunk[/code] of data.
+ Updates the computation with the given [param chunk] of data.
</description>
</method>
</methods>
diff --git a/doc/classes/HingeJoint3D.xml b/doc/classes/HingeJoint3D.xml
index d2547434e7..99524795f9 100644
--- a/doc/classes/HingeJoint3D.xml
+++ b/doc/classes/HingeJoint3D.xml
@@ -47,7 +47,7 @@
<member name="angular_limit/enable" type="bool" setter="set_flag" getter="get_flag" default="false">
If [code]true[/code], the hinges maximum and minimum rotation, defined by [member angular_limit/lower] and [member angular_limit/upper] has effects.
</member>
- <member name="angular_limit/lower" type="float" setter="_set_lower_limit" getter="_get_lower_limit" default="-90.0">
+ <member name="angular_limit/lower" type="float" setter="set_param" getter="get_param" default="-1.5708">
The minimum rotation. Only active if [member angular_limit/enable] is [code]true[/code].
</member>
<member name="angular_limit/relaxation" type="float" setter="set_param" getter="get_param" default="1.0">
@@ -55,7 +55,7 @@
</member>
<member name="angular_limit/softness" type="float" setter="set_param" getter="get_param" default="0.9">
</member>
- <member name="angular_limit/upper" type="float" setter="_set_upper_limit" getter="_get_upper_limit" default="90.0">
+ <member name="angular_limit/upper" type="float" setter="set_param" getter="get_param" default="1.5708">
The maximum rotation. Only active if [member angular_limit/enable] is [code]true[/code].
</member>
<member name="motor/enable" type="bool" setter="set_flag" getter="get_flag" default="false">
diff --git a/doc/classes/IP.xml b/doc/classes/IP.xml
index 63de1f8081..1e5e6da513 100644
--- a/doc/classes/IP.xml
+++ b/doc/classes/IP.xml
@@ -13,24 +13,24 @@
<return type="void" />
<param index="0" name="hostname" type="String" default="&quot;&quot;" />
<description>
- Removes all of a [code]hostname[/code]'s cached references. If no [code]hostname[/code] is given, all cached IP addresses are removed.
+ Removes all of a [param hostname]'s cached references. If no [param hostname] is given, all cached IP addresses are removed.
</description>
</method>
<method name="erase_resolve_item">
<return type="void" />
<param index="0" name="id" type="int" />
<description>
- Removes a given item [code]id[/code] from the queue. This should be used to free a queue after it has completed to enable more queries to happen.
+ Removes a given item [param id] from the queue. This should be used to free a queue after it has completed to enable more queries to happen.
</description>
</method>
<method name="get_local_addresses" qualifiers="const">
- <return type="Array" />
+ <return type="PackedStringArray" />
<description>
Returns all the user's current IPv4 and IPv6 addresses as an array.
</description>
</method>
<method name="get_local_interfaces" qualifiers="const">
- <return type="Array" />
+ <return type="Dictionary[]" />
<description>
Returns all network adapters as an array.
Each adapter is a dictionary of the form:
@@ -48,7 +48,7 @@
<return type="String" />
<param index="0" name="id" type="int" />
<description>
- 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]).
+ Returns a queued hostname's IP address, given its queue [param id]. 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">
@@ -62,7 +62,7 @@
<return type="int" enum="IP.ResolverStatus" />
<param index="0" name="id" type="int" />
<description>
- Returns a queued hostname's status as a [enum ResolverStatus] constant, given its queue [code]id[/code].
+ Returns a queued hostname's status as a [enum ResolverStatus] constant, given its queue [param id].
</description>
</method>
<method name="resolve_hostname">
@@ -70,15 +70,15 @@
<param index="0" name="host" type="String" />
<param index="1" name="ip_type" type="int" enum="IP.Type" default="3" />
<description>
- 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].
+ 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 [param ip_type].
</description>
</method>
<method name="resolve_hostname_addresses">
- <return type="Array" />
+ <return type="PackedStringArray" />
<param index="0" name="host" type="String" />
<param index="1" name="ip_type" type="int" enum="IP.Type" default="3" />
<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].
+ Resolves a given hostname in a blocking way. Addresses are returned as an [Array] of IPv4 or IPv6 addresses depending on [param ip_type].
</description>
</method>
<method name="resolve_hostname_queue_item">
@@ -86,7 +86,7 @@
<param index="0" name="host" type="String" />
<param index="1" name="ip_type" type="int" enum="IP.Type" default="3" />
<description>
- Creates a queue item to resolve a hostname to an IPv4 or IPv6 address depending on the [enum Type] constant given as [code]ip_type[/code]. Returns the queue ID if successful, or [constant RESOLVER_INVALID_ID] on error.
+ Creates a queue item to resolve a hostname to an IPv4 or IPv6 address depending on the [enum Type] constant given as [param ip_type]. Returns the queue ID if successful, or [constant RESOLVER_INVALID_ID] on error.
</description>
</method>
</methods>
diff --git a/doc/classes/Image.xml b/doc/classes/Image.xml
index 94fb8fbb19..be66b8a7b9 100644
--- a/doc/classes/Image.xml
+++ b/doc/classes/Image.xml
@@ -26,7 +26,7 @@
<param index="1" name="src_rect" type="Rect2i" />
<param index="2" name="dst" type="Vector2i" />
<description>
- Alpha-blends [code]src_rect[/code] from [code]src[/code] image to this image at coordinates [code]dest[/code], clipped accordingly to both image bounds. This image and [code]src[/code] image [b]must[/b] have the same format. [code]src_rect[/code] with not positive size is treated as empty.
+ Alpha-blends [param src_rect] from [param src] image to this image at coordinates [param dst], clipped accordingly to both image bounds. This image and [param src] image [b]must[/b] have the same format. [param src_rect] with non-positive size is treated as empty.
</description>
</method>
<method name="blend_rect_mask">
@@ -36,7 +36,7 @@
<param index="2" name="src_rect" type="Rect2i" />
<param index="3" name="dst" type="Vector2i" />
<description>
- Alpha-blends [code]src_rect[/code] from [code]src[/code] image to this image using [code]mask[/code] image at coordinates [code]dst[/code], clipped accordingly to both image bounds. Alpha channels are required for both [code]src[/code] and [code]mask[/code]. [code]dst[/code] pixels and [code]src[/code] pixels will blend if the corresponding mask pixel's alpha value is not 0. This image and [code]src[/code] image [b]must[/b] have the same format. [code]src[/code] image and [code]mask[/code] image [b]must[/b] have the same size (width and height) but they can have different formats. [code]src_rect[/code] with not positive size is treated as empty.
+ Alpha-blends [param src_rect] from [param src] image to this image using [param mask] image at coordinates [param dst], clipped accordingly to both image bounds. Alpha channels are required for both [param src] and [param mask]. [param dst] pixels and [param src] pixels will blend if the corresponding mask pixel's alpha value is not 0. This image and [param src] image [b]must[/b] have the same format. [param src] image and [param mask] image [b]must[/b] have the same size (width and height) but they can have different formats. [param src_rect] with non-positive size is treated as empty.
</description>
</method>
<method name="blit_rect">
@@ -45,7 +45,7 @@
<param index="1" name="src_rect" type="Rect2i" />
<param index="2" name="dst" type="Vector2i" />
<description>
- Copies [code]src_rect[/code] from [code]src[/code] image to this image at coordinates [code]dst[/code], clipped accordingly to both image bounds. This image and [code]src[/code] image [b]must[/b] have the same format. [code]src_rect[/code] with not positive size is treated as empty.
+ Copies [param src_rect] from [param src] image to this image at coordinates [param dst], clipped accordingly to both image bounds. This image and [param src] image [b]must[/b] have the same format. [param src_rect] with non-positive size is treated as empty.
</description>
</method>
<method name="blit_rect_mask">
@@ -55,7 +55,7 @@
<param index="2" name="src_rect" type="Rect2i" />
<param index="3" name="dst" type="Vector2i" />
<description>
- Blits [code]src_rect[/code] area from [code]src[/code] image to this image at the coordinates given by [code]dst[/code], clipped accordingly to both image bounds. [code]src[/code] pixel is copied onto [code]dst[/code] if the corresponding [code]mask[/code] pixel's alpha value is not 0. This image and [code]src[/code] image [b]must[/b] have the same format. [code]src[/code] image and [code]mask[/code] image [b]must[/b] have the same size (width and height) but they can have different formats. [code]src_rect[/code] with not positive size is treated as empty.
+ Blits [param src_rect] area from [param src] image to this image at the coordinates given by [param dst], clipped accordingly to both image bounds. [param src] pixel is copied onto [param dst] if the corresponding [param mask] pixel's alpha value is not 0. This image and [param src] image [b]must[/b] have the same format. [param src] image and [param mask] image [b]must[/b] have the same size (width and height) but they can have different formats. [param src_rect] with non-positive size is treated as empty.
</description>
</method>
<method name="bump_map_to_normal_map">
@@ -108,28 +108,28 @@
<return type="void" />
<param index="0" name="src" type="Image" />
<description>
- Copies [code]src[/code] image to this image.
+ Copies [param src] image to this image.
</description>
</method>
- <method name="create">
- <return type="void" />
+ <method name="create" qualifiers="static">
+ <return type="Image" />
<param index="0" name="width" type="int" />
<param index="1" name="height" type="int" />
<param index="2" name="use_mipmaps" type="bool" />
<param index="3" name="format" type="int" enum="Image.Format" />
<description>
- Creates an empty image of given size and format. See [enum Format] constants. If [code]use_mipmaps[/code] is [code]true[/code] then generate mipmaps for this image. See the [method generate_mipmaps].
+ Creates an empty image of given size and format. See [enum Format] constants. If [param use_mipmaps] is [code]true[/code], then generate mipmaps for this image. See the [method generate_mipmaps].
</description>
</method>
- <method name="create_from_data">
- <return type="void" />
+ <method name="create_from_data" qualifiers="static">
+ <return type="Image" />
<param index="0" name="width" type="int" />
<param index="1" name="height" type="int" />
<param index="2" name="use_mipmaps" type="bool" />
<param index="3" name="format" type="int" enum="Image.Format" />
<param index="4" name="data" type="PackedByteArray" />
<description>
- Creates a new image of given size and format. See [enum Format] constants. Fills the image with the given raw data. If [code]use_mipmaps[/code] is [code]true[/code] then loads mipmaps for this image from [code]data[/code]. See [method generate_mipmaps].
+ Creates a new image of given size and format. See [enum Format] constants. Fills the image with the given raw data. If [param use_mipmaps] is [code]true[/code] then loads mipmaps for this image from [param data]. See [method generate_mipmaps].
</description>
</method>
<method name="crop">
@@ -137,7 +137,7 @@
<param index="0" name="width" type="int" />
<param index="1" name="height" type="int" />
<description>
- Crops the image to the given [code]width[/code] and [code]height[/code]. If the specified size is larger than the current size, the extra area is filled with black pixels.
+ Crops the image to the given [param width] and [param height]. If the specified size is larger than the current size, the extra area is filled with black pixels.
</description>
</method>
<method name="decompress">
@@ -163,7 +163,7 @@
<return type="void" />
<param index="0" name="color" type="Color" />
<description>
- Fills the image with [code]color[/code].
+ Fills the image with [param color].
</description>
</method>
<method name="fill_rect">
@@ -171,7 +171,7 @@
<param index="0" name="rect" type="Rect2i" />
<param index="1" name="color" type="Color" />
<description>
- Fills [code]rect[/code] with [code]color[/code].
+ Fills [param rect] with [param color].
</description>
</method>
<method name="fix_alpha_edges">
@@ -197,7 +197,6 @@
<param index="0" name="renormalize" type="bool" default="false" />
<description>
Generates mipmaps for the image. Mipmaps are precalculated lower-resolution copies of the image that are automatically used if the image needs to be scaled down when rendered. They help improve image quality and performance when rendering. This method returns an error if the image is compressed, in a custom format, or if the image's width/height is [code]0[/code].
- [b]Note:[/b] Mipmap generation is done on the CPU, is single-threaded and is [i]always[/i] done on the main thread. This means generating mipmaps will result in noticeable stuttering during gameplay, even if [method generate_mipmaps] is called from a [Thread].
</description>
</method>
<method name="get_data" qualifiers="const">
@@ -222,7 +221,7 @@
<return type="int" />
<param index="0" name="mipmap" type="int" />
<description>
- Returns the offset where the image's mipmap with index [code]mipmap[/code] is stored in the [code]data[/code] dictionary.
+ Returns the offset where the image's mipmap with index [param mipmap] is stored in the [code]data[/code] dictionary.
</description>
</method>
<method name="get_pixel" qualifiers="const">
@@ -238,15 +237,15 @@
<return type="Color" />
<param index="0" name="point" type="Vector2i" />
<description>
- Returns the color of the pixel at [code]point[/code].
+ Returns the color of the pixel at [param point].
This is the same as [method get_pixel], but with a [Vector2i] argument instead of two integer arguments.
</description>
</method>
- <method name="get_rect" qualifiers="const">
+ <method name="get_region" qualifiers="const">
<return type="Image" />
- <param index="0" name="rect" type="Rect2i" />
+ <param index="0" name="region" type="Rect2i" />
<description>
- Returns a new image that is a copy of the image's area specified with [code]rect[/code].
+ Returns a new [Image] that is a copy of this [Image]'s area specified with [param region].
</description>
</method>
<method name="get_size" qualifiers="const">
@@ -295,7 +294,7 @@
<return type="int" enum="Error" />
<param index="0" name="path" type="String" />
<description>
- Loads an image from file [code]path[/code]. See [url=$DOCS_URL/tutorials/assets_pipeline/importing_images.html#supported-image-formats]Supported image formats[/url] for a list of supported image formats and limitations.
+ Loads an image from file [param path]. See [url=$DOCS_URL/tutorials/assets_pipeline/importing_images.html#supported-image-formats]Supported image formats[/url] for a list of supported image formats and limitations.
[b]Warning:[/b] This method should only be used in the editor or in cases when you need to load external images at run-time, such as images located at the [code]user://[/code] directory, and may not work in exported projects.
See also [ImageTexture] description for usage examples.
</description>
@@ -361,7 +360,7 @@
<param index="1" name="height" type="int" />
<param index="2" name="interpolation" type="int" enum="Image.Interpolation" default="1" />
<description>
- Resizes the image to the given [code]width[/code] and [code]height[/code]. New pixels are calculated using the [code]interpolation[/code] mode defined via [enum Interpolation] constants.
+ Resizes the image to the given [param width] and [param height]. New pixels are calculated using the [param interpolation] mode defined via [enum Interpolation] constants.
</description>
</method>
<method name="resize_to_po2">
@@ -369,7 +368,7 @@
<param index="0" name="square" type="bool" default="false" />
<param index="1" name="interpolation" type="int" enum="Image.Interpolation" default="1" />
<description>
- Resizes the image to the nearest power of 2 for the width and height. If [code]square[/code] is [code]true[/code] then set width and height to be the same. New pixels are calculated using the [code]interpolation[/code] mode defined via [enum Interpolation] constants.
+ Resizes the image to the nearest power of 2 for the width and height. If [param square] is [code]true[/code] then set width and height to be the same. New pixels are calculated using the [param interpolation] mode defined via [enum Interpolation] constants.
</description>
</method>
<method name="rgbe_to_srgb">
@@ -388,7 +387,7 @@
<return type="void" />
<param index="0" name="direction" type="int" enum="ClockDirection" />
<description>
- Rotates the image in the specified [code]direction[/code] by [code]90[/code] degrees. The width and height of the image must be greater than [code]1[/code]. If the width and height are not equal, the image will be resized.
+ Rotates the image in the specified [param direction] by [code]90[/code] degrees. The width and height of the image must be greater than [code]1[/code]. If the width and height are not equal, the image will be resized.
</description>
</method>
<method name="save_exr" qualifiers="const">
@@ -396,7 +395,7 @@
<param index="0" name="path" type="String" />
<param index="1" name="grayscale" type="bool" default="false" />
<description>
- Saves the image as an EXR file to [code]path[/code]. If [code]grayscale[/code] is [code]true[/code] and the image has only one channel, it will be saved explicitly as monochrome rather than one red channel. This function will return [constant ERR_UNAVAILABLE] if Godot was compiled without the TinyEXR module.
+ Saves the image as an EXR file to [param path]. If [param grayscale] is [code]true[/code] and the image has only one channel, it will be saved explicitly as monochrome rather than one red channel. This function will return [constant ERR_UNAVAILABLE] if Godot was compiled without the TinyEXR module.
[b]Note:[/b] The TinyEXR module is disabled in non-editor builds, which means [method save_exr] will return [constant ERR_UNAVAILABLE] when it is called from an exported project.
</description>
</method>
@@ -404,7 +403,7 @@
<return type="PackedByteArray" />
<param index="0" name="grayscale" type="bool" default="false" />
<description>
- Saves the image as an EXR file to a byte array. If [code]grayscale[/code] is [code]true[/code] and the image has only one channel, it will be saved explicitly as monochrome rather than one red channel. This function will return an empty byte array if Godot was compiled without the TinyEXR module.
+ Saves the image as an EXR file to a byte array. If [param grayscale] is [code]true[/code] and the image has only one channel, it will be saved explicitly as monochrome rather than one red channel. This function will return an empty byte array if Godot was compiled without the TinyEXR module.
[b]Note:[/b] The TinyEXR module is disabled in non-editor builds, which means [method save_exr] will return an empty byte array when it is called from an exported project.
</description>
</method>
@@ -413,7 +412,7 @@
<param index="0" name="path" type="String" />
<param index="1" name="quality" type="float" default="0.75" />
<description>
- Saves the image as a JPEG file to [code]path[/code] with the specified [code]quality[/code] between [code]0.01[/code] and [code]1.0[/code] (inclusive). Higher [code]quality[/code] values result in better-looking output at the cost of larger file sizes. Recommended [code]quality[/code] values are between [code]0.75[/code] and [code]0.90[/code]. Even at quality [code]1.00[/code], JPEG compression remains lossy.
+ Saves the image as a JPEG file to [param path] with the specified [param quality] between [code]0.01[/code] and [code]1.0[/code] (inclusive). Higher [param quality] values result in better-looking output at the cost of larger file sizes. Recommended [param quality] values are between [code]0.75[/code] and [code]0.90[/code]. Even at quality [code]1.00[/code], JPEG compression remains lossy.
[b]Note:[/b] JPEG does not save an alpha channel. If the [Image] contains an alpha channel, the image will still be saved, but the resulting JPEG file won't contain the alpha channel.
</description>
</method>
@@ -421,7 +420,7 @@
<return type="PackedByteArray" />
<param index="0" name="quality" type="float" default="0.75" />
<description>
- Saves the image as a JPEG file to a byte array with the specified [code]quality[/code] between [code]0.01[/code] and [code]1.0[/code] (inclusive). Higher [code]quality[/code] values result in better-looking output at the cost of larger byte array sizes (and therefore memory usage). Recommended [code]quality[/code] values are between [code]0.75[/code] and [code]0.90[/code]. Even at quality [code]1.00[/code], JPEG compression remains lossy.
+ Saves the image as a JPEG file to a byte array with the specified [param quality] between [code]0.01[/code] and [code]1.0[/code] (inclusive). Higher [param quality] values result in better-looking output at the cost of larger byte array sizes (and therefore memory usage). Recommended [param quality] values are between [code]0.75[/code] and [code]0.90[/code]. Even at quality [code]1.00[/code], JPEG compression remains lossy.
[b]Note:[/b] JPEG does not save an alpha channel. If the [Image] contains an alpha channel, the image will still be saved, but the resulting byte array won't contain the alpha channel.
</description>
</method>
@@ -429,7 +428,7 @@
<return type="int" enum="Error" />
<param index="0" name="path" type="String" />
<description>
- Saves the image as a PNG file to the file at [code]path[/code].
+ Saves the image as a PNG file to the file at [param path].
</description>
</method>
<method name="save_png_to_buffer" qualifiers="const">
@@ -444,7 +443,7 @@
<param index="1" name="lossy" type="bool" default="false" />
<param index="2" name="quality" type="float" default="0.75" />
<description>
- Saves the image as a WebP (Web Picture) file to the file at [code]path[/code]. By default it will save lossless. If [code]lossy[/code] is true, the image will be saved lossy, using the [code]quality[/code] setting between 0.0 and 1.0 (inclusive).
+ Saves the image as a WebP (Web Picture) file to the file at [param path]. By default it will save lossless. If [param lossy] is true, the image will be saved lossy, using the [param quality] setting between 0.0 and 1.0 (inclusive).
</description>
</method>
<method name="save_webp_to_buffer" qualifiers="const">
@@ -452,7 +451,18 @@
<param index="0" name="lossy" type="bool" default="false" />
<param index="1" name="quality" type="float" default="0.75" />
<description>
- Saves the image as a WebP (Web Picture) file to a byte array. By default it will save lossless. If [code]lossy[/code] is true, the image will be saved lossy, using the [code]quality[/code] setting between 0.0 and 1.0 (inclusive).
+ Saves the image as a WebP (Web Picture) file to a byte array. By default it will save lossless. If [param lossy] is true, the image will be saved lossy, using the [param quality] setting between 0.0 and 1.0 (inclusive).
+ </description>
+ </method>
+ <method name="set_data">
+ <return type="void" />
+ <param index="0" name="width" type="int" />
+ <param index="1" name="height" type="int" />
+ <param index="2" name="use_mipmaps" type="bool" />
+ <param index="3" name="format" type="int" enum="Image.Format" />
+ <param index="4" name="data" type="PackedByteArray" />
+ <description>
+ Overwrites data of an existing [Image]. Non-static equivalent of [method create_from_data].
</description>
</method>
<method name="set_pixel">
@@ -461,7 +471,8 @@
<param index="1" name="y" type="int" />
<param index="2" name="color" type="Color" />
<description>
- Sets the [Color] of the pixel at [code](x, y)[/code] to [code]color[/code]. Example:
+ Sets the [Color] of the pixel at [code](x, y)[/code] to [param color].
+ [b]Example:[/b]
[codeblocks]
[gdscript]
var img_width = 10
@@ -488,7 +499,8 @@
<param index="0" name="point" type="Vector2i" />
<param index="1" name="color" type="Color" />
<description>
- Sets the [Color] of the pixel at [code]point[/code] to [code]color[/code]. Example:
+ Sets the [Color] of the pixel at [param point] to [param color].
+ [b]Example:[/b]
[codeblocks]
[gdscript]
var img_width = 10
diff --git a/doc/classes/ImageFormatLoader.xml b/doc/classes/ImageFormatLoader.xml
new file mode 100644
index 0000000000..c6b1ec922a
--- /dev/null
+++ b/doc/classes/ImageFormatLoader.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="ImageFormatLoader" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ Base class to add support for specific image formats.
+ </brief_description>
+ <description>
+ The engine supports multiple image formats out of the box (PNG, SVG, JPEG, WebP to name a few), but you can choose to implement support for additional image formats by extending [ImageFormatLoaderExtension].
+ </description>
+ <tutorials>
+ </tutorials>
+ <constants>
+ <constant name="FLAG_NONE" value="0" enum="LoaderFlags" is_bitfield="true">
+ </constant>
+ <constant name="FLAG_FORCE_LINEAR" value="1" enum="LoaderFlags" is_bitfield="true">
+ </constant>
+ <constant name="FLAG_CONVERT_COLORS" value="2" enum="LoaderFlags" is_bitfield="true">
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/ImageFormatLoaderExtension.xml b/doc/classes/ImageFormatLoaderExtension.xml
new file mode 100644
index 0000000000..9d18ee8b84
--- /dev/null
+++ b/doc/classes/ImageFormatLoaderExtension.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="ImageFormatLoaderExtension" inherits="ImageFormatLoader" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ Base class for creating [ImageFormatLoader] extensions (adding support for extra image formats).
+ </brief_description>
+ <description>
+ The engine supports multiple image formats out of the box (PNG, SVG, JPEG, WebP to name a few), but you can choose to implement support for additional image formats by extending this class.
+ Be sure to respect the documented return types and values. You should create an instance of it, and call [method add_format_loader] to register that loader during the initialization phase.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="_get_recognized_extensions" qualifiers="virtual const">
+ <return type="PackedStringArray" />
+ <description>
+ Returns the list of file extensions for this image format. Files with the given extensions will be treated as image file and loaded using this class.
+ </description>
+ </method>
+ <method name="_load_image" qualifiers="virtual">
+ <return type="int" enum="Error" />
+ <param index="0" name="image" type="Image" />
+ <param index="1" name="fileaccess" type="FileAccess" />
+ <param index="2" name="flags" type="int" enum="ImageFormatLoader.LoaderFlags" />
+ <param index="3" name="scale" type="float" />
+ <description>
+ Loads the content of [param fileaccess] into the provided [param image].
+ </description>
+ </method>
+ <method name="add_format_loader">
+ <return type="void" />
+ <description>
+ Add this format loader to the engine, allowing it to recognize the file extensions returned by [method _get_recognized_extensions].
+ </description>
+ </method>
+ <method name="remove_format_loader">
+ <return type="void" />
+ <description>
+ Remove this format loader from the engine.
+ </description>
+ </method>
+ </methods>
+</class>
diff --git a/doc/classes/ImageTexture.xml b/doc/classes/ImageTexture.xml
index c750b540a4..03d1947475 100644
--- a/doc/classes/ImageTexture.xml
+++ b/doc/classes/ImageTexture.xml
@@ -6,20 +6,20 @@
<description>
A [Texture2D] based on an [Image]. For an image to be displayed, an [ImageTexture] has to be created from it using the [method create_from_image] method:
[codeblock]
- var image = Image.load_from_file("res://icon.png")
+ var image = Image.load_from_file("res://icon.svg")
var texture = ImageTexture.create_from_image(image)
$Sprite2D.texture = texture
[/codeblock]
This way, textures can be created at run-time by loading images both from within the editor and externally.
[b]Warning:[/b] Prefer to load imported textures with [method @GDScript.load] over loading them from within the filesystem dynamically with [method Image.load], as it may not work in exported projects:
[codeblock]
- var texture = load("res://icon.png")
+ var texture = load("res://icon.svg")
$Sprite2D.texture = texture
[/codeblock]
This is because images have to be imported as a [CompressedTexture2D] first to be loaded with [method @GDScript.load]. If you'd still like to load an image file just like any other [Resource], import it as an [Image] resource instead, and then load it normally using the [method @GDScript.load] method.
[b]Note:[/b] The image can be retrieved from an imported texture using the [method Texture2D.get_image] method, which returns a copy of the image:
[codeblock]
- var texture = load("res://icon.png")
+ var texture = load("res://icon.svg")
var image : Image = texture.get_image()
[/codeblock]
An [ImageTexture] is not meant to be operated from within the editor interface directly, and is mostly useful for rendering images on screen dynamically via code. If you need to generate images procedurally from within the editor, consider saving and importing images as custom texture resources implementing a new [EditorImportPlugin].
@@ -67,4 +67,7 @@
</description>
</method>
</methods>
+ <members>
+ <member name="resource_local_to_scene" type="bool" setter="set_local_to_scene" getter="is_local_to_scene" overrides="Resource" default="false" />
+ </members>
</class>
diff --git a/doc/classes/ImageTexture3D.xml b/doc/classes/ImageTexture3D.xml
index 958c5f90f1..ee26a959aa 100644
--- a/doc/classes/ImageTexture3D.xml
+++ b/doc/classes/ImageTexture3D.xml
@@ -1,8 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="ImageTexture3D" inherits="Texture3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
+ Texture with 3 dimensions.
</brief_description>
<description>
+ [ImageTexture3D] is a 3-dimensional [ImageTexture] that has a width, height, and depth. See also [ImageTextureLayered].
+ 3D textures are typically used to store density maps for [FogMaterial], color correction LUTs for [Environment], vector fields for [GPUParticlesAttractorVectorField3D] and collision maps for [GPUParticlesCollisionSDF3D]. 3D textures can also be used in custom shaders.
</description>
<tutorials>
</tutorials>
@@ -16,12 +19,14 @@
<param index="4" name="use_mipmaps" type="bool" />
<param index="5" name="data" type="Image[]" />
<description>
+ Creates the [ImageTexture3D] with specified [param width], [param height], and [param depth]. See [enum Image.Format] for [param format] options. If [param use_mipmaps] is [code]true[/code], then generate mipmaps for the [ImageTexture3D].
</description>
</method>
<method name="update">
<return type="void" />
<param index="0" name="data" type="Image[]" />
<description>
+ Replaces the texture's existing data with the layers specified in [code]data[/code]. The size of [code]data[/code] must match the parameters that were used for [method create]. In other words, the texture cannot be resized or have its format changed by calling [method update].
</description>
</method>
</methods>
diff --git a/doc/classes/ImageTextureLayered.xml b/doc/classes/ImageTextureLayered.xml
index c0ad19ddd7..0aa1d65d5a 100644
--- a/doc/classes/ImageTextureLayered.xml
+++ b/doc/classes/ImageTextureLayered.xml
@@ -1,16 +1,20 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="ImageTextureLayered" inherits="TextureLayered" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
+ Base class for texture types which contain the data of multiple [ImageTexture]s. Each image is of the same size and format.
</brief_description>
<description>
+ Base class for [Texture2DArray], [Cubemap] and [CubemapArray]. Cannot be used directly, but contains all the functions necessary for accessing the derived resource types. See also [Texture3D].
</description>
<tutorials>
</tutorials>
<methods>
<method name="create_from_images">
<return type="int" enum="Error" />
- <param index="0" name="images" type="Array" />
+ <param index="0" name="images" type="Image[]" />
<description>
+ Creates an [ImageTextureLayered] from an array of [Image]s. See [method Image.create] for the expected data format. The first image decides the width, height, image format and mipmapping setting. The other images [i]must[/i] have the same width, height, image format and mipmapping setting.
+ Each [Image] represents one [code]layer[/code].
</description>
</method>
<method name="update_layer">
@@ -18,6 +22,10 @@
<param index="0" name="image" type="Image" />
<param index="1" name="layer" type="int" />
<description>
+ Replaces the existing [Image] data at the given [code]layer[/code] with this new image.
+ The given [Image] must have the same width, height, image format and mipmapping setting (a [code]bool[/code] value) as the rest of the referenced images.
+ If the image format is unsupported, it will be decompressed and converted to a similar and supported [enum Image.Format].
+ The update is immediate: it's synchronized with drawing.
</description>
</method>
</methods>
diff --git a/doc/classes/ImporterMesh.xml b/doc/classes/ImporterMesh.xml
index 8afa35d1b4..b80857a7bf 100644
--- a/doc/classes/ImporterMesh.xml
+++ b/doc/classes/ImporterMesh.xml
@@ -5,7 +5,6 @@
</brief_description>
<description>
ImporterMesh is a type of [Resource] analogous to [ArrayMesh]. It contains vertex array-based geometry, divided in [i]surfaces[/i]. Each surface contains a completely separate array and a material used to draw it. Design wise, a mesh with multiple surfaces is preferred to a single surface, because objects created in 3D editing software commonly contain multiple materials.
-
Unlike its runtime counterpart, [ImporterMesh] contains mesh data before various import steps, such as lod and shadow mesh generation, have taken place. Modify surface data by calling [method clear], followed by [method add_surface] for each surface.
</description>
<tutorials>
@@ -22,15 +21,15 @@
<return type="void" />
<param index="0" name="primitive" type="int" enum="Mesh.PrimitiveType" />
<param index="1" name="arrays" type="Array" />
- <param index="2" name="blend_shapes" type="Array" default="[]" />
+ <param index="2" name="blend_shapes" type="Array[]" default="[]" />
<param index="3" name="lods" type="Dictionary" default="{}" />
<param index="4" name="material" type="Material" default="null" />
<param index="5" name="name" type="String" default="&quot;&quot;" />
<param index="6" name="flags" type="int" default="0" />
<description>
Creates a new surface, analogous to [method ArrayMesh.add_surface_from_arrays].
- Surfaces are created to be rendered using a [code]primitive[/code], which may be any of the types defined in [enum Mesh.PrimitiveType]. (As a note, when using indices, it is recommended to only use points, lines, or triangles.) [method Mesh.get_surface_count] will become the [code]surf_idx[/code] for this new surface.
- The [code]arrays[/code] argument is an array of arrays. See [enum Mesh.ArrayType] for the values used in this array. For example, [code]arrays[0][/code] is the array of vertices. That first vertex sub-array is always required; the others are optional. Adding an index array puts this function into "index mode" where the vertex and other arrays become the sources of data and the index array defines the vertex order. All sub-arrays must have the same length as the vertex array (or be an exact multiple of the vertex array's length, when multiple elements of a sub-array correspond to a single vertex) or be empty, except for [constant Mesh.ARRAY_INDEX] if it is used.
+ Surfaces are created to be rendered using a [param primitive], 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 [param arrays] argument is an array of arrays. See [enum Mesh.ArrayType] for the values used in this array. For example, [code]arrays[0][/code] is the array of vertices. That first vertex sub-array is always required; the others are optional. Adding an index array puts this function into "index mode" where the vertex and other arrays become the sources of data and the index array defines the vertex order. All sub-arrays must have the same length as the vertex array (or be an exact multiple of the vertex array's length, when multiple elements of a sub-array correspond to a single vertex) or be empty, except for [constant Mesh.ARRAY_INDEX] if it is used.
</description>
</method>
<method name="clear">
@@ -43,10 +42,12 @@
<return type="void" />
<param index="0" name="normal_merge_angle" type="float" />
<param index="1" name="normal_split_angle" type="float" />
+ <param index="2" name="bone_transform_array" type="Array" />
<description>
Generates all lods for this ImporterMesh.
- [code]normal_merge_angle[/code] and [code]normal_split_angle[/code] are in degrees and used in the same way as the importer settings in [code]lods[/code]. As a good default, use 25 and 60 respectively.
+ [param normal_merge_angle] and [param normal_split_angle] are in degrees and used in the same way as the importer settings in [code]lods[/code]. As a good default, use 25 and 60 respectively.
The number of generated lods can be accessed using [method get_surface_lod_count], and each LOD is available in [method get_surface_lod_size] and [method get_surface_lod_indices].
+ [param bone_transform_array] is an [Array] which can be either empty or contain [Transform3D]s which, for each of the mesh's bone IDs, will apply mesh skinning when generating the LOD mesh variations. This is usually used to account for discrepancies in scale between the mesh itself and its skinning data.
</description>
</method>
<method name="get_blend_shape_count" qualifiers="const">
@@ -80,7 +81,7 @@
<description>
Returns the mesh data represented by this [ImporterMesh] as a usable [ArrayMesh].
This method caches the returned mesh, and subsequent calls will return the cached data until [method clear] is called.
- If not yet cached and [code]base_mesh[/code] is provided, [code]base_mesh[/code] will be used and mutated.
+ If not yet cached and [param base_mesh] is provided, [param base_mesh] will be used and mutated.
</description>
</method>
<method name="get_surface_arrays" qualifiers="const">
@@ -101,7 +102,7 @@
<method name="get_surface_count" qualifiers="const">
<return type="int" />
<description>
- Returns the amount of surfaces that the mesh holds.
+ Returns the number of surfaces that the mesh holds.
</description>
</method>
<method name="get_surface_format" qualifiers="const">
@@ -115,7 +116,7 @@
<return type="int" />
<param index="0" name="surface_idx" type="int" />
<description>
- Returns the amount of lods that the mesh holds on a given surface.
+ Returns the number of lods that the mesh holds on a given surface.
</description>
</method>
<method name="get_surface_lod_indices" qualifiers="const">
diff --git a/doc/classes/Input.xml b/doc/classes/Input.xml
index d4e2923610..d246e64251 100644
--- a/doc/classes/Input.xml
+++ b/doc/classes/Input.xml
@@ -58,7 +58,7 @@
<param index="1" name="exact_match" type="bool" default="false" />
<description>
Returns a value between 0 and 1 representing the raw intensity of the given action, ignoring the action's deadzone. In most cases, you should use [method get_action_strength] instead.
- If [code]exact_match[/code] is [code]false[/code], it ignores additional input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events.
+ If [param exact_match] is [code]false[/code], it ignores additional input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events.
</description>
</method>
<method name="get_action_strength" qualifiers="const">
@@ -67,7 +67,7 @@
<param index="1" name="exact_match" type="bool" default="false" />
<description>
Returns a value between 0 and 1 representing the intensity of the given action. In a joypad, for example, the further away the axis (analog sticks or L2, R2 triggers) is from the dead zone, the closer the value will be to 1. If the action is mapped to a control that has no axis as the keyboard, the value returned will be 0 or 1.
- If [code]exact_match[/code] is [code]false[/code], it ignores additional input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events.
+ If [param exact_match] is [code]false[/code], it ignores additional input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events.
</description>
</method>
<method name="get_axis" qualifiers="const">
@@ -157,7 +157,7 @@
<method name="get_mouse_button_mask" qualifiers="const">
<return type="int" enum="MouseButton" />
<description>
- Returns mouse buttons as a bitmask. If multiple mouse buttons are pressed at the same time, the bits are added together.
+ Returns mouse buttons as a bitmask. If multiple mouse buttons are pressed at the same time, the bits are added together. Equivalent to [method DisplayServer.mouse_get_button_state].
</description>
</method>
<method name="get_vector" qualifiers="const">
@@ -180,7 +180,7 @@
<description>
Returns [code]true[/code] when the user starts pressing the action event, meaning it's [code]true[/code] only on the frame that the user pressed down the button.
This is useful for code that needs to run only once when an action is pressed, instead of every frame while it's pressed.
- If [code]exact_match[/code] is [code]false[/code], it ignores additional input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events.
+ If [param exact_match] is [code]false[/code], it ignores additional input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events.
[b]Note:[/b] Due to keyboard ghosting, [method is_action_just_pressed] may return [code]false[/code] even if one of the action's keys is pressed. See [url=$DOCS_URL/tutorials/inputs/input_examples.html#keyboard-events]Input examples[/url] in the documentation for more information.
</description>
</method>
@@ -190,7 +190,7 @@
<param index="1" name="exact_match" type="bool" default="false" />
<description>
Returns [code]true[/code] when the user stops pressing the action event, meaning it's [code]true[/code] only on the frame that the user released the button.
- If [code]exact_match[/code] is [code]false[/code], it ignores additional input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events.
+ If [param exact_match] is [code]false[/code], it ignores additional input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events.
</description>
</method>
<method name="is_action_pressed" qualifiers="const">
@@ -199,7 +199,7 @@
<param index="1" name="exact_match" type="bool" default="false" />
<description>
Returns [code]true[/code] if you are pressing the action event. Note that if an action has multiple buttons assigned and more than one of them is pressed, releasing one button will release the action, even if some other button assigned to this action is still pressed.
- If [code]exact_match[/code] is [code]false[/code], it ignores additional input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events.
+ If [param exact_match] is [code]false[/code], it ignores additional input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events.
[b]Note:[/b] Due to keyboard ghosting, [method is_action_pressed] may return [code]false[/code] even if one of the action's keys is pressed. See [url=$DOCS_URL/tutorials/inputs/input_examples.html#keyboard-events]Input examples[/url] in the documentation for more information.
</description>
</method>
@@ -254,7 +254,7 @@
<param index="0" name="event" type="InputEvent" />
<description>
Feeds an [InputEvent] to the game. Can be used to artificially trigger input events from code. Also generates [method Node._input] calls.
- Example:
+ [b]Example:[/b]
[codeblocks]
[gdscript]
var cancel_event = InputEventAction.new()
@@ -293,8 +293,8 @@
<param index="2" name="hotspot" type="Vector2" default="Vector2(0, 0)" />
<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.
- [code]image[/code]'s size must be lower than 256×256.
- [code]hotspot[/code] must be within [code]image[/code]'s size.
+ [param image]'s size must be lower than 256×256.
+ [param hotspot] must be within [param image]'s size.
[b]Note:[/b] [AnimatedTexture]s aren't supported as custom mouse cursors. If using an [AnimatedTexture], only the first frame will be displayed.
[b]Note:[/b] Only images imported with the [b]Lossless[/b], [b]Lossy[/b] or [b]Uncompressed[/b] compression modes are supported. The [b]Video RAM[/b] compression mode can't be used for custom cursors.
</description>
@@ -339,7 +339,7 @@
<param index="2" name="strong_magnitude" type="float" />
<param index="3" name="duration" type="float" default="0" />
<description>
- Starts to vibrate the joypad. Joypads usually come with two rumble motors, a strong and a weak one. [code]weak_magnitude[/code] is the strength of the weak motor (between 0 and 1) and [code]strong_magnitude[/code] is the strength of the strong motor (between 0 and 1). [code]duration[/code] is the duration of the effect in seconds (a duration of 0 will try to play the vibration indefinitely).
+ Starts to vibrate the joypad. Joypads usually come with two rumble motors, a strong and a weak one. [param weak_magnitude] is the strength of the weak motor (between 0 and 1) and [param strong_magnitude] is the strength of the strong motor (between 0 and 1). [param duration] is the duration of the effect in seconds (a duration of 0 will try to play the vibration indefinitely).
[b]Note:[/b] Not every hardware is compatible with long effect durations; it is recommended to restart an effect if it has to be played for more than a few seconds.
</description>
</method>
@@ -355,7 +355,7 @@
<param index="0" name="duration_ms" type="int" default="500" />
<description>
Vibrate handheld devices.
- [b]Note:[/b] This method is implemented on Android, iOS, and HTML5.
+ [b]Note:[/b] This method is implemented on Android, iOS, and Web.
[b]Note:[/b] For Android, it requires enabling the [code]VIBRATE[/code] permission in the export preset.
[b]Note:[/b] For iOS, specifying the duration is supported in iOS 13 and later.
[b]Note:[/b] Some web browsers such as Safari and Firefox for Android do not support this method.
@@ -366,7 +366,7 @@
<param index="0" name="position" type="Vector2" />
<description>
Sets the mouse position to the specified vector, provided in pixels and relative to an origin at the upper left corner of the currently focused Window Manager game window.
- Mouse position is clipped to the limits of the screen resolution, or to the limits of the game window if [enum MouseMode] is set to [code]MOUSE_MODE_CONFINED[/code] or [code]MOUSE_MODE_CONFINED_HIDDEN[/code].
+ Mouse position is clipped to the limits of the screen resolution, or to the limits of the game window if [enum MouseMode] is set to [constant MOUSE_MODE_CONFINED] or [constant MOUSE_MODE_CONFINED_HIDDEN].
</description>
</method>
</methods>
diff --git a/doc/classes/InputEvent.xml b/doc/classes/InputEvent.xml
index 71e94cf1a2..043ccdca36 100644
--- a/doc/classes/InputEvent.xml
+++ b/doc/classes/InputEvent.xml
@@ -33,7 +33,7 @@
<param index="1" name="exact_match" type="bool" default="false" />
<description>
Returns a value between 0.0 and 1.0 depending on the given actions' state. Useful for getting the value of events of type [InputEventJoypadMotion].
- If [code]exact_match[/code] is [code]false[/code], it ignores additional input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events.
+ If [param exact_match] is [code]false[/code], it ignores additional input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events.
</description>
</method>
<method name="is_action" qualifiers="const">
@@ -42,7 +42,7 @@
<param index="1" name="exact_match" type="bool" default="false" />
<description>
Returns [code]true[/code] if this input event matches a pre-defined action of any type.
- If [code]exact_match[/code] is [code]false[/code], it ignores additional input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events.
+ If [param exact_match] is [code]false[/code], it ignores additional input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events.
</description>
</method>
<method name="is_action_pressed" qualifiers="const">
@@ -51,8 +51,8 @@
<param index="1" name="allow_echo" type="bool" default="false" />
<param index="2" name="exact_match" type="bool" default="false" />
<description>
- Returns [code]true[/code] if the given action is being pressed (and is not an echo event for [InputEventKey] events, unless [code]allow_echo[/code] is [code]true[/code]). Not relevant for events of type [InputEventMouseMotion] or [InputEventScreenDrag].
- If [code]exact_match[/code] is [code]false[/code], it ignores additional input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events.
+ Returns [code]true[/code] if the given action is being pressed (and is not an echo event for [InputEventKey] events, unless [param allow_echo] is [code]true[/code]). Not relevant for events of type [InputEventMouseMotion] or [InputEventScreenDrag].
+ If [param exact_match] is [code]false[/code], it ignores additional input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events.
[b]Note:[/b] Due to keyboard ghosting, [method is_action_pressed] may return [code]false[/code] even if one of the action's keys is pressed. See [url=$DOCS_URL/tutorials/inputs/input_examples.html#keyboard-events]Input examples[/url] in the documentation for more information.
</description>
</method>
@@ -62,7 +62,7 @@
<param index="1" name="exact_match" type="bool" default="false" />
<description>
Returns [code]true[/code] if the given action is released (i.e. not pressed). Not relevant for events of type [InputEventMouseMotion] or [InputEventScreenDrag].
- If [code]exact_match[/code] is [code]false[/code], it ignores additional input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events.
+ If [param exact_match] is [code]false[/code], it ignores additional input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events.
</description>
</method>
<method name="is_action_type" qualifiers="const">
@@ -82,8 +82,8 @@
<param index="0" name="event" type="InputEvent" />
<param index="1" name="exact_match" type="bool" default="true" />
<description>
- 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 additional input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events.
+ Returns [code]true[/code] if the specified [param event] matches this event. Only valid for action events i.e key ([InputEventKey]), button ([InputEventMouseButton] or [InputEventJoypadButton]), axis [InputEventJoypadMotion] or action ([InputEventAction]) events.
+ If [param exact_match] is [code]false[/code], it ignores additional input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events.
</description>
</method>
<method name="is_pressed" qualifiers="const">
@@ -98,7 +98,7 @@
<param index="0" name="xform" type="Transform2D" />
<param index="1" name="local_ofs" type="Vector2" default="Vector2(0, 0)" />
<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].
+ Returns a copy of the given input event which has been offset by [param local_ofs] and transformed by [param xform]. Relevant for events of type [InputEventMouseButton], [InputEventMouseMotion], [InputEventScreenTouch], [InputEventScreenDrag], [InputEventMagnifyGesture] and [InputEventPanGesture].
</description>
</method>
</methods>
diff --git a/doc/classes/InputEventMIDI.xml b/doc/classes/InputEventMIDI.xml
index 2af88149b6..67e7ced2e8 100644
--- a/doc/classes/InputEventMIDI.xml
+++ b/doc/classes/InputEventMIDI.xml
@@ -69,18 +69,18 @@
The MIDI channel of this input event. There are 16 channels, so this value ranges from 0 to 15. MIDI channel 9 is reserved for the use with percussion instruments, the rest of the channels are for non-percussion instruments.
</member>
<member name="controller_number" type="int" setter="set_controller_number" getter="get_controller_number" default="0">
- If the message is [code]MIDI_MESSAGE_CONTROL_CHANGE[/code], this indicates the controller number, otherwise this is zero. Controllers include devices such as pedals and levers.
+ If the message is [constant MIDI_MESSAGE_CONTROL_CHANGE], this indicates the controller number, otherwise this is zero. Controllers include devices such as pedals and levers.
</member>
<member name="controller_value" type="int" setter="set_controller_value" getter="get_controller_value" default="0">
- If the message is [code]MIDI_MESSAGE_CONTROL_CHANGE[/code], this indicates the controller value, otherwise this is zero. Controllers include devices such as pedals and levers.
+ If the message is [constant MIDI_MESSAGE_CONTROL_CHANGE], this indicates the controller value, otherwise this is zero. Controllers include devices such as pedals and levers.
</member>
<member name="instrument" type="int" setter="set_instrument" getter="get_instrument" default="0">
The instrument of this input event. This value ranges from 0 to 127. Refer to the instrument list on the General MIDI wikipedia article to see a list of instruments, except that this value is 0-index, so subtract one from every number on that chart. A standard piano will have an instrument number of 0.
</member>
<member name="message" type="int" setter="set_message" getter="get_message" enum="MIDIMessage" default="0">
- Returns a value indicating the type of message for this MIDI signal. This is a member of the [enum @GlobalScope.MIDIMessage] enum.
+ Returns a value indicating the type of message for this MIDI signal. This is a member of the [enum MIDIMessage] enum.
For MIDI messages between 0x80 and 0xEF, only the left half of the bits are returned as this value, as the other part is the channel (ex: 0x94 becomes 0x9). For MIDI messages from 0xF0 to 0xFF, the value is returned as-is.
- Notes will return [code]MIDI_MESSAGE_NOTE_ON[/code] when activated, but they might not always return [code]MIDI_MESSAGE_NOTE_OFF[/code] when deactivated, therefore your code should treat the input as stopped if some period of time has passed.
+ Notes will return [constant MIDI_MESSAGE_NOTE_ON] when activated, but they might not always return [constant MIDI_MESSAGE_NOTE_OFF] when deactivated, therefore your code should treat the input as stopped if some period of time has passed.
For more information, see the MIDI message status byte list chart linked above.
</member>
<member name="pitch" type="int" setter="set_pitch" getter="get_pitch" default="0">
@@ -90,7 +90,7 @@
The pressure of the MIDI signal. This value ranges from 0 to 127. For many devices, this value is always zero.
</member>
<member name="velocity" type="int" setter="set_velocity" getter="get_velocity" default="0">
- The velocity of the MIDI signal. This value ranges from 0 to 127. For a piano, this corresponds to how quickly the key was pressed, and is rarely above about 110 in practice.
+ The velocity of the MIDI signal. This value ranges from 0 to 127. For a piano, this corresponds to how quickly the key was pressed, and is rarely above about 110 in practice. Note that some MIDI devices may send a [constant MIDI_MESSAGE_NOTE_ON] message with zero velocity and expect this to be treated the same as a [constant MIDI_MESSAGE_NOTE_OFF] message, but device implementations vary so Godot reports event data exactly as received.
</member>
</members>
</class>
diff --git a/doc/classes/InputEventScreenTouch.xml b/doc/classes/InputEventScreenTouch.xml
index fb50454917..346b6bf732 100644
--- a/doc/classes/InputEventScreenTouch.xml
+++ b/doc/classes/InputEventScreenTouch.xml
@@ -11,6 +11,9 @@
<link title="InputEvent">$DOCS_URL/tutorials/inputs/inputevent.html</link>
</tutorials>
<members>
+ <member name="double_tap" type="bool" setter="set_double_tap" getter="is_double_tap" default="false">
+ If [code]true[/code], the touch's state is a double tap.
+ </member>
<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>
diff --git a/doc/classes/InputEventWithModifiers.xml b/doc/classes/InputEventWithModifiers.xml
index ff2e6409c9..c6311d780c 100644
--- a/doc/classes/InputEventWithModifiers.xml
+++ b/doc/classes/InputEventWithModifiers.xml
@@ -9,25 +9,30 @@
<tutorials>
<link title="InputEvent">$DOCS_URL/tutorials/inputs/inputevent.html</link>
</tutorials>
+ <methods>
+ <method name="is_command_or_control_pressed" qualifiers="const">
+ <return type="bool" />
+ <description>
+ On macOS, returns [code]true[/code] if [kbd]Meta[/kbd] ([kbd]Command[/kbd]) is pressed.
+ On other platforms, returns [code]true[/code] if [kbd]Ctrl[/kbd] is pressed.
+ </description>
+ </method>
+ </methods>
<members>
<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_pressed" type="bool" setter="set_command_pressed" getter="is_command_pressed" default="false">
- State of the [kbd]Cmd[/kbd] modifier.
+ <member name="command_or_control_autoremap" type="bool" setter="set_command_or_control_autoremap" getter="is_command_or_control_autoremap" default="false">
+ Automatically use [kbd]Meta[/kbd] ([kbd]Command[/kbd]) on macOS and [kbd]Ctrl[/kbd] on other platforms. If [code]true[/code], [member ctrl_pressed] and [member meta_pressed] cannot be set.
</member>
<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_pressed" type="bool" setter="set_meta_pressed" getter="is_meta_pressed" default="false">
- State of the [kbd]Meta[/kbd] modifier.
+ State of the [kbd]Meta[/kbd] modifier. On Windows and Linux, this represents the Windows key (sometimes called "meta" or "super" on Linux). On macOS, this represents the Command key.
</member>
<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_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>
</class>
diff --git a/doc/classes/InputMap.xml b/doc/classes/InputMap.xml
index 8a58519a2b..1d7d54f681 100644
--- a/doc/classes/InputMap.xml
+++ b/doc/classes/InputMap.xml
@@ -41,7 +41,7 @@
</description>
</method>
<method name="action_get_events">
- <return type="Array" />
+ <return type="InputEvent[]" />
<param index="0" name="action" type="StringName" />
<description>
Returns an array of [InputEvent]s associated with a given action.
@@ -69,7 +69,7 @@
<param index="0" name="action" type="StringName" />
<param index="1" name="deadzone" type="float" default="0.5" />
<description>
- Adds an empty action to the [InputMap] with a configurable [code]deadzone[/code].
+ Adds an empty action to the [InputMap] with a configurable [param deadzone].
An [InputEvent] can then be added to this action with [method action_add_event].
</description>
</method>
@@ -87,11 +87,11 @@
<param index="2" name="exact_match" type="bool" default="false" />
<description>
Returns [code]true[/code] if the given event is part of an existing action. This method ignores keyboard modifiers if the given [InputEvent] is not pressed (for proper release detection). See [method action_has_event] if you don't want this behavior.
- If [code]exact_match[/code] is [code]false[/code], it ignores additional input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events.
+ If [param exact_match] is [code]false[/code], it ignores additional input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events.
</description>
</method>
<method name="get_actions">
- <return type="Array" />
+ <return type="StringName[]" />
<description>
Returns an array of all actions in the [InputMap].
</description>
diff --git a/doc/classes/InstancePlaceholder.xml b/doc/classes/InstancePlaceholder.xml
index 698ddcb021..c62d786d8f 100644
--- a/doc/classes/InstancePlaceholder.xml
+++ b/doc/classes/InstancePlaceholder.xml
@@ -30,7 +30,7 @@
<param index="0" name="with_order" type="bool" default="false" />
<description>
Returns the list of properties that will be applied to the node when [method create_instance] is called.
- If [code]with_order[/code] is [code]true[/code], a key named [code].order[/code] (note the leading period) is added to the dictionary. This [code].order[/code] key is an [Array] of [String] property names specifying the order in which properties will be applied (with index 0 being the first).
+ If [param with_order] is [code]true[/code], a key named [code].order[/code] (note the leading period) is added to the dictionary. This [code].order[/code] key is an [Array] of [String] property names specifying the order in which properties will be applied (with index 0 being the first).
</description>
</method>
</methods>
diff --git a/doc/classes/ItemList.xml b/doc/classes/ItemList.xml
index 3375e5a758..844f260971 100644
--- a/doc/classes/ItemList.xml
+++ b/doc/classes/ItemList.xml
@@ -28,7 +28,7 @@
<param index="2" name="selectable" type="bool" default="true" />
<description>
Adds an item to the item list with specified text. Returns the index of an added item.
- Specify an [code]icon[/code], or use [code]null[/code] as the [code]icon[/code] for a list item with no icon.
+ Specify an [param icon], or use [code]null[/code] as the [param icon] for a list item with no icon.
If selectable is [code]true[/code], the list item will be selectable.
</description>
</method>
@@ -62,22 +62,22 @@
<param index="0" name="position" type="Vector2" />
<param index="1" name="exact" type="bool" default="false" />
<description>
- Returns the item index at the given [code]position[/code].
- When there is no item at that point, -1 will be returned if [code]exact[/code] is [code]true[/code], and the closest item index will be returned otherwise.
+ Returns the item index at the given [param position].
+ When there is no item at that point, -1 will be returned if [param exact] is [code]true[/code], and the closest item index will be returned otherwise.
</description>
</method>
<method name="get_item_custom_bg_color" qualifiers="const">
<return type="Color" />
<param index="0" name="idx" type="int" />
<description>
- Returns the custom background color of the item specified by [code]idx[/code] index.
+ Returns the custom background color of the item specified by [param idx] index.
</description>
</method>
<method name="get_item_custom_fg_color" qualifiers="const">
<return type="Color" />
<param index="0" name="idx" type="int" />
<description>
- Returns the custom foreground color of the item specified by [code]idx[/code] index.
+ Returns the custom foreground color of the item specified by [param idx] index.
</description>
</method>
<method name="get_item_icon" qualifiers="const">
@@ -195,14 +195,14 @@
<param index="0" name="from_idx" type="int" />
<param index="1" name="to_idx" type="int" />
<description>
- Moves item from index [code]from_idx[/code] to [code]to_idx[/code].
+ Moves item from index [param from_idx] to [param to_idx].
</description>
</method>
<method name="remove_item">
<return type="void" />
<param index="0" name="idx" type="int" />
<description>
- Removes the item specified by [code]idx[/code] index from the list.
+ Removes the item specified by [param idx] index from the list.
</description>
</method>
<method name="select">
@@ -219,7 +219,7 @@
<param index="0" name="idx" type="int" />
<param index="1" name="custom_bg_color" type="Color" />
<description>
- Sets the background color of the item specified by [code]idx[/code] index to the specified [Color].
+ Sets the background color of the item specified by [param idx] index to the specified [Color].
</description>
</method>
<method name="set_item_custom_fg_color">
@@ -227,7 +227,7 @@
<param index="0" name="idx" type="int" />
<param index="1" name="custom_fg_color" type="Color" />
<description>
- Sets the foreground color of the item specified by [code]idx[/code] index to the specified [Color].
+ Sets the foreground color of the item specified by [param idx] index to the specified [Color].
</description>
</method>
<method name="set_item_disabled">
@@ -349,7 +349,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="Vector2i" setter="set_fixed_icon_size" getter="get_fixed_icon_size" default="Vector2i(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>
@@ -469,18 +469,18 @@
<theme_item name="font_size" data_type="font_size" type="int">
Font size of the item's text.
</theme_item>
- <theme_item name="bg" data_type="style" type="StyleBox">
- Default [StyleBox] for the [ItemList], i.e. used when the control is not being focused.
- </theme_item>
- <theme_item name="bg_focus" data_type="style" type="StyleBox">
- [StyleBox] used when the [ItemList] is being focused.
- </theme_item>
<theme_item name="cursor" data_type="style" type="StyleBox">
[StyleBox] used for the cursor, when the [ItemList] is being focused.
</theme_item>
<theme_item name="cursor_unfocused" data_type="style" type="StyleBox">
[StyleBox] used for the cursor, when the [ItemList] is not being focused.
</theme_item>
+ <theme_item name="focus" data_type="style" type="StyleBox">
+ The focused style for the [ItemList], drawn on top of the background, but below everything else.
+ </theme_item>
+ <theme_item name="panel" data_type="style" type="StyleBox">
+ The background style for the [ItemList].
+ </theme_item>
<theme_item name="selected" data_type="style" type="StyleBox">
[StyleBox] for the selected items, used when the [ItemList] is not being focused.
</theme_item>
diff --git a/doc/classes/JSON.xml b/doc/classes/JSON.xml
index 5d83c75417..93731cf553 100644
--- a/doc/classes/JSON.xml
+++ b/doc/classes/JSON.xml
@@ -6,18 +6,17 @@
<description>
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.
+ [method parse] is used to convert any existing JSON data into a [Variant] that can be used within Godot. If successfully parsed, use [member 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)
+ 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()
+ var data_received = json.data
if typeof(data_received) == TYPE_ARRAY:
print(data_received) # Prints array
else:
@@ -25,17 +24,19 @@
else:
print("JSON Parse Error: ", json.get_error_message(), " in ", json_string, " at line ", json.get_error_line())
[/codeblock]
+ Alternatively, you can parse string using the static [method parse_string] method, but it doesn't allow to handle errors.
+ [codeblock]
+ var data = JSON.parse_string(json_string) # Returns null if parsing failed.
+ [/codeblock]
+ [b]Note:[/b] Both parse methods do not fully comply with the JSON specification:
+ - Trailing commas in arrays or objects are ignored, instead of causing a parser error.
+ - New line and tab characters are accepted in string literals, and are treated like their corresponding escape sequences [code]\n[/code] and [code]\t[/code].
+ - Numbers are parsed using [method String.to_float] which is generally more lax than the JSON specification.
+ - Certain errors, such as invalid Unicode sequences, do not cause a parser error. Instead, the string is cleansed and an error is logged to the console.
</description>
<tutorials>
</tutorials>
<methods>
- <method name="get_data" qualifiers="const">
- <return type="Variant" />
- <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" />
<description>
@@ -52,11 +53,19 @@
<return type="int" enum="Error" />
<param index="0" name="json_string" type="String" />
<description>
- 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.
+ Attempts to parse the [param json_string] provided.
+ Returns an [enum Error]. If the parse was successful, it returns [constant OK] and the result can be retrieved using [member data]. If unsuccessful, use [method get_error_line] and [method get_error_message] for identifying the source of the failure.
+ Non-static variant of [method parse_string], if you want custom error handling.
+ </description>
+ </method>
+ <method name="parse_string" qualifiers="static">
+ <return type="Variant" />
+ <param index="0" name="json_string" type="String" />
+ <description>
+ Attempts to parse the [param json_string] provided and returns the parsed data. Returns [code]null[/code] if parse failed.
</description>
</method>
- <method name="stringify">
+ <method name="stringify" qualifiers="static">
<return type="String" />
<param index="0" name="data" type="Variant" />
<param index="1" name="indent" type="String" default="&quot;&quot;" />
@@ -65,8 +74,8 @@
<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.
- [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.
- The [code]indent[/code] parameter controls if and how something is indented, the string used for this parameter will be used where there should be an indent in the output, even spaces like [code]" "[/code] will work. [code]\t[/code] and [code]\n[/code] can also be used for a tab indent, or to make a newline for each indent respectively.
+ [b]Note:[/b] If [param full_precision] is [code]true[/code], when stringifying floats, the unreliable digits are stringified in addition to the reliable digits to guarantee exact decoding.
+ The [param indent] parameter controls if and how something is indented, the string used for this parameter will be used where there should be an indent in the output, even spaces like [code]" "[/code] will work. [code]\t[/code] and [code]\n[/code] can also be used for a tab indent, or to make a newline for each indent respectively.
[b]Example output:[/b]
[codeblock]
## JSON.stringify(my_dictionary)
@@ -107,4 +116,9 @@
</description>
</method>
</methods>
+ <members>
+ <member name="data" type="Variant" setter="set_data" getter="get_data" default="null">
+ Contains the parsed JSON data in [Variant] form.
+ </member>
+ </members>
</class>
diff --git a/doc/classes/JSONRPC.xml b/doc/classes/JSONRPC.xml
index e8fb208fef..8af4ed1f26 100644
--- a/doc/classes/JSONRPC.xml
+++ b/doc/classes/JSONRPC.xml
@@ -15,8 +15,8 @@
<param index="1" name="params" type="Variant" />
<description>
Returns a dictionary in the form of a JSON-RPC notification. Notifications are one-shot messages which do not expect a response.
- - [code]method[/code]: Name of the method being called.
- - [code]params[/code]: An array or dictionary of parameters being passed to the method.
+ - [param method]: Name of the method being called.
+ - [param params]: An array or dictionary of parameters being passed to the method.
</description>
</method>
<method name="make_request">
@@ -26,9 +26,9 @@
<param index="2" name="id" type="Variant" />
<description>
Returns a dictionary in the form of a JSON-RPC request. Requests are sent to a server with the expectation of a response. The ID field is used for the server to specify which exact request it is responding to.
- - [code]method[/code]: Name of the method being called.
- - [code]params[/code]: An array or dictionary of parameters being passed to the method.
- - [code]id[/code]: Uniquely identifies this request. The server is expected to send a response with the same ID.
+ - [param method]: Name of the method being called.
+ - [param params]: An array or dictionary of parameters being passed to the method.
+ - [param id]: Uniquely identifies this request. The server is expected to send a response with the same ID.
</description>
</method>
<method name="make_response">
@@ -37,8 +37,8 @@
<param index="1" name="id" type="Variant" />
<description>
When a server has received and processed a request, it is expected to send a response. If you did not want a response then you need to have sent a Notification instead.
- - [code]result[/code]: The return value of the function which was called.
- - [code]id[/code]: The ID of the request this response is targeted to.
+ - [param result]: The return value of the function which was called.
+ - [param id]: The ID of the request this response is targeted to.
</description>
</method>
<method name="make_response_error" qualifiers="const">
@@ -48,9 +48,9 @@
<param index="2" name="id" type="Variant" default="null" />
<description>
Creates a response which indicates a previous reply has failed in some way.
- - [code]code[/code]: The error code corresponding to what kind of error this is. See the [enum ErrorCode] constants.
- - [code]message[/code]: A custom message about this error.
- - [code]id[/code]: The request this error is a response to.
+ - [param code]: The error code corresponding to what kind of error this is. See the [enum ErrorCode] constants.
+ - [param message]: A custom message about this error.
+ - [param id]: The request this error is a response to.
</description>
</method>
<method name="process_action">
@@ -60,7 +60,7 @@
<description>
Given a Dictionary which takes the form of a JSON-RPC request: unpack the request and run it. Methods are resolved by looking at the field called "method" and looking for an equivalently named function in the JSONRPC object. If one is found that method is called.
To add new supported methods extend the JSONRPC class and call [method process_action] on your subclass.
- [code]action[/code]: The action to be run, as a Dictionary in the form of a JSON-RPC request or notification.
+ [param action]: The action to be run, as a Dictionary in the form of a JSON-RPC request or notification.
</description>
</method>
<method name="process_string">
diff --git a/doc/classes/JavaScript.xml b/doc/classes/JavaScriptBridge.xml
index d91e8bd3e5..5e36b5cc80 100644
--- a/doc/classes/JavaScript.xml
+++ b/doc/classes/JavaScriptBridge.xml
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="JavaScript" inherits="Object" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+<class name="JavaScriptBridge" inherits="Object" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
- Singleton that connects the engine with the browser's JavaScript context in HTML5 export.
+ Singleton that connects the engine with the browser's JavaScript context in Web export.
</brief_description>
<description>
- The JavaScript singleton is implemented only in the HTML5 export. It's used to access the browser's JavaScript context. This allows interaction with embedding pages or calling third-party JavaScript APIs.
- [b]Note:[/b] This singleton can be disabled at build-time to improve security. By default, the JavaScript singleton is enabled. Official export templates also have the JavaScript singleton enabled. See [url=$DOCS_URL/development/compiling/compiling_for_web.html]Compiling for the Web[/url] in the documentation for more information.
+ The JavaScriptBridge singleton is implemented only in the Web export. It's used to access the browser's JavaScript context. This allows interaction with embedding pages or calling third-party JavaScript APIs.
+ [b]Note:[/b] This singleton can be disabled at build-time to improve security. By default, the JavaScriptBridge singleton is enabled. Official export templates also have the JavaScriptBridge singleton enabled. See [url=$DOCS_URL/development/compiling/compiling_for_web.html]Compiling for the Web[/url] in the documentation for more information.
</description>
<tutorials>
<link title="Exporting for the Web: Calling JavaScript from script">$DOCS_URL/tutorials/export/exporting_for_web.html#calling-javascript-from-script</link>
@@ -22,7 +22,7 @@
<return type="Variant" />
<param index="0" name="object" type="String" />
<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.
+ Creates a new JavaScript object using the [code]new[/code] constructor. The [param object] must a valid property of the JavaScript [code]window[/code]. See [JavaScriptObject] for usage.
</description>
</method>
<method name="download_buffer">
@@ -31,8 +31,8 @@
<param index="1" name="name" type="String" />
<param index="2" name="mime" type="String" default="&quot;application/octet-stream&quot;" />
<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.
+ Prompts the user to download a file containing the specified [param buffer]. The file will have the given [param name] and [param mime] 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 [param name]'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>
@@ -42,15 +42,15 @@
<param index="0" name="code" type="String" />
<param index="1" name="use_global_execution_context" type="bool" default="false" />
<description>
- Execute the string [code]code[/code] as JavaScript code within the browser window. This is a call to the actual global JavaScript function [code]eval()[/code].
- 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.
+ Execute the string [param code] as JavaScript code within the browser window. This is a call to the actual global JavaScript function [code]eval()[/code].
+ If [param use_global_execution_context] 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" />
<param index="0" name="interface" type="String" />
<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.
+ Returns an interface to a JavaScript object that can be used by scripts. The [param interface] 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>
<method name="pwa_needs_update" qualifiers="const">
diff --git a/doc/classes/JavaScriptObject.xml b/doc/classes/JavaScriptObject.xml
index 5c1a37266b..7132cc5cad 100644
--- a/doc/classes/JavaScriptObject.xml
+++ b/doc/classes/JavaScriptObject.xml
@@ -1,27 +1,27 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="JavaScriptObject" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
- A wrapper class for native JavaScript objects.
+ A wrapper class for web 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:
+ JavaScriptObject is used to interact with JavaScript objects retrieved or created via [method JavaScriptBridge.get_interface], [method JavaScriptBridge.create_object], or [method JavaScriptBridge.create_callback].
+ [b]Example:[/b]
[codeblock]
extends Node
- var _my_js_callback = JavaScript.create_callback(self, "myCallback") # This reference must be kept
- var console = JavaScript.get_interface("console")
+ var _my_js_callback = JavaScriptBridge.create_callback(self, "myCallback") # This reference must be kept
+ var console = JavaScriptBridge.get_interface("console")
func _init():
- var buf = JavaScript.create_object("ArrayBuffer", 10) # new ArrayBuffer(10)
+ var buf = JavaScriptBridge.create_object("ArrayBuffer", 10) # new ArrayBuffer(10)
print(buf) # prints [JavaScriptObject:OBJECT_ID]
- var uint8arr = JavaScript.create_object("Uint8Array", buf) # new Uint8Array(buf)
+ var uint8arr = JavaScriptBridge.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)
+ # Equivalent of JavaScriptBridge: Array.from(uint8arr).forEach(myCallback)
+ JavaScriptBridge.get_interface("Array").from(uint8arr).forEach(_my_js_callback)
func myCallback(args):
# Will be called with the parameters passed to the "forEach" callback
@@ -31,7 +31,7 @@
# [0, 9, [JavaScriptObject:1180]]
print(args)
[/codeblock]
- [b]Note:[/b] Only available in the HTML5 platform.
+ [b]Note:[/b] Only available in the Web platform.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/Joint3D.xml b/doc/classes/Joint3D.xml
index fef8fdf965..a9ca86d269 100644
--- a/doc/classes/Joint3D.xml
+++ b/doc/classes/Joint3D.xml
@@ -10,16 +10,16 @@
<link title="3D Truck Town Demo">https://godotengine.org/asset-library/asset/524</link>
</tutorials>
<members>
- <member name="collision/exclude_nodes" type="bool" setter="set_exclude_nodes_from_collision" getter="get_exclude_nodes_from_collision" default="true">
+ <member name="exclude_nodes_from_collision" type="bool" setter="set_exclude_nodes_from_collision" getter="get_exclude_nodes_from_collision" default="true">
If [code]true[/code], the two bodies of the nodes are not able to collide with each other.
</member>
- <member name="nodes/node_a" type="NodePath" setter="set_node_a" getter="get_node_a" default="NodePath(&quot;&quot;)">
+ <member name="node_a" type="NodePath" setter="set_node_a" getter="get_node_a" default="NodePath(&quot;&quot;)">
The node attached to the first side (A) of the joint.
</member>
- <member name="nodes/node_b" type="NodePath" setter="set_node_b" getter="get_node_b" default="NodePath(&quot;&quot;)">
+ <member name="node_b" type="NodePath" setter="set_node_b" getter="get_node_b" default="NodePath(&quot;&quot;)">
The node attached to the second side (B) of the joint.
</member>
- <member name="solver/priority" type="int" setter="set_solver_priority" getter="get_solver_priority" default="1">
+ <member name="solver_priority" type="int" setter="set_solver_priority" getter="get_solver_priority" default="1">
The priority used to define which solver is executed first for multiple joints. The lower the value, the higher the priority.
</member>
</members>
diff --git a/doc/classes/KinematicCollision2D.xml b/doc/classes/KinematicCollision2D.xml
index 045480f17c..e991856de5 100644
--- a/doc/classes/KinematicCollision2D.xml
+++ b/doc/classes/KinematicCollision2D.xml
@@ -14,7 +14,7 @@
<return type="float" />
<param index="0" name="up_direction" type="Vector2" default="Vector2(0, -1)" />
<description>
- Returns the collision angle according to [code]up_direction[/code], which is [code]Vector2.UP[/code] by default. This value is always positive.
+ Returns the collision angle according to [param up_direction], which is [constant Vector2.UP] by default. This value is always positive.
</description>
</method>
<method name="get_collider" qualifiers="const">
diff --git a/doc/classes/KinematicCollision3D.xml b/doc/classes/KinematicCollision3D.xml
index 31fbbc8d0a..6b0a806e5c 100644
--- a/doc/classes/KinematicCollision3D.xml
+++ b/doc/classes/KinematicCollision3D.xml
@@ -15,7 +15,7 @@
<param index="0" name="collision_index" type="int" default="0" />
<param index="1" name="up_direction" type="Vector3" default="Vector3(0, 1, 0)" />
<description>
- Returns the collision angle according to [code]up_direction[/code], which is [code]Vector3.UP[/code] by default. This value is always positive.
+ Returns the collision angle according to [param up_direction], which is [constant Vector3.UP] by default. This value is always positive.
</description>
</method>
<method name="get_collider" qualifiers="const">
diff --git a/doc/classes/Label.xml b/doc/classes/Label.xml
index d882405384..615aceac53 100644
--- a/doc/classes/Label.xml
+++ b/doc/classes/Label.xml
@@ -5,7 +5,7 @@
</brief_description>
<description>
Label displays plain text on the screen. It gives you control over the horizontal and vertical alignment and can wrap the text inside the node's bounding rectangle. It doesn't support bold, italics, or other formatting. For that, use [RichTextLabel] instead.
- [b]Note:[/b] Contrarily to most other [Control]s, Label's [member Control.mouse_filter] defaults to [constant Control.MOUSE_FILTER_IGNORE] (i.e. it doesn't react to mouse input events). This implies that a label won't display any configured [member Control.hint_tooltip], unless you change its mouse filter.
+ [b]Note:[/b] Contrarily to most other [Control]s, Label's [member Control.mouse_filter] defaults to [constant Control.MOUSE_FILTER_IGNORE] (i.e. it doesn't react to mouse input events). This implies that a label won't display any configured [member Control.tooltip_text], unless you change its mouse filter.
</description>
<tutorials>
<link title="2D Dodge The Creeps Demo">https://godotengine.org/asset-library/asset/515</link>
@@ -14,16 +14,16 @@
<method name="get_line_count" qualifiers="const">
<return type="int" />
<description>
- Returns the amount of lines of text the Label has.
+ Returns the number of lines of text the Label has.
</description>
</method>
<method name="get_line_height" qualifiers="const">
<return type="int" />
<param index="0" name="line" type="int" default="-1" />
<description>
- Returns the height of the line [code]line[/code].
- If [code]line[/code] is set to [code]-1[/code], returns the biggest line height.
- If there're no lines returns font size in pixels.
+ Returns the height of the line [param line].
+ If [param line] is set to [code]-1[/code], returns the biggest line height.
+ If there are no lines, returns font size in pixels.
</description>
</method>
<method name="get_total_character_count" qualifiers="const">
@@ -61,10 +61,6 @@
Limits the lines of text the node shows on screen.
</member>
<member name="mouse_filter" type="int" setter="set_mouse_filter" getter="get_mouse_filter" overrides="Control" enum="Control.MouseFilter" default="2" />
- <member name="percent_visible" type="float" setter="set_percent_visible" getter="get_percent_visible" default="1.0">
- Limits the amount of visible characters. If you set [code]percent_visible[/code] to 0.5, only up to half of the text's characters will display on screen. Useful to animate the text in a dialog box.
- [b]Note:[/b] Setting this property updates [member visible_characters] based on current [method get_total_character_count].
- </member>
<member name="size_flags_vertical" type="int" setter="set_v_size_flags" getter="get_v_size_flags" overrides="Control" default="4" />
<member name="structured_text_bidi_override" type="int" setter="set_structured_text_bidi_override" getter="get_structured_text_bidi_override" enum="TextServer.StructuredTextParser" default="0">
Set BiDi algorithm override for the structured text.
@@ -88,11 +84,15 @@
Controls the text's vertical alignment. Supports top, center, bottom, and fill. Set it to one of the [enum VerticalAlignment] constants.
</member>
<member name="visible_characters" type="int" setter="set_visible_characters" getter="get_visible_characters" default="-1">
- Restricts the number of characters to display. Set to -1 to disable.
- [b]Note:[/b] Setting this property updates [member percent_visible] based on current [method get_total_character_count].
+ The number of characters to display. If set to [code]-1[/code], all characters are displayed. This can be useful when animating the text appearing in a dialog box.
+ [b]Note:[/b] Setting this property updates [member visible_ratio] accordingly.
</member>
<member name="visible_characters_behavior" type="int" setter="set_visible_characters_behavior" getter="get_visible_characters_behavior" enum="TextServer.VisibleCharactersBehavior" default="0">
- Sets the clipping behavior when [member visible_characters] or [member percent_visible] is set. See [enum TextServer.VisibleCharactersBehavior] for more info.
+ Sets the clipping behavior when [member visible_characters] or [member visible_ratio] is set. See [enum TextServer.VisibleCharactersBehavior] for more info.
+ </member>
+ <member name="visible_ratio" type="float" setter="set_visible_ratio" getter="get_visible_ratio" default="1.0">
+ The fraction of characters to display, relative to the total number of characters (see [method get_total_character_count]). If set to [code]1.0[/code], all characters are displayed. If set to [code]0.5[/code], only half of the characters will be displayed. This can be useful when animating the text appearing in a dialog box.
+ [b]Note:[/b] Setting this property updates [member visible_characters] accordingly.
</member>
</members>
<theme_items>
diff --git a/doc/classes/Label3D.xml b/doc/classes/Label3D.xml
index e4dc24d0b5..0cbca2224e 100644
--- a/doc/classes/Label3D.xml
+++ b/doc/classes/Label3D.xml
@@ -44,6 +44,7 @@
<member name="billboard" type="int" setter="set_billboard_mode" getter="get_billboard_mode" enum="BaseMaterial3D.BillboardMode" default="0">
The billboard mode to use for the label. See [enum BaseMaterial3D.BillboardMode] for possible values.
</member>
+ <member name="cast_shadow" type="int" setter="set_cast_shadows_setting" getter="get_cast_shadows_setting" overrides="GeometryInstance3D" enum="GeometryInstance3D.ShadowCastingSetting" default="0" />
<member name="double_sided" type="bool" setter="set_draw_flag" getter="get_draw_flag" default="true">
If [code]true[/code], text can be seen from the back as well, if [code]false[/code], it is invisible when looking at it from behind.
</member>
@@ -54,8 +55,10 @@
Font configuration used to display text.
</member>
<member name="font_size" type="int" setter="set_font_size" getter="get_font_size" default="32">
- Font size of the [Label3D]'s text.
+ Font size of the [Label3D]'s text. To make the font look more detailed when up close, increase [member font_size] while decreasing [member pixel_size] at the same time.
+ Higher font sizes require more time to render new characters, which can cause stuttering during gameplay.
</member>
+ <member name="gi_mode" type="int" setter="set_gi_mode" getter="get_gi_mode" overrides="GeometryInstance3D" enum="GeometryInstance3D.GIMode" default="0" />
<member name="horizontal_alignment" type="int" setter="set_horizontal_alignment" getter="get_horizontal_alignment" enum="HorizontalAlignment" default="1">
Controls the text's horizontal alignment. Supports left, center, right, and fill, or justify. Set it to one of the [enum HorizontalAlignment] constants.
</member>
@@ -86,7 +89,7 @@
Text outline size.
</member>
<member name="pixel_size" type="float" setter="set_pixel_size" getter="get_pixel_size" default="0.005">
- The size of one pixel's width on the label to scale it in 3D.
+ The size of one pixel's width on the label to scale it in 3D. To make the font look more detailed when up close, increase [member font_size] while decreasing [member pixel_size] at the same time.
</member>
<member name="render_priority" type="int" setter="set_render_priority" getter="get_render_priority" default="0">
Sets the render priority for the text. Higher priority objects will be sorted in front of lower priority objects.
@@ -138,7 +141,7 @@
Represents the size of the [enum DrawFlags] enum.
</constant>
<constant name="ALPHA_CUT_DISABLED" value="0" enum="AlphaCutMode">
- This mode performs standard alpha blending. It can display translucent areas, but transparency sorting issues may be visible when multiple transparent materials are overlapping.
+ This mode performs standard alpha blending. It can display translucent areas, but transparency sorting issues may be visible when multiple transparent materials are overlapping. [member GeometryInstance3D.cast_shadow] has no effect when this transparency mode is used; the [Label3D] will never cast shadows.
</constant>
<constant name="ALPHA_CUT_DISCARD" value="1" enum="AlphaCutMode">
This mode only allows fully transparent or fully opaque pixels. Harsh edges will be visible unless some form of screen-space antialiasing is enabled (see [member ProjectSettings.rendering/anti_aliasing/quality/screen_space_aa]). This mode is also known as [i]alpha testing[/i] or [i]1-bit transparency[/i].
diff --git a/doc/classes/Light3D.xml b/doc/classes/Light3D.xml
index 80ff83ec46..60e20cd97d 100644
--- a/doc/classes/Light3D.xml
+++ b/doc/classes/Light3D.xml
@@ -11,6 +11,12 @@
<link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
</tutorials>
<methods>
+ <method name="get_correlated_color" qualifiers="const">
+ <return type="Color" />
+ <description>
+ Returns the [Color] of an idealized blackbody at the given [member light_temperature]. This value is calculated internally based on the [member light_temperature]. This [Color] is multiplied by [member light_color] before being sent to the [RenderingServer].
+ </description>
+ </method>
<method name="get_param" qualifiers="const">
<return type="float" />
<param index="0" name="param" type="int" enum="Light3D.Param" />
@@ -49,6 +55,7 @@
</member>
<member name="light_angular_distance" type="float" setter="set_param" getter="get_param" default="0.0">
The light's angular size in degrees. Increasing this will make shadows softer at greater distances. Only available for [DirectionalLight3D]s. For reference, the Sun from the Earth is approximately [code]0.5[/code].
+ [b]Note:[/b] [member light_angular_distance] is not affected by [member Node3D.scale] (the light's scale or its parent's scale).
</member>
<member name="light_bake_mode" type="int" setter="set_bake_mode" getter="get_bake_mode" enum="Light3D.BakeMode" default="2">
The light's bake mode. This will affect the global illumination techniques that have an effect on the light's rendering. See [enum BakeMode].
@@ -67,6 +74,15 @@
Secondary multiplier used with indirect light (light bounces). Used with [VoxelGI] and SDFGI (see [member Environment.sdfgi_enabled]).
[b]Note:[/b] This property is ignored if [member light_energy] is equal to [code]0.0[/code], as the light won't be present at all in the GI shader.
</member>
+ <member name="light_intensity_lumens" type="float" setter="set_param" getter="get_param">
+ Used by positional lights ([OmniLight3D] and [SpotLight3D]) when [member ProjectSettings.rendering/lights_and_shadows/use_physical_light_units] is [code]true[/code]. Sets the intensity of the light source measured in Lumens. Lumens are a measure of luminous flux, which is the total amount of visible light emitted by a light source per unit of time.
+ For [SpotLight3D]s, we assume that the area outside the visible cone is surrounded by a perfect light absorbing material. Accordingly, the apparent brightness of the cone area does not change as the cone increases and decreases in size.
+ A typical household lightbulb can range from around 600 lumens to 1,200 lumens, a candle is about 13 lumens, while a streetlight can be approximately 60,000 lumens.
+ </member>
+ <member name="light_intensity_lux" type="float" setter="set_param" getter="get_param">
+ Used by [DirectionalLight3D]s when [member ProjectSettings.rendering/lights_and_shadows/use_physical_light_units] is [code]true[/code]. Sets the intensity of the light source measured in Lux. Lux is a measure pf luminous flux per unit area, it is equal to one lumen per square metre. Lux is the measure of how much light hits a surface at a given time.
+ On a clear sunny day a surface in direct sunlight may be approximately 100,000 lux, a typical room in a home may be approximately 50 lux, while the moonlit ground may be approximately 0.1 lux.
+ </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.
</member>
@@ -76,10 +92,19 @@
</member>
<member name="light_size" type="float" setter="set_param" getter="get_param" default="0.0">
The size of the light in Godot units. Only available for [OmniLight3D]s and [SpotLight3D]s. Increasing this value will make the light fade out slower and shadows appear blurrier. This can be used to simulate area lights to an extent.
+ [b]Note:[/b] [member light_size] is not affected by [member Node3D.scale] (the light's scale or its parent's scale).
</member>
<member name="light_specular" type="float" setter="set_param" getter="get_param" default="0.5">
The intensity of the specular blob in objects affected by the light. At [code]0[/code], the light becomes a pure diffuse light. When not baking emission, this can be used to avoid unrealistic reflections when placing lights above an emissive surface.
</member>
+ <member name="light_temperature" type="float" setter="set_temperature" getter="get_temperature">
+ Sets the color temperature of the light source, measured in Kelvin. This is used to calculate a correlated color temperature which tints the [member light_color].
+ The sun on a cloudy day is approximately 6500 Kelvin, on a clear day it is between 5500 to 6000 Kelvin, and on a clear day at sunrise or sunset it ranges to around 1850 Kelvin.
+ </member>
+ <member name="light_volumetric_fog_energy" type="float" setter="set_param" getter="get_param" default="1.0">
+ Secondary multiplier multiplied with [member light_energy] then used with the [Environment]'s volumetric fog (if enabled). If set to [code]0.0[/code], computing volumetric fog will be skipped for this light, which can improve performance for large amounts of lights when volumetric fog is enabled.
+ [b]Note:[/b] To prevent short-lived dynamic light effects from poorly interacting with volumetric fog, lights used in those effects should have [member light_volumetric_fog_energy] set to [code]0.0[/code] unless [member Environment.volumetric_fog_temporal_reprojection_enabled] is disabled (or unless the reprojection amount is significantly lowered).
+ </member>
<member name="shadow_bias" type="float" setter="set_param" getter="get_param" default="0.1">
Used to adjust shadow appearance. Too small a value results in self-shadowing ("shadow acne"), while too large a value causes shadows to separate from casters ("peter-panning"). Adjust as needed.
</member>
@@ -89,8 +114,6 @@
<member name="shadow_enabled" type="bool" setter="set_shadow" getter="has_shadow" default="false">
If [code]true[/code], the light will cast real-time shadows. This has a significant performance cost. Only enable shadow rendering when it makes a noticeable difference in the scene's appearance, and consider using [member distance_fade_enabled] to hide the light when far away from the [Camera3D].
</member>
- <member name="shadow_fog_fade" type="float" setter="set_param" getter="get_param" default="0.1">
- </member>
<member name="shadow_normal_bias" type="float" setter="set_param" getter="get_param" default="1.0">
Offsets the lookup into the shadow map by the object's normal. This can be used to reduce self-shadowing artifacts without using [member shadow_bias]. In practice, this value should be tweaked along with [member shadow_bias] to reduce artifacts as much as possible.
</member>
@@ -110,61 +133,64 @@
<constant name="PARAM_INDIRECT_ENERGY" value="1" enum="Param">
Constant for accessing [member light_indirect_energy].
</constant>
- <constant name="PARAM_SPECULAR" value="2" enum="Param">
+ <constant name="PARAM_VOLUMETRIC_FOG_ENERGY" value="2" enum="Param">
+ Constant for accessing [member light_volumetric_fog_energy].
+ </constant>
+ <constant name="PARAM_SPECULAR" value="3" enum="Param">
Constant for accessing [member light_specular].
</constant>
- <constant name="PARAM_RANGE" value="3" enum="Param">
+ <constant name="PARAM_RANGE" value="4" enum="Param">
Constant for accessing [member OmniLight3D.omni_range] or [member SpotLight3D.spot_range].
</constant>
- <constant name="PARAM_SIZE" value="4" enum="Param">
+ <constant name="PARAM_SIZE" value="5" enum="Param">
Constant for accessing [member light_size].
</constant>
- <constant name="PARAM_ATTENUATION" value="5" enum="Param">
+ <constant name="PARAM_ATTENUATION" value="6" enum="Param">
Constant for accessing [member OmniLight3D.omni_attenuation] or [member SpotLight3D.spot_attenuation].
</constant>
- <constant name="PARAM_SPOT_ANGLE" value="6" enum="Param">
+ <constant name="PARAM_SPOT_ANGLE" value="7" enum="Param">
Constant for accessing [member SpotLight3D.spot_angle].
</constant>
- <constant name="PARAM_SPOT_ATTENUATION" value="7" enum="Param">
+ <constant name="PARAM_SPOT_ATTENUATION" value="8" enum="Param">
Constant for accessing [member SpotLight3D.spot_angle_attenuation].
</constant>
- <constant name="PARAM_SHADOW_MAX_DISTANCE" value="8" enum="Param">
+ <constant name="PARAM_SHADOW_MAX_DISTANCE" value="9" enum="Param">
Constant for accessing [member DirectionalLight3D.directional_shadow_max_distance].
</constant>
- <constant name="PARAM_SHADOW_SPLIT_1_OFFSET" value="9" enum="Param">
+ <constant name="PARAM_SHADOW_SPLIT_1_OFFSET" value="10" enum="Param">
Constant for accessing [member DirectionalLight3D.directional_shadow_split_1].
</constant>
- <constant name="PARAM_SHADOW_SPLIT_2_OFFSET" value="10" enum="Param">
+ <constant name="PARAM_SHADOW_SPLIT_2_OFFSET" value="11" enum="Param">
Constant for accessing [member DirectionalLight3D.directional_shadow_split_2].
</constant>
- <constant name="PARAM_SHADOW_SPLIT_3_OFFSET" value="11" enum="Param">
+ <constant name="PARAM_SHADOW_SPLIT_3_OFFSET" value="12" enum="Param">
Constant for accessing [member DirectionalLight3D.directional_shadow_split_3].
</constant>
- <constant name="PARAM_SHADOW_FADE_START" value="12" enum="Param">
+ <constant name="PARAM_SHADOW_FADE_START" value="13" enum="Param">
Constant for accessing [member DirectionalLight3D.directional_shadow_fade_start].
</constant>
- <constant name="PARAM_SHADOW_NORMAL_BIAS" value="13" enum="Param">
+ <constant name="PARAM_SHADOW_NORMAL_BIAS" value="14" enum="Param">
Constant for accessing [member shadow_normal_bias].
</constant>
- <constant name="PARAM_SHADOW_BIAS" value="14" enum="Param">
+ <constant name="PARAM_SHADOW_BIAS" value="15" enum="Param">
Constant for accessing [member shadow_bias].
</constant>
- <constant name="PARAM_SHADOW_PANCAKE_SIZE" value="15" enum="Param">
+ <constant name="PARAM_SHADOW_PANCAKE_SIZE" value="16" enum="Param">
Constant for accessing [member DirectionalLight3D.directional_shadow_pancake_size].
</constant>
- <constant name="PARAM_SHADOW_OPACITY" value="16" enum="Param">
+ <constant name="PARAM_SHADOW_OPACITY" value="17" enum="Param">
Constant for accessing [member shadow_opacity].
</constant>
- <constant name="PARAM_SHADOW_BLUR" value="17" enum="Param">
+ <constant name="PARAM_SHADOW_BLUR" value="18" enum="Param">
Constant for accessing [member shadow_blur].
</constant>
- <constant name="PARAM_SHADOW_VOLUMETRIC_FOG_FADE" value="18" enum="Param">
- Constant for accessing [member shadow_fog_fade].
- </constant>
<constant name="PARAM_TRANSMITTANCE_BIAS" value="19" enum="Param">
Constant for accessing [member shadow_transmittance_bias].
</constant>
- <constant name="PARAM_MAX" value="20" enum="Param">
+ <constant name="PARAM_INTENSITY" value="20" enum="Param">
+ Constant for accessing [member light_intensity_lumens] and [member light_intensity_lux]. Only used when [member ProjectSettings.rendering/lights_and_shadows/use_physical_light_units] is [code]true[/code].
+ </constant>
+ <constant name="PARAM_MAX" value="21" enum="Param">
Represents the size of the [enum Param] enum.
</constant>
<constant name="BAKE_DISABLED" value="0" enum="BakeMode">
diff --git a/doc/classes/LightmapGI.xml b/doc/classes/LightmapGI.xml
index c0766cd1ec..53dae1a8e6 100644
--- a/doc/classes/LightmapGI.xml
+++ b/doc/classes/LightmapGI.xml
@@ -17,9 +17,12 @@
<member name="bias" type="float" setter="set_bias" getter="get_bias" default="0.0005">
The bias to use when computing shadows. Increasing [member bias] can fix shadow acne on the resulting baked lightmap, but can introduce peter-panning (shadows not connecting to their casters). Real-time [Light3D] shadows are not affected by this [member bias] property.
</member>
- <member name="bounces" type="int" setter="set_bounces" getter="get_bounces" default="1">
+ <member name="bounces" type="int" setter="set_bounces" getter="get_bounces" default="3">
Number of light bounces that are taken into account during baking. Higher values result in brighter, more realistic lighting, at the cost of longer bake times. If set to [code]0[/code], only environment lighting, direct light and emissive lighting is baked.
</member>
+ <member name="camera_attributes" type="CameraAttributes" setter="set_camera_attributes" getter="get_camera_attributes">
+ The [CameraAttributes] resource that specifies exposure levels to bake at. Auto-exposure and non exposure properties will be ignored. Exposure settings should be used to reduce the dynamic range present when baking. If exposure is too high, the [LightmapGI] will have banding artifacts or may have over-exposure artifacts.
+ </member>
<member name="directional" type="bool" setter="set_directional" getter="is_directional" default="false">
If [code]true[/code], bakes lightmaps to contain directional information as spherical harmonics. This results in more realistic lighting appearance, especially with normal mapped materials and for lights that have their direct light baked ([member Light3D.light_bake_mode] set to [constant Light3D.BAKE_STATIC]). The directional information is also used to provide rough reflections for static and dynamic objects. This has a small run-time performance cost as the shader has to perform more work to interpret the direction information from the lightmap. Directional lightmaps also take longer to bake and result in larger file sizes.
[b]Note:[/b] The property's name has no relationship with [DirectionalLight3D]. [member directional] works with all light types.
@@ -33,10 +36,10 @@
<member name="environment_custom_sky" type="Sky" setter="set_environment_custom_sky" getter="get_environment_custom_sky">
The sky to use as a source of environment lighting. Only effective if [member environment_mode] is [constant ENVIRONMENT_MODE_CUSTOM_SKY].
</member>
- <member name="environment_mode" type="int" setter="set_environment_mode" getter="get_environment_mode" enum="LightmapGI.EnvironmentMode" default="0">
+ <member name="environment_mode" type="int" setter="set_environment_mode" getter="get_environment_mode" enum="LightmapGI.EnvironmentMode" default="1">
The environment mode to use when baking lightmaps.
</member>
- <member name="generate_probes_subdiv" type="int" setter="set_generate_probes" getter="get_generate_probes" enum="LightmapGI.GenerateProbes" default="0">
+ <member name="generate_probes_subdiv" type="int" setter="set_generate_probes" getter="get_generate_probes" enum="LightmapGI.GenerateProbes" default="2">
The level of subdivision to use when automatically generating [LightmapProbe]s for dynamic object lighting. Higher values result in more accurate indirect lighting on dynamic objects, at the cost of longer bake times and larger file sizes.
[b]Note:[/b] Automatically generated [LightmapProbe]s are not visible as nodes in the Scene tree dock, and cannot be modified this way after they are generated.
[b]Note:[/b] Regardless of [member generate_probes_subdiv], direct lighting on dynamic objects is always applied using [Light3D] nodes in real-time.
diff --git a/doc/classes/LightmapGIData.xml b/doc/classes/LightmapGIData.xml
index 0881d3de8a..d24b2c6871 100644
--- a/doc/classes/LightmapGIData.xml
+++ b/doc/classes/LightmapGIData.xml
@@ -35,7 +35,7 @@
<return type="NodePath" />
<param index="0" name="user_idx" type="int" />
<description>
- Returns the [NodePath] of the baked object at index [code]user_idx[/code].
+ Returns the [NodePath] of the baked object at index [param user_idx].
</description>
</method>
<method name="is_using_spherical_harmonics" qualifiers="const">
@@ -48,7 +48,7 @@
<return type="void" />
<param index="0" name="uses_spherical_harmonics" type="bool" />
<description>
- If [code]uses_spherical_harmonics[/code] is [code]true[/code], tells the engine to treat the lightmap data as if it was baked with directional information.
+ If [param uses_spherical_harmonics] is [code]true[/code], tells the engine to treat the lightmap data as if it was baked with directional information.
[b]Note:[/b] Changing this value on already baked lightmaps will not cause them to be baked again. This means the material appearance will look incorrect until lightmaps are baked again, in which case the value set here is discarded as the entire [LightmapGIData] resource is replaced by the lightmapper.
</description>
</method>
diff --git a/doc/classes/Line2D.xml b/doc/classes/Line2D.xml
index 0bca77749d..4547c3589f 100644
--- a/doc/classes/Line2D.xml
+++ b/doc/classes/Line2D.xml
@@ -14,10 +14,10 @@
<method name="add_point">
<return type="void" />
<param index="0" name="position" type="Vector2" />
- <param index="1" name="at_position" type="int" default="-1" />
+ <param index="1" name="index" type="int" default="-1" />
<description>
- Adds a point at the [code]position[/code]. Appends the point at the end of the line.
- If [code]at_position[/code] is given, the point is inserted before the point number [code]at_position[/code], moving that point (and every point after) after the inserted point. If [code]at_position[/code] is not given, or is an illegal value ([code]at_position &lt; 0[/code] or [code]at_position &gt;= [method get_point_count][/code]), the point will be appended at the end of the point list.
+ Adds a point with the specified [param position] relative to the line's own position. Appends the new point at the end of the point list.
+ If [param index] is given, the new point is inserted before the existing point identified by index [param index]. Every existing point starting from [param index] is shifted further down the list of points. The index must be greater than or equal to [code]0[/code] and must not exceed the number of existing points in the line. See [method get_point_count].
</description>
</method>
<method name="clear_points">
@@ -29,29 +29,29 @@
<method name="get_point_count" qualifiers="const">
<return type="int" />
<description>
- Returns the Line2D's amount of points.
+ Returns the number of points in the line.
</description>
</method>
<method name="get_point_position" qualifiers="const">
<return type="Vector2" />
- <param index="0" name="i" type="int" />
+ <param index="0" name="index" type="int" />
<description>
- Returns point [code]i[/code]'s position.
+ Returns the position of the point at index [param index].
</description>
</method>
<method name="remove_point">
<return type="void" />
- <param index="0" name="i" type="int" />
+ <param index="0" name="index" type="int" />
<description>
- Removes the point at index [code]i[/code] from the line.
+ Removes the point at index [param index] from the line.
</description>
</method>
<method name="set_point_position">
<return type="void" />
- <param index="0" name="i" type="int" />
+ <param index="0" name="index" type="int" />
<param index="1" name="position" type="Vector2" />
<description>
- Overwrites the position in point [code]i[/code] with the supplied [code]position[/code].
+ Overwrites the position of the point at index [param index] with the supplied [param position].
</description>
</method>
</methods>
diff --git a/doc/classes/LineEdit.xml b/doc/classes/LineEdit.xml
index c06118e621..e57cc68b36 100644
--- a/doc/classes/LineEdit.xml
+++ b/doc/classes/LineEdit.xml
@@ -48,7 +48,7 @@
<param index="0" name="from_column" type="int" />
<param index="1" name="to_column" type="int" />
<description>
- Deletes a section of the [member text] going from position [code]from_column[/code] to [code]to_column[/code]. Both parameters should be within the text's length.
+ Deletes a section of the [member text] going from position [param from_column] to [param to_column]. Both parameters should be within the text's length.
</description>
</method>
<method name="deselect">
@@ -65,7 +65,7 @@
</description>
</method>
<method name="get_scroll_offset" qualifiers="const">
- <return type="int" />
+ <return type="float" />
<description>
Returns the scroll offset due to [member caret_column], as a number of characters.
</description>
@@ -92,7 +92,7 @@
<return type="void" />
<param index="0" name="text" type="String" />
<description>
- Inserts [code]text[/code] at the caret. If the resulting value is longer than [member max_length], nothing happens.
+ Inserts [param text] at the caret. If the resulting value is longer than [member max_length], nothing happens.
</description>
</method>
<method name="is_menu_visible" qualifiers="const">
@@ -113,7 +113,7 @@
<param index="0" name="from" type="int" default="0" />
<param index="1" name="to" type="int" default="-1" />
<description>
- Selects characters inside [LineEdit] between [code]from[/code] and [code]to[/code]. By default, [code]from[/code] is at the beginning and [code]to[/code] at the end.
+ Selects characters inside [LineEdit] between [param from] and [param to]. By default, [param from] is at the beginning and [param to] at the end.
[codeblocks]
[gdscript]
text = "Welcome"
@@ -144,7 +144,7 @@
<member name="caret_blink" type="bool" setter="set_caret_blink_enabled" getter="is_caret_blink_enabled" default="false">
If [code]true[/code], the caret (text cursor) blinks.
</member>
- <member name="caret_blink_speed" type="float" setter="set_caret_blink_speed" getter="get_caret_blink_speed" default="0.65">
+ <member name="caret_blink_interval" type="float" setter="set_caret_blink_interval" getter="get_caret_blink_interval" default="0.65">
Duration (in seconds) of a caret's blinking cycle.
</member>
<member name="caret_column" type="int" setter="set_caret_column" getter="get_caret_column" default="0">
@@ -183,7 +183,7 @@
Language code used for line-breaking and text shaping algorithms, if left empty current locale is used instead.
</member>
<member name="max_length" type="int" setter="set_max_length" getter="get_max_length" default="0">
- Maximum amount of characters that can be entered inside the [LineEdit]. If [code]0[/code], there is no limit.
+ Maximum number of characters that can be entered inside the [LineEdit]. If [code]0[/code], there is no limit.
When a limit is defined, characters that would exceed [member max_length] are truncated. This happens both for existing [member text] contents when setting the max length, or for new text inserted in the [LineEdit], including pasting. If any input text is truncated, the [signal text_change_rejected] signal is emitted with the truncated substring as parameter.
[b]Example:[/b]
[codeblocks]
@@ -221,8 +221,11 @@
<member name="secret" type="bool" setter="set_secret" getter="is_secret" default="false">
If [code]true[/code], every character is replaced with the secret character (see [member secret_character]).
</member>
- <member name="secret_character" type="String" setter="set_secret_character" getter="get_secret_character" default="&quot;*&quot;">
- The character to use to mask secret input (defaults to "*"). Only a single character can be used as the secret character.
+ <member name="secret_character" type="String" setter="set_secret_character" getter="get_secret_character" default="&quot;•&quot;">
+ The character to use to mask secret input (defaults to "•"). Only a single character can be used as the secret character.
+ </member>
+ <member name="select_all_on_focus" type="bool" setter="set_select_all_on_focus" getter="is_select_all_on_focus" default="false">
+ If [code]true[/code], the [LineEdit] will select the whole text when it gains focus.
</member>
<member name="selecting_enabled" type="bool" setter="set_selecting_enabled" getter="is_selecting_enabled" default="true">
If [code]false[/code], it's impossible to select the text using mouse nor keyboard.
@@ -379,7 +382,7 @@
</constant>
<constant name="KEYBOARD_TYPE_PASSWORD" value="6" enum="VirtualKeyboardType">
Virtual keyboard for entering a password. On most platforms, this should disable autocomplete and autocapitalization.
- [b]Note:[/b] This is not supported on HTML5. Instead, this behaves identically to [constant KEYBOARD_TYPE_DEFAULT].
+ [b]Note:[/b] This is not supported on Web. Instead, this behaves identically to [constant KEYBOARD_TYPE_DEFAULT].
</constant>
<constant name="KEYBOARD_TYPE_URL" value="7" enum="VirtualKeyboardType">
Virtual keyboard with additional keys to assist with typing URLs.
@@ -417,7 +420,7 @@
The caret's width in pixels. Greater values can be used to improve accessibility by ensuring the caret is easily visible, or to ensure consistency with a large font size.
</theme_item>
<theme_item name="minimum_character_width" data_type="constant" type="int" default="4">
- Minimum horizontal space for the text (not counting the clear button and content margins). This value is measured in count of 'M' characters (i.e. this amount of 'M' characters can be displayed without scrolling).
+ Minimum horizontal space for the text (not counting the clear button and content margins). This value is measured in count of 'M' characters (i.e. this number of 'M' characters can be displayed without scrolling).
</theme_item>
<theme_item name="outline_size" data_type="constant" type="int" default="0">
The size of the text outline.
diff --git a/doc/classes/LinkButton.xml b/doc/classes/LinkButton.xml
index 7c6ff2d4e1..d7701ea184 100644
--- a/doc/classes/LinkButton.xml
+++ b/doc/classes/LinkButton.xml
@@ -10,9 +10,11 @@
<tutorials>
</tutorials>
<members>
+ <member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" overrides="Control" enum="Control.FocusMode" default="0" />
<member name="language" type="String" setter="set_language" getter="get_language" default="&quot;&quot;">
Language code used for line-breaking and text shaping algorithms, if left empty current locale is used instead.
</member>
+ <member name="mouse_default_cursor_shape" type="int" setter="set_default_cursor_shape" getter="get_default_cursor_shape" overrides="Control" enum="Control.CursorShape" default="2" />
<member name="structured_text_bidi_override" type="int" setter="set_structured_text_bidi_override" getter="get_structured_text_bidi_override" enum="TextServer.StructuredTextParser" default="0">
Set BiDi algorithm override for the structured text.
</member>
diff --git a/doc/classes/MainLoop.xml b/doc/classes/MainLoop.xml
index acc59a307b..674adb1772 100644
--- a/doc/classes/MainLoop.xml
+++ b/doc/classes/MainLoop.xml
@@ -76,7 +76,7 @@
<return type="bool" />
<param index="0" name="delta" type="float" />
<description>
- Called each physics frame with the time since the last physics frame as argument ([code]delta[/code], in seconds). Equivalent to [method Node._physics_process].
+ Called each physics frame with the time since the last physics frame as argument ([param delta], in seconds). Equivalent to [method Node._physics_process].
If implemented, the method must return a boolean value. [code]true[/code] ends the main loop, while [code]false[/code] lets it proceed to the next frame.
</description>
</method>
diff --git a/doc/classes/Position2D.xml b/doc/classes/Marker2D.xml
index 754fd1fdf1..bf90438bf0 100644
--- a/doc/classes/Position2D.xml
+++ b/doc/classes/Marker2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Position2D" inherits="Node2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+<class name="Marker2D" inherits="Node2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Generic 2D position hint for editing.
</brief_description>
diff --git a/doc/classes/Marker3D.xml b/doc/classes/Marker3D.xml
new file mode 100644
index 0000000000..0d49b376a8
--- /dev/null
+++ b/doc/classes/Marker3D.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Marker3D" inherits="Node3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ Generic 3D position hint for editing.
+ </brief_description>
+ <description>
+ Generic 3D position hint for editing. It's just like a plain [Node3D], but it displays as a cross in the 3D editor at all times.
+ </description>
+ <tutorials>
+ </tutorials>
+ <members>
+ <member name="gizmo_extents" type="float" setter="set_gizmo_extents" getter="get_gizmo_extents" default="0.25">
+ Size of the gizmo cross that appears in the editor.
+ </member>
+ </members>
+</class>
diff --git a/doc/classes/Marshalls.xml b/doc/classes/Marshalls.xml
index ac7b4a48b9..102e4b75ed 100644
--- a/doc/classes/Marshalls.xml
+++ b/doc/classes/Marshalls.xml
@@ -13,14 +13,14 @@
<return type="PackedByteArray" />
<param index="0" name="base64_str" type="String" />
<description>
- Returns a decoded [PackedByteArray] corresponding to the Base64-encoded string [code]base64_str[/code].
+ Returns a decoded [PackedByteArray] corresponding to the Base64-encoded string [param base64_str].
</description>
</method>
<method name="base64_to_utf8">
<return type="String" />
<param index="0" name="base64_str" type="String" />
<description>
- Returns a decoded string corresponding to the Base64-encoded string [code]base64_str[/code].
+ Returns a decoded string corresponding to the Base64-encoded string [param base64_str].
</description>
</method>
<method name="base64_to_variant">
@@ -28,7 +28,7 @@
<param index="0" name="base64_str" type="String" />
<param index="1" name="allow_objects" type="bool" default="false" />
<description>
- Returns a decoded [Variant] corresponding to the Base64-encoded string [code]base64_str[/code]. If [code]allow_objects[/code] is [code]true[/code], decoding objects is allowed.
+ Returns a decoded [Variant] corresponding to the Base64-encoded string [param base64_str]. If [param allow_objects] is [code]true[/code], decoding objects is allowed.
[b]Warning:[/b] Deserialized objects can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats such as remote code execution.
</description>
</method>
@@ -43,7 +43,7 @@
<return type="String" />
<param index="0" name="utf8_str" type="String" />
<description>
- Returns a Base64-encoded string of the UTF-8 string [code]utf8_str[/code].
+ Returns a Base64-encoded string of the UTF-8 string [param utf8_str].
</description>
</method>
<method name="variant_to_base64">
@@ -51,7 +51,7 @@
<param index="0" name="variant" type="Variant" />
<param index="1" name="full_objects" type="bool" default="false" />
<description>
- Returns a Base64-encoded string of the [Variant] [code]variant[/code]. If [code]full_objects[/code] is [code]true[/code], encoding objects is allowed (and can potentially include code).
+ Returns a Base64-encoded string of the [Variant] [param variant]. If [param full_objects] is [code]true[/code], encoding objects is allowed (and can potentially include code).
</description>
</method>
</methods>
diff --git a/doc/classes/MenuBar.xml b/doc/classes/MenuBar.xml
new file mode 100644
index 0000000000..e8505937ff
--- /dev/null
+++ b/doc/classes/MenuBar.xml
@@ -0,0 +1,169 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="MenuBar" inherits="Control" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ A horizontal menu bar, which displays [PopupMenu]s or system global menu.
+ </brief_description>
+ <description>
+ New items can be created by adding [PopupMenu] nodes to his node.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="get_menu_count" qualifiers="const">
+ <return type="int" />
+ <description>
+ Returns number of menu items.
+ </description>
+ </method>
+ <method name="get_menu_popup" qualifiers="const">
+ <return type="PopupMenu" />
+ <param index="0" name="menu" type="int" />
+ <description>
+ Returns [PopupMenu] associated with menu item.
+ </description>
+ </method>
+ <method name="get_menu_title" qualifiers="const">
+ <return type="String" />
+ <param index="0" name="menu" type="int" />
+ <description>
+ Returns menu item title.
+ </description>
+ </method>
+ <method name="get_menu_tooltip" qualifiers="const">
+ <return type="String" />
+ <param index="0" name="menu" type="int" />
+ <description>
+ Returns menu item tooltip.
+ </description>
+ </method>
+ <method name="is_menu_disabled" qualifiers="const">
+ <return type="bool" />
+ <param index="0" name="menu" type="int" />
+ <description>
+ Returns [code]true[/code], if menu item is disabled.
+ </description>
+ </method>
+ <method name="is_menu_hidden" qualifiers="const">
+ <return type="bool" />
+ <param index="0" name="menu" type="int" />
+ <description>
+ Returns [code]true[/code], if menu item is hidden.
+ </description>
+ </method>
+ <method name="is_native_menu" qualifiers="const">
+ <return type="bool" />
+ <description>
+ Returns [code]true[/code], if system global menu is supported and used by this [MenuBar].
+ </description>
+ </method>
+ <method name="set_disable_shortcuts">
+ <return type="void" />
+ <param index="0" name="disabled" type="bool" />
+ <description>
+ If [code]true[/code], shortcuts are disabled and cannot be used to trigger the button.
+ </description>
+ </method>
+ <method name="set_menu_disabled">
+ <return type="void" />
+ <param index="0" name="menu" type="int" />
+ <param index="1" name="disabled" type="bool" />
+ <description>
+ If [code]true[/code], menu item is disabled.
+ </description>
+ </method>
+ <method name="set_menu_hidden">
+ <return type="void" />
+ <param index="0" name="menu" type="int" />
+ <param index="1" name="hidden" type="bool" />
+ <description>
+ If [code]true[/code], menu item is hidden.
+ </description>
+ </method>
+ <method name="set_menu_title">
+ <return type="void" />
+ <param index="0" name="menu" type="int" />
+ <param index="1" name="title" type="String" />
+ <description>
+ Sets menu item title.
+ </description>
+ </method>
+ <method name="set_menu_tooltip">
+ <return type="void" />
+ <param index="0" name="menu" type="int" />
+ <param index="1" name="tooltip" type="String" />
+ <description>
+ Sets menu item tooltip.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="flat" type="bool" setter="set_flat" getter="is_flat" default="false">
+ Flat [MenuBar] don't display item decoration.
+ </member>
+ <member name="language" type="String" setter="set_language" getter="get_language" default="&quot;&quot;">
+ Language code used for line-breaking and text shaping algorithms, if left empty current locale is used instead.
+ </member>
+ <member name="prefer_global_menu" type="bool" setter="set_prefer_global_menu" getter="is_prefer_global_menu" default="true">
+ If [code]true[/code], [MenuBar] will use system global menu when supported.
+ </member>
+ <member name="start_index" type="int" setter="set_start_index" getter="get_start_index" default="-1">
+ Position in the global menu to insert first [MenuBar] item at.
+ </member>
+ <member name="switch_on_hover" type="bool" setter="set_switch_on_hover" getter="is_switch_on_hover" default="true">
+ If [code]true[/code], when the cursor hovers above menu item, it will close the current [PopupMenu] and open the other one.
+ </member>
+ <member name="text_direction" type="int" setter="set_text_direction" getter="get_text_direction" enum="Control.TextDirection" default="0">
+ Base text writing direction.
+ </member>
+ </members>
+ <theme_items>
+ <theme_item name="font_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 1)">
+ Default text [Color] of the menu item.
+ </theme_item>
+ <theme_item name="font_disabled_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 0.5)">
+ Text [Color] used when the menu item is disabled.
+ </theme_item>
+ <theme_item name="font_focus_color" data_type="color" type="Color" default="Color(0.95, 0.95, 0.95, 1)">
+ Text [Color] used when the menu item is focused. Only replaces the normal text color of the menu item. Disabled, hovered, and pressed states take precedence over this color.
+ </theme_item>
+ <theme_item name="font_hover_color" data_type="color" type="Color" default="Color(0.95, 0.95, 0.95, 1)">
+ Text [Color] used when the menu item is being hovered.
+ </theme_item>
+ <theme_item name="font_hover_pressed_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
+ Text [Color] used when the menu item is being hovered and pressed.
+ </theme_item>
+ <theme_item name="font_outline_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
+ The tint of text outline of the menu item.
+ </theme_item>
+ <theme_item name="font_pressed_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
+ Text [Color] used when the menu item is being pressed.
+ </theme_item>
+ <theme_item name="h_separation" data_type="constant" type="int" default="4">
+ The horizontal space between menu items.
+ </theme_item>
+ <theme_item name="outline_size" data_type="constant" type="int" default="0">
+ The size of the text outline.
+ </theme_item>
+ <theme_item name="font" data_type="font" type="Font">
+ [Font] of the menu item's text.
+ </theme_item>
+ <theme_item name="font_size" data_type="font_size" type="int">
+ Font size of the menu item's text.
+ </theme_item>
+ <theme_item name="disabled" data_type="style" type="StyleBox">
+ [StyleBox] used when the menu item is disabled.
+ </theme_item>
+ <theme_item name="focus" data_type="style" type="StyleBox">
+ [StyleBox] used when the menu item is focused. The [code]focus[/code] [StyleBox] is displayed [i]over[/i] the base [StyleBox], so a partially transparent [StyleBox] should be used to ensure the base [StyleBox] remains visible. A [StyleBox] that represents an outline or an underline works well for this purpose. To disable the focus visual effect, assign a [StyleBoxEmpty] resource. Note that disabling the focus visual effect will harm keyboard/controller navigation usability, so this is not recommended for accessibility reasons.
+ </theme_item>
+ <theme_item name="hover" data_type="style" type="StyleBox">
+ [StyleBox] used when the menu item is being hovered.
+ </theme_item>
+ <theme_item name="normal" data_type="style" type="StyleBox">
+ Default [StyleBox] for the menu item.
+ </theme_item>
+ <theme_item name="pressed" data_type="style" type="StyleBox">
+ [StyleBox] used when the menu item is being pressed.
+ </theme_item>
+ </theme_items>
+</class>
diff --git a/doc/classes/MenuButton.xml b/doc/classes/MenuButton.xml
index 8baa724292..4d5d5a011b 100644
--- a/doc/classes/MenuButton.xml
+++ b/doc/classes/MenuButton.xml
@@ -25,6 +25,12 @@
If [code]true[/code], shortcuts are disabled and cannot be used to trigger the button.
</description>
</method>
+ <method name="show_popup">
+ <return type="void" />
+ <description>
+ Adjusts popup position and sizing for the [MenuButton], then shows the [PopupMenu]. Prefer this over using [code]get_popup().popup()[/code].
+ </description>
+ </method>
</methods>
<members>
<member name="action_mode" type="int" setter="set_action_mode" getter="get_action_mode" overrides="BaseButton" enum="BaseButton.ActionMode" default="0" />
@@ -65,7 +71,7 @@
Text [Color] used when the [MenuButton] is being pressed.
</theme_item>
<theme_item name="h_separation" data_type="constant" type="int" default="3">
- The horizontal space between [MenuButton]'s icon and text.
+ The horizontal space between [MenuButton]'s icon and text. Negative values will be treated as [code]0[/code] when used.
</theme_item>
<theme_item name="outline_size" data_type="constant" type="int" default="0">
The size of the text outline.
diff --git a/doc/classes/Mesh.xml b/doc/classes/Mesh.xml
index f708917b4b..640fa9efec 100644
--- a/doc/classes/Mesh.xml
+++ b/doc/classes/Mesh.xml
@@ -60,7 +60,7 @@
</description>
</method>
<method name="_surface_get_blend_shape_arrays" qualifiers="virtual const">
- <return type="Array" />
+ <return type="Array[]" />
<param index="0" name="index" type="int" />
<description>
</description>
@@ -102,8 +102,8 @@
<param index="1" name="simplify" type="bool" default="false" />
<description>
Calculate a [ConvexPolygonShape3D] from the mesh.
- If [code]clean[/code] is [code]true[/code] (default), duplicate and interior vertices are removed automatically. You can set it to [code]false[/code] to make the process faster if not needed.
- If [code]simplify[/code] is [code]true[/code], the geometry can be further simplified to reduce the amount of vertices. Disabled by default.
+ If [param clean] is [code]true[/code] (default), duplicate and interior vertices are removed automatically. You can set it to [code]false[/code] to make the process faster if not needed.
+ If [param simplify] is [code]true[/code], the geometry can be further simplified to reduce the number of vertices. Disabled by default.
</description>
</method>
<method name="create_outline" qualifiers="const">
@@ -129,7 +129,7 @@
<method name="get_aabb" qualifiers="const">
<return type="AABB" />
<description>
- Returns the smallest [AABB] enclosing this mesh in local space. Not affected by [code]custom_aabb[/code]. See also [method VisualInstance3D.get_transformed_aabb].
+ Returns the smallest [AABB] enclosing this mesh in local space. Not affected by [code]custom_aabb[/code].
[b]Note:[/b] This is only implemented for [ArrayMesh] and [PrimitiveMesh].
</description>
</method>
@@ -142,7 +142,7 @@
<method name="get_surface_count" qualifiers="const">
<return type="int" />
<description>
- Returns the amount of surfaces that the [Mesh] holds.
+ Returns the number of surfaces that the [Mesh] holds.
</description>
</method>
<method name="surface_get_arrays" qualifiers="const">
@@ -153,7 +153,7 @@
</description>
</method>
<method name="surface_get_blend_shape_arrays" qualifiers="const">
- <return type="Array" />
+ <return type="Array[]" />
<param index="0" name="surf_idx" type="int" />
<description>
Returns the blend shape arrays for the requested surface.
@@ -176,7 +176,7 @@
</method>
</methods>
<members>
- <member name="lightmap_size_hint" type="Vector2i" setter="set_lightmap_size_hint" getter="get_lightmap_size_hint">
+ <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/MeshInstance3D.xml b/doc/classes/MeshInstance3D.xml
index 1e69af6fd7..618503c8df 100644
--- a/doc/classes/MeshInstance3D.xml
+++ b/doc/classes/MeshInstance3D.xml
@@ -19,8 +19,8 @@
<param index="1" name="simplify" type="bool" default="false" />
<description>
This helper creates a [StaticBody3D] child node with a [ConvexPolygonShape3D] collision shape calculated from the mesh geometry. It's mainly used for testing.
- If [code]clean[/code] is [code]true[/code] (default), duplicate and interior vertices are removed automatically. You can set it to [code]false[/code] to make the process faster if not needed.
- If [code]simplify[/code] is [code]true[/code], the geometry can be further simplified to reduce the amount of vertices. Disabled by default.
+ If [param clean] is [code]true[/code] (default), duplicate and interior vertices are removed automatically. You can set it to [code]false[/code] to make the process faster if not needed.
+ If [param simplify] is [code]true[/code], the geometry can be further simplified to reduce the number of vertices. Disabled by default.
</description>
</method>
<method name="create_debug_tangents">
diff --git a/doc/classes/MeshTexture.xml b/doc/classes/MeshTexture.xml
index 8e2bccc79f..d09fa4c898 100644
--- a/doc/classes/MeshTexture.xml
+++ b/doc/classes/MeshTexture.xml
@@ -18,5 +18,6 @@
<member name="mesh" type="Mesh" setter="set_mesh" getter="get_mesh">
Sets the mesh used to draw. It must be a mesh using 2D vertices.
</member>
+ <member name="resource_local_to_scene" type="bool" setter="set_local_to_scene" getter="is_local_to_scene" overrides="Resource" default="false" />
</members>
</class>
diff --git a/doc/classes/MissingNode.xml b/doc/classes/MissingNode.xml
index b5aa02cfd6..ac54329313 100644
--- a/doc/classes/MissingNode.xml
+++ b/doc/classes/MissingNode.xml
@@ -4,7 +4,7 @@
This is an internal editor class intended for keeping data of nodes of unknown type.
</brief_description>
<description>
- This is an internal editor class intended for keeping data of nodes of unknown type (most likely this type was supplied by an extension that is no longer loaded). It can´t be manually instantiated or placed in the scene. Ignore it if you don't know what it is.
+ This is an internal editor class intended for keeping data of nodes of unknown type (most likely this type was supplied by an extension that is no longer loaded). It can't be manually instantiated or placed in the scene. Ignore it if you don't know what it is.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/MissingResource.xml b/doc/classes/MissingResource.xml
index eede6350d8..e5a6c4d064 100644
--- a/doc/classes/MissingResource.xml
+++ b/doc/classes/MissingResource.xml
@@ -4,7 +4,7 @@
This is an internal editor class intended for keeping data of resources of unknown type.
</brief_description>
<description>
- This is an internal editor class intended for keeping data of resources of unknown type (most likely this type was supplied by an extension that is no longer loaded). It can´t be manually instantiated or placed in the scene. Ignore it if you don't know what it is.
+ This is an internal editor class intended for keeping data of resources of unknown type (most likely this type was supplied by an extension that is no longer loaded). It can't be manually instantiated or placed in the scene. Ignore it if you don't know what it is.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/MovieWriter.xml b/doc/classes/MovieWriter.xml
index 9701f49b99..1652dd52aa 100644
--- a/doc/classes/MovieWriter.xml
+++ b/doc/classes/MovieWriter.xml
@@ -4,7 +4,7 @@
Abstract class for non-real-time video recording encoders.
</brief_description>
<description>
- Godot can record videos with non-real-time simulation. Like the [code]--fixed-fps[/code] command line argument, this forces the reported [code]delta[/code] in [method Node._process] functions to be identical across frames, regardless of how long it actually took to render the frame. This can be used to record high-quality videos with perfect frame pacing regardless of your hardware's capabilities.
+ Godot can record videos with non-real-time simulation. Like the [code]--fixed-fps[/code] [url=$DOCS_URL/tutorials/editor/command_line_tutorial.html]command line argument[/url], this forces the reported [code]delta[/code] in [method Node._process] functions to be identical across frames, regardless of how long it actually took to render the frame. This can be used to record high-quality videos with perfect frame pacing regardless of your hardware's capabilities.
Godot has 2 built-in [MovieWriter]s:
- AVI container with MJPEG for video and uncompressed audio ([code].avi[/code] file extension). Lossy compression, medium file sizes, fast encoding. The lossy compression quality can be adjusted by changing [member ProjectSettings.editor/movie_writer/mjpeg_quality]. The resulting file can be viewed in most video players, but it must be converted to another format for viewing on the web or by Godot with [VideoStreamPlayer]. MJPEG does not support transparency. AVI output is currently limited to a file of 4 GB in size at most.
- PNG image sequence for video and WAV for audio ([code].png[/code] file extension). Lossless compression, large file sizes, slow encoding. Designed to be encoded to a video file with another tool such as [url=https://ffmpeg.org/]FFmpeg[/url] after recording. Transparency is currently not supported, even if the root viewport is set to be transparent.
@@ -31,7 +31,7 @@
<return type="bool" />
<param index="0" name="path" type="String" />
<description>
- Called when the engine determines whether this [MovieWriter] is able to handle the file at [code]path[/code]. Must return [code]true[/code] if this [MovieWriter] is able to handle the given file path, [code]false[/code] otherwise. Typically, [method _handles_file] is overridden as follows to allow the user to record a file at any path with a given file extension:
+ Called when the engine determines whether this [MovieWriter] is able to handle the file at [param path]. Must return [code]true[/code] if this [MovieWriter] is able to handle the given file path, [code]false[/code] otherwise. Typically, [method _handles_file] is overridden as follows to allow the user to record a file at any path with a given file extension:
[codeblock]
func _handles_file(path):
# Allows specifying an output file with a `.mkv` file extension (case-insensitive),
@@ -46,7 +46,7 @@
<param index="1" name="fps" type="int" />
<param index="2" name="base_path" type="String" />
<description>
- Called once before the engine starts writing video and audio data. [code]movie_size[/code] is the width and height of the video to save. [code]fps[/code] is the number of frames per second specified in the project settings or using the [code]--fixed-fps &lt;fps&gt;[/code] command line argument.
+ Called once before the engine starts writing video and audio data. [param movie_size] is the width and height of the video to save. [param fps] is the number of frames per second specified in the project settings or using the [code]--fixed-fps &lt;fps&gt;[/code] [url=$DOCS_URL/tutorials/editor/command_line_tutorial.html]command line argument[/url].
</description>
</method>
<method name="_write_end" qualifiers="virtual">
@@ -61,7 +61,7 @@
<param index="0" name="frame_image" type="Image" />
<param index="1" name="audio_frame_block" type="const void*" />
<description>
- Called at the end of every rendered frame. The [code]frame_image[/code] and [code]audio_frame_block[/code] function arguments should be written to.
+ Called at the end of every rendered frame. The [param frame_image] and [param audio_frame_block] function arguments should be written to.
</description>
</method>
<method name="add_writer" qualifiers="static">
diff --git a/doc/classes/MultiMesh.xml b/doc/classes/MultiMesh.xml
index bae2335cfb..d8a232b3cf 100644
--- a/doc/classes/MultiMesh.xml
+++ b/doc/classes/MultiMesh.xml
@@ -1,13 +1,15 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="MultiMesh" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
- Provides high-performance mesh instancing.
+ Provides high-performance drawing of a mesh multiple times using GPU instancing.
</brief_description>
<description>
MultiMesh provides low-level mesh instancing. Drawing thousands of [MeshInstance3D] nodes can be slow, since each object is submitted to the GPU then drawn individually.
MultiMesh is much faster as it can draw thousands of instances with a single draw call, resulting in less API overhead.
As a drawback, if the instances are too far away from each other, performance may be reduced as every single instance will always render (they are spatially indexed as one, for the whole object).
Since instances may have any behavior, the AABB used for visibility must be provided by the user.
+ [b]Note:[/b] A MultiMesh is a single object, therefore the same maximum lights per object restriction applies. This means, that once the maximum lights are consumed by one or more instances, the rest of the MultiMesh instances will [b]not[/b] receive any lighting.
+ [b]Note:[/b] Blend Shapes will be ignored if used in a MultiMesh.
</description>
<tutorials>
<link title="Animating thousands of fish with MultiMeshInstance">$DOCS_URL/tutorials/performance/vertex_animation/animating_thousands_of_fish.html</link>
@@ -17,14 +19,14 @@
<method name="get_aabb" qualifiers="const">
<return type="AABB" />
<description>
- Returns the visibility axis-aligned bounding box in local space. See also [method VisualInstance3D.get_transformed_aabb].
+ Returns the visibility axis-aligned bounding box in local space.
</description>
</method>
<method name="get_instance_color" qualifiers="const">
<return type="Color" />
<param index="0" name="instance" type="int" />
<description>
- Gets a specific instance's color.
+ Gets a specific instance's color multiplier.
</description>
</method>
<method name="get_instance_custom_data" qualifiers="const">
@@ -53,8 +55,8 @@
<param index="0" name="instance" type="int" />
<param index="1" name="color" type="Color" />
<description>
- Sets the color of a specific instance by [i]multiplying[/i] the mesh's existing vertex colors.
- For the color to take effect, ensure that [member use_colors] is [code]true[/code] on the [MultiMesh] and [member BaseMaterial3D.vertex_color_use_as_albedo] is [code]true[/code] on the material. If the color doesn't look as expected, make sure the material's albedo color is set to pure white ([code]Color(1, 1, 1)[/code]).
+ Sets the color of a specific instance by [i]multiplying[/i] the mesh's existing vertex colors. This allows for different color tinting per instance.
+ For the color to take effect, ensure that [member use_colors] is [code]true[/code] on the [MultiMesh] and [member BaseMaterial3D.vertex_color_use_as_albedo] is [code]true[/code] on the material. If you intend to set an absolute color instead of tinting, make sure the material's albedo color is set to pure white ([code]Color(1, 1, 1)[/code]).
</description>
</method>
<method name="set_instance_custom_data">
@@ -64,6 +66,7 @@
<description>
Sets custom data for a specific instance. Although [Color] is used, it is just a container for 4 floating point numbers.
For the custom data to be used, ensure that [member use_custom_data] is [code]true[/code].
+ This custom instance data has to be manually accessed in your custom shader using [code]INSTANCE_CUSTOM[/code].
</description>
</method>
<method name="set_instance_transform">
@@ -87,28 +90,33 @@
<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">
+ See [method set_instance_color].
</member>
<member name="custom_data_array" type="PackedColorArray" setter="_set_custom_data_array" getter="_get_custom_data_array">
+ See [method set_instance_custom_data].
</member>
<member name="instance_count" type="int" setter="set_instance_count" getter="get_instance_count" default="0">
Number of instances that will get drawn. This clears and (re)sizes the buffers. Setting data format or flags afterwards will have no effect.
By default, all instances are drawn but you can limit this with [member visible_instance_count].
</member>
<member name="mesh" type="Mesh" setter="set_mesh" getter="get_mesh">
- Mesh to be drawn.
+ [Mesh] resource to be instanced.
+ The looks of the individual instances can be modified using [method set_instance_color] and [method set_instance_custom_data].
</member>
<member name="transform_2d_array" type="PackedVector2Array" setter="_set_transform_2d_array" getter="_get_transform_2d_array">
+ See [method set_instance_transform_2d].
</member>
<member name="transform_array" type="PackedVector3Array" setter="_set_transform_array" getter="_get_transform_array">
+ See [method set_instance_transform].
</member>
<member name="transform_format" type="int" setter="set_transform_format" getter="get_transform_format" enum="MultiMesh.TransformFormat" default="0">
Format of transform used to transform mesh, either 2D or 3D.
</member>
<member name="use_colors" type="bool" setter="set_use_colors" getter="is_using_colors" default="false">
- If [code]true[/code], the [MultiMesh] will use color data (see [member color_array]).
+ If [code]true[/code], the [MultiMesh] will use color data (see [method set_instance_color]). Can only be set when [member instance_count] is [code]0[/code] or less. This means that you need to call this method before setting the instance count, or temporarily reset it to [code]0[/code].
</member>
<member name="use_custom_data" type="bool" setter="set_use_custom_data" getter="is_using_custom_data" default="false">
- If [code]true[/code], the [MultiMesh] will use custom data (see [member custom_data_array]).
+ If [code]true[/code], the [MultiMesh] will use custom data (see [method set_instance_custom_data]). Can only be set when [member instance_count] is [code]0[/code] or less. This means that you need to call this method before setting the instance count, or temporarily reset it to [code]0[/code].
</member>
<member name="visible_instance_count" type="int" setter="set_visible_instance_count" getter="get_visible_instance_count" default="-1">
Limits the number of instances drawn, -1 draws all instances. Changing this does not change the sizes of the buffers.
diff --git a/doc/classes/MultiMeshInstance3D.xml b/doc/classes/MultiMeshInstance3D.xml
index 52cc9cb65f..70fbf235e2 100644
--- a/doc/classes/MultiMeshInstance3D.xml
+++ b/doc/classes/MultiMeshInstance3D.xml
@@ -5,7 +5,7 @@
</brief_description>
<description>
[MultiMeshInstance3D] is a specialized node to instance [GeometryInstance3D]s based on a [MultiMesh] resource.
- This is useful to optimize the rendering of a high amount of instances of a given mesh (for example trees in a forest or grass strands).
+ This is useful to optimize the rendering of a high number of instances of a given mesh (for example trees in a forest or grass strands).
</description>
<tutorials>
<link title="Animating thousands of fish with MultiMeshInstance">$DOCS_URL/tutorials/performance/vertex_animation/animating_thousands_of_fish.html</link>
diff --git a/doc/classes/MultiplayerAPI.xml b/doc/classes/MultiplayerAPI.xml
index e0a3a29147..3ce6ce41b4 100644
--- a/doc/classes/MultiplayerAPI.xml
+++ b/doc/classes/MultiplayerAPI.xml
@@ -60,7 +60,7 @@
<param index="0" name="object" type="Object" />
<param index="1" name="configuration" type="Variant" />
<description>
- Notifies the MultiplayerAPI of a new [code]configuration[/code] for the given [code]object[/code]. This method is used internally by [SceneTree] to configure the root path for this MultiplayerAPI (passing [code]null[/code] and a valid [NodePath] as [code]configuration[/code]). This method can be further used by MultiplayerAPI implementations to provide additional features, refer to specific implementation (e.g. [SceneMultiplayer]) for details on how they use it.
+ Notifies the MultiplayerAPI of a new [param configuration] for the given [param object]. This method is used internally by [SceneTree] to configure the root path for this MultiplayerAPI (passing [code]null[/code] and a valid [NodePath] as [param configuration]). This method can be further used by MultiplayerAPI implementations to provide additional features, refer to specific implementation (e.g. [SceneMultiplayer]) for details on how they use it.
[b]Note:[/b] This method is mostly relevant when extending or overriding the MultiplayerAPI behavior via [MultiplayerAPIExtension].
</description>
</method>
@@ -69,7 +69,7 @@
<param index="0" name="object" type="Object" />
<param index="1" name="configuration" type="Variant" />
<description>
- Notifies the MultiplayerAPI to remove a [code]configuration[/code] for the given [code]object[/code]. This method is used internally by [SceneTree] to configure the root path for this MultiplayerAPI (passing [code]null[/code] and an empty [NodePath] as [code]configuration[/code]). This method can be further used by MultiplayerAPI implementations to provide additional features, refer to specific implementation (e.g. [SceneMultiplayer]) for details on how they use it.
+ Notifies the MultiplayerAPI to remove a [param configuration] for the given [param object]. This method is used internally by [SceneTree] to configure the root path for this MultiplayerAPI (passing [code]null[/code] and an empty [NodePath] as [param configuration]). This method can be further used by MultiplayerAPI implementations to provide additional features, refer to specific implementation (e.g. [SceneMultiplayer]) for details on how they use it.
[b]Note:[/b] This method is mostly relevant when extending or overriding the MultiplayerAPI behavior via [MultiplayerAPIExtension].
</description>
</method>
@@ -87,7 +87,7 @@
<param index="2" name="method" type="StringName" />
<param index="3" name="arguments" type="Array" default="[]" />
<description>
- Sends an RPC to the target [code]peer[/code]. The given [code]method[/code] will be called on the remote [code]object[/code] with the provided [code]arguments[/code]. The RPC may also be called locally depending on the implementation and RPC configuration. See [method Node.rpc] and [method Node.rpc_config].
+ Sends an RPC to the target [param peer]. The given [param method] will be called on the remote [param object] with the provided [param arguments]. The RPC may also be called locally depending on the implementation and RPC configuration. See [method Node.rpc] and [method Node.rpc_config].
[b]Note:[/b] Prefer using [method Node.rpc], [method Node.rpc_id], or [code]my_method.rpc(peer, arg1, arg2, ...)[/code] (in GDScript), since they are faster. This method is mostly useful in conjunction with [MultiplayerAPIExtension] when augmenting or replacing the multiplayer capabilities.
</description>
</method>
diff --git a/doc/classes/MultiplayerAPIExtension.xml b/doc/classes/MultiplayerAPIExtension.xml
index e67970cc89..c4012a920a 100644
--- a/doc/classes/MultiplayerAPIExtension.xml
+++ b/doc/classes/MultiplayerAPIExtension.xml
@@ -5,7 +5,7 @@
</brief_description>
<description>
This class can be used to augment or replace the default [MultiplayerAPI] implementation via script or extensions.
- The following example augment the default implemenation ([SceneMultiplayer]) by logging every RPC being made, and every object being configured for replication.
+ The following example augment the default implementation ([SceneMultiplayer]) by logging every RPC being made, and every object being configured for replication.
[codeblocks]
[gdscript]
extends MultiplayerAPIExtension
diff --git a/doc/classes/MultiplayerPeer.xml b/doc/classes/MultiplayerPeer.xml
index 9e747383b6..dd7dac3f23 100644
--- a/doc/classes/MultiplayerPeer.xml
+++ b/doc/classes/MultiplayerPeer.xml
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="MultiplayerPeer" inherits="PacketPeer" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
- A high-level network interface to simplify multiplayer interactions.
+ Abstract class for specialized [PacketPeer]s used by the [MultiplayerAPI].
</brief_description>
<description>
- Manages the connection to multiplayer peers. Assigns unique IDs to each client connected to the server. See also [MultiplayerAPI].
- [b]Note:[/b] The high-level multiplayer API protocol is an implementation detail and isn't meant to be used by non-Godot servers. It may change without notice.
+ Manages the connection with one or more remote peers acting as server or client and assigning unique IDs to each of them. See also [MultiplayerAPI].
+ [b]Note:[/b] The [MultiplayerAPI] protocol is an implementation detail and isn't meant to be used by non-Godot servers. It may change without notice.
[b]Note:[/b] When exporting to Android, make sure to enable the [code]INTERNET[/code] permission in the Android export preset before exporting the project or using one-click deploy. Otherwise, network communication of any kind will be blocked by Android.
</description>
<tutorials>
@@ -13,6 +13,20 @@
<link title="WebRTC Signaling Demo">https://godotengine.org/asset-library/asset/537</link>
</tutorials>
<methods>
+ <method name="close">
+ <return type="void" />
+ <description>
+ Immediately close the multiplayer peer returning to the state [constant CONNECTION_DISCONNECTED]. Connected peers will be dropped without emitting [signal peer_disconnected].
+ </description>
+ </method>
+ <method name="disconnect_peer">
+ <return type="void" />
+ <param index="0" name="peer" type="int" />
+ <param index="1" name="force" type="bool" default="false" />
+ <description>
+ Disconnects the given [param peer] from this host. If [param force] is [code]true[/code] the [signal peer_disconnected] signal will not be emitted for this peer.
+ </description>
+ </method>
<method name="generate_unique_id" qualifiers="const">
<return type="int" />
<description>
@@ -25,10 +39,22 @@
Returns the current state of the connection. See [enum ConnectionStatus].
</description>
</method>
+ <method name="get_packet_channel" qualifiers="const">
+ <return type="int" />
+ <description>
+ Returns the channel over which the next available packet was received. See [method PacketPeer.get_available_packet_count].
+ </description>
+ </method>
+ <method name="get_packet_mode" qualifiers="const">
+ <return type="int" enum="MultiplayerPeer.TransferMode" />
+ <description>
+ Returns the [enum MultiplayerPeer.TransferMode] the remote peer used to send the next available packet. See [method PacketPeer.get_available_packet_count].
+ </description>
+ </method>
<method name="get_packet_peer" qualifiers="const">
<return type="int" />
<description>
- Returns the ID of the [MultiplayerPeer] who sent the most recent packet.
+ Returns the ID of the [MultiplayerPeer] who sent the next available packet. See [method PacketPeer.get_available_packet_count].
</description>
</method>
<method name="get_unique_id" qualifiers="const">
@@ -37,6 +63,12 @@
Returns the ID of this [MultiplayerPeer].
</description>
</method>
+ <method name="is_server_relay_supported" qualifiers="const">
+ <return type="bool" />
+ <description>
+ Returns true if the server can act as a relay in the current configuration (i.e. if the higher level [MultiplayerAPI] should notify connected clients of other peers, and implement a relay protocol to allow communication between them).
+ </description>
+ </method>
<method name="poll">
<return type="void" />
<description>
@@ -48,7 +80,7 @@
<param index="0" name="id" type="int" />
<description>
Sets the peer to which packets will be sent.
- The [code]id[/code] can be one of: [constant TARGET_PEER_BROADCAST] to send to all connected peers, [constant TARGET_PEER_SERVER] to send to the peer acting as server, a valid peer ID to send to that specific peer, a negative peer ID to send to all peers except that one. By default, the target peer is [constant TARGET_PEER_BROADCAST].
+ The [param id] can be one of: [constant TARGET_PEER_BROADCAST] to send to all connected peers, [constant TARGET_PEER_SERVER] to send to the peer acting as server, a valid peer ID to send to that specific peer, a negative peer ID to send to all peers except that one. By default, the target peer is [constant TARGET_PEER_BROADCAST].
</description>
</method>
</methods>
@@ -61,53 +93,38 @@
[b]Note:[/b] The default channel ([code]0[/code]) actually works as 3 separate channels (one for each [enum TransferMode]) so that [constant TRANSFER_MODE_RELIABLE] and [constant TRANSFER_MODE_UNRELIABLE_ORDERED] does not interact with each other by default. Refer to the specific network API documentation (e.g. ENet or WebRTC) to learn how to set up channels correctly.
</member>
<member name="transfer_mode" type="int" setter="set_transfer_mode" getter="get_transfer_mode" enum="MultiplayerPeer.TransferMode" default="2">
- The manner in which to send packets to the [code]target_peer[/code]. See [enum TransferMode].
+ The manner in which to send packets to the target peer. See [enum TransferMode], and the [method set_target_peer] method.
</member>
</members>
<signals>
- <signal name="connection_failed">
- <description>
- Emitted when a connection attempt fails.
- </description>
- </signal>
- <signal name="connection_succeeded">
- <description>
- Emitted when a connection attempt succeeds.
- </description>
- </signal>
<signal name="peer_connected">
<param index="0" name="id" type="int" />
<description>
- Emitted by the server when a client connects.
+ Emitted when a remote peer connects.
</description>
</signal>
<signal name="peer_disconnected">
<param index="0" name="id" type="int" />
<description>
- Emitted by the server when a client disconnects.
- </description>
- </signal>
- <signal name="server_disconnected">
- <description>
- Emitted by clients when the server disconnects.
+ Emitted when a remote peer has disconnected.
</description>
</signal>
</signals>
<constants>
<constant name="CONNECTION_DISCONNECTED" value="0" enum="ConnectionStatus">
- The ongoing connection disconnected.
+ The MultiplayerPeer is disconnected.
</constant>
<constant name="CONNECTION_CONNECTING" value="1" enum="ConnectionStatus">
- A connection attempt is ongoing.
+ The MultiplayerPeer is currently connecting to a server.
</constant>
<constant name="CONNECTION_CONNECTED" value="2" enum="ConnectionStatus">
- The connection attempt succeeded.
+ This MultiplayerPeer is connected.
</constant>
<constant name="TARGET_PEER_BROADCAST" value="0">
- Packets are sent to the server and then redistributed to other peers.
+ Packets are sent to all connected peers.
</constant>
<constant name="TARGET_PEER_SERVER" value="1">
- Packets are sent to the server alone.
+ Packets are sent to the remote peer acting as server.
</constant>
<constant name="TRANSFER_MODE_UNRELIABLE" value="0" enum="TransferMode">
Packets are not acknowledged, no resend attempts are made for lost packets. Packets may arrive in any order. Potentially faster than [constant TRANSFER_MODE_UNRELIABLE_ORDERED]. Use for non-critical data, and always consider whether the order matters.
diff --git a/doc/classes/MultiplayerPeerExtension.xml b/doc/classes/MultiplayerPeerExtension.xml
index 12e281fa76..5717135b80 100644
--- a/doc/classes/MultiplayerPeerExtension.xml
+++ b/doc/classes/MultiplayerPeerExtension.xml
@@ -9,6 +9,20 @@
<tutorials>
</tutorials>
<methods>
+ <method name="_close" qualifiers="virtual">
+ <return type="void" />
+ <description>
+ Called when the multiplayer peer should be immediately closed (see [method MultiplayerPeer.close]).
+ </description>
+ </method>
+ <method name="_disconnect_peer" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="p_peer" type="int" />
+ <param index="1" name="p_force" type="bool" />
+ <description>
+ Called when the connected [param p_peer] should be forcibly disconnected (see [method MultiplayerPeer.disconnect_peer]).
+ </description>
+ </method>
<method name="_get_available_packet_count" qualifiers="virtual const">
<return type="int" />
<description>
@@ -16,7 +30,7 @@
</description>
</method>
<method name="_get_connection_status" qualifiers="virtual const">
- <return type="int" />
+ <return type="int" enum="MultiplayerPeer.ConnectionStatus" />
<description>
Called when the connection status is requested on the [MultiplayerPeer] (see [method MultiplayerPeer.get_connection_status]).
</description>
@@ -28,11 +42,11 @@
</description>
</method>
<method name="_get_packet" qualifiers="virtual">
- <return type="int" />
+ <return type="int" enum="Error" />
<param index="0" name="r_buffer" type="const uint8_t **" />
<param index="1" name="r_buffer_size" type="int32_t*" />
<description>
- Called when a packet needs to be received by the [MultiplayerAPI], with [code]p_buffer_size[/code] being the size of the binary [code]p_buffer[/code] in bytes.
+ Called when a packet needs to be received by the [MultiplayerAPI], with [param r_buffer_size] being the size of the binary [param r_buffer] in bytes.
</description>
</method>
<method name="_get_packet_peer" qualifiers="virtual const">
@@ -54,7 +68,7 @@
</description>
</method>
<method name="_get_transfer_mode" qualifiers="virtual const">
- <return type="int" />
+ <return type="int" enum="MultiplayerPeer.TransferMode" />
<description>
Called when the transfer mode to use is read on this [MultiplayerPeer] (see [member MultiplayerPeer.transfer_mode]).
</description>
@@ -78,21 +92,21 @@
</description>
</method>
<method name="_poll" qualifiers="virtual">
- <return type="int" />
+ <return type="void" />
<description>
Called when the [MultiplayerAPI] is polled. See [method MultiplayerAPI.poll].
</description>
</method>
<method name="_put_packet" qualifiers="virtual">
- <return type="int" />
+ <return type="int" enum="Error" />
<param index="0" name="p_buffer" type="const uint8_t*" />
<param index="1" name="p_buffer_size" type="int" />
<description>
- Called when a packet needs to be sent by the [MultiplayerAPI], with [code]p_buffer_size[/code] being the size of the binary [code]p_buffer[/code] in bytes.
+ Called when a packet needs to be sent by the [MultiplayerAPI], with [param p_buffer_size] being the size of the binary [param p_buffer] in bytes.
</description>
</method>
<method name="_put_packet_script" qualifiers="virtual">
- <return type="int" />
+ <return type="int" enum="Error" />
<param index="0" name="p_buffer" type="PackedByteArray" />
<description>
Called when a packet needs to be sent by the [MultiplayerAPI], if [method _put_packet] isn't implemented. Use this when extending this class via GDScript.
@@ -121,7 +135,7 @@
</method>
<method name="_set_transfer_mode" qualifiers="virtual">
<return type="void" />
- <param index="0" name="p_mode" type="int" />
+ <param index="0" name="p_mode" type="int" enum="MultiplayerPeer.TransferMode" />
<description>
Called when the transfer mode is set on this [MultiplayerPeer] (see [member MultiplayerPeer.transfer_mode]).
</description>
diff --git a/doc/classes/NavigationAgent2D.xml b/doc/classes/NavigationAgent2D.xml
index c2b57404dc..8cf7824ff7 100644
--- a/doc/classes/NavigationAgent2D.xml
+++ b/doc/classes/NavigationAgent2D.xml
@@ -5,7 +5,7 @@
</brief_description>
<description>
2D Agent that is used in navigation to reach a location while avoiding static and dynamic obstacles. The dynamic obstacles are avoided using RVO collision avoidance. The agent needs navigation data to work correctly. [NavigationAgent2D] is physics safe.
- [b]Note:[/b] After [method set_target_location] is used it is required to use the [method get_next_location] function once every physics frame to update the internal path logic of the NavigationAgent. The returned vector position from this function should be used as the next movement position for the agent's parent Node.
+ [b]Note:[/b] After setting [member target_location] it is required to use the [method get_next_location] function once every physics frame to update the internal path logic of the NavigationAgent. The returned vector position from this function should be used as the next movement position for the agent's parent Node.
</description>
<tutorials>
</tutorials>
@@ -13,7 +13,7 @@
<method name="distance_to_target" qualifiers="const">
<return type="float" />
<description>
- Returns the distance to the target location, using the agent's global position. The user must set the target location with [method set_target_location] in order for this to be accurate.
+ Returns the distance to the target location, using the agent's global position. The user must set [member target_location] in order for this to be accurate.
</description>
</method>
<method name="get_final_location">
@@ -38,7 +38,7 @@
<return type="bool" />
<param index="0" name="layer_number" type="int" />
<description>
- Returns whether or not the specified layer of the [member navigation_layers] bitmask is enabled, given a [code]layer_number[/code] between 1 and 32.
+ Returns whether or not the specified layer of the [member navigation_layers] bitmask is enabled, given a [param layer_number] between 1 and 32.
</description>
</method>
<method name="get_navigation_map" qualifiers="const">
@@ -59,12 +59,6 @@
Returns the [RID] of this agent on the [NavigationServer2D].
</description>
</method>
- <method name="get_target_location" qualifiers="const">
- <return type="Vector2" />
- <description>
- Returns the user defined [Vector2] after setting the target location.
- </description>
- </method>
<method name="is_navigation_finished">
<return type="bool" />
<description>
@@ -74,13 +68,13 @@
<method name="is_target_reachable">
<return type="bool" />
<description>
- Returns true if the target location is reachable. The target location is set using [method set_target_location].
+ Returns true if [member target_location] is reachable.
</description>
</method>
<method name="is_target_reached" qualifiers="const">
<return type="bool" />
<description>
- Returns true if the target location is reached. The target location is set using [method set_target_location]. It may not always be possible to reach the target location. It should always be possible to reach the final location though. See [method get_final_location].
+ Returns true if [member target_location] is reached. It may not always be possible to reach the target location. It should always be possible to reach the final location though. See [method get_final_location].
</description>
</method>
<method name="set_navigation_layer_value">
@@ -88,7 +82,7 @@
<param index="0" name="layer_number" type="int" />
<param index="1" name="value" type="bool" />
<description>
- Based on [code]value[/code], enables or disables the specified layer in the [member navigation_layers] bitmask, given a [code]layer_number[/code] between 1 and 32.
+ Based on [param value], enables or disables the specified layer in the [member navigation_layers] bitmask, given a [param layer_number] between 1 and 32.
</description>
</method>
<method name="set_navigation_map">
@@ -98,13 +92,6 @@
Sets the [RID] of the navigation map this NavigationAgent node should use and also updates the [code]agent[/code] on the NavigationServer.
</description>
</method>
- <method name="set_target_location">
- <return type="void" />
- <param index="0" name="location" type="Vector2" />
- <description>
- Sets the user desired final location. This will clear the current navigation path.
- </description>
- </method>
<method name="set_velocity">
<return type="void" />
<param index="0" name="velocity" type="Vector2" />
@@ -126,7 +113,7 @@
<member name="navigation_layers" type="int" setter="set_navigation_layers" getter="get_navigation_layers" default="1">
A bitfield determining what navigation layers of navigation regions this agent will use to calculate path. Changing it runtime will clear current navigation path and generate new one, according to new navigation layers.
</member>
- <member name="neighbor_dist" type="float" setter="set_neighbor_dist" getter="get_neighbor_dist" default="500.0">
+ <member name="neighbor_distance" type="float" setter="set_neighbor_distance" getter="get_neighbor_distance" default="500.0">
The distance to search for other agents.
</member>
<member name="path_desired_distance" type="float" setter="set_path_desired_distance" getter="get_path_desired_distance" default="1.0">
@@ -136,12 +123,15 @@
The maximum distance the agent is allowed away from the ideal path to the final location. This can happen due to trying to avoid collisions. When the maximum distance is exceeded, it recalculates the ideal path.
</member>
<member name="radius" type="float" setter="set_radius" getter="get_radius" default="10.0">
- The radius of the avoidance agent. This is the "body" of the avoidance agent and not the avoidance maneuver starting radius (which is controlled by [member neighbor_dist]).
+ The radius of the avoidance agent. This is the "body" of the avoidance agent and not the avoidance maneuver starting radius (which is controlled by [member neighbor_distance]).
Does not affect normal pathfinding. To change an actor's pathfinding radius bake [NavigationMesh] resources with a different [member NavigationMesh.agent_radius] property and use different navigation maps for each actor size.
</member>
<member name="target_desired_distance" type="float" setter="set_target_desired_distance" getter="get_target_desired_distance" default="1.0">
The distance threshold before the final target point is considered to be reached. This will allow an agent to not have to hit the point of the final target exactly, but only the area. If this value is set to low the NavigationAgent will be stuck in a repath loop cause it will constantly overshoot or undershoot the distance to the final target point on each physics frame update.
</member>
+ <member name="target_location" type="Vector2" setter="set_target_location" getter="get_target_location" default="Vector2(0, 0)">
+ The user-defined target location. Setting this property will clear the current navigation path.
+ </member>
<member name="time_horizon" type="float" setter="set_time_horizon" getter="get_time_horizon" default="20.0">
The minimal amount of time for which this agent's velocities, that are computed with the collision avoidance algorithm, are safe with respect to other agents. The larger the number, the sooner the agent will respond to other agents, but less freedom in choosing its velocities. Must be positive.
</member>
@@ -159,13 +149,13 @@
</signal>
<signal name="target_reached">
<description>
- Notifies when the player defined target, set with [method set_target_location], is reached.
+ Notifies when the player-defined [member target_location] is reached.
</description>
</signal>
<signal name="velocity_computed">
- <param index="0" name="safe_velocity" type="Vector3" />
+ <param index="0" name="safe_velocity" type="Vector2" />
<description>
- Notifies when the collision avoidance velocity is calculated. Emitted by [method set_velocity].
+ Notifies when the collision avoidance velocity is calculated. Emitted by [method set_velocity]. Only emitted when [member avoidance_enabled] is true.
</description>
</signal>
</signals>
diff --git a/doc/classes/NavigationAgent3D.xml b/doc/classes/NavigationAgent3D.xml
index d4221240ba..44c17647f7 100644
--- a/doc/classes/NavigationAgent3D.xml
+++ b/doc/classes/NavigationAgent3D.xml
@@ -5,7 +5,7 @@
</brief_description>
<description>
3D Agent that is used in navigation to reach a location while avoiding static and dynamic obstacles. The dynamic obstacles are avoided using RVO collision avoidance. The agent needs navigation data to work correctly. [NavigationAgent3D] is physics safe.
- [b]Note:[/b] After [method set_target_location] is used it is required to use the [method get_next_location] function once every physics frame to update the internal path logic of the NavigationAgent. The returned vector position from this function should be used as the next movement position for the agent's parent Node.
+ [b]Note:[/b] After setting [member target_location] it is required to use the [method get_next_location] function once every physics frame to update the internal path logic of the NavigationAgent. The returned vector position from this function should be used as the next movement position for the agent's parent Node.
</description>
<tutorials>
</tutorials>
@@ -13,7 +13,7 @@
<method name="distance_to_target" qualifiers="const">
<return type="float" />
<description>
- Returns the distance to the target location, using the agent's global position. The user must set the target location with [method set_target_location] in order for this to be accurate.
+ Returns the distance to the target location, using the agent's global position. The user must set [member target_location] in order for this to be accurate.
</description>
</method>
<method name="get_final_location">
@@ -38,7 +38,7 @@
<return type="bool" />
<param index="0" name="layer_number" type="int" />
<description>
- Returns whether or not the specified layer of the [member navigation_layers] bitmask is enabled, given a [code]layer_number[/code] between 1 and 32.
+ Returns whether or not the specified layer of the [member navigation_layers] bitmask is enabled, given a [param layer_number] between 1 and 32.
</description>
</method>
<method name="get_navigation_map" qualifiers="const">
@@ -59,12 +59,6 @@
Returns the [RID] of this agent on the [NavigationServer3D].
</description>
</method>
- <method name="get_target_location" qualifiers="const">
- <return type="Vector3" />
- <description>
- Returns the user defined [Vector3] after setting the target location.
- </description>
- </method>
<method name="is_navigation_finished">
<return type="bool" />
<description>
@@ -74,13 +68,13 @@
<method name="is_target_reachable">
<return type="bool" />
<description>
- Returns true if the target location is reachable. The target location is set using [method set_target_location].
+ Returns true if [member target_location] is reachable.
</description>
</method>
<method name="is_target_reached" qualifiers="const">
<return type="bool" />
<description>
- Returns true if the target location is reached. The target location is set using [method set_target_location]. It may not always be possible to reach the target location. It should always be possible to reach the final location though. See [method get_final_location].
+ Returns true if [member target_location] is reached. It may not always be possible to reach the target location. It should always be possible to reach the final location though. See [method get_final_location].
</description>
</method>
<method name="set_navigation_layer_value">
@@ -88,7 +82,7 @@
<param index="0" name="layer_number" type="int" />
<param index="1" name="value" type="bool" />
<description>
- Based on [code]value[/code], enables or disables the specified layer in the [member navigation_layers] bitmask, given a [code]layer_number[/code] between 1 and 32.
+ Based on [param value], enables or disables the specified layer in the [member navigation_layers] bitmask, given a [param layer_number] between 1 and 32.
</description>
</method>
<method name="set_navigation_map">
@@ -98,13 +92,6 @@
Sets the [RID] of the navigation map this NavigationAgent node should use and also updates the [code]agent[/code] on the NavigationServer.
</description>
</method>
- <method name="set_target_location">
- <return type="void" />
- <param index="0" name="location" type="Vector3" />
- <description>
- Sets the user desired final location. This will clear the current navigation path.
- </description>
- </method>
<method name="set_velocity">
<return type="void" />
<param index="0" name="velocity" type="Vector3" />
@@ -132,7 +119,7 @@
<member name="navigation_layers" type="int" setter="set_navigation_layers" getter="get_navigation_layers" default="1">
A bitfield determining what navigation layers of navigation regions this NavigationAgent will use to calculate path. Changing it runtime will clear current navigation path and generate new one, according to new navigation layers.
</member>
- <member name="neighbor_dist" type="float" setter="set_neighbor_dist" getter="get_neighbor_dist" default="50.0">
+ <member name="neighbor_distance" type="float" setter="set_neighbor_distance" getter="get_neighbor_distance" default="50.0">
The distance to search for other agents.
</member>
<member name="path_desired_distance" type="float" setter="set_path_desired_distance" getter="get_path_desired_distance" default="1.0">
@@ -142,12 +129,15 @@
The maximum distance the agent is allowed away from the ideal path to the final location. This can happen due to trying to avoid collisions. When the maximum distance is exceeded, it recalculates the ideal path.
</member>
<member name="radius" type="float" setter="set_radius" getter="get_radius" default="1.0">
- The radius of the avoidance agent. This is the "body" of the avoidance agent and not the avoidance maneuver starting radius (which is controlled by [member neighbor_dist]).
+ The radius of the avoidance agent. This is the "body" of the avoidance agent and not the avoidance maneuver starting radius (which is controlled by [member neighbor_distance]).
Does not affect normal pathfinding. To change an actor's pathfinding radius bake [NavigationMesh] resources with a different [member NavigationMesh.agent_radius] property and use different navigation maps for each actor size.
</member>
<member name="target_desired_distance" type="float" setter="set_target_desired_distance" getter="get_target_desired_distance" default="1.0">
The distance threshold before the final target point is considered to be reached. This will allow an agent to not have to hit the point of the final target exactly, but only the area. If this value is set to low the NavigationAgent will be stuck in a repath loop cause it will constantly overshoot or undershoot the distance to the final target point on each physics frame update.
</member>
+ <member name="target_location" type="Vector3" setter="set_target_location" getter="get_target_location" default="Vector3(0, 0, 0)">
+ The user-defined target location. Setting this property will clear the current navigation path.
+ </member>
<member name="time_horizon" type="float" setter="set_time_horizon" getter="get_time_horizon" default="5.0">
The minimal amount of time for which this agent's velocities, that are computed with the collision avoidance algorithm, are safe with respect to other agents. The larger the number, the sooner the agent will respond to other agents, but less freedom in choosing its velocities. Must be positive.
</member>
@@ -165,13 +155,13 @@
</signal>
<signal name="target_reached">
<description>
- Notifies when the player defined target, set with [method set_target_location], is reached.
+ Notifies when the player-defined [member target_location] is reached.
</description>
</signal>
<signal name="velocity_computed">
<param index="0" name="safe_velocity" type="Vector3" />
<description>
- Notifies when the collision avoidance velocity is calculated. Emitted by [method set_velocity].
+ Notifies when the collision avoidance velocity is calculated. Emitted by [method set_velocity]. Only emitted when [member avoidance_enabled] is true.
</description>
</signal>
</signals>
diff --git a/doc/classes/NavigationLink2D.xml b/doc/classes/NavigationLink2D.xml
new file mode 100644
index 0000000000..1e086fb730
--- /dev/null
+++ b/doc/classes/NavigationLink2D.xml
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="NavigationLink2D" inherits="Node2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ Creates a link between two locations that [NavigationServer2D] can route agents through.
+ </brief_description>
+ <description>
+ Creates a link between two locations that [NavigationServer2D] can route agents through. Links can be used to express navigation methods that aren't just traveling along the surface of the navigation mesh, like zip-lines, teleporters, or jumping across gaps.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="get_navigation_layer_value" qualifiers="const">
+ <return type="bool" />
+ <param index="0" name="layer_number" type="int" />
+ <description>
+ Returns whether or not the specified layer of the [member navigation_layers] bitmask is enabled, given a [code]layer_number[/code] between 1 and 32.
+ </description>
+ </method>
+ <method name="set_navigation_layer_value">
+ <return type="void" />
+ <param index="0" name="layer_number" type="int" />
+ <param index="1" name="value" type="bool" />
+ <description>
+ Based on [code]value[/code], enables or disables the specified layer in the [member navigation_layers] bitmask, given a [code]layer_number[/code] between 1 and 32.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="bidirectional" type="bool" setter="set_bidirectional" getter="is_bidirectional" default="true">
+ Whether this link can be traveled in both directions or only from [member start_location] to [member end_location].
+ </member>
+ <member name="enabled" type="bool" setter="set_enabled" getter="is_enabled" default="true">
+ Whether this link is currently active. If [code]false[/code], [method NavigationServer2D.map_get_path] will ignore this link.
+ </member>
+ <member name="end_location" type="Vector2" setter="set_end_location" getter="get_end_location" default="Vector2(0, 0)">
+ Ending position of the link.
+ This position will search out the nearest polygon in the navigation mesh to attach to.
+ The distance the link will search is controlled by [method NavigationServer2D.map_set_link_connection_radius].
+ </member>
+ <member name="enter_cost" type="float" setter="set_enter_cost" getter="get_enter_cost" default="0.0">
+ When pathfinding enters this link from another regions navmesh the [code]enter_cost[/code] value is added to the path distance for determining the shortest path.
+ </member>
+ <member name="navigation_layers" type="int" setter="set_navigation_layers" getter="get_navigation_layers" default="1">
+ A bitfield determining all navigation layers the link belongs to. These navigation layers will be checked when requesting a path with [method NavigationServer2D.map_get_path].
+ </member>
+ <member name="start_location" type="Vector2" setter="set_start_location" getter="get_start_location" default="Vector2(0, 0)">
+ Starting position of the link.
+ This position will search out the nearest polygon in the navigation mesh to attach to.
+ The distance the link will search is controlled by [method NavigationServer2D.map_set_link_connection_radius].
+ </member>
+ <member name="travel_cost" type="float" setter="set_travel_cost" getter="get_travel_cost" default="1.0">
+ When pathfinding moves along the link the traveled distance is multiplied with [code]travel_cost[/code] for determining the shortest path.
+ </member>
+ </members>
+</class>
diff --git a/doc/classes/NavigationLink3D.xml b/doc/classes/NavigationLink3D.xml
new file mode 100644
index 0000000000..4d5d81bec5
--- /dev/null
+++ b/doc/classes/NavigationLink3D.xml
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="NavigationLink3D" inherits="Node3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ Creates a link between two locations that [NavigationServer3D] can route agents through.
+ </brief_description>
+ <description>
+ Creates a link between two locations that [NavigationServer3D] can route agents through. Links can be used to express navigation methods that aren't just traveling along the surface of the navigation mesh, like zip-lines, teleporters, or jumping across gaps.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="get_navigation_layer_value" qualifiers="const">
+ <return type="bool" />
+ <param index="0" name="layer_number" type="int" />
+ <description>
+ Returns whether or not the specified layer of the [member navigation_layers] bitmask is enabled, given a [code]layer_number[/code] between 1 and 32.
+ </description>
+ </method>
+ <method name="set_navigation_layer_value">
+ <return type="void" />
+ <param index="0" name="layer_number" type="int" />
+ <param index="1" name="value" type="bool" />
+ <description>
+ Based on [code]value[/code], enables or disables the specified layer in the [member navigation_layers] bitmask, given a [code]layer_number[/code] between 1 and 32.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="bidirectional" type="bool" setter="set_bidirectional" getter="is_bidirectional" default="true">
+ Whether this link can be traveled in both directions or only from [member start_location] to [member end_location].
+ </member>
+ <member name="enabled" type="bool" setter="set_enabled" getter="is_enabled" default="true">
+ Whether this link is currently active. If [code]false[/code], [method NavigationServer3D.map_get_path] will ignore this link.
+ </member>
+ <member name="end_location" type="Vector3" setter="set_end_location" getter="get_end_location" default="Vector3(0, 0, 0)">
+ Ending position of the link.
+ This position will search out the nearest polygon in the navigation mesh to attach to.
+ The distance the link will search is controlled by [method NavigationServer3D.map_set_link_connection_radius].
+ </member>
+ <member name="enter_cost" type="float" setter="set_enter_cost" getter="get_enter_cost" default="0.0">
+ When pathfinding enters this link from another regions navmesh the [code]enter_cost[/code] value is added to the path distance for determining the shortest path.
+ </member>
+ <member name="navigation_layers" type="int" setter="set_navigation_layers" getter="get_navigation_layers" default="1">
+ A bitfield determining all navigation layers the link belongs to. These navigation layers will be checked when requesting a path with [method NavigationServer3D.map_get_path].
+ </member>
+ <member name="start_location" type="Vector3" setter="set_start_location" getter="get_start_location" default="Vector3(0, 0, 0)">
+ Starting position of the link.
+ This position will search out the nearest polygon in the navigation mesh to attach to.
+ The distance the link will search is controlled by [method NavigationServer3D.map_set_link_connection_radius].
+ </member>
+ <member name="travel_cost" type="float" setter="set_travel_cost" getter="get_travel_cost" default="1.0">
+ When pathfinding moves along the link the traveled distance is multiplied with [code]travel_cost[/code] for determining the shortest path.
+ </member>
+ </members>
+</class>
diff --git a/doc/classes/NavigationMesh.xml b/doc/classes/NavigationMesh.xml
index cef23699c8..c86bc47e04 100644
--- a/doc/classes/NavigationMesh.xml
+++ b/doc/classes/NavigationMesh.xml
@@ -28,14 +28,14 @@
<param index="0" name="mesh" type="Mesh" />
<description>
Initializes the navigation mesh by setting the vertices and indices according to a [Mesh].
- [b]Note:[/b] The given [code]mesh[/code] must be of type [constant Mesh.PRIMITIVE_TRIANGLES] and have an index array.
+ [b]Note:[/b] The given [param mesh] must be of type [constant Mesh.PRIMITIVE_TRIANGLES] and have an index array.
</description>
</method>
<method name="get_collision_mask_value" qualifiers="const">
<return type="bool" />
<param index="0" name="layer_number" type="int" />
<description>
- Returns whether or not the specified layer of the [member geometry_collision_mask] is enabled, given a [code]layer_number[/code] between 1 and 32.
+ Returns whether or not the specified layer of the [member geometry_collision_mask] is enabled, given a [param layer_number] between 1 and 32.
</description>
</method>
<method name="get_polygon">
@@ -62,7 +62,7 @@
<param index="0" name="layer_number" type="int" />
<param index="1" name="value" type="bool" />
<description>
- Based on [code]value[/code], enables or disables the specified layer in the [member geometry_collision_mask], given a [code]layer_number[/code] between 1 and 32.
+ Based on [param value], enables or disables the specified layer in the [member geometry_collision_mask], given a [param layer_number] between 1 and 32.
</description>
</method>
<method name="set_vertices">
diff --git a/doc/classes/NavigationMeshGenerator.xml b/doc/classes/NavigationMeshGenerator.xml
index 30d068b55c..4c337db90f 100644
--- a/doc/classes/NavigationMeshGenerator.xml
+++ b/doc/classes/NavigationMeshGenerator.xml
@@ -6,7 +6,7 @@
<description>
This class is responsible for creating and clearing 3D navigation meshes used as [NavigationMesh] resources inside [NavigationRegion3D]. The [NavigationMeshGenerator] has very limited to no use for 2D as the navigation mesh baking process expects 3D node types and 3D source geometry to parse.
The entire navigation mesh baking is best done in a separate thread as the voxelization, collision tests and mesh optimization steps involved are very performance and time hungry operations.
- Navigation mesh baking happens in multiple steps and the result depends on 3D source geometry and properties of the [NavigationMesh] resource. In the first step, starting from a root node and depending on [NavigationMesh] properties all valid 3D source geometry nodes are collected from the [SceneTree]. Second, all collected nodes are parsed for their relevant 3D geometry data and a combined 3D mesh is build. Due to the many different types of parsable objects, from normal [MeshInstance3D]s to [CSGShape3D]s or various [CollisionObject3D]s, some operations to collect geometry data can trigger [RenderingServer] and [PhysicsServer3D] synchronizations. Server synchronization can have a negative effect on baking time or framerate as it often involves [Mutex] locking for thread security. Many parsable objects and the continuous synchronization with other threaded Servers can increase the baking time significantly. On the other hand only a few but very large and complex objects will take some time to prepare for the Servers which can noticeably stall the next frame render. As a general rule the total amount of parsable objects and their individual size and complexity should be balanced to avoid framerate issues or very long baking times. The combined mesh is then passed to the Recast Navigation Object to test the source geometry for walkable terrain suitable to [NavigationMesh] agent properties by creating a voxel world around the meshes bounding area.
+ Navigation mesh baking happens in multiple steps and the result depends on 3D source geometry and properties of the [NavigationMesh] resource. In the first step, starting from a root node and depending on [NavigationMesh] properties all valid 3D source geometry nodes are collected from the [SceneTree]. Second, all collected nodes are parsed for their relevant 3D geometry data and a combined 3D mesh is build. Due to the many different types of parsable objects, from normal [MeshInstance3D]s to [CSGShape3D]s or various [CollisionObject3D]s, some operations to collect geometry data can trigger [RenderingServer] and [PhysicsServer3D] synchronizations. Server synchronization can have a negative effect on baking time or framerate as it often involves [Mutex] locking for thread security. Many parsable objects and the continuous synchronization with other threaded Servers can increase the baking time significantly. On the other hand only a few but very large and complex objects will take some time to prepare for the Servers which can noticeably stall the next frame render. As a general rule the total number of parsable objects and their individual size and complexity should be balanced to avoid framerate issues or very long baking times. The combined mesh is then passed to the Recast Navigation Object to test the source geometry for walkable terrain suitable to [NavigationMesh] agent properties by creating a voxel world around the meshes bounding area.
The finalized navigation mesh is then returned and stored inside the [NavigationMesh] for use as a resource inside [NavigationRegion3D] nodes.
[b]Note:[/b] Using meshes to not only define walkable surfaces but also obstruct navigation baking does not always work. The navigation baking has no concept of what is a geometry "inside" when dealing with mesh source geometry and this is intentional. Depending on current baking parameters, as soon as the obstructing mesh is large enough to fit a navigation mesh area inside, the baking will generate navigation mesh areas that are inside the obstructing source geometry mesh.
</description>
@@ -18,14 +18,14 @@
<param index="0" name="nav_mesh" type="NavigationMesh" />
<param index="1" name="root_node" type="Node" />
<description>
- Bakes navigation data to the provided [code]nav_mesh[/code] by parsing child nodes under the provided [code]root_node[/code] or a specific group of nodes for potential source geometry. The parse behavior can be controlled with the [member NavigationMesh.geometry_parsed_geometry_type] and [member NavigationMesh.geometry_source_geometry_mode] properties on the [NavigationMesh] resource.
+ Bakes navigation data to the provided [param nav_mesh] by parsing child nodes under the provided [param root_node] or a specific group of nodes for potential source geometry. The parse behavior can be controlled with the [member NavigationMesh.geometry_parsed_geometry_type] and [member NavigationMesh.geometry_source_geometry_mode] properties on the [NavigationMesh] resource.
</description>
</method>
<method name="clear">
<return type="void" />
<param index="0" name="nav_mesh" type="NavigationMesh" />
<description>
- Removes all polygons and vertices from the provided [code]nav_mesh[/code] resource.
+ Removes all polygons and vertices from the provided [param nav_mesh] resource.
</description>
</method>
</methods>
diff --git a/doc/classes/NavigationObstacle2D.xml b/doc/classes/NavigationObstacle2D.xml
index 4ecdc06645..68d9691ccf 100644
--- a/doc/classes/NavigationObstacle2D.xml
+++ b/doc/classes/NavigationObstacle2D.xml
@@ -5,17 +5,30 @@
</brief_description>
<description>
2D Obstacle used in navigation for collision avoidance. The obstacle needs navigation data to work correctly. [NavigationObstacle2D] is physics safe.
- [b]Note:[/b] Obstacles are intended as a last resort option for constantly moving objects that cannot be (re)baked to a navigation mesh efficiently.
+ Obstacles [b]don't[/b] change the resulting path from the pathfinding, they only affect the navigation agent movement in a radius. Therefore, using obstacles for the static walls in your level won't work because those walls don't exist in the pathfinding. The navigation agent will be pushed in a semi-random direction away while moving inside that radius. Obstacles are intended as a last resort option for constantly moving objects that cannot be (re)baked to a navigation mesh efficiently.
</description>
<tutorials>
</tutorials>
<methods>
+ <method name="get_navigation_map" qualifiers="const">
+ <return type="RID" />
+ <description>
+ Returns the [RID] of the navigation map for this NavigationObstacle node. This function returns always the map set on the NavigationObstacle node and not the map of the abstract agent on the NavigationServer. If the agent map is changed directly with the NavigationServer API the NavigationObstacle node will not be aware of the map change. Use [method set_navigation_map] to change the navigation map for the NavigationObstacle and also update the agent on the NavigationServer.
+ </description>
+ </method>
<method name="get_rid" qualifiers="const">
<return type="RID" />
<description>
Returns the [RID] of this obstacle on the [NavigationServer2D].
</description>
</method>
+ <method name="set_navigation_map">
+ <return type="void" />
+ <param index="0" name="navigation_map" type="RID" />
+ <description>
+ Sets the [RID] of the navigation map this NavigationObstacle node should use and also updates the [code]agent[/code] on the NavigationServer.
+ </description>
+ </method>
</methods>
<members>
<member name="estimate_radius" type="bool" setter="set_estimate_radius" getter="is_radius_estimated" default="true">
diff --git a/doc/classes/NavigationObstacle3D.xml b/doc/classes/NavigationObstacle3D.xml
index ed8af3883c..90eb55887f 100644
--- a/doc/classes/NavigationObstacle3D.xml
+++ b/doc/classes/NavigationObstacle3D.xml
@@ -5,17 +5,30 @@
</brief_description>
<description>
3D Obstacle used in navigation for collision avoidance. The obstacle needs navigation data to work correctly. [NavigationObstacle3D] is physics safe.
- [b]Note:[/b] Obstacles are intended as a last resort option for constantly moving objects that cannot be (re)baked to a navigation mesh efficiently.
+ Obstacles [b]don't[/b] change the resulting path from the pathfinding, they only affect the navigation agent movement in a radius. Therefore, using obstacles for the static walls in your level won't work because those walls don't exist in the pathfinding. The navigation agent will be pushed in a semi-random direction away while moving inside that radius. Obstacles are intended as a last resort option for constantly moving objects that cannot be (re)baked to a navigation mesh efficiently.
</description>
<tutorials>
</tutorials>
<methods>
+ <method name="get_navigation_map" qualifiers="const">
+ <return type="RID" />
+ <description>
+ Returns the [RID] of the navigation map for this NavigationObstacle node. This function returns always the map set on the NavigationObstacle node and not the map of the abstract agent on the NavigationServer. If the agent map is changed directly with the NavigationServer API the NavigationObstacle node will not be aware of the map change. Use [method set_navigation_map] to change the navigation map for the NavigationObstacle and also update the agent on the NavigationServer.
+ </description>
+ </method>
<method name="get_rid" qualifiers="const">
<return type="RID" />
<description>
Returns the [RID] of this obstacle on the [NavigationServer3D].
</description>
</method>
+ <method name="set_navigation_map">
+ <return type="void" />
+ <param index="0" name="navigation_map" type="RID" />
+ <description>
+ Sets the [RID] of the navigation map this NavigationObstacle node should use and also updates the [code]agent[/code] on the NavigationServer.
+ </description>
+ </method>
</methods>
<members>
<member name="estimate_radius" type="bool" setter="set_estimate_radius" getter="is_radius_estimated" default="true">
diff --git a/doc/classes/NavigationPathQueryParameters2D.xml b/doc/classes/NavigationPathQueryParameters2D.xml
new file mode 100644
index 0000000000..397ca8b713
--- /dev/null
+++ b/doc/classes/NavigationPathQueryParameters2D.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="NavigationPathQueryParameters2D" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ Parameters to be sent to a 2D navigation path query.
+ </brief_description>
+ <description>
+ This class contains the start and target position and other parameters to be used with [method NavigationServer2D.query_path].
+ </description>
+ <tutorials>
+ </tutorials>
+ <members>
+ <member name="map" type="RID" setter="set_map" getter="get_map">
+ The navigation [code]map[/code] [RID] used in the path query.
+ </member>
+ <member name="navigation_layers" type="int" setter="set_navigation_layers" getter="get_navigation_layers" default="1">
+ The navigation layers the query will use (as a bitmask).
+ </member>
+ <member name="path_postprocessing" type="int" setter="set_path_postprocessing" getter="get_path_postprocessing" enum="NavigationPathQueryParameters2D.PathPostProcessing" default="0">
+ The path postprocessing applied to the raw path corridor found by the [member pathfinding_algorithm].
+ </member>
+ <member name="pathfinding_algorithm" type="int" setter="set_pathfinding_algorithm" getter="get_pathfinding_algorithm" enum="NavigationPathQueryParameters2D.PathfindingAlgorithm" default="0">
+ The pathfinding algorithm used in the path query.
+ </member>
+ <member name="start_position" type="Vector2" setter="set_start_position" getter="get_start_position" default="Vector2(0, 0)">
+ The pathfinding start position in global coordinates.
+ </member>
+ <member name="target_position" type="Vector2" setter="set_target_position" getter="get_target_position" default="Vector2(0, 0)">
+ The pathfinding target position in global coordinates.
+ </member>
+ </members>
+ <constants>
+ <constant name="PATHFINDING_ALGORITHM_ASTAR" value="0" enum="PathfindingAlgorithm">
+ The path query uses the default A* pathfinding algorithm.
+ </constant>
+ <constant name="PATH_POSTPROCESSING_CORRIDORFUNNEL" value="0" enum="PathPostProcessing">
+ Applies a funnel algorithm to the raw path corridor found by the pathfinding algorithm. This will result in the shortest path possible inside the path corridor. This postprocessing very much depends on the navmesh polygon layout and the created corridor. Especially tile- or gridbased layouts can face artificial corners with diagonal movement due to a jagged path corridor imposed by the cell shapes.
+ </constant>
+ <constant name="PATH_POSTPROCESSING_EDGECENTERED" value="1" enum="PathPostProcessing">
+ Centers every path position in the middle of the traveled navmesh polygon edge. This creates better paths for tile- or gridbased layouts that restrict the movement to the cells center.
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/NavigationPathQueryParameters3D.xml b/doc/classes/NavigationPathQueryParameters3D.xml
new file mode 100644
index 0000000000..29faa5561b
--- /dev/null
+++ b/doc/classes/NavigationPathQueryParameters3D.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="NavigationPathQueryParameters3D" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ Parameters to be sent to a 3D navigation path query.
+ </brief_description>
+ <description>
+ This class contains the start and target position and other parameters to be used with [method NavigationServer3D.query_path].
+ </description>
+ <tutorials>
+ </tutorials>
+ <members>
+ <member name="map" type="RID" setter="set_map" getter="get_map">
+ The navigation [code]map[/code] [RID] used in the path query.
+ </member>
+ <member name="navigation_layers" type="int" setter="set_navigation_layers" getter="get_navigation_layers" default="1">
+ The navigation layers the query will use (as a bitmask).
+ </member>
+ <member name="path_postprocessing" type="int" setter="set_path_postprocessing" getter="get_path_postprocessing" enum="NavigationPathQueryParameters3D.PathPostProcessing" default="0">
+ The path postprocessing applied to the raw path corridor found by the [member pathfinding_algorithm].
+ </member>
+ <member name="pathfinding_algorithm" type="int" setter="set_pathfinding_algorithm" getter="get_pathfinding_algorithm" enum="NavigationPathQueryParameters3D.PathfindingAlgorithm" default="0">
+ The pathfinding algorithm used in the path query.
+ </member>
+ <member name="start_position" type="Vector3" setter="set_start_position" getter="get_start_position" default="Vector3(0, 0, 0)">
+ The pathfinding start position in global coordinates.
+ </member>
+ <member name="target_position" type="Vector3" setter="set_target_position" getter="get_target_position" default="Vector3(0, 0, 0)">
+ The pathfinding target position in global coordinates.
+ </member>
+ </members>
+ <constants>
+ <constant name="PATHFINDING_ALGORITHM_ASTAR" value="0" enum="PathfindingAlgorithm">
+ The path query uses the default A* pathfinding algorithm.
+ </constant>
+ <constant name="PATH_POSTPROCESSING_CORRIDORFUNNEL" value="0" enum="PathPostProcessing">
+ Applies a funnel algorithm to the raw path corridor found by the pathfinding algorithm. This will result in the shortest path possible inside the path corridor. This postprocessing very much depends on the navmesh polygon layout and the created corridor. Especially tile- or gridbased layouts can face artificial corners with diagonal movement due to a jagged path corridor imposed by the cell shapes.
+ </constant>
+ <constant name="PATH_POSTPROCESSING_EDGECENTERED" value="1" enum="PathPostProcessing">
+ Centers every path position in the middle of the traveled navmesh polygon edge. This creates better paths for tile- or gridbased layouts that restrict the movement to the cells center.
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/NavigationPathQueryResult2D.xml b/doc/classes/NavigationPathQueryResult2D.xml
new file mode 100644
index 0000000000..95b90e9383
--- /dev/null
+++ b/doc/classes/NavigationPathQueryResult2D.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="NavigationPathQueryResult2D" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ Result from a [NavigationPathQueryParameters2D] navigation path query.
+ </brief_description>
+ <description>
+ This class contains the result of a navigation path query from [method NavigationServer2D.query_path].
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="reset">
+ <return type="void" />
+ <description>
+ Reset the result object to its initial state. This is useful to reuse the object across multiple queries.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="path" type="PackedVector2Array" setter="set_path" getter="get_path" default="PackedVector2Array()">
+ The resulting path array from the navigation query. All path array positions are in global coordinates. Without customized query parameters this is the same path as returned by [method NavigationServer2D.map_get_path].
+ </member>
+ </members>
+</class>
diff --git a/doc/classes/NavigationPathQueryResult3D.xml b/doc/classes/NavigationPathQueryResult3D.xml
new file mode 100644
index 0000000000..b4ca8288db
--- /dev/null
+++ b/doc/classes/NavigationPathQueryResult3D.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="NavigationPathQueryResult3D" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ Result from a [NavigationPathQueryParameters3D] navigation path query.
+ </brief_description>
+ <description>
+ This class contains the result of a navigation path query from [method NavigationServer3D.query_path].
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="reset">
+ <return type="void" />
+ <description>
+ Reset the result object to its initial state. This is useful to reuse the object across multiple queries.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="path" type="PackedVector3Array" setter="set_path" getter="get_path" default="PackedVector3Array()">
+ The resulting path array from the navigation query. All path array positions are in global coordinates. Without customized query parameters this is the same path as returned by [method NavigationServer3D.map_get_path].
+ </member>
+ </members>
+</class>
diff --git a/doc/classes/NavigationRegion2D.xml b/doc/classes/NavigationRegion2D.xml
index 655d51b25c..0f28081201 100644
--- a/doc/classes/NavigationRegion2D.xml
+++ b/doc/classes/NavigationRegion2D.xml
@@ -10,6 +10,7 @@
The pathfinding cost of entering this region from another region can be controlled with the [member enter_cost] value.
[b]Note:[/b] This value is not added to the path cost when the start position is already inside this region.
The pathfinding cost of traveling distances inside this region can be controlled with the [member travel_cost] multiplier.
+ [b]Note:[/b] This node caches changes to its properties, so if you make changes to the underlying region [RID] in [NavigationServer2D], they will not be reflected in this node's properties.
</description>
<tutorials>
</tutorials>
@@ -18,7 +19,7 @@
<return type="bool" />
<param index="0" name="layer_number" type="int" />
<description>
- Returns whether or not the specified layer of the [member navigation_layers] bitmask is enabled, given a [code]layer_number[/code] between 1 and 32.
+ Returns whether or not the specified layer of the [member navigation_layers] bitmask is enabled, given a [param layer_number] between 1 and 32.
</description>
</method>
<method name="get_region_rid" qualifiers="const">
@@ -32,7 +33,7 @@
<param index="0" name="layer_number" type="int" />
<param index="1" name="value" type="bool" />
<description>
- Based on [code]value[/code], enables or disables the specified layer in the [member navigation_layers] bitmask, given a [code]layer_number[/code] between 1 and 32.
+ Based on [param value], enables or disables the specified layer in the [member navigation_layers] bitmask, given a [param layer_number] between 1 and 32.
</description>
</method>
</methods>
diff --git a/doc/classes/NavigationRegion3D.xml b/doc/classes/NavigationRegion3D.xml
index 927b2ba5e5..85f163b3c2 100644
--- a/doc/classes/NavigationRegion3D.xml
+++ b/doc/classes/NavigationRegion3D.xml
@@ -10,6 +10,7 @@
The cost of entering this region from another region can be controlled with the [member enter_cost] value.
[b]Note:[/b] This value is not added to the path cost when the start position is already inside this region.
The cost of traveling distances inside this region can be controlled with the [member travel_cost] multiplier.
+ [b]Note:[/b] This node caches changes to its properties, so if you make changes to the underlying region [RID] in [NavigationServer3D], they will not be reflected in this node's properties.
</description>
<tutorials>
</tutorials>
@@ -18,14 +19,14 @@
<return type="void" />
<param index="0" name="on_thread" type="bool" default="true" />
<description>
- Bakes the [NavigationMesh]. If [code]on_thread[/code] is set to [code]true[/code] (default), the baking is done on a separate thread. Baking on separate thread is useful because navigation baking is not a cheap operation. When it is completed, it automatically sets the new [NavigationMesh]. Please note that baking on separate thread may be very slow if geometry is parsed from meshes as async access to each mesh involves heavy synchronization. Also, please note that baking on a separate thread is automatically disabled on operating systems that cannot use threads (such as HTML5 with threads disabled).
+ Bakes the [NavigationMesh]. If [param on_thread] is set to [code]true[/code] (default), the baking is done on a separate thread. Baking on separate thread is useful because navigation baking is not a cheap operation. When it is completed, it automatically sets the new [NavigationMesh]. Please note that baking on separate thread may be very slow if geometry is parsed from meshes as async access to each mesh involves heavy synchronization. Also, please note that baking on a separate thread is automatically disabled on operating systems that cannot use threads (such as Web with threads disabled).
</description>
</method>
<method name="get_navigation_layer_value" qualifiers="const">
<return type="bool" />
<param index="0" name="layer_number" type="int" />
<description>
- Returns whether or not the specified layer of the [member navigation_layers] bitmask is enabled, given a [code]layer_number[/code] between 1 and 32.
+ Returns whether or not the specified layer of the [member navigation_layers] bitmask is enabled, given a [param layer_number] between 1 and 32.
</description>
</method>
<method name="get_region_rid" qualifiers="const">
@@ -39,7 +40,7 @@
<param index="0" name="layer_number" type="int" />
<param index="1" name="value" type="bool" />
<description>
- Based on [code]value[/code], enables or disables the specified layer in the [member navigation_layers] bitmask, given a [code]layer_number[/code] between 1 and 32.
+ Based on [param value], enables or disables the specified layer in the [member navigation_layers] bitmask, given a [param layer_number] between 1 and 32.
</description>
</method>
</methods>
diff --git a/doc/classes/NavigationServer2D.xml b/doc/classes/NavigationServer2D.xml
index 8469099b80..981ab8a5e1 100644
--- a/doc/classes/NavigationServer2D.xml
+++ b/doc/classes/NavigationServer2D.xml
@@ -27,7 +27,7 @@
<return type="RID" />
<param index="0" name="agent" type="RID" />
<description>
- Returns the navigation map [RID] the requested [code]agent[/code] is currently assigned to.
+ Returns the navigation map [RID] the requested [param agent] is currently assigned to.
</description>
</method>
<method name="agent_is_map_changed" qualifiers="const">
@@ -44,8 +44,8 @@
<param index="2" name="method" type="StringName" />
<param index="3" name="userdata" type="Variant" default="null" />
<description>
- Callback called at the end of the RVO process. If a callback is created manually and the agent is placed on a navigation map it will calculate avoidance for the agent and dispatch the calculated [code]safe_velocity[/code] to the [code]receiver[/code] object with a signal to the chosen [code]method[/code] name.
- [b]Note:[/b] Created callbacks are always processed independently of the SceneTree state as long as the agent is on a navigation map and not freed. To disable the dispatch of a callback from an agent use [method agent_set_callback] again with a [code]null[/code] object as the [code]receiver[/code].
+ Callback called at the end of the RVO process. If a callback is created manually and the agent is placed on a navigation map it will calculate avoidance for the agent and dispatch the calculated [code]safe_velocity[/code] to the [param receiver] object with a signal to the chosen [param method] name.
+ [b]Note:[/b] Created callbacks are always processed independently of the SceneTree state as long as the agent is on a navigation map and not freed. To disable the dispatch of a callback from an agent use [method agent_set_callback] again with a [code]null[/code] object as the [param receiver].
</description>
</method>
<method name="agent_set_map" qualifiers="const">
@@ -72,10 +72,10 @@
Sets the maximum speed of the agent. Must be positive.
</description>
</method>
- <method name="agent_set_neighbor_dist" qualifiers="const">
+ <method name="agent_set_neighbor_distance" qualifiers="const">
<return type="void" />
<param index="0" name="agent" type="RID" />
- <param index="1" name="dist" type="float" />
+ <param index="1" name="distance" type="float" />
<description>
Sets the maximum distance to other agents this agent takes into account in the navigation. The larger this number, the longer the running time of the simulation. If the number is too low, the simulation will not be safe.
</description>
@@ -128,11 +128,122 @@
</description>
</method>
<method name="get_maps" qualifiers="const">
- <return type="Array" />
+ <return type="RID[]" />
<description>
Returns all created navigation map [RID]s on the NavigationServer. This returns both 2D and 3D created navigation maps as there is technically no distinction between them.
</description>
</method>
+ <method name="link_create" qualifiers="const">
+ <return type="RID" />
+ <description>
+ Create a new link between two locations on a map.
+ </description>
+ </method>
+ <method name="link_get_end_location" qualifiers="const">
+ <return type="Vector2" />
+ <param index="0" name="link" type="RID" />
+ <description>
+ Returns the ending location of this [code]link[/code].
+ </description>
+ </method>
+ <method name="link_get_enter_cost" qualifiers="const">
+ <return type="float" />
+ <param index="0" name="link" type="RID" />
+ <description>
+ Returns the [code]enter_cost[/code] of this [code]link[/code].
+ </description>
+ </method>
+ <method name="link_get_map" qualifiers="const">
+ <return type="RID" />
+ <param index="0" name="link" type="RID" />
+ <description>
+ Returns the navigation map [RID] the requested [code]link[/code] is currently assigned to.
+ </description>
+ </method>
+ <method name="link_get_navigation_layers" qualifiers="const">
+ <return type="int" />
+ <param index="0" name="link" type="RID" />
+ <description>
+ Returns the navigation layers for this [code]link[/code].
+ </description>
+ </method>
+ <method name="link_get_start_location" qualifiers="const">
+ <return type="Vector2" />
+ <param index="0" name="link" type="RID" />
+ <description>
+ Returns the starting location of this [code]link[/code].
+ </description>
+ </method>
+ <method name="link_get_travel_cost" qualifiers="const">
+ <return type="float" />
+ <param index="0" name="link" type="RID" />
+ <description>
+ Returns the [code]travel_cost[/code] of this [code]link[/code].
+ </description>
+ </method>
+ <method name="link_is_bidirectional" qualifiers="const">
+ <return type="bool" />
+ <param index="0" name="link" type="RID" />
+ <description>
+ Returns whether this [code]link[/code] can be travelled in both directions.
+ </description>
+ </method>
+ <method name="link_set_bidirectional" qualifiers="const">
+ <return type="void" />
+ <param index="0" name="link" type="RID" />
+ <param index="1" name="bidirectional" type="bool" />
+ <description>
+ Sets whether this [code]link[/code] can be travelled in both directions.
+ </description>
+ </method>
+ <method name="link_set_end_location" qualifiers="const">
+ <return type="void" />
+ <param index="0" name="link" type="RID" />
+ <param index="1" name="location" type="Vector2" />
+ <description>
+ Sets the exit location for the [code]link[/code].
+ </description>
+ </method>
+ <method name="link_set_enter_cost" qualifiers="const">
+ <return type="void" />
+ <param index="0" name="link" type="RID" />
+ <param index="1" name="enter_cost" type="float" />
+ <description>
+ Sets the [code]enter_cost[/code] for this [code]link[/code].
+ </description>
+ </method>
+ <method name="link_set_map" qualifiers="const">
+ <return type="void" />
+ <param index="0" name="link" type="RID" />
+ <param index="1" name="map" type="RID" />
+ <description>
+ Sets the navigation map [RID] for the link.
+ </description>
+ </method>
+ <method name="link_set_navigation_layers" qualifiers="const">
+ <return type="void" />
+ <param index="0" name="link" type="RID" />
+ <param index="1" name="navigation_layers" type="int" />
+ <description>
+ Set the links's navigation layers. This allows selecting links from a path request (when using [method NavigationServer2D.map_get_path]).
+ </description>
+ </method>
+ <method name="link_set_start_location" qualifiers="const">
+ <return type="void" />
+ <param index="0" name="link" type="RID" />
+ <param index="1" name="location" type="Vector2" />
+ <description>
+ Sets the entry location for this [code]link[/code].
+ </description>
+ </method>
+ <method name="link_set_travel_cost" qualifiers="const">
+ <return type="void" />
+ <param index="0" name="link" type="RID" />
+ <param index="1" name="travel_cost" type="float" />
+ <description>
+ Sets the [code]travel_cost[/code] for this [code]link[/code].
+ </description>
+ </method>
<method name="map_create" qualifiers="const">
<return type="RID" />
<description>
@@ -143,17 +254,17 @@
<return type="void" />
<param index="0" name="map" type="RID" />
<description>
- This function immediately forces synchronization of the specified navigation [code]map[/code] [RID]. By default navigation maps are only synchronized at the end of each physics frame. This function can be used to immediately (re)calculate all the navigation meshes and region connections of the navigation map. This makes it possible to query a navigation path for a changed map immediately and in the same frame (multiple times if needed).
+ This function immediately forces synchronization of the specified navigation [param map] [RID]. By default navigation maps are only synchronized at the end of each physics frame. This function can be used to immediately (re)calculate all the navigation meshes and region connections of the navigation map. This makes it possible to query a navigation path for a changed map immediately and in the same frame (multiple times if needed).
Due to technical restrictions the current NavigationServer command queue will be flushed. This means all already queued update commands for this physics frame will be executed, even those intended for other maps, regions and agents not part of the specified map. The expensive computation of the navigation meshes and region connections of a map will only be done for the specified map. Other maps will receive the normal synchronization at the end of the physics frame. Should the specified map receive changes after the forced update it will update again as well when the other maps receive their update.
Avoidance processing and dispatch of the [code]safe_velocity[/code] signals is untouched by this function and continues to happen for all maps and agents at the end of the physics frame.
[b]Note:[/b] With great power comes great responsibility. This function should only be used by users that really know what they are doing and have a good reason for it. Forcing an immediate update of a navigation map requires locking the NavigationServer and flushing the entire NavigationServer command queue. Not only can this severely impact the performance of a game but it can also introduce bugs if used inappropriately without much foresight.
</description>
</method>
<method name="map_get_agents" qualifiers="const">
- <return type="Array" />
+ <return type="RID[]" />
<param index="0" name="map" type="RID" />
<description>
- Returns all navigation agents [RID]s that are currently assigned to the requested navigation [code]map[/code].
+ Returns all navigation agents [RID]s that are currently assigned to the requested navigation [param map].
</description>
</method>
<method name="map_get_cell_size" qualifiers="const">
@@ -168,7 +279,7 @@
<param index="0" name="map" type="RID" />
<param index="1" name="to_point" type="Vector2" />
<description>
- Returns the point closest to the provided [code]to_point[/code] on the navigation mesh surface.
+ Returns the point closest to the provided [param to_point] on the navigation mesh surface.
</description>
</method>
<method name="map_get_closest_point_owner" qualifiers="const">
@@ -186,6 +297,20 @@
Returns the edge connection margin of the map. The edge connection margin is a distance used to connect two regions.
</description>
</method>
+ <method name="map_get_link_connection_radius" qualifiers="const">
+ <return type="float" />
+ <param index="0" name="map" type="RID" />
+ <description>
+ Returns the link connection radius of the map. This distance is the maximum range any link will search for navigation mesh polygons to connect to.
+ </description>
+ </method>
+ <method name="map_get_links" qualifiers="const">
+ <return type="RID[]" />
+ <param index="0" name="map" type="RID" />
+ <description>
+ Returns all navigation link [RID]s that are currently assigned to the requested navigation [code]map[/code].
+ </description>
+ </method>
<method name="map_get_path" qualifiers="const">
<return type="PackedVector2Array" />
<param index="0" name="map" type="RID" />
@@ -194,19 +319,19 @@
<param index="3" name="optimize" type="bool" />
<param index="4" name="navigation_layers" type="int" default="1" />
<description>
- Returns the navigation path to reach the destination from the origin. [code]navigation_layers[/code] is a bitmask of all region navigation layers that are allowed to be in the path.
+ Returns the navigation path to reach the destination from the origin. [param navigation_layers] is a bitmask of all region navigation layers that are allowed to be in the path.
</description>
</method>
<method name="map_get_regions" qualifiers="const">
- <return type="Array" />
+ <return type="RID[]" />
<param index="0" name="map" type="RID" />
<description>
- Returns all navigation regions [RID]s that are currently assigned to the requested navigation [code]map[/code].
+ Returns all navigation regions [RID]s that are currently assigned to the requested navigation [param map].
</description>
</method>
<method name="map_is_active" qualifiers="const">
<return type="bool" />
- <param index="0" name="nap" type="RID" />
+ <param index="0" name="map" type="RID" />
<description>
Returns true if the map is active.
</description>
@@ -235,6 +360,22 @@
Set the map edge connection margin used to weld the compatible region edges.
</description>
</method>
+ <method name="map_set_link_connection_radius" qualifiers="const">
+ <return type="void" />
+ <param index="0" name="map" type="RID" />
+ <param index="1" name="radius" type="float" />
+ <description>
+ Set the map's link connection radius used to connect links to navigation polygons.
+ </description>
+ </method>
+ <method name="query_path" qualifiers="const">
+ <return type="void" />
+ <param index="0" name="parameters" type="NavigationPathQueryParameters2D" />
+ <param index="1" name="result" type="NavigationPathQueryResult2D" />
+ <description>
+ Queries a path in a given navigation map. Start and target position and other parameters are defined through [NavigationPathQueryParameters2D]. Updates the provided [NavigationPathQueryResult2D] result object with the path among other results requested by the query.
+ </description>
+ </method>
<method name="region_create" qualifiers="const">
<return type="RID" />
<description>
@@ -246,7 +387,7 @@
<param index="0" name="region" type="RID" />
<param index="1" name="connection" type="int" />
<description>
- Returns the ending point of a connection door. [code]connection[/code] is an index between 0 and the return value of [method region_get_connections_count].
+ Returns the ending point of a connection door. [param connection] is an index between 0 and the return value of [method region_get_connections_count].
</description>
</method>
<method name="region_get_connection_pathway_start" qualifiers="const">
@@ -254,28 +395,28 @@
<param index="0" name="region" type="RID" />
<param index="1" name="connection" type="int" />
<description>
- Returns the starting point of a connection door. [code]connection[/code] is an index between 0 and the return value of [method region_get_connections_count].
+ Returns the starting point of a connection door. [param connection] is an index between 0 and the return value of [method region_get_connections_count].
</description>
</method>
<method name="region_get_connections_count" qualifiers="const">
<return type="int" />
<param index="0" name="region" type="RID" />
<description>
- Returns how many connections this [code]region[/code] has with other regions in the map.
+ Returns how many connections this [param region] has with other regions in the map.
</description>
</method>
<method name="region_get_enter_cost" qualifiers="const">
<return type="float" />
<param index="0" name="region" type="RID" />
<description>
- Returns the [code]enter_cost[/code] of this [code]region[/code].
+ Returns the [code]enter_cost[/code] of this [param region].
</description>
</method>
<method name="region_get_map" qualifiers="const">
<return type="RID" />
<param index="0" name="region" type="RID" />
<description>
- Returns the navigation map [RID] the requested [code]region[/code] is currently assigned to.
+ Returns the navigation map [RID] the requested [param region] is currently assigned to.
</description>
</method>
<method name="region_get_navigation_layers" qualifiers="const">
@@ -289,7 +430,7 @@
<return type="float" />
<param index="0" name="region" type="RID" />
<description>
- Returns the [code]travel_cost[/code] of this [code]region[/code].
+ Returns the [code]travel_cost[/code] of this [param region].
</description>
</method>
<method name="region_owns_point" qualifiers="const">
@@ -297,7 +438,7 @@
<param index="0" name="region" type="RID" />
<param index="1" name="point" type="Vector2" />
<description>
- Returns [code]true[/code] if the provided [code]point[/code] in world space is currently owned by the provided navigation [code]region[/code]. Owned in this context means that one of the region's navigation mesh polygon faces has a possible position at the closest distance to this point compared to all other navigation meshes from other navigation regions that are also registered on the navigation map of the provided region.
+ Returns [code]true[/code] if the provided [param point] in world space is currently owned by the provided navigation [param region]. Owned in this context means that one of the region's navigation mesh polygon faces has a possible position at the closest distance to this point compared to all other navigation meshes from other navigation regions that are also registered on the navigation map of the provided region.
If multiple navigation meshes have positions at equal distance the navigation region whose polygons are processed first wins the ownership. Polygons are processed in the same order that navigation regions were registered on the NavigationServer.
[b]Note:[/b] If navigation meshes from different navigation regions overlap (which should be avoided in general) the result might not be what is expected.
</description>
@@ -307,7 +448,7 @@
<param index="0" name="region" type="RID" />
<param index="1" name="enter_cost" type="float" />
<description>
- Sets the [code]enter_cost[/code] for this [code]region[/code].
+ Sets the [param enter_cost] for this [param region].
</description>
</method>
<method name="region_set_map" qualifiers="const">
@@ -347,7 +488,7 @@
<param index="0" name="region" type="RID" />
<param index="1" name="travel_cost" type="float" />
<description>
- Sets the [code]travel_cost[/code] for this [code]region[/code].
+ Sets the [param travel_cost] for this [param region].
</description>
</method>
</methods>
diff --git a/doc/classes/NavigationServer3D.xml b/doc/classes/NavigationServer3D.xml
index f9dfd01c41..943aa03ef7 100644
--- a/doc/classes/NavigationServer3D.xml
+++ b/doc/classes/NavigationServer3D.xml
@@ -27,7 +27,7 @@
<return type="RID" />
<param index="0" name="agent" type="RID" />
<description>
- Returns the navigation map [RID] the requested [code]agent[/code] is currently assigned to.
+ Returns the navigation map [RID] the requested [param agent] is currently assigned to.
</description>
</method>
<method name="agent_is_map_changed" qualifiers="const">
@@ -44,8 +44,8 @@
<param index="2" name="method" type="StringName" />
<param index="3" name="userdata" type="Variant" default="null" />
<description>
- Callback called at the end of the RVO process. If a callback is created manually and the agent is placed on a navigation map it will calculate avoidance for the agent and dispatch the calculated [code]safe_velocity[/code] to the [code]receiver[/code] object with a signal to the chosen [code]method[/code] name.
- [b]Note:[/b] Created callbacks are always processed independently of the SceneTree state as long as the agent is on a navigation map and not freed. To disable the dispatch of a callback from an agent use [method agent_set_callback] again with a [code]null[/code] object as the [code]receiver[/code].
+ Callback called at the end of the RVO process. If a callback is created manually and the agent is placed on a navigation map it will calculate avoidance for the agent and dispatch the calculated [code]safe_velocity[/code] to the [param receiver] object with a signal to the chosen [param method] name.
+ [b]Note:[/b] Created callbacks are always processed independently of the SceneTree state as long as the agent is on a navigation map and not freed. To disable the dispatch of a callback from an agent use [method agent_set_callback] again with a [code]null[/code] object as the [param receiver].
</description>
</method>
<method name="agent_set_map" qualifiers="const">
@@ -72,10 +72,10 @@
Sets the maximum speed of the agent. Must be positive.
</description>
</method>
- <method name="agent_set_neighbor_dist" qualifiers="const">
+ <method name="agent_set_neighbor_distance" qualifiers="const">
<return type="void" />
<param index="0" name="agent" type="RID" />
- <param index="1" name="dist" type="float" />
+ <param index="1" name="distance" type="float" />
<description>
Sets the maximum distance to other agents this agent takes into account in the navigation. The larger this number, the longer the running time of the simulation. If the number is too low, the simulation will not be safe.
</description>
@@ -128,11 +128,122 @@
</description>
</method>
<method name="get_maps" qualifiers="const">
- <return type="Array" />
+ <return type="RID[]" />
<description>
Returns all created navigation map [RID]s on the NavigationServer. This returns both 2D and 3D created navigation maps as there is technically no distinction between them.
</description>
</method>
+ <method name="link_create" qualifiers="const">
+ <return type="RID" />
+ <description>
+ Create a new link between two locations on a map.
+ </description>
+ </method>
+ <method name="link_get_end_location" qualifiers="const">
+ <return type="Vector3" />
+ <param index="0" name="link" type="RID" />
+ <description>
+ Returns the ending location of this [code]link[/code].
+ </description>
+ </method>
+ <method name="link_get_enter_cost" qualifiers="const">
+ <return type="float" />
+ <param index="0" name="link" type="RID" />
+ <description>
+ Returns the [code]enter_cost[/code] of this [code]link[/code].
+ </description>
+ </method>
+ <method name="link_get_map" qualifiers="const">
+ <return type="RID" />
+ <param index="0" name="link" type="RID" />
+ <description>
+ Returns the navigation map [RID] the requested [code]link[/code] is currently assigned to.
+ </description>
+ </method>
+ <method name="link_get_navigation_layers" qualifiers="const">
+ <return type="int" />
+ <param index="0" name="link" type="RID" />
+ <description>
+ Returns the navigation layers for this [code]link[/code].
+ </description>
+ </method>
+ <method name="link_get_start_location" qualifiers="const">
+ <return type="Vector3" />
+ <param index="0" name="link" type="RID" />
+ <description>
+ Returns the starting location of this [code]link[/code].
+ </description>
+ </method>
+ <method name="link_get_travel_cost" qualifiers="const">
+ <return type="float" />
+ <param index="0" name="link" type="RID" />
+ <description>
+ Returns the [code]travel_cost[/code] of this [code]link[/code].
+ </description>
+ </method>
+ <method name="link_is_bidirectional" qualifiers="const">
+ <return type="bool" />
+ <param index="0" name="link" type="RID" />
+ <description>
+ Returns whether this [code]link[/code] can be travelled in both directions.
+ </description>
+ </method>
+ <method name="link_set_bidirectional" qualifiers="const">
+ <return type="void" />
+ <param index="0" name="link" type="RID" />
+ <param index="1" name="bidirectional" type="bool" />
+ <description>
+ Sets whether this [code]link[/code] can be travelled in both directions.
+ </description>
+ </method>
+ <method name="link_set_end_location" qualifiers="const">
+ <return type="void" />
+ <param index="0" name="link" type="RID" />
+ <param index="1" name="location" type="Vector3" />
+ <description>
+ Sets the exit location for the [code]link[/code].
+ </description>
+ </method>
+ <method name="link_set_enter_cost" qualifiers="const">
+ <return type="void" />
+ <param index="0" name="link" type="RID" />
+ <param index="1" name="enter_cost" type="float" />
+ <description>
+ Sets the [code]enter_cost[/code] for this [code]link[/code].
+ </description>
+ </method>
+ <method name="link_set_map" qualifiers="const">
+ <return type="void" />
+ <param index="0" name="link" type="RID" />
+ <param index="1" name="map" type="RID" />
+ <description>
+ Sets the navigation map [RID] for the link.
+ </description>
+ </method>
+ <method name="link_set_navigation_layers" qualifiers="const">
+ <return type="void" />
+ <param index="0" name="link" type="RID" />
+ <param index="1" name="navigation_layers" type="int" />
+ <description>
+ Set the links's navigation layers. This allows selecting links from a path request (when using [method NavigationServer3D.map_get_path]).
+ </description>
+ </method>
+ <method name="link_set_start_location" qualifiers="const">
+ <return type="void" />
+ <param index="0" name="link" type="RID" />
+ <param index="1" name="location" type="Vector3" />
+ <description>
+ Sets the entry location for this [code]link[/code].
+ </description>
+ </method>
+ <method name="link_set_travel_cost" qualifiers="const">
+ <return type="void" />
+ <param index="0" name="link" type="RID" />
+ <param index="1" name="travel_cost" type="float" />
+ <description>
+ Sets the [code]travel_cost[/code] for this [code]link[/code].
+ </description>
+ </method>
<method name="map_create" qualifiers="const">
<return type="RID" />
<description>
@@ -143,17 +254,17 @@
<return type="void" />
<param index="0" name="map" type="RID" />
<description>
- This function immediately forces synchronization of the specified navigation [code]map[/code] [RID]. By default navigation maps are only synchronized at the end of each physics frame. This function can be used to immediately (re)calculate all the navigation meshes and region connections of the navigation map. This makes it possible to query a navigation path for a changed map immediately and in the same frame (multiple times if needed).
+ This function immediately forces synchronization of the specified navigation [param map] [RID]. By default navigation maps are only synchronized at the end of each physics frame. This function can be used to immediately (re)calculate all the navigation meshes and region connections of the navigation map. This makes it possible to query a navigation path for a changed map immediately and in the same frame (multiple times if needed).
Due to technical restrictions the current NavigationServer command queue will be flushed. This means all already queued update commands for this physics frame will be executed, even those intended for other maps, regions and agents not part of the specified map. The expensive computation of the navigation meshes and region connections of a map will only be done for the specified map. Other maps will receive the normal synchronization at the end of the physics frame. Should the specified map receive changes after the forced update it will update again as well when the other maps receive their update.
Avoidance processing and dispatch of the [code]safe_velocity[/code] signals is untouched by this function and continues to happen for all maps and agents at the end of the physics frame.
[b]Note:[/b] With great power comes great responsibility. This function should only be used by users that really know what they are doing and have a good reason for it. Forcing an immediate update of a navigation map requires locking the NavigationServer and flushing the entire NavigationServer command queue. Not only can this severely impact the performance of a game but it can also introduce bugs if used inappropriately without much foresight.
</description>
</method>
<method name="map_get_agents" qualifiers="const">
- <return type="Array" />
+ <return type="RID[]" />
<param index="0" name="map" type="RID" />
<description>
- Returns all navigation agents [RID]s that are currently assigned to the requested navigation [code]map[/code].
+ Returns all navigation agents [RID]s that are currently assigned to the requested navigation [param map].
</description>
</method>
<method name="map_get_cell_size" qualifiers="const">
@@ -168,7 +279,7 @@
<param index="0" name="map" type="RID" />
<param index="1" name="to_point" type="Vector3" />
<description>
- Returns the point closest to the provided [code]point[/code] on the navigation mesh surface.
+ Returns the point closest to the provided [param to_point] on the navigation mesh surface.
</description>
</method>
<method name="map_get_closest_point_normal" qualifiers="const">
@@ -204,6 +315,20 @@
Returns the edge connection margin of the map. This distance is the minimum vertex distance needed to connect two edges from different regions.
</description>
</method>
+ <method name="map_get_link_connection_radius" qualifiers="const">
+ <return type="float" />
+ <param index="0" name="map" type="RID" />
+ <description>
+ Returns the link connection radius of the map. This distance is the maximum range any link will search for navigation mesh polygons to connect to.
+ </description>
+ </method>
+ <method name="map_get_links" qualifiers="const">
+ <return type="RID[]" />
+ <param index="0" name="map" type="RID" />
+ <description>
+ Returns all navigation link [RID]s that are currently assigned to the requested navigation [code]map[/code].
+ </description>
+ </method>
<method name="map_get_path" qualifiers="const">
<return type="PackedVector3Array" />
<param index="0" name="map" type="RID" />
@@ -212,14 +337,14 @@
<param index="3" name="optimize" type="bool" />
<param index="4" name="navigation_layers" type="int" default="1" />
<description>
- Returns the navigation path to reach the destination from the origin. [code]navigation_layers[/code] is a bitmask of all region navigation layers that are allowed to be in the path.
+ Returns the navigation path to reach the destination from the origin. [param navigation_layers] is a bitmask of all region navigation layers that are allowed to be in the path.
</description>
</method>
<method name="map_get_regions" qualifiers="const">
- <return type="Array" />
+ <return type="RID[]" />
<param index="0" name="map" type="RID" />
<description>
- Returns all navigation regions [RID]s that are currently assigned to the requested navigation [code]map[/code].
+ Returns all navigation regions [RID]s that are currently assigned to the requested navigation [param map].
</description>
</method>
<method name="map_get_up" qualifiers="const">
@@ -231,7 +356,7 @@
</method>
<method name="map_is_active" qualifiers="const">
<return type="bool" />
- <param index="0" name="nap" type="RID" />
+ <param index="0" name="map" type="RID" />
<description>
Returns true if the map is active.
</description>
@@ -260,6 +385,14 @@
Set the map edge connection margin used to weld the compatible region edges.
</description>
</method>
+ <method name="map_set_link_connection_radius" qualifiers="const">
+ <return type="void" />
+ <param index="0" name="map" type="RID" />
+ <param index="1" name="radius" type="float" />
+ <description>
+ Set the map's link connection radius used to connect links to navigation polygons.
+ </description>
+ </method>
<method name="map_set_up" qualifiers="const">
<return type="void" />
<param index="0" name="map" type="RID" />
@@ -277,6 +410,14 @@
[b]Note:[/b] This function is not thread safe.
</description>
</method>
+ <method name="query_path" qualifiers="const">
+ <return type="void" />
+ <param index="0" name="parameters" type="NavigationPathQueryParameters3D" />
+ <param index="1" name="result" type="NavigationPathQueryResult3D" />
+ <description>
+ Queries a path in a given navigation map. Start and target position and other parameters are defined through [NavigationPathQueryParameters3D]. Updates the provided [NavigationPathQueryResult3D] result object with the path among other results requested by the query.
+ </description>
+ </method>
<method name="region_bake_navmesh" qualifiers="const">
<return type="void" />
<param index="0" name="mesh" type="NavigationMesh" />
@@ -296,7 +437,7 @@
<param index="0" name="region" type="RID" />
<param index="1" name="connection" type="int" />
<description>
- Returns the ending point of a connection door. [code]connection[/code] is an index between 0 and the return value of [method region_get_connections_count].
+ Returns the ending point of a connection door. [param connection] is an index between 0 and the return value of [method region_get_connections_count].
</description>
</method>
<method name="region_get_connection_pathway_start" qualifiers="const">
@@ -304,28 +445,28 @@
<param index="0" name="region" type="RID" />
<param index="1" name="connection" type="int" />
<description>
- Returns the starting point of a connection door. [code]connection[/code] is an index between 0 and the return value of [method region_get_connections_count].
+ Returns the starting point of a connection door. [param connection] is an index between 0 and the return value of [method region_get_connections_count].
</description>
</method>
<method name="region_get_connections_count" qualifiers="const">
<return type="int" />
<param index="0" name="region" type="RID" />
<description>
- Returns how many connections this [code]region[/code] has with other regions in the map.
+ Returns how many connections this [param region] has with other regions in the map.
</description>
</method>
<method name="region_get_enter_cost" qualifiers="const">
<return type="float" />
<param index="0" name="region" type="RID" />
<description>
- Returns the [code]enter_cost[/code] of this [code]region[/code].
+ Returns the [code]enter_cost[/code] of this [param region].
</description>
</method>
<method name="region_get_map" qualifiers="const">
<return type="RID" />
<param index="0" name="region" type="RID" />
<description>
- Returns the navigation map [RID] the requested [code]region[/code] is currently assigned to.
+ Returns the navigation map [RID] the requested [param region] is currently assigned to.
</description>
</method>
<method name="region_get_navigation_layers" qualifiers="const">
@@ -339,7 +480,7 @@
<return type="float" />
<param index="0" name="region" type="RID" />
<description>
- Returns the [code]travel_cost[/code] of this [code]region[/code].
+ Returns the [code]travel_cost[/code] of this [param region].
</description>
</method>
<method name="region_owns_point" qualifiers="const">
@@ -347,7 +488,7 @@
<param index="0" name="region" type="RID" />
<param index="1" name="point" type="Vector3" />
<description>
- Returns [code]true[/code] if the provided [code]point[/code] in world space is currently owned by the provided navigation [code]region[/code]. Owned in this context means that one of the region's navigation mesh polygon faces has a possible position at the closest distance to this point compared to all other navigation meshes from other navigation regions that are also registered on the navigation map of the provided region.
+ Returns [code]true[/code] if the provided [param point] in world space is currently owned by the provided navigation [param region]. Owned in this context means that one of the region's navigation mesh polygon faces has a possible position at the closest distance to this point compared to all other navigation meshes from other navigation regions that are also registered on the navigation map of the provided region.
If multiple navigation meshes have positions at equal distance the navigation region whose polygons are processed first wins the ownership. Polygons are processed in the same order that navigation regions were registered on the NavigationServer.
[b]Note:[/b] If navigation meshes from different navigation regions overlap (which should be avoided in general) the result might not be what is expected.
</description>
@@ -357,7 +498,7 @@
<param index="0" name="region" type="RID" />
<param index="1" name="enter_cost" type="float" />
<description>
- Sets the [code]enter_cost[/code] for this [code]region[/code].
+ Sets the [param enter_cost] for this [param region].
</description>
</method>
<method name="region_set_map" qualifiers="const">
@@ -397,7 +538,7 @@
<param index="0" name="region" type="RID" />
<param index="1" name="travel_cost" type="float" />
<description>
- Sets the [code]travel_cost[/code] for this [code]region[/code].
+ Sets the [param travel_cost] for this [param region].
</description>
</method>
<method name="set_active" qualifiers="const">
diff --git a/doc/classes/NinePatchRect.xml b/doc/classes/NinePatchRect.xml
index d84509ca8f..1592718c4b 100644
--- a/doc/classes/NinePatchRect.xml
+++ b/doc/classes/NinePatchRect.xml
@@ -21,7 +21,7 @@
<param index="0" name="margin" type="int" enum="Side" />
<param index="1" name="value" type="int" />
<description>
- Sets the size of the margin on the specified [enum Side] to [code]value[/code] pixels.
+ Sets the size of the margin on the specified [enum Side] to [param value] pixels.
</description>
</method>
</methods>
diff --git a/doc/classes/Node.xml b/doc/classes/Node.xml
index 1436123e94..21fb9d139c 100644
--- a/doc/classes/Node.xml
+++ b/doc/classes/Node.xml
@@ -39,7 +39,7 @@
<method name="_get_configuration_warnings" qualifiers="virtual const">
<return type="PackedStringArray" />
<description>
- The elements in the array returned from this method are displayed as warnings in the Scene Dock if the script that overrides it is a [code]tool[/code] script.
+ The elements in the array returned from this method are displayed as warnings in the Scene dock if the script that overrides it is a [code]tool[/code] script.
Returning an empty array produces no warnings.
Call [method update_configuration_warnings] when the warnings need to be updated for this node.
</description>
@@ -59,7 +59,7 @@
<return type="void" />
<param index="0" name="delta" type="float" />
<description>
- Called during the physics processing step of the main loop. Physics processing means that the frame rate is synced to the physics, i.e. the [code]delta[/code] variable should be constant. [code]delta[/code] is in seconds.
+ Called during the physics processing step of the main loop. Physics processing means that the frame rate is synced to the physics, i.e. the [param delta] variable should be constant. [param delta] is in seconds.
It is only called if physics processing is enabled, which is done automatically if this method is overridden, and can be toggled with [method set_physics_process].
Corresponds to the [constant NOTIFICATION_PHYSICS_PROCESS] notification in [method Object._notification].
[b]Note:[/b] This method is only called if the node is present in the scene tree (i.e. if it's not an orphan).
@@ -69,7 +69,7 @@
<return type="void" />
<param index="0" name="delta" type="float" />
<description>
- Called during the processing step of the main loop. Processing happens at every frame and as fast as possible, so the [code]delta[/code] time since the previous frame is not constant. [code]delta[/code] is in seconds.
+ Called during the processing step of the main loop. Processing happens at every frame and as fast as possible, so the [param delta] time since the previous frame is not constant. [param delta] is in seconds.
It is only called if processing is enabled, which is done automatically if this method is overridden, and can be toggled with [method set_process].
Corresponds to the [constant NOTIFICATION_PROCESS] notification in [method Object._notification].
[b]Note:[/b] This method is only called if the node is present in the scene tree (i.e. if it's not an orphan).
@@ -110,23 +110,24 @@
<return type="void" />
<param index="0" name="event" type="InputEvent" />
<description>
- Called when an [InputEventKey] or [InputEventShortcut] hasn't been consumed by [method _input] or any GUI [Control] item. The input event propagates up through the node tree until a node consumes it.
+ Called when an [InputEventKey] hasn't been consumed by [method _input] or any GUI [Control] item. The input event propagates up through the node tree until a node consumes it.
It is only called if unhandled key input processing is enabled, which is done automatically if this method is overridden, and can be toggled with [method set_process_unhandled_key_input].
To consume the input event and stop it propagating further to other nodes, [method Viewport.set_input_as_handled] can be called.
This method can be used to handle Unicode character input with [kbd]Alt[/kbd], [kbd]Alt + Ctrl[/kbd], and [kbd]Alt + Shift[/kbd] modifiers, after shortcuts were handled.
For gameplay input, this and [method _unhandled_input] are usually a better fit than [method _input] as they allow the GUI to intercept the events first.
+ This method also performs better than [method _unhandled_input], since unrelated events such as [InputEventMouseMotion] are automatically filtered.
[b]Note:[/b] This method is only called if the node is present in the scene tree (i.e. if it's not an orphan).
</description>
</method>
<method name="add_child">
<return type="void" />
<param index="0" name="node" type="Node" />
- <param index="1" name="legible_unique_name" type="bool" default="false" />
+ <param index="1" name="force_readable_name" type="bool" default="false" />
<param index="2" name="internal" type="int" enum="Node.InternalMode" default="0" />
<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 instantiated instead of its type.
- If [code]internal[/code] is different than [constant INTERNAL_MODE_DISABLED], the child will be added as internal node. Such nodes are ignored by methods like [method get_children], unless their parameter [code]include_internal[/code] is [code]true[/code].The intended usage is to hide the internal nodes from the user, so the user won't accidentally delete or modify them. Used by some GUI nodes, e.g. [ColorPicker]. See [enum InternalMode] for available modes.
+ Adds a child [param 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 [param force_readable_name] is [code]true[/code], improves the readability of the added [param node]. If not named, the [param node] is renamed to its type, and if it shares [member name] with a sibling, a number is suffixed more appropriately. This operation is very slow. As such, it is recommended leaving this to [code]false[/code], which assigns a dummy name featuring [code]@[/code] in both situations.
+ If [param internal] is different than [constant INTERNAL_MODE_DISABLED], the child will be added as internal node. Such nodes are ignored by methods like [method get_children], unless their parameter [code]include_internal[/code] is [code]true[/code].The intended usage is to hide the internal nodes from the user, so the user won't accidentally delete or modify them. Used by some GUI nodes, e.g. [ColorPicker]. See [enum InternalMode] for available modes.
[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]
@@ -145,16 +146,16 @@
[/csharp]
[/codeblocks]
If you need the child node to be added below a specific node in the list of children, use [method add_sibling] instead of this method.
- [b]Note:[/b] If you want a child to be persisted to a [PackedScene], you must set [member owner] in addition to calling [method add_child]. This is typically relevant for [url=$DOCS_URL/tutorials/misc/running_code_in_the_editor.html]tool scripts[/url] and [url=$DOCS_URL/tutorials/plugins/editor/index.html]editor plugins[/url]. If [method add_child] is called without setting [member owner], the newly added [Node] will not be visible in the scene tree, though it will be visible in the 2D/3D view.
+ [b]Note:[/b] If you want a child to be persisted to a [PackedScene], you must set [member owner] in addition to calling [method add_child]. This is typically relevant for [url=$DOCS_URL/tutorials/plugins/running_code_in_the_editor.html]tool scripts[/url] and [url=$DOCS_URL/tutorials/plugins/editor/index.html]editor plugins[/url]. If [method add_child] is called without setting [member owner], the newly added [Node] will not be visible in the scene tree, though it will be visible in the 2D/3D view.
</description>
</method>
<method name="add_sibling">
<return type="void" />
<param index="0" name="sibling" type="Node" />
- <param index="1" name="legible_unique_name" type="bool" default="false" />
+ <param index="1" name="force_readable_name" type="bool" default="false" />
<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 instantiated instead of its type.
+ Adds a [param sibling] node to current's node parent, at the same level as that node, right below it.
+ If [param force_readable_name] is [code]true[/code], improves the readability of the added [param sibling]. If not named, the [param sibling] is renamed to its type, and if it shares [member name] with a sibling, a number is suffixed more appropriately. This operation is very slow. As such, it is recommended leaving this to [code]false[/code], which assigns a dummy name featuring [code]@[/code] in both situations.
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.
[b]Note:[/b] If this node is internal, the new sibling will be internal too (see [code]internal[/code] parameter in [method add_child]).
</description>
@@ -165,7 +166,7 @@
<param index="1" name="persistent" type="bool" default="false" />
<description>
Adds the node to a group. Groups are helpers to name and organize a subset of nodes, for example "enemies" or "collectables". A node can be in any number of groups. Nodes can be assigned a group at any time, but will not be added until they are inside the scene tree (see [method is_inside_tree]). See notes in the description, and the group methods in [SceneTree].
- The [code]persistent[/code] option is used when packing node to [PackedScene] and saving to file. Non-persistent groups aren't stored.
+ The [param persistent] option is used when packing node to [PackedScene] and saving to file. Non-persistent groups aren't stored.
[b]Note:[/b] For performance reasons, the order of node groups is [i]not[/i] guaranteed. The order of node groups should not be relied upon as it can vary across project runs.
</description>
</method>
@@ -179,9 +180,14 @@
<return type="Tween" />
<description>
Creates a new [Tween] and binds it to this node. This is equivalent of doing:
- [codeblock]
+ [codeblocks]
+ [gdscript]
get_tree().create_tween().bind_node(self)
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ GetTree().CreateTween().BindNode(this);
+ [/csharp]
+ [/codeblocks]
</description>
</method>
<method name="duplicate" qualifiers="const">
@@ -189,7 +195,7 @@
<param index="0" name="flags" type="int" default="15" />
<description>
Duplicates the node, returning a new node.
- You can fine-tune the behavior using the [code]flags[/code] (see [enum DuplicateFlags]).
+ You can fine-tune the behavior using the [param flags] (see [enum DuplicateFlags]).
[b]Note:[/b] It will not work properly if the node contains a script with constructor arguments (i.e. needs to supply arguments to [method Object._init] method). In that case, the node will be duplicated without a script.
</description>
</method>
@@ -199,10 +205,10 @@
<param index="1" name="recursive" type="bool" default="true" />
<param index="2" name="owned" type="bool" default="true" />
<description>
- Finds the first descendant of this node whose name matches [code]pattern[/code] as in [method String.match].
- [code]pattern[/code] does not match against the full path, just against individual node names. It is case-sensitive, with [code]"*"[/code] matching zero or more characters and [code]"?"[/code] matching any single character except [code]"."[/code]).
- If [code]recursive[/code] is [code]true[/code], all child nodes are included, even if deeply nested. Nodes are checked in tree order, so this node's first direct child is checked first, then its own direct children, etc., before moving to the second direct child, and so on. If [code]recursive[/code] is [code]false[/code], only this node's direct children are matched.
- If [code]owned[/code] is [code]true[/code], this method only finds nodes who have an assigned [member Node.owner]. This is especially important for scenes instantiated through a script, because those scenes don't have an owner.
+ Finds the first descendant of this node whose name matches [param pattern] as in [method String.match].
+ [param pattern] does not match against the full path, just against individual node names. It is case-sensitive, with [code]"*"[/code] matching zero or more characters and [code]"?"[/code] matching any single character except [code]"."[/code]).
+ If [param recursive] is [code]true[/code], all child nodes are included, even if deeply nested. Nodes are checked in tree order, so this node's first direct child is checked first, then its own direct children, etc., before moving to the second direct child, and so on. If [param recursive] is [code]false[/code], only this node's direct children are matched.
+ If [param owned] is [code]true[/code], this method only finds nodes who have an assigned [member Node.owner]. This is especially important for scenes instantiated through a script, because those scenes don't have an owner.
Returns [code]null[/code] if no matching [Node] is found.
[b]Note:[/b] As this method walks through all the descendants of the node, it is the slowest way to get a reference to another node. Whenever possible, consider using [method get_node] with unique names instead (see [member unique_name_in_owner]), or caching the node references into variable.
[b]Note:[/b] To find all descendant nodes matching a pattern or a class type, see [method find_children].
@@ -215,11 +221,11 @@
<param index="2" name="recursive" type="bool" default="true" />
<param index="3" name="owned" type="bool" default="true" />
<description>
- Finds descendants of this node whose name matches [code]pattern[/code] as in [method String.match], and/or type matches [code]type[/code] as in [method Object.is_class].
- [code]pattern[/code] does not match against the full path, just against individual node names. It is case-sensitive, with [code]"*"[/code] matching zero or more characters and [code]"?"[/code] matching any single character except [code]"."[/code]).
- [code]type[/code] will check equality or inheritance, and is case-sensitive. [code]"Object"[/code] will match a node whose type is [code]"Node"[/code] but not the other way around.
- If [code]recursive[/code] is [code]true[/code], all child nodes are included, even if deeply nested. Nodes are checked in tree order, so this node's first direct child is checked first, then its own direct children, etc., before moving to the second direct child, and so on. If [code]recursive[/code] is [code]false[/code], only this node's direct children are matched.
- If [code]owned[/code] is [code]true[/code], this method only finds nodes who have an assigned [member Node.owner]. This is especially important for scenes instantiated through a script, because those scenes don't have an owner.
+ Finds descendants of this node whose name matches [param pattern] as in [method String.match], and/or type matches [param type] as in [method Object.is_class].
+ [param pattern] does not match against the full path, just against individual node names. It is case-sensitive, with [code]"*"[/code] matching zero or more characters and [code]"?"[/code] matching any single character except [code]"."[/code]).
+ [param type] will check equality or inheritance, and is case-sensitive. [code]"Object"[/code] will match a node whose type is [code]"Node"[/code] but not the other way around.
+ If [param recursive] is [code]true[/code], all child nodes are included, even if deeply nested. Nodes are checked in tree order, so this node's first direct child is checked first, then its own direct children, etc., before moving to the second direct child, and so on. If [param recursive] is [code]false[/code], only this node's direct children are matched.
+ If [param owned] is [code]true[/code], this method only finds nodes who have an assigned [member Node.owner]. This is especially important for scenes instantiated through a script, because those scenes don't have an owner.
Returns an empty array if no matching nodes are found.
[b]Note:[/b] As this method walks through all the descendants of the node, it is the slowest way to get references to other nodes. Whenever possible, consider caching the node references into variables.
[b]Note:[/b] If you only want to find the first descendant node that matches a pattern, see [method find_child].
@@ -229,8 +235,8 @@
<return type="Node" />
<param index="0" name="pattern" type="String" />
<description>
- Finds the first parent of the current node whose name matches [code]pattern[/code] as in [method String.match].
- [code]pattern[/code] does not match against the full path, just against individual node names. It is case-sensitive, with [code]"*"[/code] matching zero or more characters and [code]"?"[/code] matching any single character except [code]"."[/code]).
+ Finds the first parent of the current node whose name matches [param pattern] as in [method String.match].
+ [param pattern] does not match against the full path, just against individual node names. It is case-sensitive, with [code]"*"[/code] matching zero or more characters and [code]"?"[/code] matching any single character except [code]"."[/code]).
[b]Note:[/b] As this method walks upwards in the scene tree, it can be slow in large, deeply nested scene trees. Whenever possible, consider using [method get_node] with unique names instead (see [member unique_name_in_owner]), or caching the node references into variable.
</description>
</method>
@@ -241,7 +247,7 @@
<description>
Returns a child node by its index (see [method get_child_count]). This method is often used for iterating all children of a node.
Negative indices access the children from the last one.
- If [code]include_internal[/code] is [code]true[/code], internal children are skipped (see [code]internal[/code] parameter in [method add_child]).
+ If [param include_internal] is [code]false[/code], internal children are skipped (see [code]internal[/code] parameter in [method add_child]).
To access a child node via its name, use [method get_node].
</description>
</method>
@@ -250,7 +256,7 @@
<param index="0" name="include_internal" type="bool" default="false" />
<description>
Returns the number of child nodes.
- If [code]include_internal[/code] is [code]false[/code], internal children aren't counted (see [code]internal[/code] parameter in [method add_child]).
+ If [param include_internal] is [code]false[/code], internal children aren't counted (see [code]internal[/code] parameter in [method add_child]).
</description>
</method>
<method name="get_children" qualifiers="const">
@@ -258,22 +264,33 @@
<param index="0" name="include_internal" type="bool" default="false" />
<description>
Returns an array of references to node's children.
- If [code]include_internal[/code] is [code]false[/code], the returned array won't include internal children (see [code]internal[/code] parameter in [method add_child]).
+ If [param include_internal] is [code]false[/code], the returned array won't include internal children (see [code]internal[/code] parameter in [method add_child]).
</description>
</method>
<method name="get_groups" qualifiers="const">
- <return type="Array" />
+ <return type="StringName[]" />
<description>
Returns an array listing the groups that the node is a member of.
[b]Note:[/b] For performance reasons, the order of node groups is [i]not[/i] guaranteed. The order of node groups should not be relied upon as it can vary across project runs.
[b]Note:[/b] The engine uses some group names internally (all starting with an underscore). To avoid conflicts with internal groups, do not add custom groups whose name starts with an underscore. To exclude internal groups while looping over [method get_groups], use the following snippet:
- [codeblock]
+ [codeblocks]
+ [gdscript]
# Stores the node's non-internal groups only (as an array of Strings).
var non_internal_groups = []
for group in get_groups():
if not group.begins_with("_"):
non_internal_groups.push_back(group)
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ // Stores the node's non-internal groups only (as a List of strings).
+ List&lt;string&gt; nonInternalGroups = new List&lt;string&gt;();
+ foreach (string group in GetGroups())
+ {
+ if (!group.BeginsWith("_"))
+ nonInternalGroups.Add(group);
+ }
+ [/csharp]
+ [/codeblocks]
</description>
</method>
<method name="get_index" qualifiers="const">
@@ -281,7 +298,7 @@
<param index="0" name="include_internal" type="bool" default="false" />
<description>
Returns the node's order in the scene tree branch. For example, if called on the first child node the position is [code]0[/code].
- If [code]include_internal[/code] is [code]false[/code], the index won't take internal children into account, i.e. first non-internal child will have index of 0 (see [code]internal[/code] parameter in [method add_child]).
+ If [param include_internal] is [code]false[/code], the index won't take internal children into account, i.e. first non-internal child will have index of 0 (see [code]internal[/code] parameter in [method add_child]).
</description>
</method>
<method name="get_multiplayer_authority" qualifiers="const">
@@ -349,7 +366,7 @@
<return type="Node" />
<param index="0" name="path" type="NodePath" />
<description>
- Similar to [method get_node], but does not log an error if [code]path[/code] does not point to a valid [Node].
+ Similar to [method get_node], but does not log an error if [param path] does not point to a valid [Node].
</description>
</method>
<method name="get_parent" qualifiers="const">
@@ -368,7 +385,7 @@
<return type="NodePath" />
<param index="0" name="node" type="Node" />
<description>
- Returns the relative [NodePath] from this node to the specified [code]node[/code]. Both nodes must be in the same scene or the function will fail.
+ Returns the relative [NodePath] from this node to the specified [param node]. Both nodes must be in the same scene or the function will fail.
</description>
</method>
<method name="get_physics_process_delta_time" qualifiers="const">
@@ -432,7 +449,7 @@
<return type="bool" />
<param index="0" name="node" type="Node" />
<description>
- Returns [code]true[/code] if [code]node[/code] has editable children enabled relative to this node. This method is only intended for use with editor tooling.
+ Returns [code]true[/code] if [param node] has editable children enabled relative to this node. This method is only intended for use with editor tooling.
</description>
</method>
<method name="is_greater_than" qualifiers="const">
@@ -512,9 +529,9 @@
<method name="move_child">
<return type="void" />
<param index="0" name="child_node" type="Node" />
- <param index="1" name="to_position" type="int" />
+ <param index="1" name="to_index" type="int" />
<description>
- Moves a child node to a different position (order) among the other children. Since calls, signals, etc are performed by tree order, changing the order of children nodes may be useful.
+ Moves a child node to a different index (order) among the other children. Since calls, signals, etc. are performed by tree order, changing the order of children nodes may be useful. If [param to_index] is negative, the index will be counted from the end.
[b]Note:[/b] Internal children can only be moved within their expected "internal range" (see [code]internal[/code] parameter in [method add_child]).
</description>
</method>
@@ -543,7 +560,7 @@
<method name="print_tree_pretty">
<return type="void" />
<description>
- Similar to [method print_tree], this prints the tree to stdout. This version displays a more graphical representation similar to what is displayed in the scene inspector. It is useful for inspecting larger trees.
+ Similar to [method print_tree], this prints the tree to stdout. This version displays a more graphical representation similar to what is displayed in the Scene Dock. It is useful for inspecting larger trees.
[b]Example output:[/b]
[codeblock]
â”–â•´TheGame
@@ -561,7 +578,7 @@
<param index="1" name="args" type="Array" default="[]" />
<param index="2" name="parent_first" type="bool" default="false" />
<description>
- Calls the given method (if present) with the arguments given in [code]args[/code] on this node and recursively on all its children. If the [code]parent_first[/code] argument is [code]true[/code], the method will be called on the current node first, then on all its children. If [code]parent_first[/code] is [code]false[/code], the children will be called first.
+ Calls the given method (if present) with the arguments given in [param args] on this node and recursively on all its children. If the [param parent_first] argument is [code]true[/code], the method will be called on the current node first, then on all its children. If [param parent_first] is [code]false[/code], the children will be called first.
</description>
</method>
<method name="propagate_notification">
@@ -577,18 +594,6 @@
Queues a node for deletion at the end of the current frame. When deleted, all of its child nodes will be deleted as well. This method ensures it's safe to delete the node, contrary to [method Object.free]. Use [method Object.is_queued_for_deletion] to check whether a node will be deleted at the end of the frame.
</description>
</method>
- <method name="raise">
- <return type="void" />
- <description>
- Moves this node to the bottom of parent node's children hierarchy. This is often useful in GUIs ([Control] nodes), because their order of drawing depends on their order in the tree. The top Node is drawn first, then any siblings below the top Node in the hierarchy are successively drawn on top of it. After using [code]raise[/code], a Control will be drawn on top of its siblings.
- </description>
- </method>
- <method name="remove_and_skip">
- <return type="void" />
- <description>
- Removes a node and sets all its children as children of the parent node (if it exists). All event subscriptions that pass by the removed node will be unsubscribed.
- </description>
- </method>
<method name="remove_child">
<return type="void" />
<param index="0" name="node" type="Node" />
@@ -601,7 +606,7 @@
<return type="void" />
<param index="0" name="group" type="StringName" />
<description>
- Removes a node from a group. See notes in the description, and the group methods in [SceneTree].
+ Removes a node from the [param group]. Does nothing if the node is not in the [param group]. See notes in the description, and the group methods in [SceneTree].
</description>
</method>
<method name="replace_by">
@@ -610,7 +615,7 @@
<param index="1" name="keep_groups" type="bool" default="false" />
<description>
Replaces a node in a scene by the given one. Subscriptions that pass through this node will be lost.
- If [code]keep_groups[/code] is [code]true[/code], the [code]node[/code] is added to the same groups that the replaced node is in.
+ If [param keep_groups] is [code]true[/code], the [param node] is added to the same groups that the replaced node is in.
[b]Note:[/b] The given node will become the new parent of any child nodes that the replaced node had.
[b]Note:[/b] The replaced node is not automatically freed, so you either need to keep it in a variable for later use or free it using [method Object.free].
</description>
@@ -625,7 +630,7 @@
<return type="int" enum="Error" />
<param index="0" name="method" type="StringName" />
<description>
- Sends a remote procedure call request for the given [code]method[/code] to peers on the network (and locally), optionally sending all additional arguments as arguments to the method called by the RPC. The call request will only be received by nodes with the same [NodePath], including the exact same node name. Behaviour depends on the RPC configuration for the given method, see [method rpc_config]. Methods are not exposed to RPCs by default. Returns [code]null[/code].
+ Sends a remote procedure call request for the given [param method] 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. Behavior depends on the RPC configuration for the given method, see [method rpc_config]. Methods are not exposed to RPCs by default. Returns [code]null[/code].
[b]Note:[/b] You can only safely use RPCs on clients after you received the [code]connected_to_server[/code] signal from the [MultiplayerAPI]. You also need to keep track of the connection state, either by the [MultiplayerAPI] signals like [code]server_disconnected[/code] or by checking [code]get_multiplayer().peer.get_connection_status() == CONNECTION_CONNECTED[/code].
</description>
</method>
@@ -634,7 +639,7 @@
<param index="0" name="method" type="StringName" />
<param index="1" name="config" type="Variant" />
<description>
- Changes the RPC mode for the given [code]method[/code] with the given [code]config[/code] which should be [code]null[/code] (to disable) or a [Dictionary] in the form:
+ Changes the RPC mode for the given [param method] with the given [param config] which should be [code]null[/code] (to disable) or a [Dictionary] in the form:
[codeblock]
{
rpc_mode = MultiplayerAPI.RPCMode,
@@ -651,7 +656,7 @@
<param index="0" name="peer_id" type="int" />
<param index="1" name="method" type="StringName" />
<description>
- Sends a [method rpc] to a specific peer identified by [code]peer_id[/code] (see [method MultiplayerPeer.set_target_peer]). Returns [code]null[/code].
+ Sends a [method rpc] to a specific peer identified by [param peer_id] (see [method MultiplayerPeer.set_target_peer]). Returns [code]null[/code].
</description>
</method>
<method name="set_display_folded">
@@ -666,7 +671,7 @@
<param index="0" name="node" type="Node" />
<param index="1" name="is_editable" type="bool" />
<description>
- Sets the editable children state of [code]node[/code] relative to this node. This method is only intended for use with editor tooling.
+ Sets the editable children state of [param node] relative to this node. This method is only intended for use with editor tooling.
</description>
</method>
<method name="set_multiplayer_authority">
@@ -674,7 +679,7 @@
<param index="0" name="id" type="int" />
<param index="1" name="recursive" type="bool" default="true" />
<description>
- Sets the node's multiplayer authority to the peer with the given peer ID. The multiplayer authority is the peer that has authority over the node on the network. Useful in conjunction with [method rpc_config] and the [MultiplayerAPI]. Inherited from the parent node by default, which ultimately defaults to peer ID 1 (the server). If [code]recursive[/code], the given peer is recursively set as the authority for all children of this node.
+ Sets the node's multiplayer authority to the peer with the given peer ID. The multiplayer authority is the peer that has authority over the node on the network. Useful in conjunction with [method rpc_config] and the [MultiplayerAPI]. Inherited from the parent node by default, which ultimately defaults to peer ID 1 (the server). If [param recursive], the given peer is recursively set as the authority for all children of this node.
</description>
</method>
<method name="set_physics_process">
@@ -763,7 +768,7 @@
</member>
<member name="owner" type="Node" setter="set_owner" getter="get_owner">
The node owner. A node can have any other node as owner (as long as it is a valid parent, grandparent, etc. ascending in the tree). When saving a node (using [PackedScene]), all the nodes it owns will be saved with it. This allows for the creation of complex [SceneTree]s, with instancing and subinstancing.
- [b]Note:[/b] If you want a child to be persisted to a [PackedScene], you must set [member owner] in addition to calling [method add_child]. This is typically relevant for [url=$DOCS_URL/tutorials/misc/running_code_in_the_editor.html]tool scripts[/url] and [url=$DOCS_URL/tutorials/plugins/editor/index.html]editor plugins[/url]. If [method add_child] is called without setting [member owner], the newly added [Node] will not be visible in the scene tree, though it will be visible in the 2D/3D view.
+ [b]Note:[/b] If you want a child to be persisted to a [PackedScene], you must set [member owner] in addition to calling [method add_child]. This is typically relevant for [url=$DOCS_URL/tutorials/plugins/running_code_in_the_editor.html]tool scripts[/url] and [url=$DOCS_URL/tutorials/plugins/editor/index.html]editor plugins[/url]. If [method add_child] is called without setting [member owner], the newly added [Node] will not be visible in the scene tree, though it will be visible in the 2D/3D view.
</member>
<member name="process_mode" type="int" setter="set_process_mode" getter="get_process_mode" enum="Node.ProcessMode" default="0">
Can be used to pause or unpause the node, or make the node paused based on the [SceneTree], or make it inherit the process mode from its parent (default).
@@ -791,7 +796,7 @@
<param index="0" name="node" type="Node" />
<description>
Emitted when a child node is about to exit the scene tree, either because it is being removed or freed directly, or because this node is exiting the tree.
- When this signal is received, the child [code]node[/code] is still in the tree and valid. This signal is emitted [i]after[/i] the child node's own [signal tree_exiting] and [constant NOTIFICATION_EXIT_TREE].
+ When this signal is received, the child [param node] is still in the tree and valid. This signal is emitted [i]after[/i] the child node's own [signal tree_exiting] and [constant NOTIFICATION_EXIT_TREE].
</description>
</signal>
<signal name="ready">
@@ -856,8 +861,8 @@
<constant name="NOTIFICATION_UNPARENTED" value="19">
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 instantiated.
+ <constant name="NOTIFICATION_SCENE_INSTANTIATED" value="20">
+ Notification received by scene owner when its scene is instantiated.
</constant>
<constant name="NOTIFICATION_DRAG_BEGIN" value="21">
Notification received when a drag operation begins. All nodes receive this notification, not only the dragged one.
@@ -986,7 +991,7 @@
<constant name="DUPLICATE_SCRIPTS" value="4" enum="DuplicateFlags">
Duplicate the node's scripts.
</constant>
- <constant name="DUPLICATE_USE_INSTANCING" value="8" enum="DuplicateFlags">
+ <constant name="DUPLICATE_USE_INSTANTIATION" value="8" enum="DuplicateFlags">
Duplicate using instancing.
An instance stays linked to the original so when the original changes, the instance changes too.
</constant>
diff --git a/doc/classes/Node2D.xml b/doc/classes/Node2D.xml
index 50392ea59a..054ab532af 100644
--- a/doc/classes/Node2D.xml
+++ b/doc/classes/Node2D.xml
@@ -15,14 +15,14 @@
<return type="void" />
<param index="0" name="ratio" type="Vector2" />
<description>
- Multiplies the current scale by the [code]ratio[/code] vector.
+ Multiplies the current scale by the [param ratio] vector.
</description>
</method>
<method name="get_angle_to" qualifiers="const">
<return type="float" />
<param index="0" name="point" type="Vector2" />
<description>
- Returns the angle between the node and the [code]point[/code] in radians.
+ Returns the angle between the node and the [param point] in radians.
[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/node2d_get_angle_to.png]Illustration of the returned angle.[/url]
</description>
</method>
@@ -37,14 +37,14 @@
<return type="void" />
<param index="0" name="offset" type="Vector2" />
<description>
- Adds the [code]offset[/code] vector to the node's global position.
+ Adds the [param offset] vector to the node's global position.
</description>
</method>
<method name="look_at">
<return type="void" />
<param index="0" name="point" type="Vector2" />
<description>
- Rotates the node so it points towards the [code]point[/code], which is expected to use global coordinates.
+ Rotates the node so it points towards the [param point], which is expected to use global coordinates.
</description>
</method>
<method name="move_local_x">
@@ -52,7 +52,7 @@
<param index="0" name="delta" type="float" />
<param index="1" name="scaled" type="bool" default="false" />
<description>
- Applies a local translation on the node's X axis based on the [method Node._process]'s [code]delta[/code]. If [code]scaled[/code] is [code]false[/code], normalizes the movement.
+ Applies a local translation on the node's X axis based on the [method Node._process]'s [param delta]. If [param scaled] is [code]false[/code], normalizes the movement.
</description>
</method>
<method name="move_local_y">
@@ -60,7 +60,7 @@
<param index="0" name="delta" type="float" />
<param index="1" name="scaled" type="bool" default="false" />
<description>
- Applies a local translation on the node's Y axis based on the [method Node._process]'s [code]delta[/code]. If [code]scaled[/code] is [code]false[/code], normalizes the movement.
+ Applies a local translation on the node's Y axis based on the [method Node._process]'s [param delta]. If [param scaled] is [code]false[/code], normalizes the movement.
</description>
</method>
<method name="rotate">
@@ -88,7 +88,7 @@
<return type="void" />
<param index="0" name="offset" type="Vector2" />
<description>
- Translates the node by the given [code]offset[/code] in local coordinates.
+ Translates the node by the given [param offset] in local coordinates.
</description>
</method>
</methods>
@@ -119,6 +119,8 @@
[b]Note:[/b] Negative X scales in 2D are not decomposable from the transformation matrix. Due to the way scale is represented with transformation matrices in Godot, negative scales on the X axis will be changed to negative scales on the Y axis and a rotation of 180 degrees when decomposed.
</member>
<member name="skew" type="float" setter="set_skew" getter="get_skew" default="0.0">
+ Slants the node.
+ [b]Note:[/b] Skew is X axis only.
</member>
<member name="transform" type="Transform2D" setter="set_transform" getter="get_transform">
Local [Transform2D].
diff --git a/doc/classes/Node3D.xml b/doc/classes/Node3D.xml
index 6958f4f7d5..b6024b1887 100644
--- a/doc/classes/Node3D.xml
+++ b/doc/classes/Node3D.xml
@@ -6,7 +6,7 @@
<description>
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].
+ [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.deg_to_rad].
</description>
<tutorials>
<link title="Introduction to 3D">$DOCS_URL/tutorials/3d/introduction_to_3d.html</link>
@@ -39,7 +39,7 @@
</description>
</method>
<method name="get_gizmos" qualifiers="const">
- <return type="Array" />
+ <return type="Node3DGizmo[]" />
<description>
Returns all the gizmos attached to this [code]Node3D[/code].
</description>
@@ -113,10 +113,10 @@
<param index="0" name="target" type="Vector3" />
<param index="1" name="up" type="Vector3" default="Vector3(0, 1, 0)" />
<description>
- Rotates the node so that the local forward axis (-Z) points toward the [code]target[/code] position.
- The local up axis (+Y) points as close to the [code]up[/code] vector as possible while staying perpendicular to the local forward axis. The resulting transform is orthogonal, and the scale is preserved. Non-uniform scaling may not work correctly.
- The [code]target[/code] position cannot be the same as the node's position, the [code]up[/code] vector cannot be zero, and the direction from the node's position to the [code]target[/code] vector cannot be parallel to the [code]up[/code] vector.
- Operations take place in global space.
+ Rotates the node so that the local forward axis (-Z) points toward the [param target] position.
+ The local up axis (+Y) points as close to the [param up] vector as possible while staying perpendicular to the local forward axis. The resulting transform is orthogonal, and the scale is preserved. Non-uniform scaling may not work correctly.
+ The [param target] position cannot be the same as the node's position, the [param up] vector cannot be zero, and the direction from the node's position to the [param target] vector cannot be parallel to the [param up] vector.
+ Operations take place in global space, which means that the node must be in the scene tree.
</description>
</method>
<method name="look_at_from_position">
@@ -125,7 +125,7 @@
<param index="1" name="target" type="Vector3" />
<param index="2" name="up" type="Vector3" default="Vector3(0, 1, 0)" />
<description>
- Moves the node to the specified [code]position[/code], and then rotates the node to point toward the [code]target[/code] as per [method look_at]. Operations take place in global space.
+ Moves the node to the specified [param position], and then rotates the node to point toward the [param target] as per [method look_at]. Operations take place in global space.
</description>
</method>
<method name="orthonormalize">
@@ -134,20 +134,6 @@
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="property_can_revert">
- <return type="bool" />
- <param index="0" name="name" type="String" />
- <description>
- Returns [code]true[/code] if the property identified by [code]name[/code] can be reverted to a default value.
- </description>
- </method>
- <method name="property_get_revert">
- <return type="Variant" />
- <param index="0" name="name" type="String" />
- <description>
- Returns the default value of the Node3D property with given [code]name[/code].
- </description>
- </method>
<method name="rotate">
<return type="void" />
<param index="0" name="axis" type="Vector3" />
@@ -245,14 +231,14 @@
<return type="Vector3" />
<param index="0" name="local_point" type="Vector3" />
<description>
- Transforms [code]local_point[/code] from this node's local space to world space.
+ Transforms [param local_point] from this node's local space to world space.
</description>
</method>
<method name="to_local" qualifiers="const">
<return type="Vector3" />
<param index="0" name="global_point" type="Vector3" />
<description>
- Transforms [code]global_point[/code] from world space to this node's local space.
+ Transforms [param global_point] from world space to this node's local space.
</description>
</method>
<method name="translate">
@@ -260,7 +246,7 @@
<param index="0" name="offset" type="Vector3" />
<description>
Changes the node's position by the given offset [Vector3].
- Note that the translation [code]offset[/code] is affected by the node's scale, so if scaled by e.g. [code](10, 1, 1)[/code], a translation by an offset of [code](2, 0, 0)[/code] would actually add 20 ([code]2 * 10[/code]) to the X coordinate.
+ Note that the translation [param offset] is affected by the node's scale, so if scaled by e.g. [code](10, 1, 1)[/code], a translation by an offset of [code](2, 0, 0)[/code] would actually add 20 ([code]2 * 10[/code]) to the X coordinate.
</description>
</method>
<method name="translate_object_local">
@@ -304,12 +290,13 @@
<member name="rotation_edit_mode" type="int" setter="set_rotation_edit_mode" getter="get_rotation_edit_mode" enum="Node3D.RotationEditMode" default="0">
Specify how rotation (and scale) will be presented in the editor.
</member>
- <member name="rotation_order" type="int" setter="set_rotation_order" getter="get_rotation_order" enum="Node3D.RotationOrder" default="2">
+ <member name="rotation_order" type="int" setter="set_rotation_order" getter="get_rotation_order" enum="EulerOrder" default="2">
Specify the axis rotation order of the [member rotation] property. The final orientation is constructed by rotating the Euler angles in the order specified by this property.
</member>
<member name="scale" type="Vector3" setter="set_scale" getter="get_scale" default="Vector3(1, 1, 1)">
Scale part of the local transformation.
[b]Note:[/b] Mixed negative scales in 3D are not decomposable from the transformation matrix. Due to the way scale is represented with transformation matrices in Godot, the scale values will either be all positive or all negative.
+ [b]Note:[/b] Not all nodes are visually scaled by the [member scale] property. For example, [Light3D]s are not visually affected by [member scale].
</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.
@@ -345,23 +332,15 @@
<constant name="NOTIFICATION_VISIBILITY_CHANGED" value="43">
Node3D nodes receives this notification when their visibility changes.
</constant>
+ <constant name="NOTIFICATION_LOCAL_TRANSFORM_CHANGED" value="44">
+ Node3D nodes receives this notification when their local transform changes. This is not received when the transform of a parent node is changed.
+ In order for [constant NOTIFICATION_LOCAL_TRANSFORM_CHANGED] to work, users first need to ask for it, with [method set_notify_local_transform].
+ </constant>
<constant name="ROTATION_EDIT_MODE_EULER" value="0" enum="RotationEditMode">
</constant>
<constant name="ROTATION_EDIT_MODE_QUATERNION" value="1" enum="RotationEditMode">
</constant>
<constant name="ROTATION_EDIT_MODE_BASIS" value="2" enum="RotationEditMode">
</constant>
- <constant name="ROTATION_ORDER_XYZ" value="0" enum="RotationOrder">
- </constant>
- <constant name="ROTATION_ORDER_XZY" value="1" enum="RotationOrder">
- </constant>
- <constant name="ROTATION_ORDER_YXZ" value="2" enum="RotationOrder">
- </constant>
- <constant name="ROTATION_ORDER_YZX" value="3" enum="RotationOrder">
- </constant>
- <constant name="ROTATION_ORDER_ZXY" value="4" enum="RotationOrder">
- </constant>
- <constant name="ROTATION_ORDER_ZYX" value="5" enum="RotationOrder">
- </constant>
</constants>
</class>
diff --git a/doc/classes/NodePath.xml b/doc/classes/NodePath.xml
index edea501d6e..022b4826ea 100644
--- a/doc/classes/NodePath.xml
+++ b/doc/classes/NodePath.xml
@@ -4,7 +4,7 @@
Pre-parsed scene tree path.
</brief_description>
<description>
- A pre-parsed relative or absolute path in a scene tree, for use with [method Node.get_node] and similar functions. It can reference a node, a resource within a node, or a property of a node or resource. For instance, [code]"Path2D/PathFollow2D/Sprite2D:texture:size"[/code] would refer to the [code]size[/code] property of the [code]texture[/code] resource on the node named [code]"Sprite2D"[/code] which is a child of the other named nodes in the path.
+ A pre-parsed relative or absolute path in a scene tree, for use with [method Node.get_node] and similar functions. It can reference a node, a resource within a node, or a property of a node or resource. For example, [code]"Path2D/PathFollow2D/Sprite2D:texture:size"[/code] would refer to the [code]size[/code] property of the [code]texture[/code] resource on the node named [code]"Sprite2D"[/code] which is a child of the other named nodes in the path.
You will usually just pass a string to [method Node.get_node] and it will be automatically converted, but you may occasionally want to parse a path ahead of time with [NodePath] or the literal syntax [code]^"path"[/code]. Exporting a [NodePath] variable will give you a node selection widget in the properties panel of the editor, which can often be useful.
A [NodePath] is composed of a list of slash-separated node names (like a filesystem path) and an optional colon-separated list of "subnames" which can be resources or properties.
Some examples of NodePaths include the following:
@@ -113,7 +113,7 @@
<return type="StringName" />
<param index="0" name="idx" type="int" />
<description>
- Gets the node name indicated by [code]idx[/code] (0 to [method get_name_count] - 1).
+ Gets the node name indicated by [param idx] (0 to [method get_name_count] - 1).
[codeblocks]
[gdscript]
var node_path = NodePath("Path2D/PathFollow2D/Sprite2D")
@@ -141,7 +141,7 @@
<return type="StringName" />
<param index="0" name="idx" type="int" />
<description>
- Gets the resource or property name indicated by [code]idx[/code] (0 to [method get_subname_count]).
+ Gets the resource or property name indicated by [param idx] (0 to [method get_subname_count]).
[codeblocks]
[gdscript]
var node_path = NodePath("Path2D/PathFollow2D/Sprite2D:texture:load_path")
diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml
index a1f1e9f0d6..ea9b83d2aa 100644
--- a/doc/classes/OS.xml
+++ b/doc/classes/OS.xml
@@ -4,7 +4,8 @@
Operating System functions.
</brief_description>
<description>
- Operating System functions. OS wraps the most common functionality to communicate with the host operating system, such as the clipboard, video driver, date and time, timers, environment variables, execution of binaries, command line, etc.
+ Operating System functions. [OS] wraps the most common functionality to communicate with the host operating system, such as the clipboard, video driver, delays, environment variables, execution of binaries, command line, etc.
+ [b]Note:[/b] In Godot 4, [OS] functions related to window management were moved to the [DisplayServer] singleton.
</description>
<tutorials>
<link title="OS Test Demo">https://godotengine.org/asset-library/asset/677</link>
@@ -18,12 +19,6 @@
Displays a modal dialog box using the host OS' facilities. Execution is blocked until the dialog is closed.
</description>
</method>
- <method name="can_use_threads" qualifiers="const">
- <return type="bool" />
- <description>
- Returns [code]true[/code] if the current host platform is using multiple threads.
- </description>
- </method>
<method name="close_midi_inputs">
<return type="void" />
<description>
@@ -42,7 +37,7 @@
<return type="int" />
<param index="0" name="arguments" type="PackedStringArray" />
<description>
- Creates a new instance of Godot that runs independently. The [code]arguments[/code] are used in the given order and separated by a space.
+ Creates a new instance of Godot that runs independently. The [param arguments] are used in the given order and separated by a space.
If the process creation succeeds, the method will return the new process ID, which you can use to monitor the process (and potentially terminate it with [method kill]). If the process creation fails, the method will return [code]-1[/code].
[b]Note:[/b] This method is implemented on Android, iOS, Linux, macOS and Windows.
</description>
@@ -53,8 +48,8 @@
<param index="1" name="arguments" type="PackedStringArray" />
<param index="2" name="open_console" type="bool" default="false" />
<description>
- Creates a new process that runs independently of Godot. It will not terminate if Godot terminates. The path specified in [code]path[/code] must exist and be executable file or macOS .app bundle. Platform path resolution will be used. The [code]arguments[/code] are used in the given order and separated by a space.
- On Windows, if [code]open_console[/code] is [code]true[/code] and the process is a console app, a new terminal window will be opened. This is ignored on other platforms.
+ Creates a new process that runs independently of Godot. It will not terminate if Godot terminates. The path specified in [param path] must exist and be executable file or macOS .app bundle. Platform path resolution will be used. The [param arguments] are used in the given order and separated by a space.
+ On Windows, if [param open_console] is [code]true[/code] and the process is a console app, a new terminal window will be opened. This is ignored on other platforms.
If the process creation succeeds, the method will return the new process ID, which you can use to monitor the process (and potentially terminate it with [method kill]). If the process creation fails, the method will return [code]-1[/code].
For example, running another instance of the project:
[codeblocks]
@@ -74,7 +69,7 @@
<return type="void" />
<param index="0" name="msec" type="int" />
<description>
- Delays execution of the current thread by [code]msec[/code] milliseconds. [code]msec[/code] must be greater than or equal to [code]0[/code]. Otherwise, [method delay_msec] will do nothing and will print an error message.
+ Delays execution of the current thread by [param msec] milliseconds. [param msec] must be greater than or equal to [code]0[/code]. Otherwise, [method delay_msec] will do nothing and will print an error message.
[b]Note:[/b] [method delay_msec] is a [i]blocking[/i] way to delay code execution. To delay code execution in a non-blocking way, see [method SceneTree.create_timer]. Awaiting with [method SceneTree.create_timer] will delay the execution of code placed below the [code]await[/code] without affecting the rest of the project (or editor, for [EditorPlugin]s and [EditorScript]s).
[b]Note:[/b] When [method delay_msec] is called on the main thread, it will freeze the project and will prevent it from redrawing and registering input until the delay has passed. When using [method delay_msec] as part of an [EditorPlugin] or [EditorScript], it will freeze the editor but won't freeze the project if it is currently running (since the project is an independent child process).
</description>
@@ -83,28 +78,11 @@
<return type="void" />
<param index="0" name="usec" type="int" />
<description>
- Delays execution of the current thread by [code]usec[/code] microseconds. [code]usec[/code] must be greater than or equal to [code]0[/code]. Otherwise, [method delay_usec] will do nothing and will print an error message.
+ Delays execution of the current thread by [param usec] microseconds. [param usec] must be greater than or equal to [code]0[/code]. Otherwise, [method delay_usec] will do nothing and will print an error message.
[b]Note:[/b] [method delay_usec] is a [i]blocking[/i] way to delay code execution. To delay code execution in a non-blocking way, see [method SceneTree.create_timer]. Awaiting with [method SceneTree.create_timer] will delay the execution of code placed below the [code]await[/code] without affecting the rest of the project (or editor, for [EditorPlugin]s and [EditorScript]s).
[b]Note:[/b] When [method delay_usec] is called on the main thread, it will freeze the project and will prevent it from redrawing and registering input until the delay has passed. When using [method delay_usec] as part of an [EditorPlugin] or [EditorScript], it will freeze the editor but won't freeze the project if it is currently running (since the project is an independent child process).
</description>
</method>
- <method name="dump_memory_to_file">
- <return type="void" />
- <param index="0" name="file" type="String" />
- <description>
- Dumps the memory allocation ringlist to a file (only works in debug).
- Entry format per line: "Address - Size - Description".
- </description>
- </method>
- <method name="dump_resources_to_file">
- <return type="void" />
- <param index="0" name="file" type="String" />
- <description>
- Dumps all used resources to file (only works in debug).
- Entry format per line: "Resource Type : Resource Location".
- At the end of the file is a statistic of all used Resource Types.
- </description>
- </method>
<method name="execute">
<return type="int" />
<param index="0" name="path" type="String" />
@@ -113,8 +91,8 @@
<param index="3" name="read_stderr" type="bool" default="false" />
<param index="4" name="open_console" type="bool" default="false" />
<description>
- Executes a command. The file specified in [code]path[/code] must exist and be executable. Platform path resolution will be used. The [code]arguments[/code] are used in the given order and separated by a space. If an [code]output[/code] [Array] is provided, the complete shell output of the process will be appended as a single [String] element in [code]output[/code]. If [code]read_stderr[/code] is [code]true[/code], the output to the standard error stream will be included too.
- On Windows, if [code]open_console[/code] is [code]true[/code] and the process is a console app, a new terminal window will be opened. This is ignored on other platforms.
+ Executes a command. The file specified in [param path] must exist and be executable. Platform path resolution will be used. The [param arguments] are used in the given order and separated by a space. If an [param output] [Array] is provided, the complete shell output of the process will be appended as a single [String] element in [param output]. If [param read_stderr] is [code]true[/code], the output to the standard error stream will be included too.
+ On Windows, if [param open_console] is [code]true[/code] and the process is a console app, a new terminal window will be opened. This is ignored on other platforms.
If the command is successfully executed, the method will return the exit code of the command, or [code]-1[/code] if it fails.
[b]Note:[/b] The Godot thread will pause its execution until the executed command terminates. Use [Thread] to create a separate thread that will not pause the Godot thread, or use [method create_process] to create a completely independent process.
For example, to retrieve a list of the working directory's contents:
@@ -140,9 +118,9 @@
[/csharp]
[/codeblocks]
[b]Note:[/b] This method is implemented on Android, iOS, Linux, macOS and Windows.
- [b]Note:[/b] To execute a Windows command interpreter built-in command, specify [code]cmd.exe[/code] in [code]path[/code], [code]/c[/code] as the first argument, and the desired command as the second argument.
- [b]Note:[/b] To execute a PowerShell built-in command, specify [code]powershell.exe[/code] in [code]path[/code], [code]-Command[/code] as the first argument, and the desired command as the second argument.
- [b]Note:[/b] To execute a Unix shell built-in command, specify shell executable name in [code]path[/code], [code]-c[/code] as the first argument, and the desired command as the second argument.
+ [b]Note:[/b] To execute a Windows command interpreter built-in command, specify [code]cmd.exe[/code] in [param path], [code]/c[/code] as the first argument, and the desired command as the second argument.
+ [b]Note:[/b] To execute a PowerShell built-in command, specify [code]powershell.exe[/code] in [param path], [code]-Command[/code] as the first argument, and the desired command as the second argument.
+ [b]Note:[/b] To execute a Unix shell built-in command, specify shell executable name in [param path], [code]-c[/code] as the first argument, and the desired command as the second argument.
[b]Note:[/b] On macOS, sandboxed applications are limited to run only embedded helper executables, specified during export.
</description>
</method>
@@ -156,7 +134,7 @@
<method name="get_cache_dir" qualifiers="const">
<return type="String" />
<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=$DOCS_URL/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].
+ Returns the [i]global[/i] cache data directory according to the operating system's standards. On the Linux/BSD platform, this path can be overridden by setting the [code]XDG_CACHE_HOME[/code] environment variable before starting the project. See [url=$DOCS_URL/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>
@@ -214,7 +192,7 @@
<method name="get_config_dir" qualifiers="const">
<return type="String" />
<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=$DOCS_URL/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].
+ Returns the [i]global[/i] user configuration directory according to the operating system's standards. On the Linux/BSD platform, this path can be overridden by setting the [code]XDG_CONFIG_HOME[/code] environment variable before starting the project. See [url=$DOCS_URL/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>
@@ -222,23 +200,32 @@
<return type="PackedStringArray" />
<description>
Returns an array of MIDI device names.
- The returned array will be empty if the system MIDI driver has not previously been initialised with [method open_midi_inputs].
+ The returned array will be empty if the system MIDI driver has not previously been initialized with [method open_midi_inputs].
[b]Note:[/b] This method is implemented on Linux, macOS and Windows.
</description>
</method>
<method name="get_data_dir" qualifiers="const">
<return type="String" />
<description>
- 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=$DOCS_URL/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].
+ Returns the [i]global[/i] user data directory according to the operating system's standards. On the Linux/BSD platform, this path can be overridden by setting the [code]XDG_DATA_HOME[/code] environment variable before starting the project. See [url=$DOCS_URL/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_distribution_name" qualifiers="const">
+ <return type="String" />
+ <description>
+ Returns the name of the distribution for Linux and BSD platforms (e.g. Ubuntu, Manjaro, OpenBSD, etc.).
+ Returns the same value as [method get_name] for stock Android ROMs, but attempts to return the custom ROM name for popular Android derivatives such as LineageOS.
+ Returns the same value as [method get_name] for other platforms.
+ [b]Note:[/b] This method is not supported on the web platform. It returns an empty string.
+ </description>
+ </method>
<method name="get_environment" qualifiers="const">
<return type="String" />
<param index="0" name="variable" type="String" />
<description>
Returns the value of an environment variable. Returns an empty string if the environment variable doesn't exist.
- [b]Note:[/b] Double-check the casing of [code]variable[/code]. Environment variable names are case-sensitive on all platforms except Windows.
+ [b]Note:[/b] Double-check the casing of [param variable]. Environment variable names are case-sensitive on all platforms except Windows.
</description>
</method>
<method name="get_executable_path" qualifiers="const">
@@ -305,7 +292,7 @@
On BSD-based operating systems, this is [code]"FreeBSD"[/code], [code]"NetBSD"[/code], [code]"OpenBSD"[/code], or [code]"BSD"[/code] as a fallback.
On Android, this is [code]"Android"[/code].
On iOS, this is [code]"iOS"[/code].
- On the web, this is [code]"HTML5"[/code].
+ On the web, this is [code]"Web"[/code].
[b]Note:[/b] Custom builds of the engine may support additional platforms, such as consoles, yielding other return values.
[codeblocks]
[gdscript]
@@ -320,7 +307,7 @@
print("Android")
"iOS":
print("iOS")
- "HTML5":
+ "Web":
print("Web")
[/gdscript]
[csharp]
@@ -346,7 +333,7 @@
case "iOS":
GD.Print("iOS");
break;
- case "HTML5":
+ case "Web":
GD.Print("Web");
break;
}
@@ -371,7 +358,7 @@
<return type="String" />
<description>
Returns the name of the CPU model on the host machine (e.g. "Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz").
- [b]Note:[/b] This method is only implemented on Windows, macOS, Linux and iOS. On Android, HTML5 and UWP, [method get_processor_name] returns an empty string.
+ [b]Note:[/b] This method is only implemented on Windows, macOS, Linux and iOS. On Android, Web and UWP, [method get_processor_name] returns an empty string.
</description>
</method>
<method name="get_restart_on_exit_arguments" qualifiers="const">
@@ -408,7 +395,7 @@
<param index="1" name="bold" type="bool" default="false" />
<param index="2" name="italic" type="bool" default="false" />
<description>
- Returns path to the system font file with [code]font_name[/code] and style. Return empty string if no matching fonts found.
+ Returns path to the system font file with [param font_name] and style. Return empty string if no matching fonts found.
[b]Note:[/b] This method is implemented on iOS, Linux, macOS and Windows.
</description>
</method>
@@ -431,7 +418,7 @@
<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 before 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.
+ [b]Note:[/b] Returns an empty string on Web and UWP, as this method isn't implemented on those platforms yet.
</description>
</method>
<method name="get_user_data_dir" qualifiers="const">
@@ -447,19 +434,40 @@
Not to be confused with [method get_data_dir], which returns the [i]global[/i] (non-project-specific) user home directory.
</description>
</method>
+ <method name="get_version" qualifiers="const">
+ <return type="String" />
+ <description>
+ Returns the exact production and build version of the operating system. This is different from the branded version used in marketing. This helps to distinguish between different releases of operating systems, including minor versions, and insider and custom builds.
+ For Windows, the major and minor version are returned, as well as the build number. For example, the returned string can look like [code]10.0.9926[/code] for a build of Windows 10, and it can look like [code]6.1.7601[/code] for a build of Windows 7 SP1.
+ For rolling distributions, such as Arch Linux, an empty string is returned.
+ For macOS and iOS, the major and minor version are returned, as well as the patch number.
+ For UWP, the device family version is returned.
+ For Android, the SDK version and the incremental build number are returned. If it's a custom ROM, it attempts to return its version instead.
+ [b]Note:[/b] This method is not supported on the web platform. It returns an empty string.
+ </description>
+ </method>
+ <method name="get_video_adapter_driver_info" qualifiers="const">
+ <return type="PackedStringArray" />
+ <description>
+ Returns the video adapter driver name and version for the user's currently active graphics card.
+ The first element holds the driver name, such as [code]nvidia[/code], [code]amdgpu[/code], etc.
+ The second element holds the driver version. For e.g. the [code]nvidia[/code] driver on a Linux/BSD platform, the version is in the format [code]510.85.02[/code]. For Windows, the driver's format is [code]31.0.15.1659[/code].
+ [b]Note:[/b] This method is only supported on the platforms Linux/BSD and Windows when not running in headless mode. It returns an empty array on other platforms.
+ </description>
+ </method>
<method name="has_environment" qualifiers="const">
<return type="bool" />
<param index="0" name="variable" type="String" />
<description>
- Returns [code]true[/code] if the environment variable with the name [code]variable[/code] exists.
- [b]Note:[/b] Double-check the casing of [code]variable[/code]. Environment variable names are case-sensitive on all platforms except Windows.
+ Returns [code]true[/code] if the environment variable with the name [param variable] exists.
+ [b]Note:[/b] Double-check the casing of [param variable]. Environment variable names are case-sensitive on all platforms except Windows.
</description>
</method>
<method name="has_feature" qualifiers="const">
<return type="bool" />
<param index="0" name="tag_name" type="String" />
<description>
- Returns [code]true[/code] if the feature for the given feature tag is supported in the currently running instance, depending on the platform, build, etc. Can be used to check whether you're currently running a debug build, on a certain platform or arch, etc. Refer to the [url=$DOCS_URL/getting_started/workflow/export/feature_tags.html]Feature Tags[/url] documentation for more details.
+ Returns [code]true[/code] if the feature for the given feature tag is supported in the currently running instance, depending on the platform, build, etc. Can be used to check whether you're currently running a debug build, on a certain platform or arch, etc. Refer to the [url=$DOCS_URL/tutorials/export/feature_tags.html]Feature Tags[/url] documentation for more details.
[b]Note:[/b] Tag names are case-sensitive.
</description>
</method>
@@ -482,7 +490,7 @@
<return type="bool" />
<param index="0" name="pid" type="int" />
<description>
- Returns [code]true[/code] if the child process ID ([code]pid[/code]) is still running or [code]false[/code] if it has terminated.
+ Returns [code]true[/code] if the child process ID ([param pid]) is still running or [code]false[/code] if it has terminated.
Must be a valid ID generated from [method create_process].
[b]Note:[/b] This method is implemented on Android, iOS, Linux, macOS and Windows.
</description>
@@ -502,14 +510,14 @@
<method name="is_userfs_persistent" qualifiers="const">
<return type="bool" />
<description>
- If [code]true[/code], the [code]user://[/code] file system is persistent, so that its state is the same after a player quits and starts the game again. Relevant to the HTML5 platform, where this persistence may be unavailable.
+ If [code]true[/code], the [code]user://[/code] file system is persistent, so that its state is the same after a player quits and starts the game again. Relevant to the Web platform, where this persistence may be unavailable.
</description>
</method>
<method name="kill">
<return type="int" enum="Error" />
<param index="0" name="pid" type="int" />
<description>
- Kill (terminate) the process identified by the given process ID ([code]pid[/code]), e.g. the one returned by [method execute] in non-blocking mode. See also [method crash].
+ Kill (terminate) the process identified by the given process ID ([param pid]), e.g. the one returned by [method execute] in non-blocking mode. See also [method crash].
[b]Note:[/b] This method can also be used to kill processes that were not spawned by the game.
[b]Note:[/b] This method is implemented on Android, iOS, Linux, macOS and Windows.
</description>
@@ -518,13 +526,19 @@
<return type="int" enum="Error" />
<param index="0" name="path" type="String" />
<description>
- Moves the file or directory to the system's recycle bin. See also [method Directory.remove].
- The method takes only global paths, so you may need to use [method ProjectSettings.globalize_path]. Do not use it for files in [code]res://[/code] as it will not work in exported project.
+ Moves the file or directory to the system's recycle bin. See also [method DirAccess.remove].
+ The method takes only global paths, so you may need to use [method ProjectSettings.globalize_path]. Do not use it for files in [code]res://[/code] as it will not work in exported projects.
[b]Note:[/b] If the user has disabled the recycle bin on their system, the file will be permanently deleted instead.
- [codeblock]
+ [codeblocks]
+ [gdscript]
var file_to_remove = "user://slot1.sav"
OS.move_to_trash(ProjectSettings.globalize_path(file_to_remove))
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ var fileToRemove = "user://slot1.sav";
+ OS.MoveToTrash(ProjectSettings.GlobalizePath(fileToRemove));
+ [/csharp]
+ [/codeblocks]
</description>
</method>
<method name="open_midi_inputs">
@@ -534,31 +548,12 @@
[b]Note:[/b] This method is implemented on Linux, macOS and Windows.
</description>
</method>
- <method name="print_all_resources">
- <return type="void" />
- <param index="0" name="tofile" type="String" default="&quot;&quot;" />
- <description>
- Shows all resources in the game. Optionally, the list can be written to a file by specifying a file path in [code]tofile[/code].
- </description>
- </method>
- <method name="print_all_textures_by_size">
- <return type="void" />
- <description>
- Shows the list of loaded textures sorted by size in memory.
- </description>
- </method>
- <method name="print_resources_by_type">
- <return type="void" />
- <param index="0" name="types" type="PackedStringArray" />
- <description>
- Shows the number of resources loaded by the game of the given types.
- </description>
- </method>
- <method name="print_resources_in_use">
- <return type="void" />
- <param index="0" name="short" type="bool" default="false" />
+ <method name="read_string_from_stdin">
+ <return type="String" />
+ <param index="0" name="block" type="bool" default="true" />
<description>
- Shows all resources currently used by the game.
+ Reads a user input string from the standard input (usually the terminal).
+ [b]Note:[/b] This method is implemented on Linux, macOS and Windows. Non-blocking reads are not currently supported on any platform.
</description>
</method>
<method name="request_permission">
@@ -580,8 +575,8 @@
<param index="0" name="variable" type="String" />
<param index="1" name="value" type="String" />
<description>
- Sets the value of the environment variable [code]variable[/code] to [code]value[/code]. The environment variable will be set for the Godot process and any process executed with [method execute] after running [method set_environment]. The environment variable will [i]not[/i] persist to processes run after the Godot process was terminated.
- [b]Note:[/b] Double-check the casing of [code]variable[/code]. Environment variable names are case-sensitive on all platforms except Windows.
+ Sets the value of the environment variable [param variable] to [param value]. The environment variable will be set for the Godot process and any process executed with [method execute] after running [method set_environment]. The environment variable will [i]not[/i] persist to processes run after the Godot process was terminated.
+ [b]Note:[/b] Double-check the casing of [param variable]. Environment variable names are case-sensitive on all platforms except Windows.
</description>
</method>
<method name="set_restart_on_exit">
@@ -589,7 +584,7 @@
<param index="0" name="restart" type="bool" />
<param index="1" name="arguments" type="PackedStringArray" default="PackedStringArray()" />
<description>
- If [code]restart[/code] is [code]true[/code], restarts the project automatically when it is exited with [method SceneTree.quit] or [constant Node.NOTIFICATION_WM_CLOSE_REQUEST]. Command line [code]arguments[/code] can be supplied. To restart the project with the same command line arguments as originally used to run the project, pass [method get_cmdline_args] as the value for [code]arguments[/code].
+ If [param restart] is [code]true[/code], restarts the project automatically when it is exited with [method SceneTree.quit] or [constant Node.NOTIFICATION_WM_CLOSE_REQUEST]. Command line [param arguments] can be supplied. To restart the project with the same command line arguments as originally used to run the project, pass [method get_cmdline_args] as the value for [param arguments].
[method set_restart_on_exit] can be used to apply setting changes that require a restart. See also [method is_restart_on_exit_set] and [method get_restart_on_exit_arguments].
[b]Note:[/b] This method is only effective on desktop platforms, and only when the project isn't started from the editor. It will have no effect on mobile and Web platforms, or when the project is started from the editor.
[b]Note:[/b] If the project process crashes or is [i]killed[/i] by the user (by sending [code]SIGKILL[/code] instead of the usual [code]SIGTERM[/code]), the project won't restart automatically.
@@ -606,7 +601,7 @@
<return type="void" />
<param index="0" name="enabled" type="bool" />
<description>
- Enables backup saves if [code]enabled[/code] is [code]true[/code].
+ Enables backup saves if [param enabled] is [code]true[/code].
</description>
</method>
<method name="shell_open">
@@ -618,7 +613,7 @@
- [code]OS.shell_open("https://godotengine.org")[/code] opens the default web browser on the official Godot website.
- [code]OS.shell_open("mailto:example@example.com")[/code] opens the default email client with the "To" field set to [code]example@example.com[/code]. See [url=https://datatracker.ietf.org/doc/html/rfc2368]RFC 2368 - The [code]mailto[/code] URL scheme[/url] for a list of fields that can be added.
Use [method ProjectSettings.globalize_path] to convert a [code]res://[/code] or [code]user://[/code] path into a system path for use with this method.
- [b]Note:[/b] This method is implemented on Android, iOS, HTML5, Linux, macOS and Windows.
+ [b]Note:[/b] This method is implemented on Android, iOS, Web, Linux, macOS and Windows.
</description>
</method>
</methods>
@@ -631,11 +626,11 @@
</member>
</members>
<constants>
- <constant name="VIDEO_DRIVER_VULKAN" value="0" enum="VideoDriver">
- The Vulkan rendering backend. It requires Vulkan 1.0 support and automatically uses features from Vulkan 1.1 and 1.2 if available.
+ <constant name="RENDERING_DRIVER_VULKAN" value="0" enum="RenderingDriver">
+ The Vulkan rendering driver. It requires Vulkan 1.0 support and automatically uses features from Vulkan 1.1 and 1.2 if available.
</constant>
- <constant name="VIDEO_DRIVER_OPENGL_3" value="1" enum="VideoDriver">
- The OpenGL 3 rendering backend. It uses OpenGL 3.3 Core Profile on desktop platforms, OpenGL ES 3.0 on mobile devices, and WebGL 2.0 on HTML5.
+ <constant name="RENDERING_DRIVER_OPENGL3" value="1" enum="RenderingDriver">
+ The OpenGL 3 rendering driver. It uses OpenGL 3.3 Core Profile on desktop platforms, OpenGL ES 3.0 on mobile devices, and WebGL 2.0 on Web.
</constant>
<constant name="DAY_SUNDAY" value="0" enum="Weekday">
Sunday.
diff --git a/doc/classes/Object.xml b/doc/classes/Object.xml
index 824da0591e..318f2cfade 100644
--- a/doc/classes/Object.xml
+++ b/doc/classes/Object.xml
@@ -5,7 +5,7 @@
</brief_description>
<description>
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.
+ You can construct Objects from scripting languages, using [code]Object.new()[/code] in GDScript, or [code]new Object[/code] in C#.
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 [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.
@@ -39,11 +39,11 @@
<param index="0" name="property" type="StringName" />
<description>
Virtual method which can be overridden to customize the return value of [method get].
- Returns the given property. Returns [code]null[/code] if the [code]property[/code] does not exist.
+ Returns the given property. Returns [code]null[/code] if the [param property] does not exist.
</description>
</method>
<method name="_get_property_list" qualifiers="virtual">
- <return type="Array" />
+ <return type="Dictionary[]" />
<description>
Virtual method which can be overridden to customize the return value of [method get_property_list].
Returns the object's property list as an [Array] of dictionaries.
@@ -61,7 +61,23 @@
<return type="void" />
<param index="0" name="what" type="int" />
<description>
- Called whenever the object receives a notification, which is identified in [code]what[/code] by a constant. The base [Object] has two constants [constant NOTIFICATION_POSTINITIALIZE] and [constant NOTIFICATION_PREDELETE], but subclasses such as [Node] define a lot more notifications which are also received by this method.
+ Called whenever the object receives a notification, which is identified in [param what] by a constant. The base [Object] has two constants [constant NOTIFICATION_POSTINITIALIZE] and [constant NOTIFICATION_PREDELETE], but subclasses such as [Node] define a lot more notifications which are also received by this method.
+ </description>
+ </method>
+ <method name="_property_can_revert" qualifiers="virtual">
+ <return type="bool" />
+ <param index="0" name="property" type="StringName" />
+ <description>
+ Virtual methods that can be overridden to customize the property revert behavior in the editor.
+ Returns [code]true[/code] if the property identified by [code]name[/code] can be reverted to a default value. Override [method _property_get_revert] to return the actual value.
+ </description>
+ </method>
+ <method name="_property_get_revert" qualifiers="virtual">
+ <return type="Variant" />
+ <param index="0" name="property" type="StringName" />
+ <description>
+ Virtual methods that can be overridden to customize the property revert behavior in the editor.
+ Returns the default value of the property identified by [code]name[/code]. [method _property_can_revert] must be overridden as well for this method to be called.
</description>
</method>
<method name="_set" qualifiers="virtual">
@@ -70,7 +86,7 @@
<param index="1" name="value" type="Variant" />
<description>
Virtual method which can be overridden to customize the return value of [method set].
- Sets a property. Returns [code]true[/code] if the [code]property[/code] exists.
+ Sets a property. Returns [code]true[/code] if the [param property] exists.
</description>
</method>
<method name="_to_string" qualifiers="virtual">
@@ -85,14 +101,15 @@
<param index="0" name="signal" type="String" />
<param index="1" name="arguments" type="Array" default="[]" />
<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.
+ Adds a user-defined [param signal]. 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.
</description>
</method>
<method name="call" qualifiers="vararg">
<return type="Variant" />
<param index="0" name="method" type="StringName" />
<description>
- Calls the [code]method[/code] on the object and returns the result. This method supports a variable number of arguments, so parameters are passed as a comma separated list. Example:
+ Calls the [param method] on the object and returns the result. This method supports a variable number of arguments, so parameters are passed as a comma separated list.
+ [b]Example:[/b]
[codeblocks]
[gdscript]
var node = Node3D.new()
@@ -110,7 +127,8 @@
<return type="Variant" />
<param index="0" name="method" type="StringName" />
<description>
- Calls the [code]method[/code] on the object during idle time. This method supports a variable number of arguments, so parameters are passed as a comma separated list. Example:
+ Calls the [param method] on the object during idle time. This method supports a variable number of arguments, so parameters are passed as a comma separated list.
+ [b]Example:[/b]
[codeblocks]
[gdscript]
var node = Node3D.new()
@@ -129,7 +147,7 @@
<param index="0" name="method" type="StringName" />
<param index="1" name="arg_array" type="Array" />
<description>
- Calls the [code]method[/code] on the object and returns the result. Contrarily to [method call], this method does not support a variable number of arguments but expects all parameters to be via a single [Array].
+ Calls the [param method] on the object and returns the result. Contrarily to [method call], this method does not support a variable number of arguments but expects all parameters to be via a single [Array].
[codeblocks]
[gdscript]
var node = Node3D.new()
@@ -154,7 +172,7 @@
<param index="1" name="callable" type="Callable" />
<param index="2" name="flags" type="int" default="0" />
<description>
- Connects a [code]signal[/code] to a [code]callable[/code]. Use [code]flags[/code] to set deferred or one-shot connections. See [enum ConnectFlags] constants.
+ Connects a [param signal] to a [param callable]. Use [param flags] to set deferred or one-shot connections. See [enum ConnectFlags] constants.
A signal can only be connected once to a [Callable]. It will print an error if already connected, unless the signal was connected with [constant CONNECT_REFERENCE_COUNTED]. To avoid this, first, use [method is_connected] to check for existing connections.
If the callable's target is destroyed in the game's lifecycle, the connection will be lost.
[b]Examples with recommended syntax:[/b]
@@ -294,7 +312,7 @@
<param index="0" name="signal" type="StringName" />
<param index="1" name="callable" type="Callable" />
<description>
- Disconnects a [code]signal[/code] from a given [code]callable[/code].
+ Disconnects a [param signal] from a given [param callable].
If you try to disconnect a connection that does not exist, the method will print an error. Use [method is_connected] to ensure that the connection exists.
</description>
</method>
@@ -302,7 +320,8 @@
<return type="int" enum="Error" />
<param index="0" name="signal" type="StringName" />
<description>
- Emits the given [code]signal[/code]. The signal must exist, so it should be a built-in signal of this class or one of its parent classes, or a user-defined signal. This method supports a variable number of arguments, so parameters are passed as a comma separated list. Example:
+ Emits the given [param signal]. The signal must exist, so it should be a built-in signal of this class or one of its parent classes, or a user-defined signal. This method supports a variable number of arguments, so parameters are passed as a comma separated list.
+ [b]Example:[/b]
[codeblocks]
[gdscript]
emit_signal("hit", "sword", 100)
@@ -325,7 +344,7 @@
<return type="Variant" />
<param index="0" name="property" type="StringName" />
<description>
- Returns the [Variant] value of the given [code]property[/code]. If the [code]property[/code] doesn't exist, this will return [code]null[/code].
+ Returns the [Variant] value of the given [param property]. If the [param property] doesn't exist, this will return [code]null[/code].
[b]Note:[/b] In C#, the property name must be specified as snake_case if it is defined by a built-in Godot node. This doesn't apply to user-defined properties where you should use the same convention as in the C# source (typically PascalCase).
</description>
</method>
@@ -337,7 +356,7 @@
</description>
</method>
<method name="get_incoming_connections" qualifiers="const">
- <return type="Array" />
+ <return type="Dictionary[]" />
<description>
Returns an [Array] of dictionaries with information about signals that are connected to the object.
Each [Dictionary] contains three String entries:
@@ -348,9 +367,10 @@
</method>
<method name="get_indexed" qualifiers="const">
<return type="Variant" />
- <param index="0" name="property" type="NodePath" />
+ <param index="0" name="property_path" type="NodePath" />
<description>
- Gets the object's property indexed by the given [NodePath]. The node path should be relative to the current object and can use the colon character ([code]:[/code]) to access nested properties. Examples: [code]"position:x"[/code] or [code]"material:next_pass:blend_mode"[/code].
+ Gets the object's property indexed by the given [param property_path]. The path should be a [NodePath] relative to the current object and can use the colon character ([code]:[/code]) to access nested properties.
+ [b]Examples:[/b] [code]"position:x"[/code] or [code]"material:next_pass:blend_mode"[/code].
[b]Note:[/b] Even though the method takes [NodePath] argument, it doesn't support actual paths to [Node]s in the scene tree, only colon-separated sub-property paths. For the purpose of nodes, use [method Node.get_node_and_resource] instead.
</description>
</method>
@@ -366,8 +386,9 @@
<param index="0" name="name" type="StringName" />
<param index="1" name="default" type="Variant" default="null" />
<description>
- Returns the object's metadata entry for the given [code]name[/code].
- Throws error if the entry does not exist, unless [code]default[/code] is not [code]null[/code] (in which case the default value will be returned).
+ Returns the object's metadata entry for the given [param name].
+ Throws error if the entry does not exist, unless [param default] is not [code]null[/code] (in which case the default value will be returned). See also [method has_meta], [method set_meta] and [method remove_meta].
+ [b]Note:[/b] Metadata that has a [param name] starting with an underscore ([code]_[/code]) is considered editor-only. Editor-only metadata is not displayed in the Inspector and should not be edited.
</description>
</method>
<method name="get_meta_list" qualifiers="const">
@@ -377,13 +398,13 @@
</description>
</method>
<method name="get_method_list" qualifiers="const">
- <return type="Array" />
+ <return type="Dictionary[]" />
<description>
Returns the object's methods and their signatures as an [Array].
</description>
</method>
<method name="get_property_list" qualifiers="const">
- <return type="Array" />
+ <return type="Dictionary[]" />
<description>
Returns the object's property list as an [Array] of dictionaries.
Each property's [Dictionary] contain at least [code]name: String[/code] and [code]type: int[/code] (see [enum Variant.Type]) entries. Optionally, it can also include [code]hint: int[/code] (see [enum PropertyHint]), [code]hint_string: String[/code], and [code]usage: int[/code] (see [enum PropertyUsageFlags]).
@@ -396,14 +417,14 @@
</description>
</method>
<method name="get_signal_connection_list" qualifiers="const">
- <return type="Array" />
+ <return type="Dictionary[]" />
<param index="0" name="signal" type="StringName" />
<description>
- Returns an [Array] of connections for the given [code]signal[/code].
+ Returns an [Array] of connections for the given [param signal].
</description>
</method>
<method name="get_signal_list" qualifiers="const">
- <return type="Array" />
+ <return type="Dictionary[]" />
<description>
Returns the list of signals as an [Array] of dictionaries.
</description>
@@ -412,28 +433,29 @@
<return type="bool" />
<param index="0" name="name" type="StringName" />
<description>
- Returns [code]true[/code] if a metadata entry is found with the given [code]name[/code].
+ Returns [code]true[/code] if a metadata entry is found with the given [param name]. See also [method get_meta], [method set_meta] and [method remove_meta].
+ [b]Note:[/b] Metadata that has a [param name] starting with an underscore ([code]_[/code]) is considered editor-only. Editor-only metadata is not displayed in the Inspector and should not be edited.
</description>
</method>
<method name="has_method" qualifiers="const">
<return type="bool" />
<param index="0" name="method" type="StringName" />
<description>
- Returns [code]true[/code] if the object contains the given [code]method[/code].
+ Returns [code]true[/code] if the object contains the given [param method].
</description>
</method>
<method name="has_signal" qualifiers="const">
<return type="bool" />
<param index="0" name="signal" type="StringName" />
<description>
- Returns [code]true[/code] if the given [code]signal[/code] exists.
+ Returns [code]true[/code] if the given [param signal] exists.
</description>
</method>
<method name="has_user_signal" qualifiers="const">
<return type="bool" />
<param index="0" name="signal" type="StringName" />
<description>
- Returns [code]true[/code] if the given user-defined [code]signal[/code] exists. Only signals added using [method add_user_signal] are taken into account.
+ Returns [code]true[/code] if the given user-defined [param signal] exists. Only signals added using [method add_user_signal] are taken into account.
</description>
</method>
<method name="is_blocking_signals" qualifiers="const">
@@ -446,7 +468,7 @@
<return type="bool" />
<param index="0" name="class" type="String" />
<description>
- Returns [code]true[/code] if the object inherits from the given [code]class[/code]. See also [method get_class].
+ Returns [code]true[/code] if the object inherits from the given [param class]. See also [method get_class].
[b]Note:[/b] [method is_class] does not take [code]class_name[/code] declarations into account. If the object has a [code]class_name[/code] defined, [method is_class] will return [code]false[/code] for that name.
</description>
</method>
@@ -455,7 +477,7 @@
<param index="0" name="signal" type="StringName" />
<param index="1" name="callable" type="Callable" />
<description>
- Returns [code]true[/code] if a connection exists for a given [code]signal[/code] and [code]callable[/code].
+ Returns [code]true[/code] if a connection exists for a given [param signal] and [param callable].
</description>
</method>
<method name="is_queued_for_deletion" qualifiers="const">
@@ -470,7 +492,7 @@
<param index="1" name="reversed" type="bool" default="false" />
<description>
Send a given notification to the object, which will also trigger a call to the [method _notification] method of all classes that the object inherits from.
- If [code]reversed[/code] is [code]true[/code], [method _notification] is called first on the object's own class, and then up to its successive parent classes. If [code]reversed[/code] is [code]false[/code], [method _notification] is called first on the highest ancestor ([Object] itself), and then down to its successive inheriting classes.
+ If [param reversed] is [code]true[/code], [method _notification] is called first on the object's own class, and then up to its successive parent classes. If [param reversed] is [code]false[/code], [method _notification] is called first on the highest ancestor ([Object] itself), and then down to its successive inheriting classes.
</description>
</method>
<method name="notify_property_list_changed">
@@ -483,7 +505,8 @@
<return type="void" />
<param index="0" name="name" type="StringName" />
<description>
- Removes a given entry from the object's metadata. See also [method set_meta].
+ Removes a given entry from the object's metadata. See also [method has_meta], [method get_meta] and [method set_meta].
+ [b]Note:[/b] Metadata that has a [param name] starting with an underscore ([code]_[/code]) is considered editor-only. Editor-only metadata is not displayed in the Inspector and should not be edited.
</description>
</method>
<method name="set">
@@ -491,7 +514,7 @@
<param index="0" name="property" type="StringName" />
<param index="1" name="value" type="Variant" />
<description>
- Assigns a new value to the given property. If the [code]property[/code] does not exist or the given value's type doesn't match, nothing will happen.
+ Assigns a new value to the given property. If the [param property] does not exist or the given value's type doesn't match, nothing will happen.
[b]Note:[/b] In C#, the property name must be specified as snake_case if it is defined by a built-in Godot node. This doesn't apply to user-defined properties where you should use the same convention as in the C# source (typically PascalCase).
</description>
</method>
@@ -513,10 +536,11 @@
</method>
<method name="set_indexed">
<return type="void" />
- <param index="0" name="property" type="NodePath" />
+ <param index="0" name="property_path" type="NodePath" />
<param index="1" name="value" type="Variant" />
<description>
- Assigns a new value to the property identified by the [NodePath]. The node path should be relative to the current object and can use the colon character ([code]:[/code]) to access nested properties. Example:
+ Assigns a new value to the property identified by the [param property_path]. The path should be a [NodePath] relative to the current object and can use the colon character ([code]:[/code]) to access nested properties.
+ [b]Example:[/b]
[codeblocks]
[gdscript]
var node = Node2D.new()
@@ -546,7 +570,8 @@
<param index="1" name="value" type="Variant" />
<description>
Adds, changes or removes a given entry in the object's metadata. Metadata are serialized and can take any [Variant] value.
- To remove a given entry from the object's metadata, use [method remove_meta]. Metadata is also removed if its value is set to [code]null[/code]. This means you can also use [code]set_meta("name", null)[/code] to remove metadata for [code]"name"[/code].
+ To remove a given entry from the object's metadata, use [method remove_meta]. Metadata is also removed if its value is set to [code]null[/code]. This means you can also use [code]set_meta("name", null)[/code] to remove metadata for [code]"name"[/code]. See also [method has_meta] and [method get_meta].
+ [b]Note:[/b] Metadata that has a [param name] starting with an underscore ([code]_[/code]) is considered editor-only. Editor-only metadata is not displayed in the Inspector and should not be edited.
</description>
</method>
<method name="set_script">
@@ -570,7 +595,7 @@
<param index="1" name="context" type="StringName" default="&quot;&quot;" />
<description>
Translates a message using translation catalogs configured in the Project Settings. An additional context could be used to specify the translation context.
- Only works if message translation is enabled (which it is by default), otherwise it returns the [code]message[/code] unchanged. See [method set_message_translation].
+ Only works if message translation is enabled (which it is by default), otherwise it returns the [param message] unchanged. See [method set_message_translation].
See [url=$DOCS_URL/tutorials/i18n/internationalizing_games.html]Internationalizing games[/url] for examples of the usage of this method.
</description>
</method>
@@ -582,8 +607,8 @@
<param index="3" name="context" type="StringName" default="&quot;&quot;" />
<description>
Translates a message involving plurals using translation catalogs configured in the Project Settings. An additional context could be used to specify the translation context.
- Only works if message translation is enabled (which it is by default), otherwise it returns the [code]message[/code] or [code]plural_message[/code] unchanged. See [method set_message_translation].
- The number [code]n[/code] is the number or quantity of the plural object. It will be used to guide the translation system to fetch the correct plural form for the selected language.
+ Only works if message translation is enabled (which it is by default), otherwise it returns the [param message] or [param plural_message] unchanged. See [method set_message_translation].
+ The number [param n] is the number or quantity of the plural object. It will be used to guide the translation system to fetch the correct plural form for the selected language.
[b]Note:[/b] Negative and floating-point values usually represent physical entities for which singular and plural don't clearly apply. In such cases, use [method tr].
See [url=$DOCS_URL/tutorials/i18n/localization_using_gettext.html]Localization using gettext[/url] for examples of the usage of this method.
</description>
@@ -613,7 +638,7 @@
<constant name="CONNECT_PERSIST" value="2" enum="ConnectFlags">
Persisting connections are saved when the object is serialized to file.
</constant>
- <constant name="CONNECT_ONESHOT" value="4" enum="ConnectFlags">
+ <constant name="CONNECT_ONE_SHOT" value="4" enum="ConnectFlags">
One-shot connections disconnect themselves after emission.
</constant>
<constant name="CONNECT_REFERENCE_COUNTED" value="8" enum="ConnectFlags">
diff --git a/doc/classes/OccluderInstance3D.xml b/doc/classes/OccluderInstance3D.xml
index 556ff07267..bc16fba500 100644
--- a/doc/classes/OccluderInstance3D.xml
+++ b/doc/classes/OccluderInstance3D.xml
@@ -17,7 +17,7 @@
<return type="bool" />
<param index="0" name="layer_number" type="int" />
<description>
- Returns whether or not the specified layer of the [member bake_mask] is enabled, given a [code]layer_number[/code] between 1 and 32.
+ Returns whether or not the specified layer of the [member bake_mask] is enabled, given a [param layer_number] between 1 and 32.
</description>
</method>
<method name="set_bake_mask_value">
@@ -25,7 +25,7 @@
<param index="0" name="layer_number" type="int" />
<param index="1" name="value" type="bool" />
<description>
- Based on [code]value[/code], enables or disables the specified layer in the [member bake_mask], given a [code]layer_number[/code] between 1 and 32.
+ Based on [param value], enables or disables the specified layer in the [member bake_mask], given a [param layer_number] between 1 and 32.
</description>
</method>
</methods>
@@ -42,7 +42,7 @@
</member>
<member name="occluder" type="Occluder3D" setter="set_occluder" getter="get_occluder">
The occluder resource for this [OccluderInstance3D]. You can generate an occluder resource by selecting an [OccluderInstance3D] node then using the [b]Bake Occluders[/b] button at the top of the editor.
- You can also draw your own 2D occluder polygon by adding a new [PolygonOccluder3D] resource to the [member occluder] property in the inspector.
+ You can also draw your own 2D occluder polygon by adding a new [PolygonOccluder3D] resource to the [member occluder] property in the Inspector.
Alternatively, you can select a primitive occluder to use: [QuadOccluder3D], [BoxOccluder3D] or [SphereOccluder3D].
</member>
</members>
diff --git a/doc/classes/OfflineMultiplayerPeer.xml b/doc/classes/OfflineMultiplayerPeer.xml
new file mode 100644
index 0000000000..5e15992d54
--- /dev/null
+++ b/doc/classes/OfflineMultiplayerPeer.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="OfflineMultiplayerPeer" inherits="MultiplayerPeer" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ A [MultiplayerPeer] which is always connected and acts as a server.
+ </brief_description>
+ <description>
+ This is the default [member MultiplayerAPI.multiplayer_peer] for the [member Node.multiplayer]. It mimics the behavior of a server with no peers connected.
+ This means that the [SceneTree] will act as the multiplayer authority by default. Calls to [method MultiplayerAPI.is_server] will return [code]true[/code], and calls to [method MultiplayerAPI.get_unique_id] will return [constant MultiplayerPeer.TARGET_PEER_SERVER].
+ </description>
+ <tutorials>
+ </tutorials>
+</class>
diff --git a/doc/classes/OmniLight3D.xml b/doc/classes/OmniLight3D.xml
index ce63dbdbc1..193ae8deeb 100644
--- a/doc/classes/OmniLight3D.xml
+++ b/doc/classes/OmniLight3D.xml
@@ -15,6 +15,7 @@
</member>
<member name="omni_range" type="float" setter="set_param" getter="get_param" default="5.0">
The light's radius. Note that the effectively lit area may appear to be smaller depending on the [member omni_attenuation] in use. No matter the [member omni_attenuation] in use, the light will never reach anything outside this radius.
+ [b]Note:[/b] [member omni_range] is not affected by [member Node3D.scale] (the light's scale or its parent's scale).
</member>
<member name="omni_shadow_mode" type="int" setter="set_shadow_mode" getter="get_shadow_mode" enum="OmniLight3D.ShadowMode" default="1">
See [enum ShadowMode].
diff --git a/doc/classes/OptionButton.xml b/doc/classes/OptionButton.xml
index 9e476bd05b..e63e822648 100644
--- a/doc/classes/OptionButton.xml
+++ b/doc/classes/OptionButton.xml
@@ -17,7 +17,7 @@
<param index="1" name="label" type="String" />
<param index="2" name="id" type="int" default="-1" />
<description>
- Adds an item, with a [code]texture[/code] icon, text [code]label[/code] and (optionally) [code]id[/code]. If no [code]id[/code] is passed, the item index will be used as the item's ID. New items are appended at the end.
+ Adds an item, with a [param texture] icon, text [param label] and (optionally) [param id]. If no [param id] is passed, the item index will be used as the item's ID. New items are appended at the end.
</description>
</method>
<method name="add_item">
@@ -25,14 +25,14 @@
<param index="0" name="label" type="String" />
<param index="1" name="id" type="int" default="-1" />
<description>
- Adds an item, with text [code]label[/code] and (optionally) [code]id[/code]. If no [code]id[/code] is passed, the item index will be used as the item's ID. New items are appended at the end.
+ Adds an item, with text [param label] and (optionally) [param id]. If no [param id] is passed, the item index will be used as the item's ID. New items are appended at the end.
</description>
</method>
<method name="add_separator">
<return type="void" />
<param index="0" name="text" type="String" default="&quot;&quot;" />
<description>
- Adds a separator to the list of items. Separators help to group items, and can optionally be given a [code]text[/code] header. A separator also gets an index assigned, and is appended at the end of the item list.
+ Adds a separator to the list of items. Separators help to group items, and can optionally be given a [param text] header. A separator also gets an index assigned, and is appended at the end of the item list.
</description>
</method>
<method name="clear">
@@ -45,21 +45,21 @@
<return type="Texture2D" />
<param index="0" name="idx" type="int" />
<description>
- Returns the icon of the item at index [code]idx[/code].
+ Returns the icon of the item at index [param idx].
</description>
</method>
<method name="get_item_id" qualifiers="const">
<return type="int" />
<param index="0" name="idx" type="int" />
<description>
- Returns the ID of the item at index [code]idx[/code].
+ Returns the ID of the item at index [param idx].
</description>
</method>
<method name="get_item_index" qualifiers="const">
<return type="int" />
<param index="0" name="id" type="int" />
<description>
- Returns the index of the item with the given [code]id[/code].
+ Returns the index of the item with the given [param id].
</description>
</method>
<method name="get_item_metadata" qualifiers="const">
@@ -73,14 +73,14 @@
<return type="String" />
<param index="0" name="idx" type="int" />
<description>
- Returns the text of the item at index [code]idx[/code].
+ Returns the text of the item at index [param idx].
</description>
</method>
<method name="get_item_tooltip" qualifiers="const">
<return type="String" />
<param index="0" name="idx" type="int" />
<description>
- Returns the tooltip of the item at index [code]idx[/code].
+ Returns the tooltip of the item at index [param idx].
</description>
</method>
<method name="get_popup" qualifiers="const">
@@ -117,7 +117,7 @@
<return type="bool" />
<param index="0" name="idx" type="int" />
<description>
- Returns [code]true[/code] if the item at index [code]idx[/code] is disabled.
+ Returns [code]true[/code] if the item at index [param idx] is disabled.
</description>
</method>
<method name="is_item_separator" qualifiers="const">
@@ -130,7 +130,7 @@
<return type="void" />
<param index="0" name="idx" type="int" />
<description>
- Removes the item at index [code]idx[/code].
+ Removes the item at index [param idx].
</description>
</method>
<method name="select">
@@ -146,7 +146,7 @@
<param index="0" name="idx" type="int" />
<param index="1" name="disabled" type="bool" />
<description>
- Sets whether the item at index [code]idx[/code] is disabled.
+ Sets whether the item at index [param idx] is disabled.
Disabled items are drawn differently in the dropdown and are not selectable by the user. If the current selected item is set as disabled, it will remain selected.
</description>
</method>
@@ -155,7 +155,7 @@
<param index="0" name="idx" type="int" />
<param index="1" name="texture" type="Texture2D" />
<description>
- Sets the icon of the item at index [code]idx[/code].
+ Sets the icon of the item at index [param idx].
</description>
</method>
<method name="set_item_id">
@@ -163,7 +163,7 @@
<param index="0" name="idx" type="int" />
<param index="1" name="id" type="int" />
<description>
- Sets the ID of the item at index [code]idx[/code].
+ Sets the ID of the item at index [param idx].
</description>
</method>
<method name="set_item_metadata">
@@ -179,7 +179,7 @@
<param index="0" name="idx" type="int" />
<param index="1" name="text" type="String" />
<description>
- Sets the text of the item at index [code]idx[/code].
+ Sets the text of the item at index [param idx].
</description>
</method>
<method name="set_item_tooltip">
@@ -187,7 +187,13 @@
<param index="0" name="idx" type="int" />
<param index="1" name="tooltip" type="String" />
<description>
- Sets the tooltip of the item at index [code]idx[/code].
+ Sets the tooltip of the item at index [param idx].
+ </description>
+ </method>
+ <method name="show_popup">
+ <return type="void" />
+ <description>
+ Adjusts popup position and sizing for the [OptionButton], then shows the [PopupMenu]. Prefer this over using [code]get_popup().popup()[/code].
</description>
</method>
</methods>
@@ -210,7 +216,7 @@
<signal name="item_focused">
<param index="0" name="index" type="int" />
<description>
- Emitted when the user navigates to an item using the [code]ui_up[/code] or [code]ui_down[/code] actions. The index of the item selected is passed as argument.
+ Emitted when the user navigates to an item using the [member ProjectSettings.input/ui_up] or [member ProjectSettings.input/ui_down] input actions. The index of the item selected is passed as argument.
</description>
</signal>
<signal name="item_selected">
@@ -233,6 +239,9 @@
<theme_item name="font_hover_color" data_type="color" type="Color" default="Color(0.95, 0.95, 0.95, 1)">
Text [Color] used when the [OptionButton] is being hovered.
</theme_item>
+ <theme_item name="font_hover_pressed_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
+ Text [Color] used when the [OptionButton] is being hovered and pressed.
+ </theme_item>
<theme_item name="font_outline_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
The tint of text outline of the [OptionButton].
</theme_item>
@@ -243,7 +252,10 @@
The horizontal space between the arrow icon and the right edge of the button.
</theme_item>
<theme_item name="h_separation" data_type="constant" type="int" default="2">
- The horizontal space between [OptionButton]'s icon and text.
+ The horizontal space between [OptionButton]'s icon and text. Negative values will be treated as [code]0[/code] when used.
+ </theme_item>
+ <theme_item name="modulate_arrow" data_type="constant" type="int" default="0">
+ If different than [code]0[/code], the arrow icon will be modulated to the font color.
</theme_item>
<theme_item name="outline_size" data_type="constant" type="int" default="0">
The size of the text outline.
diff --git a/doc/classes/PCKPacker.xml b/doc/classes/PCKPacker.xml
index 3083ea849b..cb00b45fed 100644
--- a/doc/classes/PCKPacker.xml
+++ b/doc/classes/PCKPacker.xml
@@ -30,14 +30,14 @@
<param index="1" name="source_path" type="String" />
<param index="2" name="encrypt" type="bool" default="false" />
<description>
- Adds the [code]source_path[/code] file to the current PCK package at the [code]pck_path[/code] internal path (should start with [code]res://[/code]).
+ Adds the [param source_path] file to the current PCK package at the [param pck_path] internal path (should start with [code]res://[/code]).
</description>
</method>
<method name="flush">
<return type="int" enum="Error" />
<param index="0" name="verbose" type="bool" default="false" />
<description>
- Writes the files specified using all [method add_file] calls since the last flush. If [code]verbose[/code] is [code]true[/code], a list of files added will be printed to the console for easier debugging.
+ Writes the files specified using all [method add_file] calls since the last flush. If [param verbose] is [code]true[/code], a list of files added will be printed to the console for easier debugging.
</description>
</method>
<method name="pck_start">
@@ -47,7 +47,7 @@
<param index="2" name="key" type="String" default="&quot;0000000000000000000000000000000000000000000000000000000000000000&quot;" />
<param index="3" name="encrypt_directory" type="bool" default="false" />
<description>
- Creates a new PCK file with the name [code]pck_name[/code]. The [code].pck[/code] file extension isn't added automatically, so it should be part of [code]pck_name[/code] (even though it's not required).
+ Creates a new PCK file with the name [param pck_name]. The [code].pck[/code] file extension isn't added automatically, so it should be part of [param pck_name] (even though it's not required).
</description>
</method>
</methods>
diff --git a/doc/classes/PackedByteArray.xml b/doc/classes/PackedByteArray.xml
index 36372fbe54..ccf012f82c 100644
--- a/doc/classes/PackedByteArray.xml
+++ b/doc/classes/PackedByteArray.xml
@@ -5,6 +5,7 @@
</brief_description>
<description>
An array specifically designed to hold bytes. Packs data tightly, so it saves memory for large array sizes.
+ [PackedByteArray] also provides methods to encode/decode various types to/from bytes. The way values are encoded is an implementation detail and shouldn't be relied upon when interacting with external apps.
</description>
<tutorials>
</tutorials>
@@ -50,7 +51,7 @@
<param index="0" name="value" type="int" />
<param index="1" name="before" type="bool" default="true" />
<description>
- Finds the index of an existing value (or the insertion index that maintains sorting order, if the value is not yet present in the array) using binary search. Optionally, a [code]before[/code] specifier can be passed. If [code]false[/code], the returned index comes after all existing entries of the value in the array.
+ Finds the index of an existing value (or the insertion index that maintains sorting order, if the value is not yet present in the array) using binary search. Optionally, a [param before] specifier can be passed. If [code]false[/code], the returned index comes after all existing entries of the value in the array.
[b]Note:[/b] Calling [method bsearch] on an unsorted array results in unexpected behavior.
</description>
</method>
@@ -64,7 +65,7 @@
<return type="PackedByteArray" />
<param index="0" name="compression_mode" type="int" default="0" />
<description>
- Returns a new [PackedByteArray] with the data compressed. Set the compression mode using one of [enum File.CompressionMode]'s constants.
+ Returns a new [PackedByteArray] with the data compressed. Set the compression mode using one of [enum FileAccess.CompressionMode]'s constants.
</description>
</method>
<method name="count" qualifiers="const">
@@ -78,66 +79,77 @@
<return type="float" />
<param index="0" name="byte_offset" type="int" />
<description>
+ Decodes a 64-bit floating point number from the bytes starting at [param byte_offset]. Fails if the byte count is insufficient. Returns [code]0.0[/code] if a valid number can't be decoded.
</description>
</method>
<method name="decode_float" qualifiers="const">
<return type="float" />
<param index="0" name="byte_offset" type="int" />
<description>
+ Decodes a 32-bit floating point number from the bytes starting at [param byte_offset]. Fails if the byte count is insufficient. Returns [code]0.0[/code] if a valid number can't be decoded.
</description>
</method>
<method name="decode_half" qualifiers="const">
<return type="float" />
<param index="0" name="byte_offset" type="int" />
<description>
+ Decodes a 16-bit floating point number from the bytes starting at [param byte_offset]. Fails if the byte count is insufficient. Returns [code]0.0[/code] if a valid number can't be decoded.
</description>
</method>
<method name="decode_s16" qualifiers="const">
<return type="int" />
<param index="0" name="byte_offset" type="int" />
<description>
+ Decodes a 16-bit signed integer number from the bytes starting at [param byte_offset]. Fails if the byte count is insufficient. Returns [code]0[/code] if a valid number can't be decoded.
</description>
</method>
<method name="decode_s32" qualifiers="const">
<return type="int" />
<param index="0" name="byte_offset" type="int" />
<description>
+ Decodes a 32-bit signed integer number from the bytes starting at [param byte_offset]. Fails if the byte count is insufficient. Returns [code]0[/code] if a valid number can't be decoded.
</description>
</method>
<method name="decode_s64" qualifiers="const">
<return type="int" />
<param index="0" name="byte_offset" type="int" />
<description>
+ Decodes a 64-bit signed integer number from the bytes starting at [param byte_offset]. Fails if the byte count is insufficient. Returns [code]0[/code] if a valid number can't be decoded.
</description>
</method>
<method name="decode_s8" qualifiers="const">
<return type="int" />
<param index="0" name="byte_offset" type="int" />
<description>
+ Decodes a 8-bit signed integer number from the bytes starting at [param byte_offset]. Fails if the byte count is insufficient. Returns [code]0[/code] if a valid number can't be decoded.
</description>
</method>
<method name="decode_u16" qualifiers="const">
<return type="int" />
<param index="0" name="byte_offset" type="int" />
<description>
+ Decodes a 16-bit unsigned integer number from the bytes starting at [param byte_offset]. Fails if the byte count is insufficient. Returns [code]0[/code] if a valid number can't be decoded.
</description>
</method>
<method name="decode_u32" qualifiers="const">
<return type="int" />
<param index="0" name="byte_offset" type="int" />
<description>
+ Decodes a 32-bit unsigned integer number from the bytes starting at [param byte_offset]. Fails if the byte count is insufficient. Returns [code]0[/code] if a valid number can't be decoded.
</description>
</method>
<method name="decode_u64" qualifiers="const">
<return type="int" />
<param index="0" name="byte_offset" type="int" />
<description>
+ Decodes a 64-bit unsigned integer number from the bytes starting at [param byte_offset]. Fails if the byte count is insufficient. Returns [code]0[/code] if a valid number can't be decoded.
</description>
</method>
<method name="decode_u8" qualifiers="const">
<return type="int" />
<param index="0" name="byte_offset" type="int" />
<description>
+ Decodes a 8-bit unsigned integer number from the bytes starting at [param byte_offset]. Fails if the byte count is insufficient. Returns [code]0[/code] if a valid number can't be decoded.
</description>
</method>
<method name="decode_var" qualifiers="const">
@@ -145,6 +157,7 @@
<param index="0" name="byte_offset" type="int" />
<param index="1" name="allow_objects" type="bool" default="false" />
<description>
+ Decodes a [Variant] from the bytes starting at [param byte_offset]. Returns [code]null[/code] if a valid variant can't be decoded or the value is [Object]-derived and [param allow_objects] is [code]false[/code].
</description>
</method>
<method name="decode_var_size" qualifiers="const">
@@ -152,6 +165,7 @@
<param index="0" name="byte_offset" type="int" />
<param index="1" name="allow_objects" type="bool" default="false" />
<description>
+ Decodes a size of a [Variant] from the bytes starting at [param byte_offset]. Requires at least 4 bytes of data starting at the offset, otherwise fails.
</description>
</method>
<method name="decompress" qualifiers="const">
@@ -159,7 +173,7 @@
<param index="0" name="buffer_size" type="int" />
<param index="1" name="compression_mode" type="int" default="0" />
<description>
- Returns a new [PackedByteArray] with the data decompressed. Set [code]buffer_size[/code] to the size of the uncompressed data. Set the compression mode using one of [enum File.CompressionMode]'s constants.
+ Returns a new [PackedByteArray] with the data decompressed. Set [param buffer_size] to the size of the uncompressed data. Set the compression mode using one of [enum FileAccess.CompressionMode]'s constants.
</description>
</method>
<method name="decompress_dynamic" qualifiers="const">
@@ -167,9 +181,9 @@
<param index="0" name="max_output_size" type="int" />
<param index="1" name="compression_mode" type="int" default="0" />
<description>
- Returns a new [PackedByteArray] with the data decompressed. Set the compression mode using one of [enum File.CompressionMode]'s constants. [b]This method only accepts gzip and deflate compression modes.[/b]
+ Returns a new [PackedByteArray] with the data decompressed. Set the compression mode using one of [enum FileAccess.CompressionMode]'s constants. [b]This method only accepts gzip and deflate compression modes.[/b]
This method is potentially slower than [code]decompress[/code], as it may have to re-allocate its output buffer multiple times while decompressing, whereas [code]decompress[/code] knows it's output buffer size from the beginning.
- GZIP has a maximal compression ratio of 1032:1, meaning it's very possible for a small compressed payload to decompress to a potentially very large output. To guard against this, you may provide a maximum size this function is allowed to allocate in bytes via [code]max_output_size[/code]. Passing -1 will allow for unbounded output. If any positive value is passed, and the decompression exceeds that amount in bytes, then an error will be returned.
+ GZIP has a maximal compression ratio of 1032:1, meaning it's very possible for a small compressed payload to decompress to a potentially very large output. To guard against this, you may provide a maximum size this function is allowed to allocate in bytes via [param max_output_size]. Passing -1 will allow for unbounded output. If any positive value is passed, and the decompression exceeds that amount in bytes, then an error will be returned.
</description>
</method>
<method name="duplicate">
@@ -183,6 +197,7 @@
<param index="0" name="byte_offset" type="int" />
<param index="1" name="value" type="float" />
<description>
+ Encodes a 64-bit floating point number as bytes at the index of [param byte_offset] bytes. The array must have at least 8 bytes of allocated space, starting at the offset.
</description>
</method>
<method name="encode_float">
@@ -190,6 +205,7 @@
<param index="0" name="byte_offset" type="int" />
<param index="1" name="value" type="float" />
<description>
+ Encodes a 32-bit floating point number as bytes at the index of [param byte_offset] bytes. The array must have at least 4 bytes of space, starting at the offset.
</description>
</method>
<method name="encode_half">
@@ -197,6 +213,7 @@
<param index="0" name="byte_offset" type="int" />
<param index="1" name="value" type="float" />
<description>
+ Encodes a 16-bit floating point number as bytes at the index of [param byte_offset] bytes. The array must have at least 2 bytes of space, starting at the offset.
</description>
</method>
<method name="encode_s16">
@@ -204,6 +221,7 @@
<param index="0" name="byte_offset" type="int" />
<param index="1" name="value" type="int" />
<description>
+ Encodes a 16-bit signed integer number as bytes at the index of [param byte_offset] bytes. The array must have at least 2 bytes of space, starting at the offset.
</description>
</method>
<method name="encode_s32">
@@ -211,6 +229,7 @@
<param index="0" name="byte_offset" type="int" />
<param index="1" name="value" type="int" />
<description>
+ Encodes a 32-bit signed integer number as bytes at the index of [param byte_offset] bytes. The array must have at least 2 bytes of space, starting at the offset.
</description>
</method>
<method name="encode_s64">
@@ -218,6 +237,7 @@
<param index="0" name="byte_offset" type="int" />
<param index="1" name="value" type="int" />
<description>
+ Encodes a 64-bit signed integer number as bytes at the index of [param byte_offset] bytes. The array must have at least 2 bytes of space, starting at the offset.
</description>
</method>
<method name="encode_s8">
@@ -225,6 +245,7 @@
<param index="0" name="byte_offset" type="int" />
<param index="1" name="value" type="int" />
<description>
+ Encodes a 8-bit signed integer number (signed byte) at the index of [param byte_offset] bytes. The array must have at least 1 byte of space, starting at the offset.
</description>
</method>
<method name="encode_u16">
@@ -232,6 +253,7 @@
<param index="0" name="byte_offset" type="int" />
<param index="1" name="value" type="int" />
<description>
+ Encodes a 16-bit unsigned integer number as bytes at the index of [param byte_offset] bytes. The array must have at least 2 bytes of space, starting at the offset.
</description>
</method>
<method name="encode_u32">
@@ -239,6 +261,7 @@
<param index="0" name="byte_offset" type="int" />
<param index="1" name="value" type="int" />
<description>
+ Encodes a 32-bit unsigned integer number as bytes at the index of [param byte_offset] bytes. The array must have at least 4 bytes of space, starting at the offset.
</description>
</method>
<method name="encode_u64">
@@ -246,6 +269,7 @@
<param index="0" name="byte_offset" type="int" />
<param index="1" name="value" type="int" />
<description>
+ Encodes a 64-bit unsigned integer number as bytes at the index of [param byte_offset] bytes. The array must have at least 8 bytes of space, starting at the offset.
</description>
</method>
<method name="encode_u8">
@@ -253,6 +277,7 @@
<param index="0" name="byte_offset" type="int" />
<param index="1" name="value" type="int" />
<description>
+ Encodes a 8-bit unsigned integer number (byte) at the index of [param byte_offset] bytes. The array must have at least 1 byte of space, starting at the offset.
</description>
</method>
<method name="encode_var">
@@ -261,6 +286,7 @@
<param index="1" name="value" type="Variant" />
<param index="2" name="allow_objects" type="bool" default="false" />
<description>
+ Encodes a [Variant] at the index of [param byte_offset] bytes. A sufficient space must be allocated, depending on the encoded variant's size. If [param allow_objects] is [code]false[/code], [Object]-derived values are not permitted and will instead be serialized as ID-only.
</description>
</method>
<method name="fill">
@@ -306,7 +332,7 @@
<return type="bool" />
<param index="0" name="value" type="int" />
<description>
- Returns [code]true[/code] if the array contains [code]value[/code].
+ Returns [code]true[/code] if the array contains [param value].
</description>
</method>
<method name="has_encoded_var" qualifiers="const">
@@ -314,6 +340,7 @@
<param index="0" name="byte_offset" type="int" />
<param index="1" name="allow_objects" type="bool" default="false" />
<description>
+ Returns [code]true[/code] if a valid [Variant] value can be decoded at the [param byte_offset]. Returns [code]false[/code] othewrise or when the value is [Object]-derived and [param allow_objects] is [code]false[/code].
</description>
</method>
<method name="hex_encode" qualifiers="const">
@@ -400,9 +427,9 @@
<param index="0" name="begin" type="int" />
<param index="1" name="end" type="int" default="2147483647" />
<description>
- Returns the slice of the [PackedByteArray], from [code]begin[/code] (inclusive) to [code]end[/code] (exclusive), as a new [PackedByteArray].
- The absolute value of [code]begin[/code] and [code]end[/code] will be clamped to the array size, so the default value for [code]end[/code] makes it slice to the size of the array by default (i.e. [code]arr.slice(1)[/code] is a shorthand for [code]arr.slice(1, arr.size())[/code]).
- If either [code]begin[/code] or [code]end[/code] are negative, they will be relative to the end of the array (i.e. [code]arr.slice(0, -2)[/code] is a shorthand for [code]arr.slice(0, arr.size() - 2)[/code]).
+ Returns the slice of the [PackedByteArray], from [param begin] (inclusive) to [param end] (exclusive), as a new [PackedByteArray].
+ The absolute value of [param begin] and [param end] will be clamped to the array size, so the default value for [param end] makes it slice to the size of the array by default (i.e. [code]arr.slice(1)[/code] is a shorthand for [code]arr.slice(1, arr.size())[/code]).
+ If either [param begin] or [param end] are negative, they will be relative to the end of the array (i.e. [code]arr.slice(0, -2)[/code] is a shorthand for [code]arr.slice(0, arr.size() - 2)[/code]).
</description>
</method>
<method name="sort">
@@ -449,24 +476,29 @@
<return type="bool" />
<param index="0" name="right" type="PackedByteArray" />
<description>
+ Returns [code]true[/code] if contents of the arrays differ.
</description>
</operator>
<operator name="operator +">
<return type="PackedByteArray" />
<param index="0" name="right" type="PackedByteArray" />
<description>
+ Returns a new [PackedByteArray] with contents of [param right] added at the end of this array. For better performance, consider using [method append_array] instead.
</description>
</operator>
<operator name="operator ==">
<return type="bool" />
<param index="0" name="right" type="PackedByteArray" />
<description>
+ Returns [code]true[/code] if contents of both arrays are the same, i.e. they have all equal bytes at the corresponding indices.
</description>
</operator>
<operator name="operator []">
<return type="int" />
<param index="0" name="index" type="int" />
<description>
+ Returns the byte at index [param index]. Negative indices can be used to access the elements starting from the end. Using index out of array's bounds will result in an error.
+ Note that the byte is returned as a 64-bit [int].
</description>
</operator>
</operators>
diff --git a/doc/classes/PackedColorArray.xml b/doc/classes/PackedColorArray.xml
index 390adfa5a6..a2dc8e8f1d 100644
--- a/doc/classes/PackedColorArray.xml
+++ b/doc/classes/PackedColorArray.xml
@@ -50,7 +50,7 @@
<param index="0" name="value" type="Color" />
<param index="1" name="before" type="bool" default="true" />
<description>
- Finds the index of an existing value (or the insertion index that maintains sorting order, if the value is not yet present in the array) using binary search. Optionally, a [code]before[/code] specifier can be passed. If [code]false[/code], the returned index comes after all existing entries of the value in the array.
+ Finds the index of an existing value (or the insertion index that maintains sorting order, if the value is not yet present in the array) using binary search. Optionally, a [param before] specifier can be passed. If [code]false[/code], the returned index comes after all existing entries of the value in the array.
[b]Note:[/b] Calling [method bsearch] on an unsorted array results in unexpected behavior.
</description>
</method>
@@ -92,7 +92,7 @@
<return type="bool" />
<param index="0" name="value" type="Color" />
<description>
- Returns [code]true[/code] if the array contains [code]value[/code].
+ Returns [code]true[/code] if the array contains [param value].
</description>
</method>
<method name="insert">
@@ -163,9 +163,9 @@
<param index="0" name="begin" type="int" />
<param index="1" name="end" type="int" default="2147483647" />
<description>
- Returns the slice of the [PackedColorArray], from [code]begin[/code] (inclusive) to [code]end[/code] (exclusive), as a new [PackedColorArray].
- The absolute value of [code]begin[/code] and [code]end[/code] will be clamped to the array size, so the default value for [code]end[/code] makes it slice to the size of the array by default (i.e. [code]arr.slice(1)[/code] is a shorthand for [code]arr.slice(1, arr.size())[/code]).
- If either [code]begin[/code] or [code]end[/code] are negative, they will be relative to the end of the array (i.e. [code]arr.slice(0, -2)[/code] is a shorthand for [code]arr.slice(0, arr.size() - 2)[/code]).
+ Returns the slice of the [PackedColorArray], from [param begin] (inclusive) to [param end] (exclusive), as a new [PackedColorArray].
+ The absolute value of [param begin] and [param end] will be clamped to the array size, so the default value for [param end] makes it slice to the size of the array by default (i.e. [code]arr.slice(1)[/code] is a shorthand for [code]arr.slice(1, arr.size())[/code]).
+ If either [param begin] or [param end] are negative, they will be relative to the end of the array (i.e. [code]arr.slice(0, -2)[/code] is a shorthand for [code]arr.slice(0, arr.size() - 2)[/code]).
</description>
</method>
<method name="sort">
@@ -177,6 +177,7 @@
<method name="to_byte_array" qualifiers="const">
<return type="PackedByteArray" />
<description>
+ Returns a [PackedByteArray] with each color encoded as bytes.
</description>
</method>
</methods>
@@ -185,24 +186,28 @@
<return type="bool" />
<param index="0" name="right" type="PackedColorArray" />
<description>
+ Returns [code]true[/code] if contents of the arrays differ.
</description>
</operator>
<operator name="operator +">
<return type="PackedColorArray" />
<param index="0" name="right" type="PackedColorArray" />
<description>
+ Returns a new [PackedColorArray] with contents of [param right] added at the end of this array. For better performance, consider using [method append_array] instead.
</description>
</operator>
<operator name="operator ==">
<return type="bool" />
<param index="0" name="right" type="PackedColorArray" />
<description>
+ Returns [code]true[/code] if contents of both arrays are the same, i.e. they have all equal [Color]s at the corresponding indices.
</description>
</operator>
<operator name="operator []">
<return type="Color" />
<param index="0" name="index" type="int" />
<description>
+ Returns the [Color] at index [param index]. Negative indices can be used to access the elements starting from the end. Using index out of array's bounds will result in an error.
</description>
</operator>
</operators>
diff --git a/doc/classes/PackedFloat32Array.xml b/doc/classes/PackedFloat32Array.xml
index f5d5b4566b..d350d64f38 100644
--- a/doc/classes/PackedFloat32Array.xml
+++ b/doc/classes/PackedFloat32Array.xml
@@ -4,7 +4,7 @@
A packed array of 32-bit floating-point values.
</brief_description>
<description>
- An array specifically designed to hold 32-bit floating-point values. Packs data tightly, so it saves memory for large array sizes.
+ An array specifically designed to hold 32-bit floating-point values (float). Packs data tightly, so it saves memory for large array sizes.
If you need to pack 64-bit floats tightly, see [PackedFloat64Array].
</description>
<tutorials>
@@ -51,7 +51,7 @@
<param index="0" name="value" type="float" />
<param index="1" name="before" type="bool" default="true" />
<description>
- Finds the index of an existing value (or the insertion index that maintains sorting order, if the value is not yet present in the array) using binary search. Optionally, a [code]before[/code] specifier can be passed. If [code]false[/code], the returned index comes after all existing entries of the value in the array.
+ Finds the index of an existing value (or the insertion index that maintains sorting order, if the value is not yet present in the array) using binary search. Optionally, a [param before] specifier can be passed. If [code]false[/code], the returned index comes after all existing entries of the value in the array.
[b]Note:[/b] Calling [method bsearch] on an unsorted array results in unexpected behavior.
</description>
</method>
@@ -93,7 +93,7 @@
<return type="bool" />
<param index="0" name="value" type="float" />
<description>
- Returns [code]true[/code] if the array contains [code]value[/code].
+ Returns [code]true[/code] if the array contains [param value].
</description>
</method>
<method name="insert">
@@ -164,9 +164,9 @@
<param index="0" name="begin" type="int" />
<param index="1" name="end" type="int" default="2147483647" />
<description>
- Returns the slice of the [PackedFloat32Array], from [code]begin[/code] (inclusive) to [code]end[/code] (exclusive), as a new [PackedFloat32Array].
- The absolute value of [code]begin[/code] and [code]end[/code] will be clamped to the array size, so the default value for [code]end[/code] makes it slice to the size of the array by default (i.e. [code]arr.slice(1)[/code] is a shorthand for [code]arr.slice(1, arr.size())[/code]).
- If either [code]begin[/code] or [code]end[/code] are negative, they will be relative to the end of the array (i.e. [code]arr.slice(0, -2)[/code] is a shorthand for [code]arr.slice(0, arr.size() - 2)[/code]).
+ Returns the slice of the [PackedFloat32Array], from [param begin] (inclusive) to [param end] (exclusive), as a new [PackedFloat32Array].
+ The absolute value of [param begin] and [param end] will be clamped to the array size, so the default value for [param end] makes it slice to the size of the array by default (i.e. [code]arr.slice(1)[/code] is a shorthand for [code]arr.slice(1, arr.size())[/code]).
+ If either [param begin] or [param end] are negative, they will be relative to the end of the array (i.e. [code]arr.slice(0, -2)[/code] is a shorthand for [code]arr.slice(0, arr.size() - 2)[/code]).
</description>
</method>
<method name="sort">
@@ -188,24 +188,29 @@
<return type="bool" />
<param index="0" name="right" type="PackedFloat32Array" />
<description>
+ Returns [code]true[/code] if contents of the arrays differ.
</description>
</operator>
<operator name="operator +">
<return type="PackedFloat32Array" />
<param index="0" name="right" type="PackedFloat32Array" />
<description>
+ Returns a new [PackedFloat32Array] with contents of [param right] added at the end of this array. For better performance, consider using [method append_array] instead.
</description>
</operator>
<operator name="operator ==">
<return type="bool" />
<param index="0" name="right" type="PackedFloat32Array" />
<description>
+ Returns [code]true[/code] if contents of both arrays are the same, i.e. they have all equal floats at the corresponding indices.
</description>
</operator>
<operator name="operator []">
<return type="float" />
<param index="0" name="index" type="int" />
<description>
+ Returns the [float] at index [param index]. Negative indices can be used to access the elements starting from the end. Using index out of array's bounds will result in an error.
+ Note that [float] type is 64-bit, unlike the values stored in the array.
</description>
</operator>
</operators>
diff --git a/doc/classes/PackedFloat64Array.xml b/doc/classes/PackedFloat64Array.xml
index dfac2c80e8..690cb15fa7 100644
--- a/doc/classes/PackedFloat64Array.xml
+++ b/doc/classes/PackedFloat64Array.xml
@@ -4,7 +4,7 @@
A packed array of 64-bit floating-point values.
</brief_description>
<description>
- An array specifically designed to hold 64-bit floating-point values. Packs data tightly, so it saves memory for large array sizes.
+ An array specifically designed to hold 64-bit floating-point values (double). Packs data tightly, so it saves memory for large array sizes.
If you only need to pack 32-bit floats tightly, see [PackedFloat32Array] for a more memory-friendly alternative.
</description>
<tutorials>
@@ -51,7 +51,7 @@
<param index="0" name="value" type="float" />
<param index="1" name="before" type="bool" default="true" />
<description>
- Finds the index of an existing value (or the insertion index that maintains sorting order, if the value is not yet present in the array) using binary search. Optionally, a [code]before[/code] specifier can be passed. If [code]false[/code], the returned index comes after all existing entries of the value in the array.
+ Finds the index of an existing value (or the insertion index that maintains sorting order, if the value is not yet present in the array) using binary search. Optionally, a [param before] specifier can be passed. If [code]false[/code], the returned index comes after all existing entries of the value in the array.
[b]Note:[/b] Calling [method bsearch] on an unsorted array results in unexpected behavior.
</description>
</method>
@@ -93,7 +93,7 @@
<return type="bool" />
<param index="0" name="value" type="float" />
<description>
- Returns [code]true[/code] if the array contains [code]value[/code].
+ Returns [code]true[/code] if the array contains [param value].
</description>
</method>
<method name="insert">
@@ -164,9 +164,9 @@
<param index="0" name="begin" type="int" />
<param index="1" name="end" type="int" default="2147483647" />
<description>
- Returns the slice of the [PackedFloat64Array], from [code]begin[/code] (inclusive) to [code]end[/code] (exclusive), as a new [PackedFloat64Array].
- The absolute value of [code]begin[/code] and [code]end[/code] will be clamped to the array size, so the default value for [code]end[/code] makes it slice to the size of the array by default (i.e. [code]arr.slice(1)[/code] is a shorthand for [code]arr.slice(1, arr.size())[/code]).
- If either [code]begin[/code] or [code]end[/code] are negative, they will be relative to the end of the array (i.e. [code]arr.slice(0, -2)[/code] is a shorthand for [code]arr.slice(0, arr.size() - 2)[/code]).
+ Returns the slice of the [PackedFloat64Array], from [param begin] (inclusive) to [param end] (exclusive), as a new [PackedFloat64Array].
+ The absolute value of [param begin] and [param end] will be clamped to the array size, so the default value for [param end] makes it slice to the size of the array by default (i.e. [code]arr.slice(1)[/code] is a shorthand for [code]arr.slice(1, arr.size())[/code]).
+ If either [param begin] or [param end] are negative, they will be relative to the end of the array (i.e. [code]arr.slice(0, -2)[/code] is a shorthand for [code]arr.slice(0, arr.size() - 2)[/code]).
</description>
</method>
<method name="sort">
@@ -188,24 +188,28 @@
<return type="bool" />
<param index="0" name="right" type="PackedFloat64Array" />
<description>
+ Returns [code]true[/code] if contents of the arrays differ.
</description>
</operator>
<operator name="operator +">
<return type="PackedFloat64Array" />
<param index="0" name="right" type="PackedFloat64Array" />
<description>
+ Returns a new [PackedFloat64Array] with contents of [param right] added at the end of this array. For better performance, consider using [method append_array] instead.
</description>
</operator>
<operator name="operator ==">
<return type="bool" />
<param index="0" name="right" type="PackedFloat64Array" />
<description>
+ Returns [code]true[/code] if contents of both arrays are the same, i.e. they have all equal doubles at the corresponding indices.
</description>
</operator>
<operator name="operator []">
<return type="float" />
<param index="0" name="index" type="int" />
<description>
+ Returns the [float] at index [param index]. Negative indices can be used to access the elements starting from the end. Using index out of array's bounds will result in an error.
</description>
</operator>
</operators>
diff --git a/doc/classes/PackedInt32Array.xml b/doc/classes/PackedInt32Array.xml
index b29b1b1bd0..2f9032e214 100644
--- a/doc/classes/PackedInt32Array.xml
+++ b/doc/classes/PackedInt32Array.xml
@@ -51,7 +51,7 @@
<param index="0" name="value" type="int" />
<param index="1" name="before" type="bool" default="true" />
<description>
- Finds the index of an existing value (or the insertion index that maintains sorting order, if the value is not yet present in the array) using binary search. Optionally, a [code]before[/code] specifier can be passed. If [code]false[/code], the returned index comes after all existing entries of the value in the array.
+ Finds the index of an existing value (or the insertion index that maintains sorting order, if the value is not yet present in the array) using binary search. Optionally, a [param before] specifier can be passed. If [code]false[/code], the returned index comes after all existing entries of the value in the array.
[b]Note:[/b] Calling [method bsearch] on an unsorted array results in unexpected behavior.
</description>
</method>
@@ -93,7 +93,7 @@
<return type="bool" />
<param index="0" name="value" type="int" />
<description>
- Returns [code]true[/code] if the array contains [code]value[/code].
+ Returns [code]true[/code] if the array contains [param value].
</description>
</method>
<method name="insert">
@@ -164,9 +164,9 @@
<param index="0" name="begin" type="int" />
<param index="1" name="end" type="int" default="2147483647" />
<description>
- Returns the slice of the [PackedInt32Array], from [code]begin[/code] (inclusive) to [code]end[/code] (exclusive), as a new [PackedInt32Array].
- The absolute value of [code]begin[/code] and [code]end[/code] will be clamped to the array size, so the default value for [code]end[/code] makes it slice to the size of the array by default (i.e. [code]arr.slice(1)[/code] is a shorthand for [code]arr.slice(1, arr.size())[/code]).
- If either [code]begin[/code] or [code]end[/code] are negative, they will be relative to the end of the array (i.e. [code]arr.slice(0, -2)[/code] is a shorthand for [code]arr.slice(0, arr.size() - 2)[/code]).
+ Returns the slice of the [PackedInt32Array], from [param begin] (inclusive) to [param end] (exclusive), as a new [PackedInt32Array].
+ The absolute value of [param begin] and [param end] will be clamped to the array size, so the default value for [param end] makes it slice to the size of the array by default (i.e. [code]arr.slice(1)[/code] is a shorthand for [code]arr.slice(1, arr.size())[/code]).
+ If either [param begin] or [param end] are negative, they will be relative to the end of the array (i.e. [code]arr.slice(0, -2)[/code] is a shorthand for [code]arr.slice(0, arr.size() - 2)[/code]).
</description>
</method>
<method name="sort">
@@ -188,24 +188,29 @@
<return type="bool" />
<param index="0" name="right" type="PackedInt32Array" />
<description>
+ Returns [code]true[/code] if contents of the arrays differ.
</description>
</operator>
<operator name="operator +">
<return type="PackedInt32Array" />
<param index="0" name="right" type="PackedInt32Array" />
<description>
+ Returns a new [PackedInt32Array] with contents of [param right] added at the end of this array. For better performance, consider using [method append_array] instead.
</description>
</operator>
<operator name="operator ==">
<return type="bool" />
<param index="0" name="right" type="PackedInt32Array" />
<description>
+ Returns [code]true[/code] if contents of both arrays are the same, i.e. they have all equal ints at the corresponding indices.
</description>
</operator>
<operator name="operator []">
<return type="int" />
<param index="0" name="index" type="int" />
<description>
+ Returns the [int] at index [param index]. Negative indices can be used to access the elements starting from the end. Using index out of array's bounds will result in an error.
+ Note that [int] type is 64-bit, unlike the values stored in the array.
</description>
</operator>
</operators>
diff --git a/doc/classes/PackedInt64Array.xml b/doc/classes/PackedInt64Array.xml
index 2a33238677..5f762cde3e 100644
--- a/doc/classes/PackedInt64Array.xml
+++ b/doc/classes/PackedInt64Array.xml
@@ -51,7 +51,7 @@
<param index="0" name="value" type="int" />
<param index="1" name="before" type="bool" default="true" />
<description>
- Finds the index of an existing value (or the insertion index that maintains sorting order, if the value is not yet present in the array) using binary search. Optionally, a [code]before[/code] specifier can be passed. If [code]false[/code], the returned index comes after all existing entries of the value in the array.
+ Finds the index of an existing value (or the insertion index that maintains sorting order, if the value is not yet present in the array) using binary search. Optionally, a [param before] specifier can be passed. If [code]false[/code], the returned index comes after all existing entries of the value in the array.
[b]Note:[/b] Calling [method bsearch] on an unsorted array results in unexpected behavior.
</description>
</method>
@@ -93,7 +93,7 @@
<return type="bool" />
<param index="0" name="value" type="int" />
<description>
- Returns [code]true[/code] if the array contains [code]value[/code].
+ Returns [code]true[/code] if the array contains [param value].
</description>
</method>
<method name="insert">
@@ -164,9 +164,9 @@
<param index="0" name="begin" type="int" />
<param index="1" name="end" type="int" default="2147483647" />
<description>
- Returns the slice of the [PackedInt64Array], from [code]begin[/code] (inclusive) to [code]end[/code] (exclusive), as a new [PackedInt64Array].
- The absolute value of [code]begin[/code] and [code]end[/code] will be clamped to the array size, so the default value for [code]end[/code] makes it slice to the size of the array by default (i.e. [code]arr.slice(1)[/code] is a shorthand for [code]arr.slice(1, arr.size())[/code]).
- If either [code]begin[/code] or [code]end[/code] are negative, they will be relative to the end of the array (i.e. [code]arr.slice(0, -2)[/code] is a shorthand for [code]arr.slice(0, arr.size() - 2)[/code]).
+ Returns the slice of the [PackedInt64Array], from [param begin] (inclusive) to [param end] (exclusive), as a new [PackedInt64Array].
+ The absolute value of [param begin] and [param end] will be clamped to the array size, so the default value for [param end] makes it slice to the size of the array by default (i.e. [code]arr.slice(1)[/code] is a shorthand for [code]arr.slice(1, arr.size())[/code]).
+ If either [param begin] or [param end] are negative, they will be relative to the end of the array (i.e. [code]arr.slice(0, -2)[/code] is a shorthand for [code]arr.slice(0, arr.size() - 2)[/code]).
</description>
</method>
<method name="sort">
@@ -188,24 +188,28 @@
<return type="bool" />
<param index="0" name="right" type="PackedInt64Array" />
<description>
+ Returns [code]true[/code] if contents of the arrays differ.
</description>
</operator>
<operator name="operator +">
<return type="PackedInt64Array" />
<param index="0" name="right" type="PackedInt64Array" />
<description>
+ Returns a new [PackedInt64Array] with contents of [param right] added at the end of this array. For better performance, consider using [method append_array] instead.
</description>
</operator>
<operator name="operator ==">
<return type="bool" />
<param index="0" name="right" type="PackedInt64Array" />
<description>
+ Returns [code]true[/code] if contents of both arrays are the same, i.e. they have all equal ints at the corresponding indices.
</description>
</operator>
<operator name="operator []">
<return type="int" />
<param index="0" name="index" type="int" />
<description>
+ Returns the [int] at index [param index]. Negative indices can be used to access the elements starting from the end. Using index out of array's bounds will result in an error.
</description>
</operator>
</operators>
diff --git a/doc/classes/PackedScene.xml b/doc/classes/PackedScene.xml
index c7fe7d8c37..7ca1d5d60d 100644
--- a/doc/classes/PackedScene.xml
+++ b/doc/classes/PackedScene.xml
@@ -22,12 +22,12 @@
AddChild(scene);
[/csharp]
[/codeblocks]
- [b]Example of saving a node with different owners:[/b] The following example creates 3 objects: [Node2D] ([code]node[/code]), [RigidDynamicBody2D] ([code]body[/code]) and [CollisionObject2D] ([code]collision[/code]). [code]collision[/code] is a child of [code]body[/code] which is a child of [code]node[/code]. Only [code]body[/code] is owned by [code]node[/code] and [code]pack[/code] will therefore only save those two nodes, but not [code]collision[/code].
+ [b]Example of saving a node with different owners:[/b] The following example creates 3 objects: [Node2D] ([code]node[/code]), [RigidBody2D] ([code]body[/code]) and [CollisionObject2D] ([code]collision[/code]). [code]collision[/code] is a child of [code]body[/code] which is a child of [code]node[/code]. Only [code]body[/code] is owned by [code]node[/code] and [code]pack[/code] will therefore only save those two nodes, but not [code]collision[/code].
[codeblocks]
[gdscript]
# Create the objects.
var node = Node2D.new()
- var body = RigidDynamicBody2D.new()
+ var body = RigidBody2D.new()
var collision = CollisionShape2D.new()
# Create the object hierarchy.
@@ -41,14 +41,14 @@
# Only `node` and `body` are now packed.
var result = scene.pack(node)
if result == OK:
- var error = ResourceSaver.save("res://path/name.tscn", scene) # Or "user://..."
+ var error = ResourceSaver.save(scene, "res://path/name.tscn") # Or "user://..."
if error != OK:
push_error("An error occurred while saving the scene to disk.")
[/gdscript]
[csharp]
// Create the objects.
var node = new Node2D();
- var body = new RigidDynamicBody2D();
+ var body = new RigidBody2D();
var collision = new CollisionShape2D();
// Create the object hierarchy.
@@ -63,7 +63,7 @@
Error result = scene.Pack(node);
if (result == Error.Ok)
{
- Error error = ResourceSaver.Save("res://path/name.tscn", scene); // Or "user://..."
+ Error error = ResourceSaver.Save(scene, "res://path/name.tscn"); // Or "user://..."
if (error != Error.Ok)
{
GD.PushError("An error occurred while saving the scene to disk.");
@@ -92,7 +92,7 @@
<return type="Node" />
<param index="0" name="edit_state" type="int" enum="PackedScene.GenEditState" default="0" />
<description>
- Instantiates the scene's node hierarchy. Triggers child scene instantiation(s). Triggers a [constant Node.NOTIFICATION_INSTANCED] notification on the root node.
+ Instantiates the scene's node hierarchy. Triggers child scene instantiation(s). Triggers a [constant Node.NOTIFICATION_SCENE_INSTANTIATED] notification on the root node.
</description>
</method>
<method name="pack">
diff --git a/doc/classes/PackedStringArray.xml b/doc/classes/PackedStringArray.xml
index 364142f0b6..2c3376d659 100644
--- a/doc/classes/PackedStringArray.xml
+++ b/doc/classes/PackedStringArray.xml
@@ -57,7 +57,7 @@
<param index="0" name="value" type="String" />
<param index="1" name="before" type="bool" default="true" />
<description>
- Finds the index of an existing value (or the insertion index that maintains sorting order, if the value is not yet present in the array) using binary search. Optionally, a [code]before[/code] specifier can be passed. If [code]false[/code], the returned index comes after all existing entries of the value in the array.
+ Finds the index of an existing value (or the insertion index that maintains sorting order, if the value is not yet present in the array) using binary search. Optionally, a [param before] specifier can be passed. If [code]false[/code], the returned index comes after all existing entries of the value in the array.
[b]Note:[/b] Calling [method bsearch] on an unsorted array results in unexpected behavior.
</description>
</method>
@@ -99,7 +99,7 @@
<return type="bool" />
<param index="0" name="value" type="String" />
<description>
- Returns [code]true[/code] if the array contains [code]value[/code].
+ Returns [code]true[/code] if the array contains [param value].
</description>
</method>
<method name="insert">
@@ -170,9 +170,9 @@
<param index="0" name="begin" type="int" />
<param index="1" name="end" type="int" default="2147483647" />
<description>
- Returns the slice of the [PackedStringArray], from [code]begin[/code] (inclusive) to [code]end[/code] (exclusive), as a new [PackedStringArray].
- The absolute value of [code]begin[/code] and [code]end[/code] will be clamped to the array size, so the default value for [code]end[/code] makes it slice to the size of the array by default (i.e. [code]arr.slice(1)[/code] is a shorthand for [code]arr.slice(1, arr.size())[/code]).
- If either [code]begin[/code] or [code]end[/code] are negative, they will be relative to the end of the array (i.e. [code]arr.slice(0, -2)[/code] is a shorthand for [code]arr.slice(0, arr.size() - 2)[/code]).
+ Returns the slice of the [PackedStringArray], from [param begin] (inclusive) to [param end] (exclusive), as a new [PackedStringArray].
+ The absolute value of [param begin] and [param end] will be clamped to the array size, so the default value for [param end] makes it slice to the size of the array by default (i.e. [code]arr.slice(1)[/code] is a shorthand for [code]arr.slice(1, arr.size())[/code]).
+ If either [param begin] or [param end] are negative, they will be relative to the end of the array (i.e. [code]arr.slice(0, -2)[/code] is a shorthand for [code]arr.slice(0, arr.size() - 2)[/code]).
</description>
</method>
<method name="sort">
@@ -184,6 +184,7 @@
<method name="to_byte_array" qualifiers="const">
<return type="PackedByteArray" />
<description>
+ Returns a [PackedByteArray] with each string encoded as bytes.
</description>
</method>
</methods>
@@ -192,24 +193,28 @@
<return type="bool" />
<param index="0" name="right" type="PackedStringArray" />
<description>
+ Returns [code]true[/code] if contents of the arrays differ.
</description>
</operator>
<operator name="operator +">
<return type="PackedStringArray" />
<param index="0" name="right" type="PackedStringArray" />
<description>
+ Returns a new [PackedStringArray] with contents of [param right] added at the end of this array. For better performance, consider using [method append_array] instead.
</description>
</operator>
<operator name="operator ==">
<return type="bool" />
<param index="0" name="right" type="PackedStringArray" />
<description>
+ Returns [code]true[/code] if contents of both arrays are the same, i.e. they have all equal [String]s at the corresponding indices.
</description>
</operator>
<operator name="operator []">
<return type="String" />
<param index="0" name="index" type="int" />
<description>
+ Returns the [String] at index [param index]. Negative indices can be used to access the elements starting from the end. Using index out of array's bounds will result in an error.
</description>
</operator>
</operators>
diff --git a/doc/classes/PackedVector2Array.xml b/doc/classes/PackedVector2Array.xml
index 632680e739..25650ef40a 100644
--- a/doc/classes/PackedVector2Array.xml
+++ b/doc/classes/PackedVector2Array.xml
@@ -51,7 +51,7 @@
<param index="0" name="value" type="Vector2" />
<param index="1" name="before" type="bool" default="true" />
<description>
- Finds the index of an existing value (or the insertion index that maintains sorting order, if the value is not yet present in the array) using binary search. Optionally, a [code]before[/code] specifier can be passed. If [code]false[/code], the returned index comes after all existing entries of the value in the array.
+ Finds the index of an existing value (or the insertion index that maintains sorting order, if the value is not yet present in the array) using binary search. Optionally, a [param before] specifier can be passed. If [code]false[/code], the returned index comes after all existing entries of the value in the array.
[b]Note:[/b] Calling [method bsearch] on an unsorted array results in unexpected behavior.
</description>
</method>
@@ -93,7 +93,7 @@
<return type="bool" />
<param index="0" name="value" type="Vector2" />
<description>
- Returns [code]true[/code] if the array contains [code]value[/code].
+ Returns [code]true[/code] if the array contains [param value].
</description>
</method>
<method name="insert">
@@ -164,9 +164,9 @@
<param index="0" name="begin" type="int" />
<param index="1" name="end" type="int" default="2147483647" />
<description>
- Returns the slice of the [PackedVector2Array], from [code]begin[/code] (inclusive) to [code]end[/code] (exclusive), as a new [PackedVector2Array].
- The absolute value of [code]begin[/code] and [code]end[/code] will be clamped to the array size, so the default value for [code]end[/code] makes it slice to the size of the array by default (i.e. [code]arr.slice(1)[/code] is a shorthand for [code]arr.slice(1, arr.size())[/code]).
- If either [code]begin[/code] or [code]end[/code] are negative, they will be relative to the end of the array (i.e. [code]arr.slice(0, -2)[/code] is a shorthand for [code]arr.slice(0, arr.size() - 2)[/code]).
+ Returns the slice of the [PackedVector2Array], from [param begin] (inclusive) to [param end] (exclusive), as a new [PackedVector2Array].
+ The absolute value of [param begin] and [param end] will be clamped to the array size, so the default value for [param end] makes it slice to the size of the array by default (i.e. [code]arr.slice(1)[/code] is a shorthand for [code]arr.slice(1, arr.size())[/code]).
+ If either [param begin] or [param end] are negative, they will be relative to the end of the array (i.e. [code]arr.slice(0, -2)[/code] is a shorthand for [code]arr.slice(0, arr.size() - 2)[/code]).
</description>
</method>
<method name="sort">
@@ -178,6 +178,7 @@
<method name="to_byte_array" qualifiers="const">
<return type="PackedByteArray" />
<description>
+ Returns a [PackedByteArray] with each vector encoded as bytes.
</description>
</method>
</methods>
@@ -186,30 +187,35 @@
<return type="bool" />
<param index="0" name="right" type="PackedVector2Array" />
<description>
+ Returns [code]true[/code] if contents of the arrays differ.
</description>
</operator>
<operator name="operator *">
<return type="PackedVector2Array" />
<param index="0" name="right" type="Transform2D" />
<description>
+ Transforms (multiplies) all vectors in the array by the [Transform2D] matrix.
</description>
</operator>
<operator name="operator +">
<return type="PackedVector2Array" />
<param index="0" name="right" type="PackedVector2Array" />
<description>
+ Returns a new [PackedVector2Array] with contents of [param right] added at the end of this array. For better performance, consider using [method append_array] instead.
</description>
</operator>
<operator name="operator ==">
<return type="bool" />
<param index="0" name="right" type="PackedVector2Array" />
<description>
+ Returns [code]true[/code] if contents of both arrays are the same, i.e. they have all equal [Vector2]s at the corresponding indices.
</description>
</operator>
<operator name="operator []">
<return type="Vector2" />
<param index="0" name="index" type="int" />
<description>
+ Returns the [Vector2] at index [param index]. Negative indices can be used to access the elements starting from the end. Using index out of array's bounds will result in an error.
</description>
</operator>
</operators>
diff --git a/doc/classes/PackedVector3Array.xml b/doc/classes/PackedVector3Array.xml
index 014e7d5aa5..22979a5a37 100644
--- a/doc/classes/PackedVector3Array.xml
+++ b/doc/classes/PackedVector3Array.xml
@@ -50,7 +50,7 @@
<param index="0" name="value" type="Vector3" />
<param index="1" name="before" type="bool" default="true" />
<description>
- Finds the index of an existing value (or the insertion index that maintains sorting order, if the value is not yet present in the array) using binary search. Optionally, a [code]before[/code] specifier can be passed. If [code]false[/code], the returned index comes after all existing entries of the value in the array.
+ Finds the index of an existing value (or the insertion index that maintains sorting order, if the value is not yet present in the array) using binary search. Optionally, a [param before] specifier can be passed. If [code]false[/code], the returned index comes after all existing entries of the value in the array.
[b]Note:[/b] Calling [method bsearch] on an unsorted array results in unexpected behavior.
</description>
</method>
@@ -92,7 +92,7 @@
<return type="bool" />
<param index="0" name="value" type="Vector3" />
<description>
- Returns [code]true[/code] if the array contains [code]value[/code].
+ Returns [code]true[/code] if the array contains [param value].
</description>
</method>
<method name="insert">
@@ -163,9 +163,9 @@
<param index="0" name="begin" type="int" />
<param index="1" name="end" type="int" default="2147483647" />
<description>
- Returns the slice of the [PackedVector3Array], from [code]begin[/code] (inclusive) to [code]end[/code] (exclusive), as a new [PackedVector3Array].
- The absolute value of [code]begin[/code] and [code]end[/code] will be clamped to the array size, so the default value for [code]end[/code] makes it slice to the size of the array by default (i.e. [code]arr.slice(1)[/code] is a shorthand for [code]arr.slice(1, arr.size())[/code]).
- If either [code]begin[/code] or [code]end[/code] are negative, they will be relative to the end of the array (i.e. [code]arr.slice(0, -2)[/code] is a shorthand for [code]arr.slice(0, arr.size() - 2)[/code]).
+ Returns the slice of the [PackedVector3Array], from [param begin] (inclusive) to [param end] (exclusive), as a new [PackedVector3Array].
+ The absolute value of [param begin] and [param end] will be clamped to the array size, so the default value for [param end] makes it slice to the size of the array by default (i.e. [code]arr.slice(1)[/code] is a shorthand for [code]arr.slice(1, arr.size())[/code]).
+ If either [param begin] or [param end] are negative, they will be relative to the end of the array (i.e. [code]arr.slice(0, -2)[/code] is a shorthand for [code]arr.slice(0, arr.size() - 2)[/code]).
</description>
</method>
<method name="sort">
@@ -177,6 +177,7 @@
<method name="to_byte_array" qualifiers="const">
<return type="PackedByteArray" />
<description>
+ Returns a [PackedByteArray] with each vector encoded as bytes.
</description>
</method>
</methods>
@@ -185,30 +186,35 @@
<return type="bool" />
<param index="0" name="right" type="PackedVector3Array" />
<description>
+ Returns [code]true[/code] if contents of the arrays differ.
</description>
</operator>
<operator name="operator *">
<return type="PackedVector3Array" />
<param index="0" name="right" type="Transform3D" />
<description>
+ Transforms (multiplies) all vectors in the array by the [Transform3D] matrix.
</description>
</operator>
<operator name="operator +">
<return type="PackedVector3Array" />
<param index="0" name="right" type="PackedVector3Array" />
<description>
+ Returns a new [PackedVector3Array] with contents of [param right] added at the end of this array. For better performance, consider using [method append_array] instead.
</description>
</operator>
<operator name="operator ==">
<return type="bool" />
<param index="0" name="right" type="PackedVector3Array" />
<description>
+ Returns [code]true[/code] if contents of both arrays are the same, i.e. they have all equal [Vector3]s at the corresponding indices.
</description>
</operator>
<operator name="operator []">
<return type="Vector3" />
<param index="0" name="index" type="int" />
<description>
+ Returns the [Vector3] at index [param index]. Negative indices can be used to access the elements starting from the end. Using index out of array's bounds will result in an error.
</description>
</operator>
</operators>
diff --git a/doc/classes/PacketPeer.xml b/doc/classes/PacketPeer.xml
index 6bfaa71838..ab2bc34672 100644
--- a/doc/classes/PacketPeer.xml
+++ b/doc/classes/PacketPeer.xml
@@ -32,7 +32,7 @@
<return type="Variant" />
<param index="0" name="allow_objects" type="bool" default="false" />
<description>
- Gets a Variant. If [code]allow_objects[/code] is [code]true[/code], decoding objects is allowed.
+ Gets a Variant. If [param allow_objects] is [code]true[/code], decoding objects is allowed.
[b]Warning:[/b] Deserialized objects can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats such as remote code execution.
</description>
</method>
@@ -48,7 +48,7 @@
<param index="0" name="var" type="Variant" />
<param index="1" name="full_objects" type="bool" default="false" />
<description>
- Sends a [Variant] as a packet. If [code]full_objects[/code] is [code]true[/code], encoding objects is allowed (and can potentially include code).
+ Sends a [Variant] as a packet. If [param full_objects] is [code]true[/code], encoding objects is allowed (and can potentially include code).
</description>
</method>
</methods>
diff --git a/doc/classes/PacketPeerDTLS.xml b/doc/classes/PacketPeerDTLS.xml
index 319740e76b..db8403a56b 100644
--- a/doc/classes/PacketPeerDTLS.xml
+++ b/doc/classes/PacketPeerDTLS.xml
@@ -6,7 +6,7 @@
<description>
This class represents a DTLS peer connection. It can be used to connect to a DTLS server, and is returned by [method DTLSServer.take_connection].
[b]Note:[/b] When exporting to Android, make sure to enable the [code]INTERNET[/code] permission in the Android export preset before exporting the project or using one-click deploy. Otherwise, network communication of any kind will be blocked by Android.
- [b]Warning:[/b] SSL/TLS certificate revocation and certificate pinning are currently not supported. Revoked certificates are accepted as long as they are otherwise valid. If this is a concern, you may want to use automatically managed certificates with a short validity period.
+ [b]Warning:[/b] TLS certificate revocation and certificate pinning are currently not supported. Revoked certificates are accepted as long as they are otherwise valid. If this is a concern, you may want to use automatically managed certificates with a short validity period.
</description>
<tutorials>
</tutorials>
@@ -18,7 +18,7 @@
<param index="2" name="for_hostname" type="String" default="&quot;&quot;" />
<param index="3" name="valid_certificate" type="X509Certificate" default="null" />
<description>
- Connects a [code]peer[/code] beginning the DTLS handshake using the underlying [PacketPeerUDP] which must be connected (see [method PacketPeerUDP.connect_to_host]). If [code]validate_certs[/code] is [code]true[/code], [PacketPeerDTLS] will validate that the certificate presented by the remote peer and match it with the [code]for_hostname[/code] argument. You can specify a custom [X509Certificate] to use for validation via the [code]valid_certificate[/code] argument.
+ Connects a [param packet_peer] beginning the DTLS handshake using the underlying [PacketPeerUDP] which must be connected (see [method PacketPeerUDP.connect_to_host]). If [param validate_certs] is [code]true[/code], [PacketPeerDTLS] will validate that the certificate presented by the remote peer and match it with the [param for_hostname] argument. You can specify a custom [X509Certificate] to use for validation via the [param valid_certificate] argument.
</description>
</method>
<method name="disconnect_from_peer">
diff --git a/doc/classes/PacketPeerExtension.xml b/doc/classes/PacketPeerExtension.xml
index 28263b3f59..afb1aa4016 100644
--- a/doc/classes/PacketPeerExtension.xml
+++ b/doc/classes/PacketPeerExtension.xml
@@ -18,14 +18,14 @@
</description>
</method>
<method name="_get_packet" qualifiers="virtual">
- <return type="int" />
+ <return type="int" enum="Error" />
<param index="0" name="r_buffer" type="const uint8_t **" />
<param index="1" name="r_buffer_size" type="int32_t*" />
<description>
</description>
</method>
<method name="_put_packet" qualifiers="virtual">
- <return type="int" />
+ <return type="int" enum="Error" />
<param index="0" name="p_buffer" type="const uint8_t*" />
<param index="1" name="p_buffer_size" type="int" />
<description>
diff --git a/doc/classes/PacketPeerUDP.xml b/doc/classes/PacketPeerUDP.xml
index bcd9f3fb46..9107937183 100644
--- a/doc/classes/PacketPeerUDP.xml
+++ b/doc/classes/PacketPeerUDP.xml
@@ -16,10 +16,10 @@
<param index="1" name="bind_address" type="String" default="&quot;*&quot;" />
<param index="2" name="recv_buf_size" type="int" default="65536" />
<description>
- Binds this [PacketPeerUDP] to the specified [code]port[/code] and [code]address[/code] with a buffer size [code]recv_buf_size[/code], allowing it to receive incoming packets.
- If [code]address[/code] is set to [code]"*"[/code] (default), the peer will be bound on all available addresses (both IPv4 and IPv6).
- If [code]address[/code] is set to [code]"0.0.0.0"[/code] (for IPv4) or [code]"::"[/code] (for IPv6), the peer will be bound to all available addresses matching that IP type.
- If [code]address[/code] is set to any valid address (e.g. [code]"192.168.1.101"[/code], [code]"::1"[/code], etc), the peer will only be bound to the interface with that addresses (or fail if no interface with the given address exists).
+ Binds this [PacketPeerUDP] to the specified [param port] and [param bind_address] with a buffer size [param recv_buf_size], allowing it to receive incoming packets.
+ If [param bind_address] is set to [code]"*"[/code] (default), the peer will be bound on all available addresses (both IPv4 and IPv6).
+ If [param bind_address] is set to [code]"0.0.0.0"[/code] (for IPv4) or [code]"::"[/code] (for IPv6), the peer will be bound to all available addresses matching that IP type.
+ If [param bind_address] is set to any valid address (e.g. [code]"192.168.1.101"[/code], [code]"::1"[/code], etc), the peer will only be bound to the interface with that addresses (or fail if no interface with the given address exists).
</description>
</method>
<method name="close">
@@ -33,8 +33,8 @@
<param index="0" name="host" type="String" />
<param index="1" name="port" type="int" />
<description>
- Calling this method connects this UDP peer to the given [code]host[/code]/[code]port[/code] pair. UDP is in reality connectionless, so this option only means that incoming packets from different addresses are automatically discarded, and that outgoing packets are always sent to the connected address (future calls to [method set_dest_address] are not allowed). This method does not send any data to the remote peer, to do that, use [method PacketPeer.put_var] or [method PacketPeer.put_packet] as usual. See also [UDPServer].
- [b]Note:[/b] Connecting to the remote peer does not help to protect from malicious attacks like IP spoofing, etc. Think about using an encryption technique like SSL or DTLS if you feel like your application is transferring sensitive information.
+ Calling this method connects this UDP peer to the given [param host]/[param port] pair. UDP is in reality connectionless, so this option only means that incoming packets from different addresses are automatically discarded, and that outgoing packets are always sent to the connected address (future calls to [method set_dest_address] are not allowed). This method does not send any data to the remote peer, to do that, use [method PacketPeer.put_var] or [method PacketPeer.put_packet] as usual. See also [UDPServer].
+ [b]Note:[/b] Connecting to the remote peer does not help to protect from malicious attacks like IP spoofing, etc. Think about using an encryption technique like TLS or DTLS if you feel like your application is transferring sensitive information.
</description>
</method>
<method name="get_local_port" qualifiers="const">
@@ -72,7 +72,7 @@
<param index="0" name="multicast_address" type="String" />
<param index="1" name="interface_name" type="String" />
<description>
- Joins the multicast group specified by [code]multicast_address[/code] using the interface identified by [code]interface_name[/code].
+ Joins the multicast group specified by [param multicast_address] using the interface identified by [param interface_name].
You can join the same multicast group with multiple interfaces. Use [method IP.get_local_interfaces] to know which are available.
[b]Note:[/b] Some Android devices might require the [code]CHANGE_WIFI_MULTICAST_STATE[/code] permission for multicast to work.
</description>
@@ -82,7 +82,7 @@
<param index="0" name="multicast_address" type="String" />
<param index="1" name="interface_name" type="String" />
<description>
- Removes the interface identified by [code]interface_name[/code] from the multicast group specified by [code]multicast_address[/code].
+ Removes the interface identified by [param interface_name] from the multicast group specified by [param multicast_address].
</description>
</method>
<method name="set_broadcast_enabled">
diff --git a/doc/classes/Panel.xml b/doc/classes/Panel.xml
index da69431276..69c896e806 100644
--- a/doc/classes/Panel.xml
+++ b/doc/classes/Panel.xml
@@ -15,7 +15,5 @@
<theme_item name="panel" data_type="style" type="StyleBox">
The style of this [Panel].
</theme_item>
- <theme_item name="panel_fg" data_type="style" type="StyleBox">
- </theme_item>
</theme_items>
</class>
diff --git a/doc/classes/PanoramaSkyMaterial.xml b/doc/classes/PanoramaSkyMaterial.xml
index 21c7f29585..0c27037f28 100644
--- a/doc/classes/PanoramaSkyMaterial.xml
+++ b/doc/classes/PanoramaSkyMaterial.xml
@@ -4,9 +4,9 @@
A [Material] used with [Sky] to draw a background texture.
</brief_description>
<description>
- A resource referenced in a [Sky] that is used to draw a background. The Panorama sky material functions similar to skyboxes in other engines, except it uses an equirectangular sky map instead of a cube map.
+ A resource referenced in a [Sky] that is used to draw a background. The Panorama sky material functions similar to skyboxes in other engines, except it uses an equirectangular sky map instead of a cubemap.
Using an HDR panorama is strongly recommended for accurate, high-quality reflections. Godot supports the Radiance HDR ([code].hdr[/code]) and OpenEXR ([code].exr[/code]) image formats for this purpose.
- You can use [url=https://danilw.github.io/GLSL-howto/cubemap_to_panorama_js/cubemap_to_panorama.html]this tool[/url] to convert a cube map to an equirectangular sky map.
+ You can use [url=https://danilw.github.io/GLSL-howto/cubemap_to_panorama_js/cubemap_to_panorama.html]this tool[/url] to convert a cubemap to an equirectangular sky map.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/ParallaxLayer.xml b/doc/classes/ParallaxLayer.xml
index 7e7c2d11ec..51a10f732d 100644
--- a/doc/classes/ParallaxLayer.xml
+++ b/doc/classes/ParallaxLayer.xml
@@ -13,6 +13,7 @@
<members>
<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.
+ If the length of the viewport axis is bigger than twice the mirrored axis size, it will not repeat infinitely, as the parallax layer only draws 2 instances of the texture at any one time.
</member>
<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].
diff --git a/doc/classes/ParticlesMaterial.xml b/doc/classes/ParticleProcessMaterial.xml
index fe4caaa10c..d4050e3bd1 100644
--- a/doc/classes/ParticlesMaterial.xml
+++ b/doc/classes/ParticleProcessMaterial.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ParticlesMaterial" inherits="Material" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+<class name="ParticleProcessMaterial" inherits="Material" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Particle properties for [GPUParticles3D] and [GPUParticles2D] nodes.
</brief_description>
<description>
- ParticlesMaterial defines particle properties and behavior. It is used in the [code]process_material[/code] of [GPUParticles3D] and [GPUParticles2D] emitter nodes.
+ ParticleProcessMaterial defines particle properties and behavior. It is used in the [code]process_material[/code] of [GPUParticles3D] and [GPUParticles2D] emitter nodes.
Some of this material's properties are applied to each particle when emitted, while others can have a [CurveTexture] applied to vary values over the lifetime of the particle.
Particle animation is available only in [GPUParticles2D]. To use it, attach a [CanvasItemMaterial], with [member CanvasItemMaterial.particles_animation] enabled, to the particles node.
</description>
@@ -13,35 +13,35 @@
<methods>
<method name="get_param_max" qualifiers="const">
<return type="float" />
- <param index="0" name="param" type="int" enum="ParticlesMaterial.Parameter" />
+ <param index="0" name="param" type="int" enum="ParticleProcessMaterial.Parameter" />
<description>
Returns the maximum value range for the given parameter.
</description>
</method>
<method name="get_param_min" qualifiers="const">
<return type="float" />
- <param index="0" name="param" type="int" enum="ParticlesMaterial.Parameter" />
+ <param index="0" name="param" type="int" enum="ParticleProcessMaterial.Parameter" />
<description>
Returns the minimum value range for the given parameter.
</description>
</method>
<method name="get_param_texture" qualifiers="const">
<return type="Texture2D" />
- <param index="0" name="param" type="int" enum="ParticlesMaterial.Parameter" />
+ <param index="0" name="param" type="int" enum="ParticleProcessMaterial.Parameter" />
<description>
Returns the [Texture2D] used by the specified parameter.
</description>
</method>
<method name="get_particle_flag" qualifiers="const">
<return type="bool" />
- <param index="0" name="particle_flag" type="int" enum="ParticlesMaterial.ParticleFlags" />
+ <param index="0" name="particle_flag" type="int" enum="ParticleProcessMaterial.ParticleFlags" />
<description>
Returns [code]true[/code] if the specified particle flag is enabled. See [enum ParticleFlags] for options.
</description>
</method>
<method name="set_param_max">
<return type="void" />
- <param index="0" name="param" type="int" enum="ParticlesMaterial.Parameter" />
+ <param index="0" name="param" type="int" enum="ParticleProcessMaterial.Parameter" />
<param index="1" name="value" type="float" />
<description>
Sets the maximum value range for the given parameter.
@@ -49,7 +49,7 @@
</method>
<method name="set_param_min">
<return type="void" />
- <param index="0" name="param" type="int" enum="ParticlesMaterial.Parameter" />
+ <param index="0" name="param" type="int" enum="ParticleProcessMaterial.Parameter" />
<param index="1" name="value" type="float" />
<description>
Sets the minimum value range for the given parameter.
@@ -57,7 +57,7 @@
</method>
<method name="set_param_texture">
<return type="void" />
- <param index="0" name="param" type="int" enum="ParticlesMaterial.Parameter" />
+ <param index="0" name="param" type="int" enum="ParticleProcessMaterial.Parameter" />
<param index="1" name="texture" type="Texture2D" />
<description>
Sets the [Texture2D] for the specified [enum Parameter].
@@ -65,7 +65,7 @@
</method>
<method name="set_particle_flag">
<return type="void" />
- <param index="0" name="particle_flag" type="int" enum="ParticlesMaterial.ParticleFlags" />
+ <param index="0" name="particle_flag" type="int" enum="ParticleProcessMaterial.ParticleFlags" />
<param index="1" name="enable" type="bool" />
<description>
If [code]true[/code], enables the specified particle flag. See [enum ParticleFlags] for options.
@@ -115,26 +115,30 @@
<member name="attractor_interaction_enabled" type="bool" setter="set_attractor_interaction_enabled" getter="is_attractor_interaction_enabled" default="true">
True if the interaction with particle attractors is enabled.
</member>
- <member name="collision_bounce" type="float" setter="set_collision_bounce" getter="get_collision_bounce" default="0.0">
- Collision bounciness.
+ <member name="collision_bounce" type="float" setter="set_collision_bounce" getter="get_collision_bounce">
+ The particles' bounciness. Values range from [code]0[/code] (no bounce) to [code]1[/code] (full bounciness). Only effective if [member collision_mode] is [constant COLLISION_RIGID].
</member>
- <member name="collision_enabled" type="bool" setter="set_collision_enabled" getter="is_collision_enabled" default="false">
- True if collisions are enabled for this particle system.
+ <member name="collision_friction" type="float" setter="set_collision_friction" getter="get_collision_friction">
+ The particles' friction. Values range from [code]0[/code] (frictionless) to [code]1[/code] (maximum friction). Only effective if [member collision_mode] is [constant COLLISION_RIGID].
</member>
- <member name="collision_friction" type="float" setter="set_collision_friction" getter="get_collision_friction" default="0.0">
- Collision friction.
+ <member name="collision_mode" type="int" setter="set_collision_mode" getter="get_collision_mode" enum="ParticleProcessMaterial.CollisionMode" default="0">
+ The particles' collision mode.
+ [b]Note:[/b] Particles can only collide with [GPUParticlesCollision3D] nodes, not [PhysicsBody3D] nodes. To make particles collide with various objects, you can add [GPUParticlesCollision3D] nodes as children of [PhysicsBody3D] nodes.
</member>
<member name="collision_use_scale" type="bool" setter="set_collision_use_scale" getter="is_collision_using_scale" default="false">
Should collision take scale into account.
</member>
<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].
+ Each particle's initial color. If the [GPUParticles2D]'s [code]texture[/code] is defined, it will be multiplied by this color.
+ [b]Note:[/b] [member color] multiplies the particle mesh's vertex colors. To have a visible effect on a [BaseMaterial3D], [member BaseMaterial3D.vertex_color_use_as_albedo] [i]must[/i] be [code]true[/code]. For a [ShaderMaterial], [code]ALBEDO *= COLOR.rgb;[/code] must be inserted in the shader's [code]fragment()[/code] function. Otherwise, [member color] will have no visible effect.
</member>
<member name="color_initial_ramp" type="Texture2D" setter="set_color_initial_ramp" getter="get_color_initial_ramp">
Each particle's initial color will vary along this [GradientTexture1D] (multiplied with [member color]).
+ [b]Note:[/b] [member color_initial_ramp] multiplies the particle mesh's vertex colors. To have a visible effect on a [BaseMaterial3D], [member BaseMaterial3D.vertex_color_use_as_albedo] [i]must[/i] be [code]true[/code]. For a [ShaderMaterial], [code]ALBEDO *= COLOR.rgb;[/code] must be inserted in the shader's [code]fragment()[/code] function. Otherwise, [member color_initial_ramp] will have no visible effect.
</member>
<member name="color_ramp" type="Texture2D" setter="set_color_ramp" getter="get_color_ramp">
Each particle's color will vary along this [GradientTexture1D] over its lifetime (multiplied with [member color]).
+ [b]Note:[/b] [member color_ramp] multiplies the particle mesh's vertex colors. To have a visible effect on a [BaseMaterial3D], [member BaseMaterial3D.vertex_color_use_as_albedo] [i]must[/i] be [code]true[/code]. For a [ShaderMaterial], [code]ALBEDO *= COLOR.rgb;[/code] must be inserted in the shader's [code]fragment()[/code] function. Otherwise, [member color_ramp] will have no visible effect.
</member>
<member name="damping_curve" type="Texture2D" setter="set_param_texture" getter="get_param_texture">
Damping will vary along this [CurveTexture].
@@ -153,6 +157,7 @@
</member>
<member name="emission_color_texture" type="Texture2D" setter="set_emission_color_texture" getter="get_emission_color_texture">
Particle color will be modulated by color determined by sampling this texture at the same point as the [member emission_point_texture].
+ [b]Note:[/b] [member emission_color_texture] multiplies the particle mesh's vertex colors. To have a visible effect on a [BaseMaterial3D], [member BaseMaterial3D.vertex_color_use_as_albedo] [i]must[/i] be [code]true[/code]. For a [ShaderMaterial], [code]ALBEDO *= COLOR.rgb;[/code] must be inserted in the shader's [code]fragment()[/code] function. Otherwise, [member emission_color_texture] will have no visible effect.
</member>
<member name="emission_normal_texture" type="Texture2D" setter="set_emission_normal_texture" getter="get_emission_normal_texture">
Particle velocity and rotation will be set by sampling this texture at the same point as the [member emission_point_texture]. Used only in [constant EMISSION_SHAPE_DIRECTED_POINTS]. Can be created automatically from mesh or node by selecting "Create Emission Points from Mesh/Node" under the "Particles" tool in the toolbar.
@@ -175,7 +180,7 @@
<member name="emission_ring_radius" type="float" setter="set_emission_ring_radius" getter="get_emission_ring_radius">
The radius of the ring when using the emitter [constant EMISSION_SHAPE_RING].
</member>
- <member name="emission_shape" type="int" setter="set_emission_shape" getter="get_emission_shape" enum="ParticlesMaterial.EmissionShape" default="0">
+ <member name="emission_shape" type="int" setter="set_emission_shape" getter="get_emission_shape" enum="ParticleProcessMaterial.EmissionShape" default="0">
Particles will be emitted inside this region. Use [enum EmissionShape] constants for values.
</member>
<member name="emission_sphere_radius" type="float" setter="set_emission_sphere_radius" getter="get_emission_sphere_radius">
@@ -212,7 +217,7 @@
Maximum linear acceleration applied to each particle in the direction of motion.
</member>
<member name="linear_accel_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0">
- Minimum equivalent of [member linear_accel_min].
+ Minimum equivalent of [member linear_accel_max].
</member>
<member name="orbit_velocity_curve" type="Texture2D" setter="set_param_texture" getter="get_param_texture">
Each particle's orbital velocity will vary along this [CurveTexture].
@@ -254,13 +259,17 @@
<member name="spread" type="float" setter="set_spread" getter="get_spread" default="45.0">
Each particle's initial direction range from [code]+spread[/code] to [code]-spread[/code] degrees.
</member>
+ <member name="sub_emitter_amount_at_collision" type="int" setter="set_sub_emitter_amount_at_collision" getter="get_sub_emitter_amount_at_collision">
+ Sub particle amount on collision.
+ Maximum amount set in the sub particles emitter.
+ </member>
<member name="sub_emitter_amount_at_end" type="int" setter="set_sub_emitter_amount_at_end" getter="get_sub_emitter_amount_at_end">
</member>
<member name="sub_emitter_frequency" type="float" setter="set_sub_emitter_frequency" getter="get_sub_emitter_frequency">
</member>
<member name="sub_emitter_keep_velocity" type="bool" setter="set_sub_emitter_keep_velocity" getter="get_sub_emitter_keep_velocity" default="false">
</member>
- <member name="sub_emitter_mode" type="int" setter="set_sub_emitter_mode" getter="get_sub_emitter_mode" enum="ParticlesMaterial.SubEmitterMode" default="0">
+ <member name="sub_emitter_mode" type="int" setter="set_sub_emitter_mode" getter="get_sub_emitter_mode" enum="ParticleProcessMaterial.SubEmitterMode" default="0">
</member>
<member name="tangential_accel_curve" type="Texture2D" setter="set_param_texture" getter="get_param_texture">
Each particle's tangential acceleration will vary along this [CurveTexture].
@@ -404,5 +413,17 @@
<constant name="SUB_EMITTER_MAX" value="4" enum="SubEmitterMode">
Represents the size of the [enum SubEmitterMode] enum.
</constant>
+ <constant name="COLLISION_DISABLED" value="0" enum="CollisionMode">
+ No collision for particles. Particles will go through [GPUParticlesCollision3D] nodes.
+ </constant>
+ <constant name="COLLISION_RIGID" value="1" enum="CollisionMode">
+ [RigidBody3D]-style collision for particles using [GPUParticlesCollision3D] nodes.
+ </constant>
+ <constant name="COLLISION_HIDE_ON_CONTACT" value="2" enum="CollisionMode">
+ Hide particles instantly when colliding with a [GPUParticlesCollision3D] node. This can be combined with a subemitter that uses the [constant COLLISION_RIGID] collision mode to "replace" the parent particle with the subemitter on impact.
+ </constant>
+ <constant name="COLLISION_MAX" value="3" enum="CollisionMode">
+ Represents the size of the [enum CollisionMode] enum.
+ </constant>
</constants>
</class>
diff --git a/doc/classes/PathFollow2D.xml b/doc/classes/PathFollow2D.xml
index ae4a4b2886..09d6872e10 100644
--- a/doc/classes/PathFollow2D.xml
+++ b/doc/classes/PathFollow2D.xml
@@ -5,7 +5,7 @@
</brief_description>
<description>
This node takes its parent [Path2D], and returns the coordinates of a point within it, given a distance from the first vertex.
- It is useful for making other nodes follow a path, without coding the movement pattern. For that, the nodes must be children of this node. The descendant nodes will then move accordingly when setting an offset in this node.
+ It is useful for making other nodes follow a path, without coding the movement pattern. For that, the nodes must be children of this node. The descendant nodes will then move accordingly when setting the [member progress] in this node.
</description>
<tutorials>
</tutorials>
@@ -24,15 +24,15 @@
<member name="loop" type="bool" setter="set_loop" getter="has_loop" default="true">
If [code]true[/code], any offset outside the path's length will wrap around, instead of stopping at the ends. Use it for cyclic paths.
</member>
- <member name="offset" type="float" setter="set_offset" getter="get_offset" default="0.0">
- The distance along the path in pixels.
+ <member name="progress" type="float" setter="set_progress" getter="get_progress" default="0.0">
+ The distance along the path, in pixels. Changing this value sets this node's position to a point within the path.
+ </member>
+ <member name="progress_ratio" type="float" setter="set_progress_ratio" getter="get_progress_ratio" default="0.0">
+ The distance along the path as a number in the range 0.0 (for the first vertex) to 1.0 (for the last). This is just another way of expressing the progress within the path, as the offset supplied is multiplied internally by the path's length.
</member>
<member name="rotates" type="bool" setter="set_rotates" getter="is_rotating" default="true">
If [code]true[/code], this node rotates to follow the path, with the +X direction facing forward on the path.
</member>
- <member name="unit_offset" type="float" setter="set_unit_offset" getter="get_unit_offset" default="0.0">
- The distance along the path as a number in the range 0.0 (for the first vertex) to 1.0 (for the last). This is just another way of expressing the offset within the path, as the offset supplied is multiplied internally by the path's length.
- </member>
<member name="v_offset" type="float" setter="set_v_offset" getter="get_v_offset" default="0.0">
The node's offset perpendicular to the curve.
</member>
diff --git a/doc/classes/PathFollow3D.xml b/doc/classes/PathFollow3D.xml
index f9fab07be5..fa7580b7b6 100644
--- a/doc/classes/PathFollow3D.xml
+++ b/doc/classes/PathFollow3D.xml
@@ -5,10 +5,20 @@
</brief_description>
<description>
This node takes its parent [Path3D], and returns the coordinates of a point within it, given a distance from the first vertex.
- It is useful for making other nodes follow a path, without coding the movement pattern. For that, the nodes must be children of this node. The descendant nodes will then move accordingly when setting an offset in this node.
+ It is useful for making other nodes follow a path, without coding the movement pattern. For that, the nodes must be children of this node. The descendant nodes will then move accordingly when setting the [member progress] in this node.
</description>
<tutorials>
</tutorials>
+ <methods>
+ <method name="correct_posture" qualifiers="static">
+ <return type="Transform3D" />
+ <param index="0" name="transform" type="Transform3D" />
+ <param index="1" name="rotation_mode" type="int" enum="PathFollow3D.RotationMode" />
+ <description>
+ Correct the [code]transform[/code]. [code]rotation_mode[/code] implicitly specifies how posture (forward, up and sideway direction) is caculated.
+ </description>
+ </method>
+ </methods>
<members>
<member name="cubic_interp" type="bool" setter="set_cubic_interpolation" getter="get_cubic_interpolation" default="true">
If [code]true[/code], the position between two cached points is interpolated cubically, and linearly otherwise.
@@ -21,14 +31,17 @@
<member name="loop" type="bool" setter="set_loop" getter="has_loop" default="true">
If [code]true[/code], any offset outside the path's length will wrap around, instead of stopping at the ends. Use it for cyclic paths.
</member>
- <member name="offset" type="float" setter="set_offset" getter="get_offset" default="0.0">
- The distance from the first vertex, measured in 3D units along the path. This sets this node's position to a point within the path.
+ <member name="progress" type="float" setter="set_progress" getter="get_progress" default="0.0">
+ The distance from the first vertex, measured in 3D units along the path. Changing this value sets this node's position to a point within the path.
+ </member>
+ <member name="progress_ratio" type="float" setter="set_progress_ratio" getter="get_progress_ratio" default="0.0">
+ The distance from the first vertex, considering 0.0 as the first vertex and 1.0 as the last. This is just another way of expressing the progress within the path, as the progress supplied is multiplied internally by the path's length.
</member>
<member name="rotation_mode" type="int" setter="set_rotation_mode" getter="get_rotation_mode" enum="PathFollow3D.RotationMode" default="3">
Allows or forbids rotation on one or more axes, depending on the [enum RotationMode] constants being used.
</member>
- <member name="unit_offset" type="float" setter="set_unit_offset" getter="get_unit_offset" default="0.0">
- The distance from the first vertex, considering 0.0 as the first vertex and 1.0 as the last. This is just another way of expressing the offset within the path, as the offset supplied is multiplied internally by the path's length.
+ <member name="tilt_enabled" type="bool" setter="set_tilt_enabled" getter="is_tilt_enabled" default="true">
+ If [code]true[/code], the tilt property of [Curve3D] takes effect.
</member>
<member name="v_offset" type="float" setter="set_v_offset" getter="get_v_offset" default="0.0">
The node's offset perpendicular to the curve.
diff --git a/doc/classes/Performance.xml b/doc/classes/Performance.xml
index f61c051a52..381fa3e9ef 100644
--- a/doc/classes/Performance.xml
+++ b/doc/classes/Performance.xml
@@ -19,7 +19,7 @@
<param index="1" name="callable" type="Callable" />
<param index="2" name="arguments" type="Array" default="[]" />
<description>
- Adds a custom monitor with the name [code]id[/code]. You can specify the category of the monitor using slash delimiters in [code]id[/code] (for example: [code]"Game/NumberOfNPCs"[/code]). If there is more than one slash delimiter, then the default category is used. The default category is [code]"Custom"[/code]. Prints an error if given [code]id[/code] is already present.
+ Adds a custom monitor with the name [param id]. You can specify the category of the monitor using slash delimiters in [param id] (for example: [code]"Game/NumberOfNPCs"[/code]). If there is more than one slash delimiter, then the default category is used. The default category is [code]"Custom"[/code]. Prints an error if given [param id] is already present.
[codeblocks]
[gdscript]
func _ready():
@@ -75,11 +75,11 @@
<return type="Variant" />
<param index="0" name="id" type="StringName" />
<description>
- Returns the value of custom monitor with given [code]id[/code]. The callable is called to get the value of custom monitor. See also [method has_custom_monitor]. Prints an error if the given [code]id[/code] is absent.
+ Returns the value of custom monitor with given [param id]. The callable is called to get the value of custom monitor. See also [method has_custom_monitor]. Prints an error if the given [param id] is absent.
</description>
</method>
<method name="get_custom_monitor_names">
- <return type="Array" />
+ <return type="StringName[]" />
<description>
Returns the names of active custom monitors in an [Array].
</description>
@@ -110,14 +110,14 @@
<return type="bool" />
<param index="0" name="id" type="StringName" />
<description>
- Returns [code]true[/code] if custom monitor with the given [code]id[/code] is present, [code]false[/code] otherwise.
+ Returns [code]true[/code] if custom monitor with the given [param id] is present, [code]false[/code] otherwise.
</description>
</method>
<method name="remove_custom_monitor">
<return type="void" />
<param index="0" name="id" type="StringName" />
<description>
- Removes the custom monitor with given [code]id[/code]. Prints an error if the given [code]id[/code] is already absent.
+ Removes the custom monitor with given [param id]. Prints an error if the given [param id] is already absent.
</description>
</method>
</methods>
@@ -171,7 +171,7 @@
The amount of render buffer memory used (in bytes). [i]Lower is better.[/i]
</constant>
<constant name="PHYSICS_2D_ACTIVE_OBJECTS" value="16" enum="Monitor">
- Number of active [RigidDynamicBody2D] nodes in the game. [i]Lower is better.[/i]
+ Number of active [RigidBody2D] nodes in the game. [i]Lower is better.[/i]
</constant>
<constant name="PHYSICS_2D_COLLISION_PAIRS" value="17" enum="Monitor">
Number of collision pairs in the 2D physics engine. [i]Lower is better.[/i]
@@ -180,7 +180,7 @@
Number of islands in the 2D physics engine. [i]Lower is better.[/i]
</constant>
<constant name="PHYSICS_3D_ACTIVE_OBJECTS" value="19" enum="Monitor">
- Number of active [RigidDynamicBody3D] and [VehicleBody3D] nodes in the game. [i]Lower is better.[/i]
+ Number of active [RigidBody3D] and [VehicleBody3D] nodes in the game. [i]Lower is better.[/i]
</constant>
<constant name="PHYSICS_3D_COLLISION_PAIRS" value="20" enum="Monitor">
Number of collision pairs in the 3D physics engine. [i]Lower is better.[/i]
diff --git a/doc/classes/PhysicalBone2D.xml b/doc/classes/PhysicalBone2D.xml
index 738568ed03..26fce1a90b 100644
--- a/doc/classes/PhysicalBone2D.xml
+++ b/doc/classes/PhysicalBone2D.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PhysicalBone2D" inherits="RigidDynamicBody2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+<class name="PhysicalBone2D" inherits="RigidBody2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<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 [RigidDynamicBody2D]-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.
+ 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>
diff --git a/doc/classes/PhysicalSkyMaterial.xml b/doc/classes/PhysicalSkyMaterial.xml
index 7c2ea088c8..9d303d80e5 100644
--- a/doc/classes/PhysicalSkyMaterial.xml
+++ b/doc/classes/PhysicalSkyMaterial.xml
@@ -11,8 +11,7 @@
<tutorials>
</tutorials>
<members>
- <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 name="energy_multiplier" type="float" setter="set_energy_multiplier" getter="get_energy_multiplier" default="1.0">
</member>
<member name="ground_color" type="Color" setter="set_ground_color" getter="get_ground_color" default="Color(0.1, 0.07, 0.034, 1)">
Modulates the [Color] on the bottom half of the sky to represent the ground.
diff --git a/doc/classes/PhysicsBody2D.xml b/doc/classes/PhysicsBody2D.xml
index b9bffafdef..30fa54d669 100644
--- a/doc/classes/PhysicsBody2D.xml
+++ b/doc/classes/PhysicsBody2D.xml
@@ -25,14 +25,16 @@
</method>
<method name="move_and_collide">
<return type="KinematicCollision2D" />
- <param index="0" name="distance" type="Vector2" />
+ <param index="0" name="motion" type="Vector2" />
<param index="1" name="test_only" type="bool" default="false" />
<param index="2" name="safe_margin" type="float" default="0.08" />
+ <param index="3" name="recovery_as_collision" type="bool" default="false" />
<description>
- Moves the body along the vector [code]distance[/code]. In order to be frame rate independent in [method Node._physics_process] or [method Node._process], [code]distance[/code] should be computed using [code]delta[/code].
+ Moves the body along the vector [param motion]. In order to be frame rate independent in [method Node._physics_process] or [method Node._process], [param motion] should be computed using [code]delta[/code].
Returns a [KinematicCollision2D], which contains information about the collision when stopped, or when touching another body along the motion.
- 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).
+ If [param test_only] is [code]true[/code], the body does not move but the would-be collision information is given.
+ [param safe_margin] is the extra margin used for collision recovery (see [member CharacterBody2D.safe_margin] for more details).
+ If [param recovery_as_collision] is [code]true[/code], any depenetration from the recovery phase is also reported as a collision; this is used e.g. by [CharacterBody2D] for improving floor detection during floor snapping.
</description>
</method>
<method name="remove_collision_exception_with">
@@ -45,14 +47,16 @@
<method name="test_move">
<return type="bool" />
<param index="0" name="from" type="Transform2D" />
- <param index="1" name="distance" type="Vector2" />
+ <param index="1" name="motion" type="Vector2" />
<param index="2" name="collision" type="KinematicCollision2D" default="null" />
<param index="3" name="safe_margin" type="float" default="0.08" />
+ <param index="4" name="recovery_as_collision" type="bool" default="false" />
<description>
- Checks for collisions without moving the body. In order to be frame rate independent in [method Node._physics_process] or [method Node._process], [code]distance[/code] should be computed using [code]delta[/code].
- 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]distance[/code]. Returns [code]true[/code] if a collision would stop the body from moving along the whole path.
- [code]collision[/code] is an optional object of type [KinematicCollision2D], which contains additional information about the collision when stopped, or when touching another body along the motion.
- [code]safe_margin[/code] is the extra margin used for collision recovery (see [member CharacterBody2D.collision/safe_margin] for more details).
+ Checks for collisions without moving the body. In order to be frame rate independent in [method Node._physics_process] or [method Node._process], [param motion] should be computed using [code]delta[/code].
+ Virtually sets the node's position, scale and rotation to that of the given [Transform2D], then tries to move the body along the vector [param motion]. Returns [code]true[/code] if a collision would stop the body from moving along the whole path.
+ [param collision] is an optional object of type [KinematicCollision2D], which contains additional information about the collision when stopped, or when touching another body along the motion.
+ [param safe_margin] is the extra margin used for collision recovery (see [member CharacterBody2D.safe_margin] for more details).
+ If [param recovery_as_collision] is [code]true[/code], any depenetration from the recovery phase is also reported as a collision; this is useful for checking whether the body would [i]touch[/i] any other bodies.
</description>
</method>
</methods>
diff --git a/doc/classes/PhysicsBody3D.xml b/doc/classes/PhysicsBody3D.xml
index 4a641e5040..2ef54683f2 100644
--- a/doc/classes/PhysicsBody3D.xml
+++ b/doc/classes/PhysicsBody3D.xml
@@ -21,7 +21,7 @@
<return type="bool" />
<param index="0" name="axis" type="int" enum="PhysicsServer3D.BodyAxis" />
<description>
- Returns [code]true[/code] if the specified linear or rotational [code]axis[/code] is locked.
+ Returns [code]true[/code] if the specified linear or rotational [param axis] is locked.
</description>
</method>
<method name="get_collision_exceptions">
@@ -32,16 +32,18 @@
</method>
<method name="move_and_collide">
<return type="KinematicCollision3D" />
- <param index="0" name="distance" type="Vector3" />
+ <param index="0" name="motion" type="Vector3" />
<param index="1" name="test_only" type="bool" default="false" />
<param index="2" name="safe_margin" type="float" default="0.001" />
- <param index="3" name="max_collisions" type="int" default="1" />
+ <param index="3" name="recovery_as_collision" type="bool" default="false" />
+ <param index="4" name="max_collisions" type="int" default="1" />
<description>
- Moves the body along the vector [code]distance[/code]. In order to be frame rate independent in [method Node._physics_process] or [method Node._process], [code]distance[/code] should be computed using [code]delta[/code].
+ Moves the body along the vector [param motion]. In order to be frame rate independent in [method Node._physics_process] or [method Node._process], [param motion] should be computed using [code]delta[/code].
The body will stop if it collides. Returns a [KinematicCollision3D], which contains information about the collision when stopped, or when touching another body along the motion.
- 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).
- [code]max_collisions[/code] allows to retrieve more than one collision result.
+ If [param test_only] is [code]true[/code], the body does not move but the would-be collision information is given.
+ [param safe_margin] is the extra margin used for collision recovery (see [member CharacterBody3D.safe_margin] for more details).
+ If [param recovery_as_collision] is [code]true[/code], any depenetration from the recovery phase is also reported as a collision; this is used e.g. by [CharacterBody3D] for improving floor detection during floor snapping.
+ [param max_collisions] allows to retrieve more than one collision result.
</description>
</method>
<method name="remove_collision_exception_with">
@@ -56,22 +58,24 @@
<param index="0" name="axis" type="int" enum="PhysicsServer3D.BodyAxis" />
<param index="1" name="lock" type="bool" />
<description>
- Locks or unlocks the specified linear or rotational [code]axis[/code] depending on the value of [code]lock[/code].
+ Locks or unlocks the specified linear or rotational [param axis] depending on the value of [param lock].
</description>
</method>
<method name="test_move">
<return type="bool" />
<param index="0" name="from" type="Transform3D" />
- <param index="1" name="distance" type="Vector3" />
+ <param index="1" name="motion" type="Vector3" />
<param index="2" name="collision" type="KinematicCollision3D" default="null" />
<param index="3" name="safe_margin" type="float" default="0.001" />
- <param index="4" name="max_collisions" type="int" default="1" />
+ <param index="4" name="recovery_as_collision" type="bool" default="false" />
+ <param index="5" name="max_collisions" type="int" default="1" />
<description>
- Checks for collisions without moving the body. In order to be frame rate independent in [method Node._physics_process] or [method Node._process], [code]distance[/code] should be computed using [code]delta[/code].
- 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]distance[/code]. Returns [code]true[/code] if a collision would stop the body from moving along the whole path.
- [code]collision[/code] is an optional object of type [KinematicCollision3D], which contains additional information about the collision when stopped, or when touching another body along the motion.
- [code]safe_margin[/code] is the extra margin used for collision recovery (see [member CharacterBody3D.collision/safe_margin] for more details).
- [code]max_collisions[/code] allows to retrieve more than one collision result.
+ Checks for collisions without moving the body. In order to be frame rate independent in [method Node._physics_process] or [method Node._process], [param motion] should be computed using [code]delta[/code].
+ Virtually sets the node's position, scale and rotation to that of the given [Transform3D], then tries to move the body along the vector [param motion]. Returns [code]true[/code] if a collision would stop the body from moving along the whole path.
+ [param collision] is an optional object of type [KinematicCollision3D], which contains additional information about the collision when stopped, or when touching another body along the motion.
+ [param safe_margin] is the extra margin used for collision recovery (see [member CharacterBody3D.safe_margin] for more details).
+ If [param recovery_as_collision] is [code]true[/code], any depenetration from the recovery phase is also reported as a collision; this is useful for checking whether the body would [i]touch[/i] any other bodies.
+ [param max_collisions] allows to retrieve more than one collision result.
</description>
</method>
</methods>
diff --git a/doc/classes/PhysicsDirectBodyState2D.xml b/doc/classes/PhysicsDirectBodyState2D.xml
index 56367fbf0c..eca6a1cbc7 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 dynamic bodies, and is intended for changing the direct state of that body. See [method RigidDynamicBody2D._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 rigid bodies, and is intended for changing the direct state of that body. See [method RigidBody2D._integrate_forces].
</description>
<tutorials>
<link title="Physics introduction">$DOCS_URL/tutorials/physics/physics_introduction.html</link>
@@ -25,7 +25,7 @@
<param index="1" name="position" type="Vector2" default="Vector2(0, 0)" />
<description>
Adds a constant positioned force to the body that keeps being applied over time until cleared with [code]constant_force = Vector2(0, 0)[/code].
- [code]position[/code] is the offset from the body origin in global coordinates.
+ [param position] is the offset from the body origin in global coordinates.
</description>
</method>
<method name="add_constant_torque">
@@ -58,7 +58,7 @@
<param index="1" name="position" type="Vector2" default="Vector2(0, 0)" />
<description>
Applies a positioned force to the body. A force is time dependent and meant to be applied every physics update.
- [code]position[/code] is the offset from the body origin in global coordinates.
+ [param position] is the offset from the body origin in global coordinates.
</description>
</method>
<method name="apply_impulse">
@@ -68,7 +68,7 @@
<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).
- [code]position[/code] is the offset from the body origin in global coordinates.
+ [param position] is the offset from the body origin in global coordinates.
</description>
</method>
<method name="apply_torque">
@@ -76,6 +76,7 @@
<param index="0" name="torque" type="float" />
<description>
Applies a rotational force without affecting position. A force is time dependent and meant to be applied every physics update.
+ [b]Note:[/b] [member inverse_inertia] is required for this to work. To have [member inverse_inertia], an active [CollisionShape2D] must be a child of the node, or you can manually set [member inverse_inertia].
</description>
</method>
<method name="apply_torque_impulse">
@@ -84,6 +85,7 @@
<description>
Applies a rotational impulse to the body without affecting the position.
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).
+ [b]Note:[/b] [member inverse_inertia] is required for this to work. To have [member inverse_inertia], an active [CollisionShape2D] must be a child of the node, or you can manually set [member inverse_inertia].
</description>
</method>
<method name="get_constant_force" qualifiers="const">
@@ -146,7 +148,7 @@
<return type="int" />
<description>
Returns the number of contacts this body has with other bodies.
- [b]Note:[/b] By default, this returns 0 unless bodies are configured to monitor contacts. See [member RigidDynamicBody2D.contact_monitor].
+ [b]Note:[/b] By default, this returns 0 unless bodies are configured to monitor contacts. See [member RigidBody2D.contact_monitor].
</description>
</method>
<method name="get_contact_local_normal" qualifiers="const">
diff --git a/doc/classes/PhysicsDirectBodyState2DExtension.xml b/doc/classes/PhysicsDirectBodyState2DExtension.xml
new file mode 100644
index 0000000000..8fd34c1243
--- /dev/null
+++ b/doc/classes/PhysicsDirectBodyState2DExtension.xml
@@ -0,0 +1,249 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="PhysicsDirectBodyState2DExtension" inherits="PhysicsDirectBodyState2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="_add_constant_central_force" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="force" type="Vector2" />
+ <description>
+ </description>
+ </method>
+ <method name="_add_constant_force" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="force" type="Vector2" />
+ <param index="1" name="position" type="Vector2" />
+ <description>
+ </description>
+ </method>
+ <method name="_add_constant_torque" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="torque" type="float" />
+ <description>
+ </description>
+ </method>
+ <method name="_apply_central_force" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="force" type="Vector2" />
+ <description>
+ </description>
+ </method>
+ <method name="_apply_central_impulse" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="impulse" type="Vector2" />
+ <description>
+ </description>
+ </method>
+ <method name="_apply_force" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="force" type="Vector2" />
+ <param index="1" name="position" type="Vector2" />
+ <description>
+ </description>
+ </method>
+ <method name="_apply_impulse" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="impulse" type="Vector2" />
+ <param index="1" name="position" type="Vector2" />
+ <description>
+ </description>
+ </method>
+ <method name="_apply_torque" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="torque" type="float" />
+ <description>
+ </description>
+ </method>
+ <method name="_apply_torque_impulse" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="impulse" type="float" />
+ <description>
+ </description>
+ </method>
+ <method name="_get_angular_velocity" qualifiers="virtual const">
+ <return type="float" />
+ <description>
+ </description>
+ </method>
+ <method name="_get_center_of_mass" qualifiers="virtual const">
+ <return type="Vector2" />
+ <description>
+ </description>
+ </method>
+ <method name="_get_center_of_mass_local" qualifiers="virtual const">
+ <return type="Vector2" />
+ <description>
+ </description>
+ </method>
+ <method name="_get_constant_force" qualifiers="virtual const">
+ <return type="Vector2" />
+ <description>
+ </description>
+ </method>
+ <method name="_get_constant_torque" qualifiers="virtual const">
+ <return type="float" />
+ <description>
+ </description>
+ </method>
+ <method name="_get_contact_collider" qualifiers="virtual const">
+ <return type="RID" />
+ <param index="0" name="contact_idx" type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="_get_contact_collider_id" qualifiers="virtual const">
+ <return type="int" />
+ <param index="0" name="contact_idx" type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="_get_contact_collider_object" qualifiers="virtual const">
+ <return type="Object" />
+ <param index="0" name="contact_idx" type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="_get_contact_collider_position" qualifiers="virtual const">
+ <return type="Vector2" />
+ <param index="0" name="contact_idx" type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="_get_contact_collider_shape" qualifiers="virtual const">
+ <return type="int" />
+ <param index="0" name="contact_idx" type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="_get_contact_collider_velocity_at_position" qualifiers="virtual const">
+ <return type="Vector2" />
+ <param index="0" name="contact_idx" type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="_get_contact_count" qualifiers="virtual const">
+ <return type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="_get_contact_local_normal" qualifiers="virtual const">
+ <return type="Vector2" />
+ <param index="0" name="contact_idx" type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="_get_contact_local_position" qualifiers="virtual const">
+ <return type="Vector2" />
+ <param index="0" name="contact_idx" type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="_get_contact_local_shape" qualifiers="virtual const">
+ <return type="int" />
+ <param index="0" name="contact_idx" type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="_get_inverse_inertia" qualifiers="virtual const">
+ <return type="float" />
+ <description>
+ </description>
+ </method>
+ <method name="_get_inverse_mass" qualifiers="virtual const">
+ <return type="float" />
+ <description>
+ </description>
+ </method>
+ <method name="_get_linear_velocity" qualifiers="virtual const">
+ <return type="Vector2" />
+ <description>
+ </description>
+ </method>
+ <method name="_get_space_state" qualifiers="virtual">
+ <return type="PhysicsDirectSpaceState2D" />
+ <description>
+ </description>
+ </method>
+ <method name="_get_step" qualifiers="virtual const">
+ <return type="float" />
+ <description>
+ </description>
+ </method>
+ <method name="_get_total_angular_damp" qualifiers="virtual const">
+ <return type="float" />
+ <description>
+ </description>
+ </method>
+ <method name="_get_total_gravity" qualifiers="virtual const">
+ <return type="Vector2" />
+ <description>
+ </description>
+ </method>
+ <method name="_get_total_linear_damp" qualifiers="virtual const">
+ <return type="float" />
+ <description>
+ </description>
+ </method>
+ <method name="_get_transform" qualifiers="virtual const">
+ <return type="Transform2D" />
+ <description>
+ </description>
+ </method>
+ <method name="_get_velocity_at_local_position" qualifiers="virtual const">
+ <return type="Vector2" />
+ <param index="0" name="local_position" type="Vector2" />
+ <description>
+ </description>
+ </method>
+ <method name="_integrate_forces" qualifiers="virtual">
+ <return type="void" />
+ <description>
+ </description>
+ </method>
+ <method name="_is_sleeping" qualifiers="virtual const">
+ <return type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="_set_angular_velocity" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="velocity" type="float" />
+ <description>
+ </description>
+ </method>
+ <method name="_set_constant_force" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="force" type="Vector2" />
+ <description>
+ </description>
+ </method>
+ <method name="_set_constant_torque" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="torque" type="float" />
+ <description>
+ </description>
+ </method>
+ <method name="_set_linear_velocity" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="velocity" type="Vector2" />
+ <description>
+ </description>
+ </method>
+ <method name="_set_sleep_state" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="enabled" type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="_set_transform" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="transform" type="Transform2D" />
+ <description>
+ </description>
+ </method>
+ </methods>
+</class>
diff --git a/doc/classes/PhysicsDirectBodyState3D.xml b/doc/classes/PhysicsDirectBodyState3D.xml
index b05960b035..a809384642 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 dynamic bodies, and is intended for changing the direct state of that body. See [method RigidDynamicBody3D._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 rigid bodies, and is intended for changing the direct state of that body. See [method RigidBody3D._integrate_forces].
</description>
<tutorials>
<link title="Physics introduction">$DOCS_URL/tutorials/physics/physics_introduction.html</link>
@@ -25,7 +25,7 @@
<param index="1" name="position" type="Vector3" default="Vector3(0, 0, 0)" />
<description>
Adds a constant positioned force to the body that keeps being applied over time until cleared with [code]constant_force = Vector3(0, 0, 0)[/code].
- [code]position[/code] is the offset from the body origin in global coordinates.
+ [param position] is the offset from the body origin in global coordinates.
</description>
</method>
<method name="add_constant_torque">
@@ -58,7 +58,7 @@
<param index="1" name="position" type="Vector3" default="Vector3(0, 0, 0)" />
<description>
Applies a positioned force to the body. A force is time dependent and meant to be applied every physics update.
- [code]position[/code] is the offset from the body origin in global coordinates.
+ [param position] is the offset from the body origin in global coordinates.
</description>
</method>
<method name="apply_impulse">
@@ -68,7 +68,7 @@
<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).
- [code]position[/code] is the offset from the body origin in global coordinates.
+ [param position] is the offset from the body origin in global coordinates.
</description>
</method>
<method name="apply_torque">
@@ -76,6 +76,7 @@
<param index="0" name="torque" type="Vector3" />
<description>
Applies a rotational force without affecting position. A force is time dependent and meant to be applied every physics update.
+ [b]Note:[/b] [member inverse_inertia] is required for this to work. To have [member inverse_inertia], an active [CollisionShape3D] must be a child of the node, or you can manually set [member inverse_inertia].
</description>
</method>
<method name="apply_torque_impulse">
@@ -84,6 +85,7 @@
<description>
Applies a rotational impulse to the body without affecting the position.
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).
+ [b]Note:[/b] [member inverse_inertia] is required for this to work. To have [member inverse_inertia], an active [CollisionShape3D] must be a child of the node, or you can manually set [member inverse_inertia].
</description>
</method>
<method name="get_constant_force" qualifiers="const">
@@ -146,7 +148,7 @@
<return type="int" />
<description>
Returns the number of contacts this body has with other bodies.
- [b]Note:[/b] By default, this returns 0 unless bodies are configured to monitor contacts. See [member RigidDynamicBody3D.contact_monitor].
+ [b]Note:[/b] By default, this returns 0 unless bodies are configured to monitor contacts. See [member RigidBody3D.contact_monitor].
</description>
</method>
<method name="get_contact_impulse" qualifiers="const">
@@ -226,6 +228,9 @@
<member name="inverse_inertia" type="Vector3" setter="" getter="get_inverse_inertia">
The inverse of the inertia of the body.
</member>
+ <member name="inverse_inertia_tensor" type="Basis" setter="" getter="get_inverse_inertia_tensor">
+ The inverse of the inertia tensor of the body.
+ </member>
<member name="inverse_mass" type="float" setter="" getter="get_inverse_mass">
The inverse of the mass of the body.
</member>
diff --git a/doc/classes/PhysicsDirectBodyState3DExtension.xml b/doc/classes/PhysicsDirectBodyState3DExtension.xml
index ade197eadc..4432f89b9d 100644
--- a/doc/classes/PhysicsDirectBodyState3DExtension.xml
+++ b/doc/classes/PhysicsDirectBodyState3DExtension.xml
@@ -159,6 +159,11 @@
<description>
</description>
</method>
+ <method name="_get_inverse_inertia_tensor" qualifiers="virtual const">
+ <return type="Basis" />
+ <description>
+ </description>
+ </method>
<method name="_get_inverse_mass" qualifiers="virtual const">
<return type="float" />
<description>
diff --git a/doc/classes/PhysicsDirectSpaceState2D.xml b/doc/classes/PhysicsDirectSpaceState2D.xml
index e5a9e5dacf..d4cb073d15 100644
--- a/doc/classes/PhysicsDirectSpaceState2D.xml
+++ b/doc/classes/PhysicsDirectSpaceState2D.xml
@@ -12,7 +12,7 @@
</tutorials>
<methods>
<method name="cast_motion">
- <return type="Array" />
+ <return type="PackedFloat32Array" />
<param index="0" name="parameters" type="PhysicsShapeQueryParameters2D" />
<description>
Checks how far a [Shape2D] can move without colliding. All the parameters for the query, including the shape and the motion, are supplied through a [PhysicsShapeQueryParameters2D] object.
@@ -21,7 +21,7 @@
</description>
</method>
<method name="collide_shape">
- <return type="Array" />
+ <return type="PackedVector2Array[]" />
<param index="0" name="parameters" type="PhysicsShapeQueryParameters2D" />
<param index="1" name="max_results" type="int" default="32" />
<description>
@@ -44,7 +44,7 @@
</description>
</method>
<method name="intersect_point">
- <return type="Array" />
+ <return type="Dictionary[]" />
<param index="0" name="parameters" type="PhysicsPointQueryParameters2D" />
<param index="1" name="max_results" type="int" default="32" />
<description>
@@ -53,7 +53,7 @@
[code]collider_id[/code]: The colliding object's ID.
[code]rid[/code]: The intersecting object's [RID].
[code]shape[/code]: The shape index of the colliding shape.
- The number of intersections can be limited with the [code]max_results[/code] parameter, to reduce the processing time.
+ The number of intersections can be limited with the [param max_results] parameter, to reduce the processing time.
[b]Note:[/b] [ConcavePolygonShape2D]s and [CollisionPolygon2D]s in [code]Segments[/code] build mode are not solid shapes. Therefore, they will not be detected.
</description>
</method>
@@ -72,7 +72,7 @@
</description>
</method>
<method name="intersect_shape">
- <return type="Array" />
+ <return type="Dictionary[]" />
<param index="0" name="parameters" type="PhysicsShapeQueryParameters2D" />
<param index="1" name="max_results" type="int" default="32" />
<description>
@@ -81,7 +81,7 @@
[code]collider_id[/code]: The colliding object's ID.
[code]rid[/code]: The intersecting object's [RID].
[code]shape[/code]: The shape index of the colliding shape.
- The number of intersections can be limited with the [code]max_results[/code] parameter, to reduce the processing time.
+ The number of intersections can be limited with the [param max_results] parameter, to reduce the processing time.
</description>
</method>
</methods>
diff --git a/doc/classes/PhysicsDirectSpaceState2DExtension.xml b/doc/classes/PhysicsDirectSpaceState2DExtension.xml
new file mode 100644
index 0000000000..3235793853
--- /dev/null
+++ b/doc/classes/PhysicsDirectSpaceState2DExtension.xml
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="PhysicsDirectSpaceState2DExtension" inherits="PhysicsDirectSpaceState2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="_cast_motion" qualifiers="virtual">
+ <return type="bool" />
+ <param index="0" name="shape_rid" type="RID" />
+ <param index="1" name="transform" type="Transform2D" />
+ <param index="2" name="motion" type="Vector2" />
+ <param index="3" name="margin" type="float" />
+ <param index="4" name="collision_mask" type="int" />
+ <param index="5" name="collide_with_bodies" type="bool" />
+ <param index="6" name="collide_with_areas" type="bool" />
+ <param index="7" name="closest_safe" type="float*" />
+ <param index="8" name="closest_unsafe" type="float*" />
+ <description>
+ </description>
+ </method>
+ <method name="_collide_shape" qualifiers="virtual">
+ <return type="bool" />
+ <param index="0" name="shape_rid" type="RID" />
+ <param index="1" name="transform" type="Transform2D" />
+ <param index="2" name="motion" type="Vector2" />
+ <param index="3" name="margin" type="float" />
+ <param index="4" name="collision_mask" type="int" />
+ <param index="5" name="collide_with_bodies" type="bool" />
+ <param index="6" name="collide_with_areas" type="bool" />
+ <param index="7" name="results" type="void*" />
+ <param index="8" name="max_results" type="int" />
+ <param index="9" name="result_count" type="int32_t*" />
+ <description>
+ </description>
+ </method>
+ <method name="_intersect_point" qualifiers="virtual">
+ <return type="int" />
+ <param index="0" name="position" type="Vector2" />
+ <param index="1" name="canvas_instance_id" type="int" />
+ <param index="2" name="collision_mask" type="int" />
+ <param index="3" name="collide_with_bodies" type="bool" />
+ <param index="4" name="collide_with_areas" type="bool" />
+ <param index="5" name="results" type="PhysicsServer2DExtensionShapeResult*" />
+ <param index="6" name="max_results" type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="_intersect_ray" qualifiers="virtual">
+ <return type="bool" />
+ <param index="0" name="from" type="Vector2" />
+ <param index="1" name="to" type="Vector2" />
+ <param index="2" name="collision_mask" type="int" />
+ <param index="3" name="collide_with_bodies" type="bool" />
+ <param index="4" name="collide_with_areas" type="bool" />
+ <param index="5" name="hit_from_inside" type="bool" />
+ <param index="6" name="result" type="PhysicsServer2DExtensionRayResult*" />
+ <description>
+ </description>
+ </method>
+ <method name="_intersect_shape" qualifiers="virtual">
+ <return type="int" />
+ <param index="0" name="shape_rid" type="RID" />
+ <param index="1" name="transform" type="Transform2D" />
+ <param index="2" name="motion" type="Vector2" />
+ <param index="3" name="margin" type="float" />
+ <param index="4" name="collision_mask" type="int" />
+ <param index="5" name="collide_with_bodies" type="bool" />
+ <param index="6" name="collide_with_areas" type="bool" />
+ <param index="7" name="result" type="PhysicsServer2DExtensionShapeResult*" />
+ <param index="8" name="max_results" type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="_rest_info" qualifiers="virtual">
+ <return type="bool" />
+ <param index="0" name="shape_rid" type="RID" />
+ <param index="1" name="transform" type="Transform2D" />
+ <param index="2" name="motion" type="Vector2" />
+ <param index="3" name="margin" type="float" />
+ <param index="4" name="collision_mask" type="int" />
+ <param index="5" name="collide_with_bodies" type="bool" />
+ <param index="6" name="collide_with_areas" type="bool" />
+ <param index="7" name="rest_info" type="PhysicsServer2DExtensionShapeRestInfo*" />
+ <description>
+ </description>
+ </method>
+ </methods>
+</class>
diff --git a/doc/classes/PhysicsDirectSpaceState3D.xml b/doc/classes/PhysicsDirectSpaceState3D.xml
index 6539edd4fe..cc1cf8a323 100644
--- a/doc/classes/PhysicsDirectSpaceState3D.xml
+++ b/doc/classes/PhysicsDirectSpaceState3D.xml
@@ -12,7 +12,7 @@
</tutorials>
<methods>
<method name="cast_motion">
- <return type="Array" />
+ <return type="PackedFloat32Array" />
<param index="0" name="parameters" type="PhysicsShapeQueryParameters3D" />
<description>
Checks how far a [Shape3D] can move without colliding. All the parameters for the query, including the shape, are supplied through a [PhysicsShapeQueryParameters3D] object.
@@ -21,7 +21,7 @@
</description>
</method>
<method name="collide_shape">
- <return type="Array" />
+ <return type="PackedVector2Array[]" />
<param index="0" name="parameters" type="PhysicsShapeQueryParameters3D" />
<param index="1" name="max_results" type="int" default="32" />
<description>
@@ -46,7 +46,7 @@
</description>
</method>
<method name="intersect_point">
- <return type="Array" />
+ <return type="Dictionary[]" />
<param index="0" name="parameters" type="PhysicsPointQueryParameters3D" />
<param index="1" name="max_results" type="int" default="32" />
<description>
@@ -55,7 +55,7 @@
[code]collider_id[/code]: The colliding object's ID.
[code]rid[/code]: The intersecting object's [RID].
[code]shape[/code]: The shape index of the colliding shape.
- The number of intersections can be limited with the [code]max_results[/code] parameter, to reduce the processing time.
+ The number of intersections can be limited with the [param max_results] parameter, to reduce the processing time.
</description>
</method>
<method name="intersect_ray">
@@ -73,7 +73,7 @@
</description>
</method>
<method name="intersect_shape">
- <return type="Array" />
+ <return type="Dictionary[]" />
<param index="0" name="parameters" type="PhysicsShapeQueryParameters3D" />
<param index="1" name="max_results" type="int" default="32" />
<description>
@@ -82,7 +82,7 @@
[code]collider_id[/code]: The colliding object's ID.
[code]rid[/code]: The intersecting object's [RID].
[code]shape[/code]: The shape index of the colliding shape.
- The number of intersections can be limited with the [code]max_results[/code] parameter, to reduce the processing time.
+ The number of intersections can be limited with the [param max_results] parameter, to reduce the processing time.
[b]Note:[/b] This method does not take into account the [code]motion[/code] property of the object.
</description>
</method>
diff --git a/doc/classes/PhysicsPointQueryParameters2D.xml b/doc/classes/PhysicsPointQueryParameters2D.xml
index c1005f02a3..a6cbe2d574 100644
--- a/doc/classes/PhysicsPointQueryParameters2D.xml
+++ b/doc/classes/PhysicsPointQueryParameters2D.xml
@@ -21,7 +21,7 @@
<member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="4294967295">
The physics layers the query will detect (as a bitmask). By default, all collision layers are detected. See [url=$DOCS_URL/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information.
</member>
- <member name="exclude" type="Array" setter="set_exclude" getter="get_exclude" default="[]">
+ <member name="exclude" type="RID[]" setter="set_exclude" getter="get_exclude" default="[]">
The list of objects or object [RID]s that will be excluded from collisions.
</member>
<member name="position" type="Vector2" setter="set_position" getter="get_position" default="Vector2(0, 0)">
diff --git a/doc/classes/PhysicsRayQueryParameters2D.xml b/doc/classes/PhysicsRayQueryParameters2D.xml
index 5afd3973a0..d6a2662adc 100644
--- a/doc/classes/PhysicsRayQueryParameters2D.xml
+++ b/doc/classes/PhysicsRayQueryParameters2D.xml
@@ -14,7 +14,7 @@
<param index="0" name="from" type="Vector2" />
<param index="1" name="to" type="Vector2" />
<param index="2" name="collision_mask" type="int" default="4294967295" />
- <param index="3" name="exclude" type="Array" default="[]" />
+ <param index="3" name="exclude" type="RID[]" default="[]" />
<description>
Returns a new, pre-configured [PhysicsRayQueryParameters2D] object. Use it to quickly create query parameters using the most common options.
[codeblock]
@@ -34,7 +34,7 @@
<member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="4294967295">
The physics layers the query will detect (as a bitmask). By default, all collision layers are detected. See [url=$DOCS_URL/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information.
</member>
- <member name="exclude" type="Array" setter="set_exclude" getter="get_exclude" default="[]">
+ <member name="exclude" type="RID[]" setter="set_exclude" getter="get_exclude" default="[]">
The list of objects or object [RID]s that will be excluded from collisions.
</member>
<member name="from" type="Vector2" setter="set_from" getter="get_from" default="Vector2(0, 0)">
diff --git a/doc/classes/PhysicsServer2D.xml b/doc/classes/PhysicsServer2D.xml
index 4bb44223b3..18ac8a11df 100644
--- a/doc/classes/PhysicsServer2D.xml
+++ b/doc/classes/PhysicsServer2D.xml
@@ -53,6 +53,20 @@
<description>
</description>
</method>
+ <method name="area_get_collision_layer" qualifiers="const">
+ <return type="int" />
+ <param index="0" name="area" type="RID" />
+ <description>
+ Returns the physics layer or layers an area belongs to.
+ </description>
+ </method>
+ <method name="area_get_collision_mask" qualifiers="const">
+ <return type="int" />
+ <param index="0" name="area" type="RID" />
+ <description>
+ Returns the physics layer or layers an area can contact with.
+ </description>
+ </method>
<method name="area_get_object_instance_id" qualifiers="const">
<return type="int" />
<param index="0" name="area" type="RID" />
@@ -232,7 +246,7 @@
<param index="2" name="position" type="Vector2" default="Vector2(0, 0)" />
<description>
Adds a constant positioned force to the body that keeps being applied over time until cleared with [code]body_set_constant_force(body, Vector2(0, 0))[/code].
- [code]position[/code] is the offset from the body origin in global coordinates.
+ [param position] is the offset from the body origin in global coordinates.
</description>
</method>
<method name="body_add_constant_torque">
@@ -279,7 +293,7 @@
<param index="2" name="position" type="Vector2" default="Vector2(0, 0)" />
<description>
Applies a positioned force to the body. A force is time dependent and meant to be applied every physics update.
- [code]position[/code] is the offset from the body origin in global coordinates.
+ [param position] is the offset from the body origin in global coordinates.
</description>
</method>
<method name="body_apply_impulse">
@@ -290,7 +304,7 @@
<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).
- [code]position[/code] is the offset from the body origin in global coordinates.
+ [param position] is the offset from the body origin in global coordinates.
</description>
</method>
<method name="body_apply_torque">
@@ -358,6 +372,13 @@
Returns the physics layer or layers a body can collide with.
</description>
</method>
+ <method name="body_get_collision_priority" qualifiers="const">
+ <return type="float" />
+ <param index="0" name="body" type="RID" />
+ <description>
+ Returns the body's collision priority.
+ </description>
+ </method>
<method name="body_get_constant_force" qualifiers="const">
<return type="Vector2" />
<param index="0" name="body" type="RID" />
@@ -509,6 +530,14 @@
Sets the physics layer or layers a body can collide with.
</description>
</method>
+ <method name="body_set_collision_priority">
+ <return type="void" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="priority" type="float" />
+ <description>
+ Sets the body's collision priority.
+ </description>
+ </method>
<method name="body_set_constant_force">
<return type="void" />
<param index="0" name="body" type="RID" />
@@ -553,7 +582,7 @@
<param index="0" name="body" type="RID" />
<param index="1" name="amount" type="int" />
<description>
- Sets the maximum contacts to report. Bodies can keep a log of the contacts with other bodies, this is enabled by setting the maximum amount of contacts reported to a number greater than 0.
+ Sets the maximum contacts to report. Bodies can keep a log of the contacts with other bodies. This is enabled by setting the maximum number of contacts reported to a number greater than 0.
</description>
</method>
<method name="body_set_mode">
@@ -597,7 +626,7 @@
<param index="2" name="enable" type="bool" />
<param index="3" name="margin" type="float" />
<description>
- Enables one way collision on body if [code]enable[/code] is [code]true[/code].
+ Enables one way collision on body if [param enable] is [code]true[/code].
</description>
</method>
<method name="body_set_shape_disabled">
@@ -606,7 +635,7 @@
<param index="1" name="shape_idx" type="int" />
<param index="2" name="disabled" type="bool" />
<description>
- Disables shape in body if [code]disable[/code] is [code]true[/code].
+ Disables shape in body if [param disabled] is [code]true[/code].
</description>
</method>
<method name="body_set_shape_transform">
@@ -882,7 +911,7 @@
Constant to set/get the default solver bias for all physics constraints. A solver bias is a factor controlling how much two objects "rebound", after violating a constraint, to avoid leaving them in that state because of numerical imprecision.
</constant>
<constant name="SPACE_PARAM_SOLVER_ITERATIONS" value="8" enum="SpaceParameter">
- Constant to set/get the number of solver iterations for all contacts and constraints. The greater the amount of iterations, the more accurate the collisions will be. However, a greater amount of iterations requires more CPU power, which can decrease performance.
+ Constant to set/get the number of solver iterations for all contacts and constraints. The greater the number of iterations, the more accurate the collisions will be. However, a greater number of iterations requires more CPU power, which can decrease performance.
</constant>
<constant name="SHAPE_WORLD_BOUNDARY" value="0" enum="ShapeType">
This is the constant for creating world boundary shapes. A world boundary shape is an [i]infinite[/i] line with an origin point, and a normal. Thus, it can be used for front/behind checks.
@@ -965,11 +994,11 @@
<constant name="BODY_MODE_KINEMATIC" value="1" enum="BodyMode">
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_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 name="BODY_MODE_RIGID" value="2" enum="BodyMode">
+ Constant for rigid bodies. In this mode, a body can be pushed by other bodies and has forces applied.
</constant>
- <constant name="BODY_MODE_DYNAMIC_LINEAR" value="3" enum="BodyMode">
- Constant for linear dynamic bodies. In this mode, a body is dynamic but can not rotate, and only its linear velocity is affected by external forces.
+ <constant name="BODY_MODE_RIGID_LINEAR" value="3" enum="BodyMode">
+ Constant for linear rigid bodies. In this mode, a body 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.
@@ -1043,6 +1072,8 @@
</constant>
<constant name="JOINT_PARAM_MAX_FORCE" value="2" enum="JointParam">
</constant>
+ <constant name="PIN_JOINT_SOFTNESS" value="0" enum="PinJointParam">
+ </constant>
<constant name="DAMPED_SPRING_REST_LENGTH" value="0" enum="DampedSpringParam">
Sets the resting length of the spring joint. The joint will always try to go to back this length when pulled apart.
</constant>
diff --git a/doc/classes/PhysicsServer2DExtension.xml b/doc/classes/PhysicsServer2DExtension.xml
new file mode 100644
index 0000000000..9bb11e0d89
--- /dev/null
+++ b/doc/classes/PhysicsServer2DExtension.xml
@@ -0,0 +1,937 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="PhysicsServer2DExtension" inherits="PhysicsServer2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="_area_add_shape" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="area" type="RID" />
+ <param index="1" name="shape" type="RID" />
+ <param index="2" name="transform" type="Transform2D" />
+ <param index="3" name="disabled" type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="_area_attach_canvas_instance_id" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="area" type="RID" />
+ <param index="1" name="id" type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="_area_attach_object_instance_id" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="area" type="RID" />
+ <param index="1" name="id" type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="_area_clear_shapes" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="area" type="RID" />
+ <description>
+ </description>
+ </method>
+ <method name="_area_create" qualifiers="virtual">
+ <return type="RID" />
+ <description>
+ </description>
+ </method>
+ <method name="_area_get_canvas_instance_id" qualifiers="virtual const">
+ <return type="int" />
+ <param index="0" name="area" type="RID" />
+ <description>
+ </description>
+ </method>
+ <method name="_area_get_collision_layer" qualifiers="virtual const">
+ <return type="int" />
+ <param index="0" name="area" type="RID" />
+ <description>
+ </description>
+ </method>
+ <method name="_area_get_collision_mask" qualifiers="virtual const">
+ <return type="int" />
+ <param index="0" name="area" type="RID" />
+ <description>
+ </description>
+ </method>
+ <method name="_area_get_object_instance_id" qualifiers="virtual const">
+ <return type="int" />
+ <param index="0" name="area" type="RID" />
+ <description>
+ </description>
+ </method>
+ <method name="_area_get_param" qualifiers="virtual const">
+ <return type="Variant" />
+ <param index="0" name="area" type="RID" />
+ <param index="1" name="param" type="int" enum="PhysicsServer2D.AreaParameter" />
+ <description>
+ </description>
+ </method>
+ <method name="_area_get_shape" qualifiers="virtual const">
+ <return type="RID" />
+ <param index="0" name="area" type="RID" />
+ <param index="1" name="shape_idx" type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="_area_get_shape_count" qualifiers="virtual const">
+ <return type="int" />
+ <param index="0" name="area" type="RID" />
+ <description>
+ </description>
+ </method>
+ <method name="_area_get_shape_transform" qualifiers="virtual const">
+ <return type="Transform2D" />
+ <param index="0" name="area" type="RID" />
+ <param index="1" name="shape_idx" type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="_area_get_space" qualifiers="virtual const">
+ <return type="RID" />
+ <param index="0" name="area" type="RID" />
+ <description>
+ </description>
+ </method>
+ <method name="_area_get_transform" qualifiers="virtual const">
+ <return type="Transform2D" />
+ <param index="0" name="area" type="RID" />
+ <description>
+ </description>
+ </method>
+ <method name="_area_remove_shape" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="area" type="RID" />
+ <param index="1" name="shape_idx" type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="_area_set_area_monitor_callback" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="area" type="RID" />
+ <param index="1" name="callback" type="Callable" />
+ <description>
+ </description>
+ </method>
+ <method name="_area_set_collision_layer" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="area" type="RID" />
+ <param index="1" name="layer" type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="_area_set_collision_mask" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="area" type="RID" />
+ <param index="1" name="mask" type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="_area_set_monitor_callback" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="area" type="RID" />
+ <param index="1" name="callback" type="Callable" />
+ <description>
+ </description>
+ </method>
+ <method name="_area_set_monitorable" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="area" type="RID" />
+ <param index="1" name="monitorable" type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="_area_set_param" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="area" type="RID" />
+ <param index="1" name="param" type="int" enum="PhysicsServer2D.AreaParameter" />
+ <param index="2" name="value" type="Variant" />
+ <description>
+ </description>
+ </method>
+ <method name="_area_set_pickable" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="area" type="RID" />
+ <param index="1" name="pickable" type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="_area_set_shape" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="area" type="RID" />
+ <param index="1" name="shape_idx" type="int" />
+ <param index="2" name="shape" type="RID" />
+ <description>
+ </description>
+ </method>
+ <method name="_area_set_shape_disabled" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="area" type="RID" />
+ <param index="1" name="shape_idx" type="int" />
+ <param index="2" name="disabled" type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="_area_set_shape_transform" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="area" type="RID" />
+ <param index="1" name="shape_idx" type="int" />
+ <param index="2" name="transform" type="Transform2D" />
+ <description>
+ </description>
+ </method>
+ <method name="_area_set_space" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="area" type="RID" />
+ <param index="1" name="space" type="RID" />
+ <description>
+ </description>
+ </method>
+ <method name="_area_set_transform" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="area" type="RID" />
+ <param index="1" name="transform" type="Transform2D" />
+ <description>
+ </description>
+ </method>
+ <method name="_body_add_collision_exception" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="excepted_body" type="RID" />
+ <description>
+ </description>
+ </method>
+ <method name="_body_add_constant_central_force" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="force" type="Vector2" />
+ <description>
+ </description>
+ </method>
+ <method name="_body_add_constant_force" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="force" type="Vector2" />
+ <param index="2" name="position" type="Vector2" />
+ <description>
+ </description>
+ </method>
+ <method name="_body_add_constant_torque" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="torque" type="float" />
+ <description>
+ </description>
+ </method>
+ <method name="_body_add_shape" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="shape" type="RID" />
+ <param index="2" name="transform" type="Transform2D" />
+ <param index="3" name="disabled" type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="_body_apply_central_force" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="force" type="Vector2" />
+ <description>
+ </description>
+ </method>
+ <method name="_body_apply_central_impulse" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="impulse" type="Vector2" />
+ <description>
+ </description>
+ </method>
+ <method name="_body_apply_force" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="force" type="Vector2" />
+ <param index="2" name="position" type="Vector2" />
+ <description>
+ </description>
+ </method>
+ <method name="_body_apply_impulse" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="impulse" type="Vector2" />
+ <param index="2" name="position" type="Vector2" />
+ <description>
+ </description>
+ </method>
+ <method name="_body_apply_torque" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="torque" type="float" />
+ <description>
+ </description>
+ </method>
+ <method name="_body_apply_torque_impulse" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="impulse" type="float" />
+ <description>
+ </description>
+ </method>
+ <method name="_body_attach_canvas_instance_id" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="id" type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="_body_attach_object_instance_id" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="id" type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="_body_clear_shapes" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="body" type="RID" />
+ <description>
+ </description>
+ </method>
+ <method name="_body_collide_shape" qualifiers="virtual">
+ <return type="bool" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="body_shape" type="int" />
+ <param index="2" name="shape" type="RID" />
+ <param index="3" name="shape_xform" type="Transform2D" />
+ <param index="4" name="motion" type="Vector2" />
+ <param index="5" name="results" type="void*" />
+ <param index="6" name="result_max" type="int" />
+ <param index="7" name="result_count" type="int32_t*" />
+ <description>
+ </description>
+ </method>
+ <method name="_body_create" qualifiers="virtual">
+ <return type="RID" />
+ <description>
+ </description>
+ </method>
+ <method name="_body_get_canvas_instance_id" qualifiers="virtual const">
+ <return type="int" />
+ <param index="0" name="body" type="RID" />
+ <description>
+ </description>
+ </method>
+ <method name="_body_get_collision_exceptions" qualifiers="virtual const">
+ <return type="RID[]" />
+ <param index="0" name="body" type="RID" />
+ <description>
+ </description>
+ </method>
+ <method name="_body_get_collision_layer" qualifiers="virtual const">
+ <return type="int" />
+ <param index="0" name="body" type="RID" />
+ <description>
+ </description>
+ </method>
+ <method name="_body_get_collision_mask" qualifiers="virtual const">
+ <return type="int" />
+ <param index="0" name="body" type="RID" />
+ <description>
+ </description>
+ </method>
+ <method name="_body_get_collision_priority" qualifiers="virtual const">
+ <return type="float" />
+ <param index="0" name="body" type="RID" />
+ <description>
+ </description>
+ </method>
+ <method name="_body_get_constant_force" qualifiers="virtual const">
+ <return type="Vector2" />
+ <param index="0" name="body" type="RID" />
+ <description>
+ </description>
+ </method>
+ <method name="_body_get_constant_torque" qualifiers="virtual const">
+ <return type="float" />
+ <param index="0" name="body" type="RID" />
+ <description>
+ </description>
+ </method>
+ <method name="_body_get_contacts_reported_depth_threshold" qualifiers="virtual const">
+ <return type="float" />
+ <param index="0" name="body" type="RID" />
+ <description>
+ </description>
+ </method>
+ <method name="_body_get_continuous_collision_detection_mode" qualifiers="virtual const">
+ <return type="int" enum="PhysicsServer2D.CCDMode" />
+ <param index="0" name="body" type="RID" />
+ <description>
+ </description>
+ </method>
+ <method name="_body_get_direct_state" qualifiers="virtual">
+ <return type="PhysicsDirectBodyState2D" />
+ <param index="0" name="body" type="RID" />
+ <description>
+ </description>
+ </method>
+ <method name="_body_get_max_contacts_reported" qualifiers="virtual const">
+ <return type="int" />
+ <param index="0" name="body" type="RID" />
+ <description>
+ </description>
+ </method>
+ <method name="_body_get_mode" qualifiers="virtual const">
+ <return type="int" enum="PhysicsServer2D.BodyMode" />
+ <param index="0" name="body" type="RID" />
+ <description>
+ </description>
+ </method>
+ <method name="_body_get_object_instance_id" qualifiers="virtual const">
+ <return type="int" />
+ <param index="0" name="body" type="RID" />
+ <description>
+ </description>
+ </method>
+ <method name="_body_get_param" qualifiers="virtual const">
+ <return type="Variant" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="param" type="int" enum="PhysicsServer2D.BodyParameter" />
+ <description>
+ </description>
+ </method>
+ <method name="_body_get_shape" qualifiers="virtual const">
+ <return type="RID" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="shape_idx" type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="_body_get_shape_count" qualifiers="virtual const">
+ <return type="int" />
+ <param index="0" name="body" type="RID" />
+ <description>
+ </description>
+ </method>
+ <method name="_body_get_shape_transform" qualifiers="virtual const">
+ <return type="Transform2D" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="shape_idx" type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="_body_get_space" qualifiers="virtual const">
+ <return type="RID" />
+ <param index="0" name="body" type="RID" />
+ <description>
+ </description>
+ </method>
+ <method name="_body_get_state" qualifiers="virtual const">
+ <return type="Variant" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="state" type="int" enum="PhysicsServer2D.BodyState" />
+ <description>
+ </description>
+ </method>
+ <method name="_body_is_omitting_force_integration" qualifiers="virtual const">
+ <return type="bool" />
+ <param index="0" name="body" type="RID" />
+ <description>
+ </description>
+ </method>
+ <method name="_body_remove_collision_exception" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="excepted_body" type="RID" />
+ <description>
+ </description>
+ </method>
+ <method name="_body_remove_shape" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="shape_idx" type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="_body_reset_mass_properties" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="body" type="RID" />
+ <description>
+ </description>
+ </method>
+ <method name="_body_set_axis_velocity" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="axis_velocity" type="Vector2" />
+ <description>
+ </description>
+ </method>
+ <method name="_body_set_collision_layer" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="layer" type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="_body_set_collision_mask" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="mask" type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="_body_set_collision_priority" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="priority" type="float" />
+ <description>
+ </description>
+ </method>
+ <method name="_body_set_constant_force" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="force" type="Vector2" />
+ <description>
+ </description>
+ </method>
+ <method name="_body_set_constant_torque" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="torque" type="float" />
+ <description>
+ </description>
+ </method>
+ <method name="_body_set_contacts_reported_depth_threshold" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="threshold" type="float" />
+ <description>
+ </description>
+ </method>
+ <method name="_body_set_continuous_collision_detection_mode" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="mode" type="int" enum="PhysicsServer2D.CCDMode" />
+ <description>
+ </description>
+ </method>
+ <method name="_body_set_force_integration_callback" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="callable" type="Callable" />
+ <param index="2" name="userdata" type="Variant" />
+ <description>
+ </description>
+ </method>
+ <method name="_body_set_max_contacts_reported" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="amount" type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="_body_set_mode" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="mode" type="int" enum="PhysicsServer2D.BodyMode" />
+ <description>
+ </description>
+ </method>
+ <method name="_body_set_omit_force_integration" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="enable" type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="_body_set_param" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="param" type="int" enum="PhysicsServer2D.BodyParameter" />
+ <param index="2" name="value" type="Variant" />
+ <description>
+ </description>
+ </method>
+ <method name="_body_set_pickable" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="pickable" type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="_body_set_shape" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="shape_idx" type="int" />
+ <param index="2" name="shape" type="RID" />
+ <description>
+ </description>
+ </method>
+ <method name="_body_set_shape_as_one_way_collision" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="shape_idx" type="int" />
+ <param index="2" name="enable" type="bool" />
+ <param index="3" name="margin" type="float" />
+ <description>
+ </description>
+ </method>
+ <method name="_body_set_shape_disabled" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="shape_idx" type="int" />
+ <param index="2" name="disabled" type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="_body_set_shape_transform" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="shape_idx" type="int" />
+ <param index="2" name="transform" type="Transform2D" />
+ <description>
+ </description>
+ </method>
+ <method name="_body_set_space" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="space" type="RID" />
+ <description>
+ </description>
+ </method>
+ <method name="_body_set_state" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="state" type="int" enum="PhysicsServer2D.BodyState" />
+ <param index="2" name="value" type="Variant" />
+ <description>
+ </description>
+ </method>
+ <method name="_body_set_state_sync_callback" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="callable" type="Callable" />
+ <description>
+ </description>
+ </method>
+ <method name="_body_test_motion" qualifiers="virtual const">
+ <return type="bool" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="from" type="Transform2D" />
+ <param index="2" name="motion" type="Vector2" />
+ <param index="3" name="margin" type="float" />
+ <param index="4" name="collide_separation_ray" type="bool" />
+ <param index="5" name="recovery_as_collision" type="bool" />
+ <param index="6" name="result" type="PhysicsServer2DExtensionMotionResult*" />
+ <description>
+ </description>
+ </method>
+ <method name="_capsule_shape_create" qualifiers="virtual">
+ <return type="RID" />
+ <description>
+ </description>
+ </method>
+ <method name="_circle_shape_create" qualifiers="virtual">
+ <return type="RID" />
+ <description>
+ </description>
+ </method>
+ <method name="_concave_polygon_shape_create" qualifiers="virtual">
+ <return type="RID" />
+ <description>
+ </description>
+ </method>
+ <method name="_convex_polygon_shape_create" qualifiers="virtual">
+ <return type="RID" />
+ <description>
+ </description>
+ </method>
+ <method name="_damped_spring_joint_get_param" qualifiers="virtual const">
+ <return type="float" />
+ <param index="0" name="joint" type="RID" />
+ <param index="1" name="param" type="int" enum="PhysicsServer2D.DampedSpringParam" />
+ <description>
+ </description>
+ </method>
+ <method name="_damped_spring_joint_set_param" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="joint" type="RID" />
+ <param index="1" name="param" type="int" enum="PhysicsServer2D.DampedSpringParam" />
+ <param index="2" name="value" type="float" />
+ <description>
+ </description>
+ </method>
+ <method name="_end_sync" qualifiers="virtual">
+ <return type="void" />
+ <description>
+ </description>
+ </method>
+ <method name="_finish" qualifiers="virtual">
+ <return type="void" />
+ <description>
+ </description>
+ </method>
+ <method name="_flush_queries" qualifiers="virtual">
+ <return type="void" />
+ <description>
+ </description>
+ </method>
+ <method name="_free_rid" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="rid" type="RID" />
+ <description>
+ </description>
+ </method>
+ <method name="_get_process_info" qualifiers="virtual">
+ <return type="int" />
+ <param index="0" name="process_info" type="int" enum="PhysicsServer2D.ProcessInfo" />
+ <description>
+ </description>
+ </method>
+ <method name="_init" qualifiers="virtual">
+ <return type="void" />
+ <description>
+ </description>
+ </method>
+ <method name="_is_flushing_queries" qualifiers="virtual const">
+ <return type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="_joint_clear" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="joint" type="RID" />
+ <description>
+ </description>
+ </method>
+ <method name="_joint_create" qualifiers="virtual">
+ <return type="RID" />
+ <description>
+ </description>
+ </method>
+ <method name="_joint_disable_collisions_between_bodies" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="joint" type="RID" />
+ <param index="1" name="disable" type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="_joint_get_param" qualifiers="virtual const">
+ <return type="float" />
+ <param index="0" name="joint" type="RID" />
+ <param index="1" name="param" type="int" enum="PhysicsServer2D.JointParam" />
+ <description>
+ </description>
+ </method>
+ <method name="_joint_get_type" qualifiers="virtual const">
+ <return type="int" enum="PhysicsServer2D.JointType" />
+ <param index="0" name="joint" type="RID" />
+ <description>
+ </description>
+ </method>
+ <method name="_joint_is_disabled_collisions_between_bodies" qualifiers="virtual const">
+ <return type="bool" />
+ <param index="0" name="joint" type="RID" />
+ <description>
+ </description>
+ </method>
+ <method name="_joint_make_damped_spring" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="joint" type="RID" />
+ <param index="1" name="anchor_a" type="Vector2" />
+ <param index="2" name="anchor_b" type="Vector2" />
+ <param index="3" name="body_a" type="RID" />
+ <param index="4" name="body_b" type="RID" />
+ <description>
+ </description>
+ </method>
+ <method name="_joint_make_groove" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="joint" type="RID" />
+ <param index="1" name="a_groove1" type="Vector2" />
+ <param index="2" name="a_groove2" type="Vector2" />
+ <param index="3" name="b_anchor" type="Vector2" />
+ <param index="4" name="body_a" type="RID" />
+ <param index="5" name="body_b" type="RID" />
+ <description>
+ </description>
+ </method>
+ <method name="_joint_make_pin" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="joint" type="RID" />
+ <param index="1" name="anchor" type="Vector2" />
+ <param index="2" name="body_a" type="RID" />
+ <param index="3" name="body_b" type="RID" />
+ <description>
+ </description>
+ </method>
+ <method name="_joint_set_param" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="joint" type="RID" />
+ <param index="1" name="param" type="int" enum="PhysicsServer2D.JointParam" />
+ <param index="2" name="value" type="float" />
+ <description>
+ </description>
+ </method>
+ <method name="_pin_joint_get_param" qualifiers="virtual const">
+ <return type="float" />
+ <param index="0" name="joint" type="RID" />
+ <param index="1" name="param" type="int" enum="PhysicsServer2D.PinJointParam" />
+ <description>
+ </description>
+ </method>
+ <method name="_pin_joint_set_param" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="joint" type="RID" />
+ <param index="1" name="param" type="int" enum="PhysicsServer2D.PinJointParam" />
+ <param index="2" name="value" type="float" />
+ <description>
+ </description>
+ </method>
+ <method name="_rectangle_shape_create" qualifiers="virtual">
+ <return type="RID" />
+ <description>
+ </description>
+ </method>
+ <method name="_segment_shape_create" qualifiers="virtual">
+ <return type="RID" />
+ <description>
+ </description>
+ </method>
+ <method name="_separation_ray_shape_create" qualifiers="virtual">
+ <return type="RID" />
+ <description>
+ </description>
+ </method>
+ <method name="_set_active" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="active" type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="_shape_collide" qualifiers="virtual">
+ <return type="bool" />
+ <param index="0" name="shape_A" type="RID" />
+ <param index="1" name="xform_A" type="Transform2D" />
+ <param index="2" name="motion_A" type="Vector2" />
+ <param index="3" name="shape_B" type="RID" />
+ <param index="4" name="xform_B" type="Transform2D" />
+ <param index="5" name="motion_B" type="Vector2" />
+ <param index="6" name="results" type="void*" />
+ <param index="7" name="result_max" type="int" />
+ <param index="8" name="result_count" type="int32_t*" />
+ <description>
+ </description>
+ </method>
+ <method name="_shape_get_custom_solver_bias" qualifiers="virtual const">
+ <return type="float" />
+ <param index="0" name="shape" type="RID" />
+ <description>
+ </description>
+ </method>
+ <method name="_shape_get_data" qualifiers="virtual const">
+ <return type="Variant" />
+ <param index="0" name="shape" type="RID" />
+ <description>
+ </description>
+ </method>
+ <method name="_shape_get_type" qualifiers="virtual const">
+ <return type="int" enum="PhysicsServer2D.ShapeType" />
+ <param index="0" name="shape" type="RID" />
+ <description>
+ </description>
+ </method>
+ <method name="_shape_set_custom_solver_bias" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="shape" type="RID" />
+ <param index="1" name="bias" type="float" />
+ <description>
+ </description>
+ </method>
+ <method name="_shape_set_data" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="shape" type="RID" />
+ <param index="1" name="data" type="Variant" />
+ <description>
+ </description>
+ </method>
+ <method name="_space_create" qualifiers="virtual">
+ <return type="RID" />
+ <description>
+ </description>
+ </method>
+ <method name="_space_get_contact_count" qualifiers="virtual const">
+ <return type="int" />
+ <param index="0" name="space" type="RID" />
+ <description>
+ </description>
+ </method>
+ <method name="_space_get_contacts" qualifiers="virtual const">
+ <return type="PackedVector2Array" />
+ <param index="0" name="space" type="RID" />
+ <description>
+ </description>
+ </method>
+ <method name="_space_get_direct_state" qualifiers="virtual">
+ <return type="PhysicsDirectSpaceState2D" />
+ <param index="0" name="space" type="RID" />
+ <description>
+ </description>
+ </method>
+ <method name="_space_get_param" qualifiers="virtual const">
+ <return type="float" />
+ <param index="0" name="space" type="RID" />
+ <param index="1" name="param" type="int" enum="PhysicsServer2D.SpaceParameter" />
+ <description>
+ </description>
+ </method>
+ <method name="_space_is_active" qualifiers="virtual const">
+ <return type="bool" />
+ <param index="0" name="space" type="RID" />
+ <description>
+ </description>
+ </method>
+ <method name="_space_set_active" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="space" type="RID" />
+ <param index="1" name="active" type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="_space_set_debug_contacts" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="space" type="RID" />
+ <param index="1" name="max_contacts" type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="_space_set_param" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="space" type="RID" />
+ <param index="1" name="param" type="int" enum="PhysicsServer2D.SpaceParameter" />
+ <param index="2" name="value" type="float" />
+ <description>
+ </description>
+ </method>
+ <method name="_step" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="step" type="float" />
+ <description>
+ </description>
+ </method>
+ <method name="_sync" qualifiers="virtual">
+ <return type="void" />
+ <description>
+ </description>
+ </method>
+ <method name="_world_boundary_shape_create" qualifiers="virtual">
+ <return type="RID" />
+ <description>
+ </description>
+ </method>
+ </methods>
+</class>
diff --git a/doc/classes/PhysicsServer2DManager.xml b/doc/classes/PhysicsServer2DManager.xml
new file mode 100644
index 0000000000..328ac93ce3
--- /dev/null
+++ b/doc/classes/PhysicsServer2DManager.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="PhysicsServer2DManager" inherits="Object" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ Manager for 2D physics server implementations.
+ </brief_description>
+ <description>
+ [PhysicsServer2DManager] is the API for registering [PhysicsServer2D] implementations, and for setting the default implementation.
+ [b]Note:[/b] It is not possible to switch physics servers at runtime. This class is only used on startup at the server initialization level, by Godot itself and possibly by GDExtensions.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="register_server">
+ <return type="void" />
+ <param index="0" name="name" type="String" />
+ <param index="1" name="create_callback" type="Callable" />
+ <description>
+ Register a [PhysicsServer2D] implementation by passing a [param name] and a [Callable] that returns a [PhysicsServer2D] object.
+ </description>
+ </method>
+ <method name="set_default_server">
+ <return type="void" />
+ <param index="0" name="name" type="String" />
+ <param index="1" name="priority" type="int" />
+ <description>
+ Set the default [PhysicsServer2D] implementation to the one identified by [param name], if [param priority] is greater than the priority of the current default implementation.
+ </description>
+ </method>
+ </methods>
+</class>
diff --git a/doc/classes/PhysicsServer3D.xml b/doc/classes/PhysicsServer3D.xml
index b76e9dfdf4..95f7fb69a2 100644
--- a/doc/classes/PhysicsServer3D.xml
+++ b/doc/classes/PhysicsServer3D.xml
@@ -40,6 +40,20 @@
Creates an [Area3D].
</description>
</method>
+ <method name="area_get_collision_layer" qualifiers="const">
+ <return type="int" />
+ <param index="0" name="area" type="RID" />
+ <description>
+ Returns the physics layer or layers an area belongs to.
+ </description>
+ </method>
+ <method name="area_get_collision_mask" qualifiers="const">
+ <return type="int" />
+ <param index="0" name="area" type="RID" />
+ <description>
+ Returns the physics layer or layers an area can contact with.
+ </description>
+ </method>
<method name="area_get_object_instance_id" qualifiers="const">
<return type="int" />
<param index="0" name="area" type="RID" />
@@ -226,7 +240,7 @@
<param index="2" name="position" type="Vector3" default="Vector3(0, 0, 0)" />
<description>
Adds a constant positioned force to the body that keeps being applied over time until cleared with [code]body_set_constant_force(body, Vector3(0, 0, 0))[/code].
- [code]position[/code] is the offset from the body origin in global coordinates.
+ [param position] is the offset from the body origin in global coordinates.
</description>
</method>
<method name="body_add_constant_torque">
@@ -273,7 +287,7 @@
<param index="2" name="position" type="Vector3" default="Vector3(0, 0, 0)" />
<description>
Applies a positioned force to the body. A force is time dependent and meant to be applied every physics update.
- [code]position[/code] is the offset from the body origin in global coordinates.
+ [param position] is the offset from the body origin in global coordinates.
</description>
</method>
<method name="body_apply_impulse">
@@ -284,7 +298,7 @@
<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).
- [code]position[/code] is the offset from the body origin in global coordinates.
+ [param position] is the offset from the body origin in global coordinates.
</description>
</method>
<method name="body_apply_torque">
@@ -338,6 +352,13 @@
Returns the physics layer or layers a body can collide with.
</description>
</method>
+ <method name="body_get_collision_priority" qualifiers="const">
+ <return type="float" />
+ <param index="0" name="body" type="RID" />
+ <description>
+ Returns the body's collision priority.
+ </description>
+ </method>
<method name="body_get_constant_force" qualifiers="const">
<return type="Vector3" />
<param index="0" name="body" type="RID" />
@@ -505,6 +526,14 @@
Sets the physics layer or layers a body can collide with.
</description>
</method>
+ <method name="body_set_collision_priority">
+ <return type="void" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="priority" type="float" />
+ <description>
+ Sets the body's collision priority.
+ </description>
+ </method>
<method name="body_set_constant_force">
<return type="void" />
<param index="0" name="body" type="RID" />
@@ -549,7 +578,7 @@
<param index="0" name="body" type="RID" />
<param index="1" name="amount" type="int" />
<description>
- Sets the maximum contacts to report. Bodies can keep a log of the contacts with other bodies, this is enabled by setting the maximum amount of contacts reported to a number greater than 0.
+ Sets the maximum contacts to report. Bodies can keep a log of the contacts with other bodies. This is enabled by setting the maximum number of contacts reported to a number greater than 0.
</description>
</method>
<method name="body_set_mode">
@@ -582,7 +611,7 @@
<param index="0" name="body" type="RID" />
<param index="1" name="enable" type="bool" />
<description>
- Sets the body pickable with rays if [code]enabled[/code] is set.
+ Sets the body pickable with rays if [param enable] is set.
</description>
</method>
<method name="body_set_shape">
@@ -1325,11 +1354,11 @@
<constant name="BODY_MODE_KINEMATIC" value="1" enum="BodyMode">
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_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 name="BODY_MODE_RIGID" value="2" enum="BodyMode">
+ Constant for rigid bodies. In this mode, a body can be pushed by other bodies and has forces applied.
</constant>
- <constant name="BODY_MODE_DYNAMIC_LINEAR" value="3" enum="BodyMode">
- Constant for linear dynamic bodies. In this mode, a body is dynamic but can not rotate, and only its linear velocity is affected by external forces.
+ <constant name="BODY_MODE_RIGID_LINEAR" value="3" enum="BodyMode">
+ Constant for linear rigid bodies. In this mode, a body 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.
@@ -1422,7 +1451,7 @@
Constant to set/get the maximum time of activity. A body marked as potentially inactive for both linear and angular velocity will be put to sleep after this time.
</constant>
<constant name="SPACE_PARAM_SOLVER_ITERATIONS" value="7" enum="SpaceParameter">
- Constant to set/get the number of solver iterations for contacts and constraints. The greater the amount of iterations, the more accurate the collisions and constraints will be. However, a greater amount of iterations requires more CPU power, which can decrease performance.
+ Constant to set/get the number of solver iterations for contacts and constraints. The greater the number of iterations, the more accurate the collisions and constraints will be. However, a greater number of iterations requires more CPU power, which can decrease performance.
</constant>
<constant name="BODY_AXIS_LINEAR_X" value="1" enum="BodyAxis">
</constant>
diff --git a/doc/classes/PhysicsServer3DExtension.xml b/doc/classes/PhysicsServer3DExtension.xml
index 4188b04e4a..1e9df54de5 100644
--- a/doc/classes/PhysicsServer3DExtension.xml
+++ b/doc/classes/PhysicsServer3DExtension.xml
@@ -34,6 +34,18 @@
<description>
</description>
</method>
+ <method name="_area_get_collision_layer" qualifiers="virtual const">
+ <return type="int" />
+ <param index="0" name="area" type="RID" />
+ <description>
+ </description>
+ </method>
+ <method name="_area_get_collision_mask" qualifiers="virtual const">
+ <return type="int" />
+ <param index="0" name="area" type="RID" />
+ <description>
+ </description>
+ </method>
<method name="_area_get_object_instance_id" qualifiers="virtual const">
<return type="int" />
<param index="0" name="area" type="RID" />
@@ -274,6 +286,12 @@
<description>
</description>
</method>
+ <method name="_body_get_collision_exceptions" qualifiers="virtual const">
+ <return type="RID[]" />
+ <param index="0" name="body" type="RID" />
+ <description>
+ </description>
+ </method>
<method name="_body_get_collision_layer" qualifiers="virtual const">
<return type="int" />
<param index="0" name="body" type="RID" />
@@ -286,6 +304,12 @@
<description>
</description>
</method>
+ <method name="_body_get_collision_priority" qualifiers="virtual const">
+ <return type="float" />
+ <param index="0" name="body" type="RID" />
+ <description>
+ </description>
+ </method>
<method name="_body_get_constant_force" qualifiers="virtual const">
<return type="Vector3" />
<param index="0" name="body" type="RID" />
@@ -298,6 +322,12 @@
<description>
</description>
</method>
+ <method name="_body_get_contacts_reported_depth_threshold" qualifiers="virtual const">
+ <return type="float" />
+ <param index="0" name="body" type="RID" />
+ <description>
+ </description>
+ </method>
<method name="_body_get_direct_state" qualifiers="virtual">
<return type="PhysicsDirectBodyState3D" />
<param index="0" name="body" type="RID" />
@@ -362,6 +392,12 @@
<description>
</description>
</method>
+ <method name="_body_get_user_flags" qualifiers="virtual const">
+ <return type="int" />
+ <param index="0" name="body" type="RID" />
+ <description>
+ </description>
+ </method>
<method name="_body_is_axis_locked" qualifiers="virtual const">
<return type="bool" />
<param index="0" name="body" type="RID" />
@@ -430,6 +466,13 @@
<description>
</description>
</method>
+ <method name="_body_set_collision_priority" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="priority" type="float" />
+ <description>
+ </description>
+ </method>
<method name="_body_set_constant_force" qualifiers="virtual">
<return type="void" />
<param index="0" name="body" type="RID" />
@@ -444,6 +487,13 @@
<description>
</description>
</method>
+ <method name="_body_set_contacts_reported_depth_threshold" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="threshold" type="float" />
+ <description>
+ </description>
+ </method>
<method name="_body_set_enable_continuous_collision_detection" qualifiers="virtual">
<return type="void" />
<param index="0" name="body" type="RID" />
@@ -534,6 +584,20 @@
<description>
</description>
</method>
+ <method name="_body_set_state_sync_callback" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="callable" type="Callable" />
+ <description>
+ </description>
+ </method>
+ <method name="_body_set_user_flags" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="flags" type="int" />
+ <description>
+ </description>
+ </method>
<method name="_body_test_motion" qualifiers="virtual const">
<return type="bool" />
<param index="0" name="body" type="RID" />
@@ -591,6 +655,21 @@
<description>
</description>
</method>
+ <method name="_end_sync" qualifiers="virtual">
+ <return type="void" />
+ <description>
+ </description>
+ </method>
+ <method name="_finish" qualifiers="virtual">
+ <return type="void" />
+ <description>
+ </description>
+ </method>
+ <method name="_flush_queries" qualifiers="virtual">
+ <return type="void" />
+ <description>
+ </description>
+ </method>
<method name="_free_rid" qualifiers="virtual">
<return type="void" />
<param index="0" name="rid" type="RID" />
@@ -672,6 +751,16 @@
<description>
</description>
</method>
+ <method name="_init" qualifiers="virtual">
+ <return type="void" />
+ <description>
+ </description>
+ </method>
+ <method name="_is_flushing_queries" qualifiers="virtual const">
+ <return type="bool" />
+ <description>
+ </description>
+ </method>
<method name="_joint_clear" qualifiers="virtual">
<return type="void" />
<param index="0" name="joint" type="RID" />
@@ -725,6 +814,18 @@
<description>
</description>
</method>
+ <method name="_joint_make_hinge_simple" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="joint" type="RID" />
+ <param index="1" name="body_A" type="RID" />
+ <param index="2" name="pivot_A" type="Vector3" />
+ <param index="3" name="axis_A" type="Vector3" />
+ <param index="4" name="body_B" type="RID" />
+ <param index="5" name="pivot_B" type="Vector3" />
+ <param index="6" name="axis_B" type="Vector3" />
+ <description>
+ </description>
+ </method>
<method name="_joint_make_pin" qualifiers="virtual">
<return type="void" />
<param index="0" name="joint" type="RID" />
@@ -804,18 +905,37 @@
<description>
</description>
</method>
+ <method name="_shape_get_custom_solver_bias" qualifiers="virtual const">
+ <return type="float" />
+ <param index="0" name="shape" type="RID" />
+ <description>
+ </description>
+ </method>
<method name="_shape_get_data" qualifiers="virtual const">
<return type="Variant" />
<param index="0" name="shape" type="RID" />
<description>
</description>
</method>
+ <method name="_shape_get_margin" qualifiers="virtual const">
+ <return type="float" />
+ <param index="0" name="shape" type="RID" />
+ <description>
+ </description>
+ </method>
<method name="_shape_get_type" qualifiers="virtual const">
<return type="int" enum="PhysicsServer3D.ShapeType" />
<param index="0" name="shape" type="RID" />
<description>
</description>
</method>
+ <method name="_shape_set_custom_solver_bias" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="shape" type="RID" />
+ <param index="1" name="bias" type="float" />
+ <description>
+ </description>
+ </method>
<method name="_shape_set_data" qualifiers="virtual">
<return type="void" />
<param index="0" name="shape" type="RID" />
@@ -823,6 +943,13 @@
<description>
</description>
</method>
+ <method name="_shape_set_margin" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="shape" type="RID" />
+ <param index="1" name="margin" type="float" />
+ <description>
+ </description>
+ </method>
<method name="_slider_joint_get_param" qualifiers="virtual const">
<return type="float" />
<param index="0" name="joint" type="RID" />
@@ -838,17 +965,250 @@
<description>
</description>
</method>
+ <method name="_soft_body_add_collision_exception" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="body_b" type="RID" />
+ <description>
+ </description>
+ </method>
+ <method name="_soft_body_create" qualifiers="virtual">
+ <return type="RID" />
+ <description>
+ </description>
+ </method>
<method name="_soft_body_get_bounds" qualifiers="virtual const">
<return type="AABB" />
<param index="0" name="body" type="RID" />
<description>
</description>
</method>
+ <method name="_soft_body_get_collision_exceptions" qualifiers="virtual const">
+ <return type="RID[]" />
+ <param index="0" name="body" type="RID" />
+ <description>
+ </description>
+ </method>
+ <method name="_soft_body_get_collision_layer" qualifiers="virtual const">
+ <return type="int" />
+ <param index="0" name="body" type="RID" />
+ <description>
+ </description>
+ </method>
+ <method name="_soft_body_get_collision_mask" qualifiers="virtual const">
+ <return type="int" />
+ <param index="0" name="body" type="RID" />
+ <description>
+ </description>
+ </method>
+ <method name="_soft_body_get_damping_coefficient" qualifiers="virtual const">
+ <return type="float" />
+ <param index="0" name="body" type="RID" />
+ <description>
+ </description>
+ </method>
+ <method name="_soft_body_get_drag_coefficient" qualifiers="virtual const">
+ <return type="float" />
+ <param index="0" name="body" type="RID" />
+ <description>
+ </description>
+ </method>
+ <method name="_soft_body_get_linear_stiffness" qualifiers="virtual const">
+ <return type="float" />
+ <param index="0" name="body" type="RID" />
+ <description>
+ </description>
+ </method>
+ <method name="_soft_body_get_point_global_position" qualifiers="virtual const">
+ <return type="Vector3" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="point_index" type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="_soft_body_get_pressure_coefficient" qualifiers="virtual const">
+ <return type="float" />
+ <param index="0" name="body" type="RID" />
+ <description>
+ </description>
+ </method>
+ <method name="_soft_body_get_simulation_precision" qualifiers="virtual const">
+ <return type="int" />
+ <param index="0" name="body" type="RID" />
+ <description>
+ </description>
+ </method>
+ <method name="_soft_body_get_space" qualifiers="virtual const">
+ <return type="RID" />
+ <param index="0" name="body" type="RID" />
+ <description>
+ </description>
+ </method>
+ <method name="_soft_body_get_state" qualifiers="virtual const">
+ <return type="Variant" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="state" type="int" enum="PhysicsServer3D.BodyState" />
+ <description>
+ </description>
+ </method>
+ <method name="_soft_body_get_total_mass" qualifiers="virtual const">
+ <return type="float" />
+ <param index="0" name="body" type="RID" />
+ <description>
+ </description>
+ </method>
+ <method name="_soft_body_is_point_pinned" qualifiers="virtual const">
+ <return type="bool" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="point_index" type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="_soft_body_move_point" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="point_index" type="int" />
+ <param index="2" name="global_position" type="Vector3" />
+ <description>
+ </description>
+ </method>
+ <method name="_soft_body_pin_point" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="point_index" type="int" />
+ <param index="2" name="pin" type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="_soft_body_remove_all_pinned_points" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="body" type="RID" />
+ <description>
+ </description>
+ </method>
+ <method name="_soft_body_remove_collision_exception" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="body_b" type="RID" />
+ <description>
+ </description>
+ </method>
+ <method name="_soft_body_set_collision_layer" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="layer" type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="_soft_body_set_collision_mask" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="mask" type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="_soft_body_set_damping_coefficient" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="damping_coefficient" type="float" />
+ <description>
+ </description>
+ </method>
+ <method name="_soft_body_set_drag_coefficient" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="drag_coefficient" type="float" />
+ <description>
+ </description>
+ </method>
+ <method name="_soft_body_set_linear_stiffness" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="linear_stiffness" type="float" />
+ <description>
+ </description>
+ </method>
+ <method name="_soft_body_set_mesh" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="mesh" type="RID" />
+ <description>
+ </description>
+ </method>
+ <method name="_soft_body_set_pressure_coefficient" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="pressure_coefficient" type="float" />
+ <description>
+ </description>
+ </method>
+ <method name="_soft_body_set_ray_pickable" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="enable" type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="_soft_body_set_simulation_precision" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="simulation_precision" type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="_soft_body_set_space" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="space" type="RID" />
+ <description>
+ </description>
+ </method>
+ <method name="_soft_body_set_state" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="state" type="int" enum="PhysicsServer3D.BodyState" />
+ <param index="2" name="variant" type="Variant" />
+ <description>
+ </description>
+ </method>
+ <method name="_soft_body_set_total_mass" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="total_mass" type="float" />
+ <description>
+ </description>
+ </method>
+ <method name="_soft_body_set_transform" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="transform" type="Transform3D" />
+ <description>
+ </description>
+ </method>
+ <method name="_soft_body_update_rendering_server" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="rendering_server_handler" type="PhysicsServer3DRenderingServerHandler" />
+ <description>
+ </description>
+ </method>
<method name="_space_create" qualifiers="virtual">
<return type="RID" />
<description>
</description>
</method>
+ <method name="_space_get_contact_count" qualifiers="virtual const">
+ <return type="int" />
+ <param index="0" name="space" type="RID" />
+ <description>
+ </description>
+ </method>
+ <method name="_space_get_contacts" qualifiers="virtual const">
+ <return type="PackedVector3Array" />
+ <param index="0" name="space" type="RID" />
+ <description>
+ </description>
+ </method>
<method name="_space_get_direct_state" qualifiers="virtual">
<return type="PhysicsDirectSpaceState3D" />
<param index="0" name="space" type="RID" />
@@ -875,6 +1235,13 @@
<description>
</description>
</method>
+ <method name="_space_set_debug_contacts" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="space" type="RID" />
+ <param index="1" name="max_contacts" type="int" />
+ <description>
+ </description>
+ </method>
<method name="_space_set_param" qualifiers="virtual">
<return type="void" />
<param index="0" name="space" type="RID" />
@@ -888,6 +1255,17 @@
<description>
</description>
</method>
+ <method name="_step" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="step" type="float" />
+ <description>
+ </description>
+ </method>
+ <method name="_sync" qualifiers="virtual">
+ <return type="void" />
+ <description>
+ </description>
+ </method>
<method name="_world_boundary_shape_create" qualifiers="virtual">
<return type="RID" />
<description>
diff --git a/doc/classes/PhysicsServer3DManager.xml b/doc/classes/PhysicsServer3DManager.xml
new file mode 100644
index 0000000000..3ec03fede4
--- /dev/null
+++ b/doc/classes/PhysicsServer3DManager.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="PhysicsServer3DManager" inherits="Object" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ Manager for 3D physics server implementations.
+ </brief_description>
+ <description>
+ [PhysicsServer3DManager] is the API for registering [PhysicsServer3D] implementations, and for setting the default implementation.
+ [b]Note:[/b] It is not possible to switch physics servers at runtime. This class is only used on startup at the server initialization level, by Godot itself and possibly by GDExtensions.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="register_server">
+ <return type="void" />
+ <param index="0" name="name" type="String" />
+ <param index="1" name="create_callback" type="Callable" />
+ <description>
+ Register a [PhysicsServer3D] implementation by passing a [param name] and a [Callable] that returns a [PhysicsServer2D] object.
+ </description>
+ </method>
+ <method name="set_default_server">
+ <return type="void" />
+ <param index="0" name="name" type="String" />
+ <param index="1" name="priority" type="int" />
+ <description>
+ Set the default [PhysicsServer3D] implementation to the one identified by [param name], if [param priority] is greater than the priority of the current default implementation.
+ </description>
+ </method>
+ </methods>
+</class>
diff --git a/doc/classes/PhysicsShapeQueryParameters2D.xml b/doc/classes/PhysicsShapeQueryParameters2D.xml
index 3fbb0c0ed0..8dcb329e7e 100644
--- a/doc/classes/PhysicsShapeQueryParameters2D.xml
+++ b/doc/classes/PhysicsShapeQueryParameters2D.xml
@@ -18,7 +18,7 @@
<member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="4294967295">
The physics layers the query will detect (as a bitmask). By default, all collision layers are detected. See [url=$DOCS_URL/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information.
</member>
- <member name="exclude" type="Array" setter="set_exclude" getter="get_exclude" default="[]">
+ <member name="exclude" type="RID[]" 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">
diff --git a/doc/classes/PhysicsTestMotionParameters2D.xml b/doc/classes/PhysicsTestMotionParameters2D.xml
index 00f21a2058..5b969ea869 100644
--- a/doc/classes/PhysicsTestMotionParameters2D.xml
+++ b/doc/classes/PhysicsTestMotionParameters2D.xml
@@ -13,7 +13,7 @@
If set to [code]true[/code], shapes of type [constant PhysicsServer2D.SHAPE_SEPARATION_RAY] are used to detect collisions and can stop the motion. Can be useful when snapping to the ground.
If set to [code]false[/code], shapes of type [constant PhysicsServer2D.SHAPE_SEPARATION_RAY] are only used for separation when overlapping with other bodies. That's the main use for separation ray shapes.
</member>
- <member name="exclude_bodies" type="Array" setter="set_exclude_bodies" getter="get_exclude_bodies" default="[]">
+ <member name="exclude_bodies" type="RID[]" setter="set_exclude_bodies" getter="get_exclude_bodies" default="[]">
Optional array of body [RID] to exclude from collision.
</member>
<member name="exclude_objects" type="Array" setter="set_exclude_objects" getter="get_exclude_objects" default="[]">
@@ -29,8 +29,8 @@
Motion vector to define the length and direction of the motion to test.
</member>
<member name="recovery_as_collision" type="bool" setter="set_recovery_as_collision_enabled" getter="is_recovery_as_collision_enabled" default="false">
- If set to [code]true[/code], any depenetration from the recovery phase is reported as a collision; this is used e.g. by [method CharacterBody2D.move_and_slide] for improving floor detection when floor snapping is disabled.
- If set to [code]false[/code], only collisions resulting from the motion are reported; this is used e.g. by [method PhysicsBody2D.move_and_collide].
+ If set to [code]true[/code], any depenetration from the recovery phase is reported as a collision; this is used e.g. by [CharacterBody2D] for improving floor detection during floor snapping.
+ If set to [code]false[/code], only collisions resulting from the motion are reported, which is generally the desired behavior.
</member>
</members>
</class>
diff --git a/doc/classes/PhysicsTestMotionParameters3D.xml b/doc/classes/PhysicsTestMotionParameters3D.xml
index 5b07796a10..ea9bca6a35 100644
--- a/doc/classes/PhysicsTestMotionParameters3D.xml
+++ b/doc/classes/PhysicsTestMotionParameters3D.xml
@@ -32,8 +32,8 @@
Motion vector to define the length and direction of the motion to test.
</member>
<member name="recovery_as_collision" type="bool" setter="set_recovery_as_collision_enabled" getter="is_recovery_as_collision_enabled" default="false">
- If set to [code]true[/code], any depenetration from the recovery phase is reported as a collision; this is used e.g. by [method CharacterBody3D.move_and_slide] for improving floor detection when floor snapping is disabled.
- If set to [code]false[/code], only collisions resulting from the motion are detected; this is used e.g. by [method PhysicsBody3D.move_and_collide].
+ If set to [code]true[/code], any depenetration from the recovery phase is reported as a collision; this is used e.g. by [CharacterBody3D] for improving floor detection during floor snapping.
+ If set to [code]false[/code], only collisions resulting from the motion are reported, which is generally the desired behavior.
</member>
</members>
</class>
diff --git a/doc/classes/PlaceholderCubemap.xml b/doc/classes/PlaceholderCubemap.xml
index 3617c6ac2c..0892b023a2 100644
--- a/doc/classes/PlaceholderCubemap.xml
+++ b/doc/classes/PlaceholderCubemap.xml
@@ -1,8 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="PlaceholderCubemap" inherits="PlaceholderTextureLayered" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
+ Placeholder class for a cubemap texture.
</brief_description>
<description>
+ This class is used when loading a project that uses a [Cubemap] subclass in 2 conditions:
+ - When running the project exported in dedicated server mode, only the texture's dimensions are kept (as they may be relied upon for gameplay purposes or positioning of other elements). This allows reducing the exported PCK's size significantly.
+ - When this subclass is missing due to using a different engine version or build (e.g. modules disabled).
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/PlaceholderCubemapArray.xml b/doc/classes/PlaceholderCubemapArray.xml
index 1fcf1e7795..c7a7e9154c 100644
--- a/doc/classes/PlaceholderCubemapArray.xml
+++ b/doc/classes/PlaceholderCubemapArray.xml
@@ -1,8 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="PlaceholderCubemapArray" inherits="PlaceholderTextureLayered" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
+ Placeholder class for a cubemap texture array.
</brief_description>
<description>
+ This class is used when loading a project that uses a [CubemapArray] subclass in 2 conditions:
+ - When running the project exported in dedicated server mode, only the texture's dimensions are kept (as they may be relied upon for gameplay purposes or positioning of other elements). This allows reducing the exported PCK's size significantly.
+ - When this subclass is missing due to using a different engine version or build (e.g. modules disabled).
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/PlaceholderMaterial.xml b/doc/classes/PlaceholderMaterial.xml
index c66641d81c..7febdc7a07 100644
--- a/doc/classes/PlaceholderMaterial.xml
+++ b/doc/classes/PlaceholderMaterial.xml
@@ -1,8 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="PlaceholderMaterial" inherits="Material" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
+ Placeholder class for a material.
</brief_description>
<description>
+ This class is used when loading a project that uses a [Material] subclass in 2 conditions:
+ - When running the project exported in dedicated server mode, only the texture's dimensions are kept (as they may be relied upon for gameplay purposes or positioning of other elements). This allows reducing the exported PCK's size significantly.
+ - When this subclass is missing due to using a different engine version or build (e.g. modules disabled).
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/PlaceholderMesh.xml b/doc/classes/PlaceholderMesh.xml
index cc688816b6..8021a57878 100644
--- a/doc/classes/PlaceholderMesh.xml
+++ b/doc/classes/PlaceholderMesh.xml
@@ -1,13 +1,18 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="PlaceholderMesh" inherits="Mesh" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
+ Placeholder class for a mesh.
</brief_description>
<description>
+ This class is used when loading a project that uses a [Mesh] subclass in 2 conditions:
+ - When running the project exported in dedicated server mode, only the texture's dimensions are kept (as they may be relied upon for gameplay purposes or positioning of other elements). This allows reducing the exported PCK's size significantly.
+ - When this subclass is missing due to using a different engine version or build (e.g. modules disabled).
</description>
<tutorials>
</tutorials>
<members>
<member name="aabb" type="AABB" setter="set_aabb" getter="get_aabb" default="AABB(0, 0, 0, 0, 0, 0)">
+ The smallest [AABB] enclosing this mesh in local space.
</member>
</members>
</class>
diff --git a/doc/classes/PlaceholderTexture2D.xml b/doc/classes/PlaceholderTexture2D.xml
index 76e575265b..c889055e4d 100644
--- a/doc/classes/PlaceholderTexture2D.xml
+++ b/doc/classes/PlaceholderTexture2D.xml
@@ -1,13 +1,19 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="PlaceholderTexture2D" inherits="Texture2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
+ Placeholder class for a 2-dimensional texture.
</brief_description>
<description>
+ This class is used when loading a project that uses a [Texture2D] subclass in 2 conditions:
+ - When running the project exported in dedicated server mode, only the texture's dimensions are kept (as they may be relied upon for gameplay purposes or positioning of other elements). This allows reducing the exported PCK's size significantly.
+ - When this subclass is missing due to using a different engine version or build (e.g. modules disabled).
</description>
<tutorials>
</tutorials>
<members>
+ <member name="resource_local_to_scene" type="bool" setter="set_local_to_scene" getter="is_local_to_scene" overrides="Resource" default="false" />
<member name="size" type="Vector2" setter="set_size" getter="get_size" default="Vector2(1, 1)">
+ The texture's size (in pixels).
</member>
</members>
</class>
diff --git a/doc/classes/PlaceholderTexture2DArray.xml b/doc/classes/PlaceholderTexture2DArray.xml
index a502e5d334..a749e8c039 100644
--- a/doc/classes/PlaceholderTexture2DArray.xml
+++ b/doc/classes/PlaceholderTexture2DArray.xml
@@ -1,8 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="PlaceholderTexture2DArray" inherits="PlaceholderTextureLayered" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
+ Placeholder class for a 2-dimensional texture array.
</brief_description>
<description>
+ This class is used when loading a project that uses a [Texture2D] subclass in 2 conditions:
+ - When running the project exported in dedicated server mode, only the texture's dimensions are kept (as they may be relied upon for gameplay purposes or positioning of other elements). This allows reducing the exported PCK's size significantly.
+ - When this subclass is missing due to using a different engine version or build (e.g. modules disabled).
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/PlaceholderTexture3D.xml b/doc/classes/PlaceholderTexture3D.xml
index d31e538307..ccd3c94fc2 100644
--- a/doc/classes/PlaceholderTexture3D.xml
+++ b/doc/classes/PlaceholderTexture3D.xml
@@ -1,13 +1,18 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="PlaceholderTexture3D" inherits="Texture3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
+ Placeholder class for a 3-dimensional texture.
</brief_description>
<description>
+ This class is used when loading a project that uses a [Texture3D] subclass in 2 conditions:
+ - When running the project exported in dedicated server mode, only the texture's dimensions are kept (as they may be relied upon for gameplay purposes or positioning of other elements). This allows reducing the exported PCK's size significantly.
+ - When this subclass is missing due to using a different engine version or build (e.g. modules disabled).
</description>
<tutorials>
</tutorials>
<members>
<member name="size" type="Vector3i" setter="set_size" getter="get_size" default="Vector3i(1, 1, 1)">
+ The texture's size (in pixels).
</member>
</members>
</class>
diff --git a/doc/classes/PlaceholderTextureLayered.xml b/doc/classes/PlaceholderTextureLayered.xml
index 39af08473a..8cc6dd606a 100644
--- a/doc/classes/PlaceholderTextureLayered.xml
+++ b/doc/classes/PlaceholderTextureLayered.xml
@@ -1,15 +1,21 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="PlaceholderTextureLayered" inherits="TextureLayered" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
+ Placeholder class for a 2-dimensional texture array.
</brief_description>
<description>
+ This class is used when loading a project that uses a [TextureLayered] subclass in 2 conditions:
+ - When running the project exported in dedicated server mode, only the texture's dimensions are kept (as they may be relied upon for gameplay purposes or positioning of other elements). This allows reducing the exported PCK's size significantly.
+ - When this subclass is missing due to using a different engine version or build (e.g. modules disabled).
</description>
<tutorials>
</tutorials>
<members>
<member name="layers" type="int" setter="set_layers" getter="get_layers" default="1">
+ The number of layers in the texture array.
</member>
<member name="size" type="Vector2i" setter="set_size" getter="get_size" default="Vector2i(1, 1)">
+ The size of each texture layer (in pixels).
</member>
</members>
</class>
diff --git a/doc/classes/Plane.xml b/doc/classes/Plane.xml
index 63a05ef15c..fbe8afa8d1 100644
--- a/doc/classes/Plane.xml
+++ b/doc/classes/Plane.xml
@@ -30,7 +30,7 @@
<param index="2" name="c" type="float" />
<param index="3" name="d" type="float" />
<description>
- Creates a plane from the four parameters. The three components of the resulting plane's [member normal] are [code]a[/code], [code]b[/code] and [code]c[/code], and the plane has a distance of [code]d[/code] from the origin.
+ Creates a plane from the four parameters. The three components of the resulting plane's [member normal] are [param a], [param b] and [param c], and the plane has a distance of [param d] from the origin.
</description>
</constructor>
<constructor name="Plane">
@@ -77,7 +77,7 @@
<return type="float" />
<param index="0" name="point" type="Vector3" />
<description>
- Returns the shortest distance from the plane to the position [code]point[/code]. If the point is above the plane, the distance will be positive. If below, the distance will be negative.
+ Returns the shortest distance from the plane to the position [param point]. If the point is above the plane, the distance will be positive. If below, the distance will be negative.
</description>
</method>
<method name="has_point" qualifiers="const">
@@ -85,7 +85,7 @@
<param index="0" name="point" type="Vector3" />
<param index="1" name="tolerance" type="float" default="1e-05" />
<description>
- Returns [code]true[/code] if [code]point[/code] is inside the plane. Comparison uses a custom minimum [code]tolerance[/code] threshold.
+ Returns [code]true[/code] if [param point] is inside the plane. Comparison uses a custom minimum [param tolerance] threshold.
</description>
</method>
<method name="intersect_3" qualifiers="const">
@@ -93,7 +93,7 @@
<param index="0" name="b" type="Plane" />
<param index="1" name="c" type="Plane" />
<description>
- Returns the intersection point of the three planes [code]b[/code], [code]c[/code] and this plane. If no intersection is found, [code]null[/code] is returned.
+ Returns the intersection point of the three planes [param b], [param c] and this plane. If no intersection is found, [code]null[/code] is returned.
</description>
</method>
<method name="intersects_ray" qualifiers="const">
@@ -101,7 +101,7 @@
<param index="0" name="from" type="Vector3" />
<param index="1" name="dir" type="Vector3" />
<description>
- Returns the intersection point of a ray consisting of the position [code]from[/code] and the direction normal [code]dir[/code] with this plane. If no intersection is found, [code]null[/code] is returned.
+ Returns the intersection point of a ray consisting of the position [param from] and the direction normal [param dir] with this plane. If no intersection is found, [code]null[/code] is returned.
</description>
</method>
<method name="intersects_segment" qualifiers="const">
@@ -109,21 +109,27 @@
<param index="0" name="from" type="Vector3" />
<param index="1" name="to" type="Vector3" />
<description>
- Returns the intersection point of a segment from position [code]from[/code] to position [code]to[/code] with this plane. If no intersection is found, [code]null[/code] is returned.
+ Returns the intersection point of a segment from position [param from] to position [param to] with this plane. If no intersection is found, [code]null[/code] is returned.
</description>
</method>
<method name="is_equal_approx" qualifiers="const">
<return type="bool" />
<param index="0" name="to_plane" type="Plane" />
<description>
- Returns [code]true[/code] if this plane and [code]plane[/code] are approximately equal, by running [method @GlobalScope.is_equal_approx] on each component.
+ Returns [code]true[/code] if this plane and [param to_plane] are approximately equal, by running [method @GlobalScope.is_equal_approx] on each component.
+ </description>
+ </method>
+ <method name="is_finite" qualifiers="const">
+ <return type="bool" />
+ <description>
+ Returns [code]true[/code] if this plane is finite, by calling [method @GlobalScope.is_finite] on each component.
</description>
</method>
<method name="is_point_over" qualifiers="const">
<return type="bool" />
<param index="0" name="point" type="Vector3" />
<description>
- Returns [code]true[/code] if [code]point[/code] is located above the plane.
+ Returns [code]true[/code] if [param point] is located above the plane.
</description>
</method>
<method name="normalized" qualifiers="const">
@@ -136,7 +142,7 @@
<return type="Vector3" />
<param index="0" name="point" type="Vector3" />
<description>
- Returns the orthogonal projection of [code]point[/code] into a point in the plane.
+ Returns the orthogonal projection of [param point] into a point in the plane.
</description>
</method>
</methods>
diff --git a/doc/classes/PlaneMesh.xml b/doc/classes/PlaneMesh.xml
index 6b3a7ed548..1dceac70b0 100644
--- a/doc/classes/PlaneMesh.xml
+++ b/doc/classes/PlaneMesh.xml
@@ -4,7 +4,7 @@
Class representing a planar [PrimitiveMesh].
</brief_description>
<description>
- Class representing a planar [PrimitiveMesh]. This flat mesh does not have a thickness. By default, this mesh is aligned on the X and Z axes; this default rotation isn't suited for use with billboarded materials. For billboarded materials, use [QuadMesh] instead.
+ Class representing a planar [PrimitiveMesh]. This flat mesh does not have a thickness. By default, this mesh is aligned on the X and Z axes; this default rotation isn't suited for use with billboarded materials. For billboarded materials, change [member orientation] to [constant FACE_Z].
[b]Note:[/b] When using a large textured [PlaneMesh] (e.g. as a floor), you may stumble upon UV jittering issues depending on the camera angle. To solve this, increase [member subdivide_depth] and [member subdivide_width] until you no longer notice UV jittering.
</description>
<tutorials>
@@ -13,6 +13,9 @@
<member name="center_offset" type="Vector3" setter="set_center_offset" getter="get_center_offset" default="Vector3(0, 0, 0)">
Offset of the generated plane. Useful for particles.
</member>
+ <member name="orientation" type="int" setter="set_orientation" getter="get_orientation" enum="PlaneMesh.Orientation" default="1">
+ Direction that the [PlaneMesh] is facing. See [enum Orientation] for options.
+ </member>
<member name="size" type="Vector2" setter="set_size" getter="get_size" default="Vector2(2, 2)">
Size of the generated plane.
</member>
@@ -23,4 +26,15 @@
Number of subdivision along the X axis.
</member>
</members>
+ <constants>
+ <constant name="FACE_X" value="0" enum="Orientation">
+ [PlaneMesh] will face the positive X-axis.
+ </constant>
+ <constant name="FACE_Y" value="1" enum="Orientation">
+ [PlaneMesh] will face the positive Y-axis. This matches the behavior of the [PlaneMesh] in Godot 3.x.
+ </constant>
+ <constant name="FACE_Z" value="2" enum="Orientation">
+ [PlaneMesh] will face the positive Z-axis. This matches the behavior of the QuadMesh in Godot 3.x.
+ </constant>
+ </constants>
</class>
diff --git a/doc/classes/Polygon2D.xml b/doc/classes/Polygon2D.xml
index 8498e703fb..a3fc326351 100644
--- a/doc/classes/Polygon2D.xml
+++ b/doc/classes/Polygon2D.xml
@@ -14,7 +14,7 @@
<param index="0" name="path" type="NodePath" />
<param index="1" name="weights" type="PackedFloat32Array" />
<description>
- Adds a bone with the specified [code]path[/code] and [code]weights[/code].
+ Adds a bone with the specified [param path] and [param weights].
</description>
</method>
<method name="clear_bones">
@@ -79,10 +79,10 @@
<member name="internal_vertex_count" type="int" setter="set_internal_vertex_count" getter="get_internal_vertex_count" default="0">
</member>
<member name="invert_border" type="float" setter="set_invert_border" getter="get_invert_border" default="100.0">
- Added padding applied to the bounding box when using [code]invert[/code]. Setting this value too small may result in a "Bad Polygon" error.
+ Added padding applied to the bounding box when [member invert_enabled] is set to [code]true[/code]. Setting this value too small may result in a "Bad Polygon" error.
</member>
- <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 name="invert_enabled" type="bool" setter="set_invert_enabled" getter="get_invert_enabled" default="false">
+ If [code]true[/code], the polygon will be inverted, containing the area outside the defined points and extending to the [member invert_border].
</member>
<member name="offset" type="Vector2" setter="set_offset" getter="get_offset" default="Vector2(0, 0)">
The offset applied to each vertex.
@@ -92,6 +92,7 @@
[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="[]">
+ The list of polygons, in case more than one is being represented. Every individual polygon is stored as a [PackedInt32Array] where each [int] is an index to a point in [member polygon]. If empty, this property will be ignored, and the resulting single polygon will be composed of all points in [member polygon], using the order they are stored in.
</member>
<member name="skeleton" type="NodePath" setter="set_skeleton" getter="get_skeleton" default="NodePath(&quot;&quot;)">
</member>
diff --git a/doc/classes/Popup.xml b/doc/classes/Popup.xml
index 3fcf0a9b8f..a56bf77774 100644
--- a/doc/classes/Popup.xml
+++ b/doc/classes/Popup.xml
@@ -4,7 +4,7 @@
Popup is a base window container for popup-like subwindows.
</brief_description>
<description>
- Popup is a base window container for popup-like subwindows. It's a modal by default (see [member popup_window]) and has helpers for custom popup behavior.
+ Popup is a base window container for popup-like subwindows. It's a modal by default (see [member Window.popup_window]) and has helpers for custom popup behavior.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/PopupMenu.xml b/doc/classes/PopupMenu.xml
index 410489481e..0dcb33ac4c 100644
--- a/doc/classes/PopupMenu.xml
+++ b/doc/classes/PopupMenu.xml
@@ -19,8 +19,8 @@
<param index="1" name="id" type="int" default="-1" />
<param index="2" name="accel" type="int" enum="Key" default="0" />
<description>
- Adds a new checkable item with text [code]label[/code].
- An [code]id[/code] can optionally be provided, as well as an accelerator ([code]accel[/code]). If no [code]id[/code] is provided, one will be created from the index. If no [code]accel[/code] is provided then the default [code]0[/code] will be assigned to it. See [method get_item_accelerator] for more info on accelerators.
+ Adds a new checkable item with text [param label].
+ An [param id] can optionally be provided, as well as an accelerator ([param accel]). If no [param id] is provided, one will be created from the index. If no [param accel] is provided then the default [code]0[/code] will be assigned to it. See [method get_item_accelerator] for more info on accelerators.
[b]Note:[/b] Checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. See [method set_item_checked] for more info on how to control it.
</description>
</method>
@@ -31,7 +31,7 @@
<param index="2" name="global" type="bool" default="false" />
<description>
Adds a new checkable item and assigns the specified [Shortcut] to it. Sets the label of the checkbox to the [Shortcut]'s name.
- An [code]id[/code] can optionally be provided. If no [code]id[/code] is provided, one will be created from the index.
+ An [param id] can optionally be provided. If no [param id] is provided, one will be created from the index.
[b]Note:[/b] Checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. See [method set_item_checked] for more info on how to control it.
</description>
</method>
@@ -42,8 +42,8 @@
<param index="2" name="id" type="int" default="-1" />
<param index="3" name="accel" type="int" enum="Key" default="0" />
<description>
- Adds a new checkable item with text [code]label[/code] and icon [code]texture[/code].
- An [code]id[/code] can optionally be provided, as well as an accelerator ([code]accel[/code]). If no [code]id[/code] is provided, one will be created from the index. If no [code]accel[/code] is provided then the default [code]0[/code] will be assigned to it. See [method get_item_accelerator] for more info on accelerators.
+ Adds a new checkable item with text [param label] and icon [param texture].
+ An [param id] can optionally be provided, as well as an accelerator ([param accel]). If no [param id] is provided, one will be created from the index. If no [param accel] is provided then the default [code]0[/code] will be assigned to it. See [method get_item_accelerator] for more info on accelerators.
[b]Note:[/b] Checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. See [method set_item_checked] for more info on how to control it.
</description>
</method>
@@ -54,8 +54,8 @@
<param index="2" name="id" type="int" default="-1" />
<param index="3" name="global" type="bool" default="false" />
<description>
- Adds a new checkable item and assigns the specified [Shortcut] and icon [code]texture[/code] to it. Sets the label of the checkbox to the [Shortcut]'s name.
- An [code]id[/code] can optionally be provided. If no [code]id[/code] is provided, one will be created from the index.
+ Adds a new checkable item and assigns the specified [Shortcut] and icon [param texture] to it. Sets the label of the checkbox to the [Shortcut]'s name.
+ An [param id] can optionally be provided. If no [param id] is provided, one will be created from the index.
[b]Note:[/b] Checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. See [method set_item_checked] for more info on how to control it.
</description>
</method>
@@ -66,8 +66,8 @@
<param index="2" name="id" type="int" default="-1" />
<param index="3" name="accel" type="int" enum="Key" default="0" />
<description>
- Adds a new item with text [code]label[/code] and icon [code]texture[/code].
- An [code]id[/code] can optionally be provided, as well as an accelerator ([code]accel[/code]). If no [code]id[/code] is provided, one will be created from the index. If no [code]accel[/code] is provided then the default [code]0[/code] will be assigned to it. See [method get_item_accelerator] for more info on accelerators.
+ Adds a new item with text [param label] and icon [param texture].
+ An [param id] can optionally be provided, as well as an accelerator ([param accel]). If no [param id] is provided, one will be created from the index. If no [param accel] is provided then the default [code]0[/code] will be assigned to it. See [method get_item_accelerator] for more info on accelerators.
</description>
</method>
<method name="add_icon_radio_check_item">
@@ -97,8 +97,8 @@
<param index="2" name="id" type="int" default="-1" />
<param index="3" name="global" type="bool" default="false" />
<description>
- Adds a new item and assigns the specified [Shortcut] and icon [code]texture[/code] to it. Sets the label of the checkbox to the [Shortcut]'s name.
- An [code]id[/code] can optionally be provided. If no [code]id[/code] is provided, one will be created from the index.
+ Adds a new item and assigns the specified [Shortcut] and icon [param texture] to it. Sets the label of the checkbox to the [Shortcut]'s name.
+ An [param id] can optionally be provided. If no [param id] is provided, one will be created from the index.
</description>
</method>
<method name="add_item">
@@ -107,9 +107,9 @@
<param index="1" name="id" type="int" default="-1" />
<param index="2" name="accel" type="int" enum="Key" default="0" />
<description>
- Adds a new item with text [code]label[/code].
- An [code]id[/code] can optionally be provided, as well as an accelerator ([code]accel[/code]). If no [code]id[/code] is provided, one will be created from the index. If no [code]accel[/code] is provided then the default [code]0[/code] will be assigned to it. See [method get_item_accelerator] for more info on accelerators.
- [b]Note:[/b] The provided [code]id[/code] is used only in [signal id_pressed] and [signal id_focused] signals. It's not related to the [code]index[/code] arguments in e.g. [method set_item_checked].
+ Adds a new item with text [param label].
+ An [param id] can optionally be provided, as well as an accelerator ([param accel]). If no [param id] is provided, one will be created from the index. If no [param accel] is provided then the default [code]0[/code] will be assigned to it. See [method get_item_accelerator] for more info on accelerators.
+ [b]Note:[/b] The provided [param id] is used only in [signal id_pressed] and [signal id_focused] signals. It's not related to the [code]index[/code] arguments in e.g. [method set_item_checked].
</description>
</method>
<method name="add_multistate_item">
@@ -120,9 +120,9 @@
<param index="3" name="id" type="int" default="-1" />
<param index="4" name="accel" type="int" enum="Key" default="0" />
<description>
- Adds a new multistate item with text [code]label[/code].
- Contrarily to normal binary items, multistate items can have more than two states, as defined by [code]max_states[/code]. Each press or activate of the item will increase the state by one. The default value is defined by [code]default_state[/code].
- An [code]id[/code] can optionally be provided, as well as an accelerator ([code]accel[/code]). If no [code]id[/code] is provided, one will be created from the index. If no [code]accel[/code] is provided then the default [code]0[/code] will be assigned to it. See [method get_item_accelerator] for more info on accelerators.
+ Adds a new multistate item with text [param label].
+ Contrarily to normal binary items, multistate items can have more than two states, as defined by [param max_states]. Each press or activate of the item will increase the state by one. The default value is defined by [param default_state].
+ An [param id] can optionally be provided, as well as an accelerator ([param accel]). If no [param id] is provided, one will be created from the index. If no [param accel] is provided then the default [code]0[/code] will be assigned to it. See [method get_item_accelerator] for more info on accelerators.
</description>
</method>
<method name="add_radio_check_item">
@@ -131,8 +131,8 @@
<param index="1" name="id" type="int" default="-1" />
<param index="2" name="accel" type="int" enum="Key" default="0" />
<description>
- Adds a new radio check button with text [code]label[/code].
- An [code]id[/code] can optionally be provided, as well as an accelerator ([code]accel[/code]). If no [code]id[/code] is provided, one will be created from the index. If no [code]accel[/code] is provided then the default [code]0[/code] will be assigned to it. See [method get_item_accelerator] for more info on accelerators.
+ Adds a new radio check button with text [param label].
+ An [param id] can optionally be provided, as well as an accelerator ([param accel]). If no [param id] is provided, one will be created from the index. If no [param accel] is provided then the default [code]0[/code] will be assigned to it. See [method get_item_accelerator] for more info on accelerators.
[b]Note:[/b] Checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. See [method set_item_checked] for more info on how to control it.
</description>
</method>
@@ -143,7 +143,7 @@
<param index="2" name="global" type="bool" default="false" />
<description>
Adds a new radio check button and assigns a [Shortcut] to it. Sets the label of the checkbox to the [Shortcut]'s name.
- An [code]id[/code] can optionally be provided. If no [code]id[/code] is provided, one will be created from the index.
+ An [param id] can optionally be provided. If no [param id] is provided, one will be created from the index.
[b]Note:[/b] Checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. See [method set_item_checked] for more info on how to control it.
</description>
</method>
@@ -152,8 +152,8 @@
<param index="0" name="label" type="String" default="&quot;&quot;" />
<param index="1" name="id" type="int" default="-1" />
<description>
- Adds a separator between items. Separators also occupy an index, which you can set by using the [code]id[/code] parameter.
- A [code]label[/code] can optionally be provided, which will appear at the center of the separator.
+ Adds a separator between items. Separators also occupy an index, which you can set by using the [param id] parameter.
+ A [param label] can optionally be provided, which will appear at the center of the separator.
</description>
</method>
<method name="add_shortcut">
@@ -163,7 +163,7 @@
<param index="2" name="global" type="bool" default="false" />
<description>
Adds a [Shortcut].
- An [code]id[/code] can optionally be provided. If no [code]id[/code] is provided, one will be created from the index.
+ An [param id] can optionally be provided. If no [param id] is provided, one will be created from the index.
</description>
</method>
<method name="add_submenu_item">
@@ -172,8 +172,8 @@
<param index="1" name="submenu" type="String" />
<param index="2" name="id" type="int" default="-1" />
<description>
- Adds an item that will act as a submenu of the parent [PopupMenu] node when clicked. The [code]submenu[/code] argument is the name of the child [PopupMenu] node that will be shown when the item is clicked.
- An [code]id[/code] can optionally be provided. If no [code]id[/code] is provided, one will be created from the index.
+ Adds an item that will act as a submenu of the parent [PopupMenu] node when clicked. The [param submenu] argument is the name of the child [PopupMenu] node that will be shown when the item is clicked.
+ An [param id] can optionally be provided. If no [param id] is provided, one will be created from the index.
</description>
</method>
<method name="clear">
@@ -182,7 +182,7 @@
Removes all items from the [PopupMenu].
</description>
</method>
- <method name="get_current_index" qualifiers="const">
+ <method name="get_focused_item" qualifiers="const">
<return type="int" />
<description>
Returns the index of the currently focused item. Returns [code]-1[/code] if no item is focused.
@@ -192,35 +192,35 @@
<return type="int" enum="Key" />
<param index="0" name="index" type="int" />
<description>
- Returns the accelerator of the item at the given [code]index[/code]. Accelerators are special combinations of keys that activate the item, no matter which control is focused.
+ Returns the accelerator of the item at the given [param index]. Accelerators are special combinations of keys that activate the item, no matter which control is focused.
</description>
</method>
- <method name="get_item_horizontal_offset" qualifiers="const">
- <return type="int" />
+ <method name="get_item_icon" qualifiers="const">
+ <return type="Texture2D" />
<param index="0" name="index" type="int" />
<description>
- Returns the horizontal offset of the item at the given [code]index[/code].
+ Returns the icon of the item at the given [param index].
</description>
</method>
- <method name="get_item_icon" qualifiers="const">
- <return type="Texture2D" />
+ <method name="get_item_id" qualifiers="const">
+ <return type="int" />
<param index="0" name="index" type="int" />
<description>
- Returns the icon of the item at the given [code]index[/code].
+ Returns the id of the item at the given [param index]. [code]id[/code] can be manually assigned, while index can not.
</description>
</method>
- <method name="get_item_id" qualifiers="const">
+ <method name="get_item_indent" qualifiers="const">
<return type="int" />
<param index="0" name="index" type="int" />
<description>
- Returns the id of the item at the given [code]index[/code]. [code]id[/code] can be manually assigned, while index can not.
+ Returns the horizontal offset of the item at the given [param index].
</description>
</method>
<method name="get_item_index" qualifiers="const">
<return type="int" />
<param index="0" name="id" type="int" />
<description>
- Returns the index of the item containing the specified [code]id[/code]. Index is automatically assigned to each item by the engine and can not be set manually.
+ Returns the index of the item containing the specified [param id]. Index is automatically assigned to each item by the engine and can not be set manually.
</description>
</method>
<method name="get_item_language" qualifiers="const">
@@ -241,21 +241,21 @@
<return type="Shortcut" />
<param index="0" name="index" type="int" />
<description>
- Returns the [Shortcut] associated with the item at the given [code]index[/code].
+ Returns the [Shortcut] associated with the item at the given [param index].
</description>
</method>
<method name="get_item_submenu" qualifiers="const">
<return type="String" />
<param index="0" name="index" type="int" />
<description>
- Returns the submenu name of the item at the given [code]index[/code]. See [method add_submenu_item] for more info on how to add a submenu.
+ Returns the submenu name of the item at the given [param index]. See [method add_submenu_item] for more info on how to add a submenu.
</description>
</method>
<method name="get_item_text" qualifiers="const">
<return type="String" />
<param index="0" name="index" type="int" />
<description>
- Returns the text of the item at the given [code]index[/code].
+ Returns the text of the item at the given [param index].
</description>
</method>
<method name="get_item_text_direction" qualifiers="const">
@@ -269,14 +269,14 @@
<return type="String" />
<param index="0" name="index" type="int" />
<description>
- Returns the tooltip associated with the item at the given [code]index[/code].
+ Returns the tooltip associated with the item at the given [param index].
</description>
</method>
<method name="is_item_checkable" qualifiers="const">
<return type="bool" />
<param index="0" name="index" type="int" />
<description>
- Returns [code]true[/code] if the item at the given [code]index[/code] is checkable in some way, i.e. if it has a checkbox or radio button.
+ Returns [code]true[/code] if the item at the given [param index] is checkable in some way, i.e. if it has a checkbox or radio button.
[b]Note:[/b] Checkable items just display a checkmark or radio button, but don't have any built-in checking behavior and must be checked/unchecked manually.
</description>
</method>
@@ -284,14 +284,14 @@
<return type="bool" />
<param index="0" name="index" type="int" />
<description>
- Returns [code]true[/code] if the item at the given [code]index[/code] is checked.
+ Returns [code]true[/code] if the item at the given [param index] is checked.
</description>
</method>
<method name="is_item_disabled" qualifiers="const">
<return type="bool" />
<param index="0" name="index" type="int" />
<description>
- Returns [code]true[/code] if the item at the given [code]index[/code] is disabled. When it is disabled it can't be selected, or its action invoked.
+ Returns [code]true[/code] if the item at the given [param index] is disabled. When it is disabled it can't be selected, or its action invoked.
See [method set_item_disabled] for more info on how to disable an item.
</description>
</method>
@@ -299,7 +299,7 @@
<return type="bool" />
<param index="0" name="index" type="int" />
<description>
- Returns [code]true[/code] if the item at the given [code]index[/code] has radio button-style checkability.
+ Returns [code]true[/code] if the item at the given [param index] has radio button-style checkability.
[b]Note:[/b] This is purely cosmetic; you must add the logic for checking/unchecking items in radio groups.
</description>
</method>
@@ -321,7 +321,7 @@
<return type="void" />
<param index="0" name="index" type="int" />
<description>
- Removes the item at the given [code]index[/code] from the menu.
+ Removes the item at the given [param index] from the menu.
[b]Note:[/b] The indices of items after the removed item will be shifted by one.
</description>
</method>
@@ -329,14 +329,15 @@
<return type="void" />
<param index="0" name="index" type="int" />
<description>
- Moves the scroll view to make the item at the given [code]index[/code] visible.
+ Moves the scroll view to make the item at the given [param index] visible.
</description>
</method>
- <method name="set_current_index">
+ <method name="set_focused_item">
<return type="void" />
<param index="0" name="index" type="int" />
<description>
- Sets the currently focused item as the given [code]index[/code].
+ Sets the currently focused item as the given [param index].
+ Passing [code]-1[/code] as the index makes so that no item is focused.
</description>
</method>
<method name="set_item_accelerator">
@@ -344,7 +345,7 @@
<param index="0" name="index" type="int" />
<param index="1" name="accel" type="int" enum="Key" />
<description>
- Sets the accelerator of the item at the given [code]index[/code]. Accelerators are special combinations of keys that activate the item, no matter which control is focused.
+ Sets the accelerator of the item at the given [param index]. Accelerators are special combinations of keys that activate the item, no matter which control is focused.
</description>
</method>
<method name="set_item_as_checkable">
@@ -352,7 +353,7 @@
<param index="0" name="index" type="int" />
<param index="1" name="enable" type="bool" />
<description>
- Sets whether the item at the given [code]index[/code] has a checkbox. If [code]false[/code], sets the type of the item to plain text.
+ Sets whether the item at the given [param index] has a checkbox. If [code]false[/code], sets the type of the item to plain text.
[b]Note:[/b] Checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually.
</description>
</method>
@@ -361,7 +362,7 @@
<param index="0" name="index" type="int" />
<param index="1" name="enable" type="bool" />
<description>
- Sets the type of the item at the given [code]index[/code] to radio button. If [code]false[/code], sets the type of the item to plain text.
+ Sets the type of the item at the given [param index] to radio button. If [code]false[/code], sets the type of the item to plain text.
</description>
</method>
<method name="set_item_as_separator">
@@ -369,7 +370,7 @@
<param index="0" name="index" type="int" />
<param index="1" name="enable" type="bool" />
<description>
- Mark the item at the given [code]index[/code] as a separator, which means that it would be displayed as a line. If [code]false[/code], sets the type of the item to plain text.
+ Mark the item at the given [param index] as a separator, which means that it would be displayed as a line. If [code]false[/code], sets the type of the item to plain text.
</description>
</method>
<method name="set_item_checked">
@@ -377,7 +378,7 @@
<param index="0" name="index" type="int" />
<param index="1" name="checked" type="bool" />
<description>
- Sets the checkstate status of the item at the given [code]index[/code].
+ Sets the checkstate status of the item at the given [param index].
</description>
</method>
<method name="set_item_disabled">
@@ -385,32 +386,32 @@
<param index="0" name="index" type="int" />
<param index="1" name="disabled" type="bool" />
<description>
- Enables/disables the item at the given [code]index[/code]. When it is disabled, it can't be selected and its action can't be invoked.
+ Enables/disables the item at the given [param index]. When it is disabled, it can't be selected and its action can't be invoked.
</description>
</method>
- <method name="set_item_horizontal_offset">
+ <method name="set_item_icon">
<return type="void" />
<param index="0" name="index" type="int" />
- <param index="1" name="offset" type="int" />
+ <param index="1" name="icon" type="Texture2D" />
<description>
- Sets the horizontal offset of the item at the given [code]index[/code].
+ Replaces the [Texture2D] icon of the item at the given [param index].
</description>
</method>
- <method name="set_item_icon">
+ <method name="set_item_id">
<return type="void" />
<param index="0" name="index" type="int" />
- <param index="1" name="icon" type="Texture2D" />
+ <param index="1" name="id" type="int" />
<description>
- Replaces the [Texture2D] icon of the item at the given [code]index[/code].
+ Sets the [param id] of the item at the given [param index].
+ The [param id] is used in [signal id_pressed] and [signal id_focused] signals.
</description>
</method>
- <method name="set_item_id">
+ <method name="set_item_indent">
<return type="void" />
<param index="0" name="index" type="int" />
- <param index="1" name="id" type="int" />
+ <param index="1" name="indent" type="int" />
<description>
- Sets the [code]id[/code] of the item at the given [code]index[/code].
- The [code]id[/code] is used in [signal id_pressed] and [signal id_focused] signals.
+ Sets the horizontal offset of the item at the given [param index].
</description>
</method>
<method name="set_item_language">
@@ -443,7 +444,7 @@
<param index="1" name="shortcut" type="Shortcut" />
<param index="2" name="global" type="bool" default="false" />
<description>
- Sets a [Shortcut] for the item at the given [code]index[/code].
+ Sets a [Shortcut] for the item at the given [param index].
</description>
</method>
<method name="set_item_shortcut_disabled">
@@ -451,7 +452,7 @@
<param index="0" name="index" type="int" />
<param index="1" name="disabled" type="bool" />
<description>
- Disables the [Shortcut] of the item at the given [code]index[/code].
+ Disables the [Shortcut] of the item at the given [param index].
</description>
</method>
<method name="set_item_submenu">
@@ -459,7 +460,7 @@
<param index="0" name="index" type="int" />
<param index="1" name="submenu" type="String" />
<description>
- Sets the submenu of the item at the given [code]index[/code]. The submenu is the name of a child [PopupMenu] node that would be shown when the item is clicked.
+ Sets the submenu of the item at the given [param index]. The submenu is the name of a child [PopupMenu] node that would be shown when the item is clicked.
</description>
</method>
<method name="set_item_text">
@@ -467,7 +468,7 @@
<param index="0" name="index" type="int" />
<param index="1" name="text" type="String" />
<description>
- Sets the text of the item at the given [code]index[/code].
+ Sets the text of the item at the given [param index].
</description>
</method>
<method name="set_item_text_direction">
@@ -483,14 +484,14 @@
<param index="0" name="index" type="int" />
<param index="1" name="tooltip" type="String" />
<description>
- Sets the [String] tooltip of the item at the given [code]index[/code].
+ Sets the [String] tooltip of the item at the given [param index].
</description>
</method>
<method name="toggle_item_checked">
<return type="void" />
<param index="0" name="index" type="int" />
<description>
- Toggles the check state of the item at the given [code]index[/code].
+ Toggles the check state of the item at the given [param index].
</description>
</method>
<method name="toggle_item_multistate">
@@ -525,19 +526,24 @@
<signal name="id_focused">
<param index="0" name="id" type="int" />
<description>
- Emitted when user navigated to an item of some [code]id[/code] using [code]ui_up[/code] or [code]ui_down[/code] action.
+ Emitted when the user navigated to an item of some [param id] using the [member ProjectSettings.input/ui_up] or [member ProjectSettings.input/ui_down] input action.
</description>
</signal>
<signal name="id_pressed">
<param index="0" name="id" type="int" />
<description>
- Emitted when an item of some [code]id[/code] is pressed or its accelerator is activated.
+ Emitted when an item of some [param id] is pressed or its accelerator is activated.
+ [b]Note:[/b] If [param id] is negative (either explicitly or due to overflow), this will return the corresponding index instead.
</description>
</signal>
<signal name="index_pressed">
<param index="0" name="index" type="int" />
<description>
- Emitted when an item of some [code]index[/code] is pressed or its accelerator is activated.
+ Emitted when an item of some [param index] is pressed or its accelerator is activated.
+ </description>
+ </signal>
+ <signal name="menu_changed">
+ <description>
</description>
</signal>
</signals>
@@ -566,6 +572,9 @@
<theme_item name="h_separation" data_type="constant" type="int" default="4">
The horizontal space between the item's elements.
</theme_item>
+ <theme_item name="indent" data_type="constant" type="int" default="10">
+ Width of the single indentation level.
+ </theme_item>
<theme_item name="item_end_padding" data_type="constant" type="int" default="2">
</theme_item>
<theme_item name="item_start_padding" data_type="constant" type="int" default="2">
@@ -594,12 +603,21 @@
<theme_item name="checked" data_type="icon" type="Texture2D">
[Texture2D] icon for the checked checkbox items.
</theme_item>
+ <theme_item name="checked_disabled" data_type="icon" type="Texture2D">
+ [Texture2D] icon for the checked checkbox items when they are disabled.
+ </theme_item>
<theme_item name="radio_checked" data_type="icon" type="Texture2D">
[Texture2D] icon for the checked radio button items.
</theme_item>
+ <theme_item name="radio_checked_disabled" data_type="icon" type="Texture2D">
+ [Texture2D] icon for the checked radio button items when they are disabled.
+ </theme_item>
<theme_item name="radio_unchecked" data_type="icon" type="Texture2D">
[Texture2D] icon for the unchecked radio button items.
</theme_item>
+ <theme_item name="radio_unchecked_disabled" data_type="icon" type="Texture2D">
+ [Texture2D] icon for the unchecked radio button items when they are disabled.
+ </theme_item>
<theme_item name="submenu" data_type="icon" type="Texture2D">
[Texture2D] icon for the submenu arrow (for left-to-right layouts).
</theme_item>
@@ -609,6 +627,9 @@
<theme_item name="unchecked" data_type="icon" type="Texture2D">
[Texture2D] icon for the unchecked checkbox items.
</theme_item>
+ <theme_item name="unchecked_disabled" data_type="icon" type="Texture2D">
+ [Texture2D] icon for the unchecked checkbox items when they are disabled.
+ </theme_item>
<theme_item name="hover" data_type="style" type="StyleBox">
[StyleBox] displayed when the [PopupMenu] item is hovered.
</theme_item>
diff --git a/doc/classes/PopupPanel.xml b/doc/classes/PopupPanel.xml
index d850cf20b8..0c6c342f5b 100644
--- a/doc/classes/PopupPanel.xml
+++ b/doc/classes/PopupPanel.xml
@@ -5,6 +5,7 @@
</brief_description>
<description>
Class for displaying popups with a panel background. In some cases it might be simpler to use than [Popup], since it provides a configurable background. If you are making windows, better check [Window].
+ If any [Control] node is added as a child of this [PopupPanel], it will be stretched to fit the panel's size (similar to how [PanelContainer] works).
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/PortableCompressedTexture2D.xml b/doc/classes/PortableCompressedTexture2D.xml
index c7e2f2fbdc..693eaafad3 100644
--- a/doc/classes/PortableCompressedTexture2D.xml
+++ b/doc/classes/PortableCompressedTexture2D.xml
@@ -21,8 +21,8 @@
<param index="3" name="lossy_quality" type="float" default="0.8" />
<description>
Initializes the compressed texture from a base image. The compression mode must be provided.
- If this image will be used as a normal map, the "normal map" flag is recommended, to ensure optimum quality.
- If lossy compression is requested, the quality setting can optionally be provided. This maps to Lossy WEBP compression quality.
+ [param normal_map] is recommended to ensure optimum quality if this image will be used as a normal map.
+ If lossy compression is requested, the quality setting can optionally be provided. This maps to Lossy WebP compression quality.
</description>
</method>
<method name="get_compression_mode" qualifiers="const">
@@ -58,6 +58,7 @@
When running on the editor, this class will keep the source compressed data in memory. Otherwise, the source compressed data is lost after loading and the resource can't be re saved.
This flag allows to keep the compressed data in memory if you intend it to persist after loading.
</member>
+ <member name="resource_local_to_scene" type="bool" setter="set_local_to_scene" getter="is_local_to_scene" overrides="Resource" default="false" />
<member name="size_override" type="Vector2" setter="set_size_override" getter="get_size_override" default="Vector2(0, 0)">
Allow overriding the texture size (for 2D only).
</member>
diff --git a/doc/classes/Position3D.xml b/doc/classes/Position3D.xml
deleted file mode 100644
index d91e0fbfdf..0000000000
--- a/doc/classes/Position3D.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Position3D" inherits="Node3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
- <brief_description>
- Generic 3D position hint for editing.
- </brief_description>
- <description>
- Generic 3D position hint for editing. It's just like a plain [Node3D], but it displays as a cross in the 3D editor at all times.
- </description>
- <tutorials>
- </tutorials>
-</class>
diff --git a/doc/classes/PrimitiveMesh.xml b/doc/classes/PrimitiveMesh.xml
index 7046a21f68..b1c8907d8e 100644
--- a/doc/classes/PrimitiveMesh.xml
+++ b/doc/classes/PrimitiveMesh.xml
@@ -4,7 +4,7 @@
Base class for all primitive meshes. Handles applying a [Material] to a primitive mesh.
</brief_description>
<description>
- Base class for all primitive meshes. Handles applying a [Material] to a primitive mesh. Examples include [BoxMesh], [CapsuleMesh], [CylinderMesh], [PlaneMesh], [PrismMesh], [QuadMesh], and [SphereMesh].
+ Base class for all primitive meshes. Handles applying a [Material] to a primitive mesh. Examples include [BoxMesh], [CapsuleMesh], [CylinderMesh], [PlaneMesh], [PrismMesh], and [SphereMesh].
</description>
<tutorials>
</tutorials>
@@ -34,15 +34,21 @@
</method>
</methods>
<members>
- <member name="custom_aabb" type="AABB" setter="set_custom_aabb" getter="get_custom_aabb">
+ <member name="add_uv2" type="bool" setter="set_add_uv2" getter="get_add_uv2" default="false">
+ If set, generates UV2 UV coordinates applying a padding using the [member uv2_padding] setting. UV2 is needed for lightmapping.
+ </member>
+ <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">
+ <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.
This gives the same result as using [constant BaseMaterial3D.CULL_FRONT] in [member BaseMaterial3D.cull_mode].
</member>
<member name="material" type="Material" setter="set_material" getter="get_material">
The current [Material] of the primitive mesh.
</member>
+ <member name="uv2_padding" type="float" setter="set_uv2_padding" getter="get_uv2_padding" default="2.0">
+ If [member add_uv2] is set, specifies the padding in pixels applied along seams of the mesh. If at generation the size of the lightmap texture can't be determined, the UVs are calculated assuming a texture size of 1024x1024.
+ </member>
</members>
</class>
diff --git a/doc/classes/ProceduralSkyMaterial.xml b/doc/classes/ProceduralSkyMaterial.xml
index 3cc4bd71f7..6ba8e57380 100644
--- a/doc/classes/ProceduralSkyMaterial.xml
+++ b/doc/classes/ProceduralSkyMaterial.xml
@@ -17,14 +17,14 @@
<member name="ground_curve" type="float" setter="set_ground_curve" getter="get_ground_curve" default="0.02">
How quickly the [member ground_horizon_color] fades into the [member ground_bottom_color].
</member>
- <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 name="ground_energy_multiplier" type="float" setter="set_ground_energy_multiplier" getter="get_ground_energy_multiplier" default="1.0">
+ Multiplier for ground color. A higher value will make the ground brighter.
</member>
<member name="ground_horizon_color" type="Color" setter="set_ground_horizon_color" getter="get_ground_horizon_color" default="Color(0.6463, 0.6558, 0.6708, 1)">
Color of the ground at the horizon. Blends with [member ground_bottom_color].
</member>
<member name="sky_cover" type="Texture2D" setter="set_sky_cover" getter="get_sky_cover">
- The sky cover texture to use. This texture must use an equirectangular projection (similar to [PanoramaSkyMaterial]). The texture's colors will be [i]added[/i] to the existing sky color, and will be multiplied by [member sky_energy] and [member sky_cover_modulate]. This is mainly suited to displaying stars at night, but it can also be used to display clouds at day or night (with a non-physically-accurate look).
+ The sky cover texture to use. This texture must use an equirectangular projection (similar to [PanoramaSkyMaterial]). The texture's colors will be [i]added[/i] to the existing sky color, and will be multiplied by [member sky_energy_multiplier] and [member sky_cover_modulate]. This is mainly suited to displaying stars at night, but it can also be used to display clouds at day or night (with a non-physically-accurate look).
</member>
<member name="sky_cover_modulate" type="Color" setter="set_sky_cover_modulate" getter="get_sky_cover_modulate" default="Color(1, 1, 1, 1)">
The tint to apply to the [member sky_cover] texture. This can be used to change the sky cover's colors or opacity independently of the sky energy, which is useful for day/night or weather transitions. Only effective if a texture is defined in [member sky_cover].
@@ -32,8 +32,8 @@
<member name="sky_curve" type="float" setter="set_sky_curve" getter="get_sky_curve" default="0.15">
How quickly the [member sky_horizon_color] fades into the [member sky_top_color].
</member>
- <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 name="sky_energy_multiplier" type="float" setter="set_sky_energy_multiplier" getter="get_sky_energy_multiplier" default="1.0">
+ Multiplier for sky color. A higher value will make the sky brighter.
</member>
<member name="sky_horizon_color" type="Color" setter="set_sky_horizon_color" getter="get_sky_horizon_color" default="Color(0.6463, 0.6558, 0.6708, 1)">
Color of the sky at the horizon. Blends with [member sky_top_color].
diff --git a/doc/classes/ProgressBar.xml b/doc/classes/ProgressBar.xml
index 8a781c51fb..510b8d5bd1 100644
--- a/doc/classes/ProgressBar.xml
+++ b/doc/classes/ProgressBar.xml
@@ -12,7 +12,7 @@
<member name="fill_mode" type="int" setter="set_fill_mode" getter="get_fill_mode" default="0">
The fill direction. See [enum FillMode] for possible values.
</member>
- <member name="percent_visible" type="bool" setter="set_percent_visible" getter="is_percent_visible" default="true">
+ <member name="show_percentage" type="bool" setter="set_show_percentage" getter="is_percentage_shown" default="true">
If [code]true[/code], the fill percentage is displayed on the bar.
</member>
</members>
@@ -44,15 +44,15 @@
The size of the text outline.
</theme_item>
<theme_item name="font" data_type="font" type="Font">
- Font used to draw the fill percentage if [member percent_visible] is [code]true[/code].
+ Font used to draw the fill percentage if [member show_percentage] is [code]true[/code].
</theme_item>
<theme_item name="font_size" data_type="font_size" type="int">
- Font size used to draw the fill percentage if [member percent_visible] is [code]true[/code].
+ Font size used to draw the fill percentage if [member show_percentage] is [code]true[/code].
</theme_item>
- <theme_item name="bg" data_type="style" type="StyleBox">
+ <theme_item name="background" data_type="style" type="StyleBox">
The style of the background.
</theme_item>
- <theme_item name="fg" data_type="style" type="StyleBox">
+ <theme_item name="fill" data_type="style" type="StyleBox">
The style of the progress (i.e. the part that fills the bar).
</theme_item>
</theme_items>
diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml
index a6c18bbe2f..714e9210a5 100644
--- a/doc/classes/ProjectSettings.xml
+++ b/doc/classes/ProjectSettings.xml
@@ -87,7 +87,7 @@
<return type="String" />
<param index="0" name="path" type="String" />
<description>
- Returns the absolute, native OS path corresponding to the localized [code]path[/code] (starting with [code]res://[/code] or [code]user://[/code]). The returned path will vary depending on the operating system and user preferences. See [url=$DOCS_URL/tutorials/io/data_paths.html]File paths in Godot projects[/url] to see what those paths convert to. See also [method localize_path].
+ Returns the absolute, native OS path corresponding to the localized [param path] (starting with [code]res://[/code] or [code]user://[/code]). The returned path will vary depending on the operating system and user preferences. See [url=$DOCS_URL/tutorials/io/data_paths.html]File paths in Godot projects[/url] to see what those paths convert to. See also [method localize_path].
[b]Note:[/b] [method globalize_path] with [code]res://[/code] will not work in an exported project. Instead, prepend the executable's base directory to the path when running from an exported project:
[codeblock]
var path = ""
@@ -100,7 +100,7 @@
# `path` will contain the absolute path to `hello.txt` next to the executable.
# This is *not* identical to using `ProjectSettings.globalize_path()` with a `res://` path,
# but is close enough in spirit.
- path = OS.get_executable_path().get_base_dir().plus_file("hello.txt")
+ path = OS.get_executable_path().get_base_dir().path_join("hello.txt")
[/codeblock]
</description>
</method>
@@ -117,30 +117,16 @@
<param index="1" name="replace_files" type="bool" default="true" />
<param index="2" name="offset" type="int" default="0" />
<description>
- Loads the contents of the .pck or .zip file specified by [code]pack[/code] into the resource filesystem ([code]res://[/code]). Returns [code]true[/code] on success.
- [b]Note:[/b] If a file from [code]pack[/code] shares the same path as a file already in the resource filesystem, any attempts to load that file will use the file from [code]pack[/code] unless [code]replace_files[/code] is set to [code]false[/code].
- [b]Note:[/b] The optional [code]offset[/code] parameter can be used to specify the offset in bytes to the start of the resource pack. This is only supported for .pck files.
+ Loads the contents of the .pck or .zip file specified by [param pack] into the resource filesystem ([code]res://[/code]). Returns [code]true[/code] on success.
+ [b]Note:[/b] If a file from [param pack] shares the same path as a file already in the resource filesystem, any attempts to load that file will use the file from [param pack] unless [param replace_files] is set to [code]false[/code].
+ [b]Note:[/b] The optional [param offset] parameter can be used to specify the offset in bytes to the start of the resource pack. This is only supported for .pck files.
</description>
</method>
<method name="localize_path" qualifiers="const">
<return type="String" />
<param index="0" name="path" type="String" />
<description>
- Returns the localized path (starting with [code]res://[/code]) corresponding to the absolute, native OS [code]path[/code]. See also [method globalize_path].
- </description>
- </method>
- <method name="property_can_revert">
- <return type="bool" />
- <param index="0" name="name" type="String" />
- <description>
- Returns [code]true[/code] if the specified property exists and its initial value differs from the current value.
- </description>
- </method>
- <method name="property_get_revert">
- <return type="Variant" />
- <param index="0" name="name" type="String" />
- <description>
- Returns the specified property's initial value. Returns [code]null[/code] if the property does not exist.
+ Returns the localized path (starting with [code]res://[/code]) corresponding to the absolute, native OS [param path]. See also [method globalize_path].
</description>
</method>
<method name="save">
@@ -173,6 +159,15 @@
Sets the order of a configuration value (influences when saved to the config file).
</description>
</method>
+ <method name="set_restart_if_changed">
+ <return type="void" />
+ <param index="0" name="name" type="String" />
+ <param index="1" name="restart" type="bool" />
+ <description>
+ Sets whether a setting requires restarting the editor to properly take effect.
+ [b]Note:[/b] This is just a hint to display to the user that the editor must be restarted for changes to take effect. Enabling [method set_restart_if_changed] does [i]not[/i] delay the setting being set when changed.
+ </description>
+ </method>
<method name="set_setting">
<return type="void" />
<param index="0" name="name" type="String" />
@@ -213,7 +208,7 @@
If [code]true[/code], applies linear filtering when scaling the image (recommended for high-resolution artwork). If [code]false[/code], uses nearest-neighbor interpolation (recommended for pixel art).
</member>
<member name="application/config/custom_user_dir_name" type="String" setter="" getter="" default="&quot;&quot;">
- This user directory is used for storing persistent data ([code]user://[/code] filesystem). If left empty, [code]user://[/code] resolves to a project-specific folder in Godot's own configuration folder (see [method OS.get_user_data_dir]). If a custom directory name is defined, this name will be used instead and appended to the system-specific user data directory (same parent folder as the Godot configuration folder documented in [method OS.get_user_data_dir]).
+ This user directory is used for storing persistent data ([code]user://[/code] filesystem). If a custom directory name is defined, this name will be appended to the system-specific user data directory (same parent folder as the Godot configuration folder documented in [method OS.get_user_data_dir]).
The [member application/config/use_custom_user_dir] setting must be enabled for this to take effect.
</member>
<member name="application/config/description" type="String" setter="" getter="" default="&quot;&quot;">
@@ -240,7 +235,8 @@
[b]Note:[/b] Regardless of this setting's value, [code]res://override.cfg[/code] will still be read to override the project settings.
</member>
<member name="application/config/use_custom_user_dir" type="bool" setter="" getter="" default="false">
- If [code]true[/code], the project will save user data to its own user directory (see [member application/config/custom_user_dir_name]). This setting is only effective on desktop platforms. A name must be set in the [member application/config/custom_user_dir_name] setting for this to take effect. If [code]false[/code], the project will save user data to [code](OS user data directory)/Godot/app_userdata/(project name)[/code].
+ If [code]true[/code], the project will save user data to its own user directory. If [member application/config/custom_user_dir_name] is empty, [code]&lt;OS user data directory&gt;/&lt;project name&gt;[/code] directory will be used. If [code]false[/code], the project will save user data to [code]&lt;OS user data directory&gt;/Godot/app_userdata/&lt;project name&gt;[/code].
+ See also [url=$DOCS_URL/tutorials/io/data_paths.html#accessing-persistent-user-data-user]File paths in Godot projects[/url]. This setting is only effective on desktop platforms.
</member>
<member name="application/config/use_hidden_project_data_directory" type="bool" setter="" getter="" default="true">
If [code]true[/code], the project will use a hidden directory ([code].godot[/code]) for storing project-specific data (metadata, shader cache, etc.).
@@ -256,7 +252,7 @@
Changes to this setting will only be applied upon restarting the application.
</member>
<member name="application/run/disable_stdout" type="bool" setter="" getter="" default="false">
- If [code]true[/code], disables printing to standard output. This is equivalent to starting the editor or project with the [code]--quiet[/code] command line argument. See also [member application/run/disable_stderr].
+ If [code]true[/code], disables printing to standard output. This is equivalent to starting the editor or project with the [code]--quiet[/code] [url=$DOCS_URL/tutorials/editor/command_line_tutorial.html]command line argument[/url]. See also [member application/run/disable_stderr].
Changes to this setting will only be applied upon restarting the application.
</member>
<member name="application/run/flush_stdout_on_print" type="bool" setter="" getter="" default="false">
@@ -281,6 +277,15 @@
<member name="application/run/main_scene" type="String" setter="" getter="" default="&quot;&quot;">
Path to the main scene file that will be loaded when the project runs.
</member>
+ <member name="application/run/max_fps" type="int" setter="" getter="" default="0">
+ Maximum number of frames per second allowed. A value of [code]0[/code] means "no limit". The actual number of frames per second may still be below this value if the CPU or GPU cannot keep up with the project logic and rendering.
+ Limiting the FPS can be useful to reduce system power consumption, which reduces heat and noise emissions (and improves battery life on mobile devices).
+ If [member display/window/vsync/vsync_mode] is set to [code]Enabled[/code] or [code]Adaptive[/code], it takes precedence and the forced FPS number cannot exceed the monitor's refresh rate.
+ If [member display/window/vsync/vsync_mode] is [code]Enabled[/code], on monitors with variable refresh rate enabled (G-Sync/FreeSync), using a FPS limit a few frames lower than the monitor's refresh rate will [url=https://blurbusters.com/howto-low-lag-vsync-on/]reduce input lag while avoiding tearing[/url].
+ If [member display/window/vsync/vsync_mode] is [code]Disabled[/code], limiting the FPS to a high value that can be consistently reached on the system can reduce input lag compared to an uncapped framerate. Since this works by ensuring the GPU load is lower than 100%, this latency reduction is only effective in GPU-bottlenecked scenarios, not CPU-bottlenecked scenarios.
+ See also [member physics/common/physics_ticks_per_second].
+ [b]Note:[/b] This property is only read when the project starts. To change the rendering FPS cap at runtime, set [member Engine.max_fps] instead.
+ </member>
<member name="audio/buses/channel_disable_threshold_db" type="float" setter="" getter="" default="-60.0">
Audio buses will disable automatically when sound goes below a given dB threshold for a given time. This saves CPU as effects assigned to that bus will no longer do any processing.
</member>
@@ -292,9 +297,12 @@
</member>
<member name="audio/driver/driver" type="String" setter="" getter="">
Specifies the audio driver to use. This setting is platform-dependent as each platform supports different audio drivers. If left empty, the default audio driver will be used.
+ The [code]Dummy[/code] audio driver disables all audio playback and recording, which is useful for non-game applications as it reduces CPU usage. It also prevents the engine from appearing as an application playing audio in the OS' audio mixer.
+ [b]Note:[/b] The driver in use can be overridden at runtime via the [code]--audio-driver[/code] [url=$DOCS_URL/tutorials/editor/command_line_tutorial.html]command line argument[/url].
</member>
<member name="audio/driver/enable_input" type="bool" setter="" getter="" default="false">
If [code]true[/code], microphone input will be allowed. This requires appropriate permissions to be set when exporting to Android or iOS.
+ [b]Note:[/b] If the operating system blocks access to audio input devices (due to the user's privacy settings), audio capture will only return silence. On Windows 10 and later, make sure that apps are allowed to access the microphone in the OS' privacy settings.
</member>
<member name="audio/driver/mix_rate" type="int" setter="" getter="" default="44100">
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.
@@ -310,11 +318,13 @@
<member name="audio/driver/output_latency.web" type="int" setter="" getter="" default="50">
Safer override for [member audio/driver/output_latency] in the Web platform, to avoid audio issues especially on mobile devices.
</member>
- <member name="audio/general/2d_panning_strength" type="float" setter="" getter="" default="1.0">
- The base strength of the panning effect for all AudioStreamPlayer2D nodes. The panning strength can be further scaled on each Node using [member AudioStreamPlayer2D.panning_strength].
+ <member name="audio/general/2d_panning_strength" type="float" setter="" getter="" default="0.5">
+ The base strength of the panning effect for all [AudioStreamPlayer2D] nodes. The panning strength can be further scaled on each Node using [member AudioStreamPlayer2D.panning_strength]. A value of [code]0.0[/code] disables stereo panning entirely, leaving only volume attenuation in place. A value of [code]1.0[/code] completely mutes one of the channels if the sound is located exactly to the left (or right) of the listener.
+ The default value of [code]0.5[/code] is tuned for headphones. When using speakers, you may find lower values to sound better as speakers have a lower stereo separation compared to headphones.
</member>
- <member name="audio/general/3d_panning_strength" type="float" setter="" getter="" default="1.0">
- The base strength of the panning effect for all AudioStreamPlayer3D nodes. The panning strength can be further scaled on each Node using [member AudioStreamPlayer3D.panning_strength].
+ <member name="audio/general/3d_panning_strength" type="float" setter="" getter="" default="0.5">
+ The base strength of the panning effect for all [AudioStreamPlayer3D] nodes. The panning strength can be further scaled on each Node using [member AudioStreamPlayer3D.panning_strength]. A value of [code]0.0[/code] disables stereo panning entirely, leaving only volume attenuation in place. A value of [code]1.0[/code] completely mutes one of the channels if the sound is located exactly to the left (or right) of the listener.
+ The default value of [code]0.5[/code] is tuned for headphones. When using speakers, you may find lower values to sound better as speakers have a lower stereo separation compared to headphones.
</member>
<member name="audio/video/video_delay_compensation_ms" type="int" setter="" getter="" default="0">
Setting to hardcode audio delay when playing video. Best to leave this untouched unless you know what you are doing.
@@ -334,6 +344,9 @@
<member name="compression/formats/zstd/window_log_size" type="int" setter="" getter="" default="27">
Largest size limit (in power of 2) allowed when compressing using long-distance matching with Zstandard. Higher values can result in better compression, but will require more memory when compressing and decompressing.
</member>
+ <member name="debug/disable_touch" type="bool" setter="" getter="" default="false">
+ Disable touch input. Only has effect on iOS.
+ </member>
<member name="debug/file_logging/enable_file_logging" type="bool" setter="" getter="" default="false">
If [code]true[/code], logs all output to files.
</member>
@@ -341,25 +354,25 @@
Desktop override for [member debug/file_logging/enable_file_logging], as log files are not readily accessible on mobile/Web platforms.
</member>
<member name="debug/file_logging/log_path" type="String" setter="" getter="" default="&quot;user://logs/godot.log&quot;">
- Path to logs within the project. Using an [code]user://[/code] path is recommended.
+ Path at which to store log files for the project. Using a path under [code]user://[/code] is recommended.
</member>
<member name="debug/file_logging/max_log_files" type="int" setter="" getter="" default="5">
- Specifies the maximum amount of log files allowed (used for rotation).
+ Specifies the maximum number of log files allowed (used for rotation).
</member>
<member name="debug/gdscript/warnings/assert_always_false" type="int" setter="" getter="" default="1">
- If [code]enabled[/code], prints a warning or an error when an [code]assert[/code] call always returns false.
+ When set to [code]warn[/code] or [code]error[/code], produces a warning or an error respectively when an [code]assert[/code] call always evaluates to false.
</member>
<member name="debug/gdscript/warnings/assert_always_true" type="int" setter="" getter="" default="1">
- If [code]enabled[/code], prints a warning or an error when an [code]assert[/code] call always returns true.
+ When set to [code]warn[/code] or [code]error[/code], produces a warning or an error respectively when an [code]assert[/code] call always evaluates to true.
</member>
<member name="debug/gdscript/warnings/constant_used_as_function" type="int" setter="" getter="" default="1">
- If [code]enabled[/code], prints a warning or an error when a constant is used as a function.
+ When set to [code]warn[/code] or [code]error[/code], produces a warning or an error respectively when a constant is used as a function.
</member>
<member name="debug/gdscript/warnings/deprecated_keyword" type="int" setter="" getter="" default="1">
- If [code]enabled[/code], prints a warning or an error when deprecated keywords are used.
+ When set to [code]warn[/code] or [code]error[/code], produces a warning or an error respectively when deprecated keywords are used.
</member>
<member name="debug/gdscript/warnings/empty_file" type="int" setter="" getter="" default="1">
- If [code]enabled[/code], prints a warning or an error when an empty file is parsed.
+ When set to [code]warn[/code] or [code]error[/code], produces a warning or an error respectively when an empty file is parsed.
</member>
<member name="debug/gdscript/warnings/enable" type="bool" setter="" getter="" default="true">
If [code]true[/code], enables specific GDScript warnings (see [code]debug/gdscript/warnings/*[/code] settings). If [code]false[/code], disables all GDScript warnings.
@@ -368,87 +381,91 @@
If [code]true[/code], scripts in the [code]res://addons[/code] folder will not generate warnings.
</member>
<member name="debug/gdscript/warnings/function_used_as_property" type="int" setter="" getter="" default="1">
- If [code]enabled[/code], prints a warning or an error when using a function as if it was a property.
+ When set to [code]warn[/code] or [code]error[/code], produces a warning or an error respectively when using a function as if it is a property.
</member>
<member name="debug/gdscript/warnings/incompatible_ternary" type="int" setter="" getter="" default="1">
- If [code]enabled[/code], prints a warning or an error when a ternary operator may emit values with incompatible types.
+ When set to [code]warn[/code] or [code]error[/code], produces a warning or an error respectively when a ternary operator may emit values with incompatible types.
</member>
<member name="debug/gdscript/warnings/int_assigned_to_enum" type="int" setter="" getter="" default="1">
- If [code]enabled[/code], prints a warning or an error when trying to assign an integer to a variable that expects an enum value.
+ When set to [code]warn[/code] or [code]error[/code], produces a warning or an error respectively when trying to assign an integer to a variable that expects an enum value.
</member>
<member name="debug/gdscript/warnings/integer_division" type="int" setter="" getter="" default="1">
- If [code]enabled[/code], prints a warning or an error when dividing an integer by another integer (the decimal part will be discarded).
+ When set to [code]warn[/code] or [code]error[/code], produces a warning or an error respectively when dividing an integer by another integer (the decimal part will be discarded).
</member>
<member name="debug/gdscript/warnings/narrowing_conversion" type="int" setter="" getter="" default="1">
- If [code]enabled[/code], prints a warning or an error when passing a floating-point value to a function that expects an integer (it will be converted and lose precision).
+ When set to [code]warn[/code] or [code]error[/code], produces a warning or an error respectively when passing a floating-point value to a function that expects an integer (it will be converted and lose precision).
</member>
<member name="debug/gdscript/warnings/property_used_as_function" type="int" setter="" getter="" default="1">
- If [code]enabled[/code], prints a warning or an error when using a property as if it was a function.
+ When set to [code]warn[/code] or [code]error[/code], produces a warning or an error respectively when using a property as if it is a function.
</member>
<member name="debug/gdscript/warnings/redundant_await" type="int" setter="" getter="" default="1">
- If [code]enabled[/code], prints a warning or an error when a function that is not a coroutine is called with await.
+ When set to [code]warn[/code] or [code]error[/code], produces a warning or an error respectively when a function that is not a coroutine is called with await.
</member>
- <member name="debug/gdscript/warnings/return_value_discarded" type="int" setter="" getter="" default="1">
- If [code]enabled[/code], prints a warning or an error when calling a function without using its return value (by assigning it to a variable or using it as a function argument). Such return values are sometimes used to denote possible errors using the [enum Error] enum.
+ <member name="debug/gdscript/warnings/return_value_discarded" type="int" setter="" getter="" default="0">
+ When set to [code]warn[/code] or [code]error[/code], produces a warning or an error respectively when calling a function without using its return value (by assigning it to a variable or using it as a function argument). Such return values are sometimes used to denote possible errors using the [enum Error] enum.
</member>
<member name="debug/gdscript/warnings/shadowed_global_identifier" type="int" setter="" getter="" default="1">
- If [code]enabled[/code], prints a warning or an error when defining a local or subclass member variable, signal, or enum that would have the same name as a built-in function or global class name, which possibly shadow it.
+ When set to [code]warn[/code] or [code]error[/code], produces a warning or an error respectively when defining a local or member variable, signal, or enum that would have the same name as a built-in function or global class name, thus shadowing it.
</member>
<member name="debug/gdscript/warnings/shadowed_variable" type="int" setter="" getter="" default="1">
- If [code]enabled[/code], prints a warning or an error when defining a local or subclass member variable that would shadow a variable at an upper level (such as a member variable).
+ When set to [code]warn[/code] or [code]error[/code], produces a warning or an error respectively when defining a local or member variable that would shadow a member variable that the class defines.
</member>
<member name="debug/gdscript/warnings/shadowed_variable_base_class" type="int" setter="" getter="" default="1">
+ When set to [code]warn[/code] or [code]error[/code], produces a warning or an error respectively when defining a local or subclass member variable that would shadow a variable that is inherited from a parent class.
</member>
<member name="debug/gdscript/warnings/standalone_expression" type="int" setter="" getter="" default="1">
- If [code]enabled[/code], prints a warning or an error when calling an expression that has no effect on the surrounding code, such as writing [code]2 + 2[/code] as a statement.
+ When set to [code]warn[/code] or [code]error[/code], produces a warning or an error respectively when calling an expression that has no effect on the surrounding code, such as writing [code]2 + 2[/code] as a statement.
</member>
<member name="debug/gdscript/warnings/standalone_ternary" type="int" setter="" getter="" default="1">
- If [code]enabled[/code], prints a warning or an error when calling a ternary expression that has no effect on the surrounding code, such as writing [code]42 if active else 0[/code] as a statement.
+ When set to [code]warn[/code] or [code]error[/code], produces a warning or an error respectively when calling a ternary expression that has no effect on the surrounding code, such as writing [code]42 if active else 0[/code] as a statement.
+ </member>
+ <member name="debug/gdscript/warnings/static_called_on_instance" type="int" setter="" getter="" default="1">
+ When set to [code]warn[/code] or [code]error[/code], produces a warning or an error respectively when calling a static method from an instance of a class instead of from the class directly.
</member>
<member name="debug/gdscript/warnings/treat_warnings_as_errors" type="bool" setter="" getter="" default="false">
- If [code]true[/code], all warnings will be reported as if they were errors.
+ If [code]true[/code], all warnings will be reported as if they are errors.
</member>
<member name="debug/gdscript/warnings/unassigned_variable" type="int" setter="" getter="" default="1">
- If [code]enabled[/code], prints a warning or an error when using a variable that wasn't previously assigned.
+ When set to [code]warn[/code] or [code]error[/code], produces a warning or an error respectively when using a variable that wasn't previously assigned.
</member>
<member name="debug/gdscript/warnings/unassigned_variable_op_assign" type="int" setter="" getter="" default="1">
- If [code]enabled[/code], prints a warning or an error when assigning a variable using an assignment operator like [code]+=[/code] if the variable wasn't previously assigned.
+ When set to [code]warn[/code] or [code]error[/code], produces a warning or an error respectively when assigning a variable using an assignment operator like [code]+=[/code] if the variable wasn't previously assigned.
</member>
<member name="debug/gdscript/warnings/unreachable_code" type="int" setter="" getter="" default="1">
- If [code]enabled[/code], prints a warning or an error when unreachable code is detected (such as after a [code]return[/code] statement that will always be executed).
+ When set to [code]warn[/code] or [code]error[/code], produces a warning or an error respectively when unreachable code is detected (such as after a [code]return[/code] statement that will always be executed).
</member>
<member name="debug/gdscript/warnings/unreachable_pattern" type="int" setter="" getter="" default="1">
- If [code]enabled[/code], prints a warning or an error when an unreachable [code]match[/code] pattern is detected.
+ When set to [code]warn[/code] or [code]error[/code], produces a warning or an error respectively when an unreachable [code]match[/code] pattern is detected.
</member>
<member name="debug/gdscript/warnings/unsafe_call_argument" type="int" setter="" getter="" default="0">
- If [code]enabled[/code], prints a warning or an error when using an expression whose type may not be compatible with the function parameter expected.
+ When set to [code]warn[/code] or [code]error[/code], produces a warning or an error respectively when using an expression whose type may not be compatible with the function parameter expected.
</member>
<member name="debug/gdscript/warnings/unsafe_cast" type="int" setter="" getter="" default="0">
- If [code]enabled[/code], prints a warning or an error when performing an unsafe cast.
+ When set to [code]warn[/code] or [code]error[/code], produces a warning or an error respectively when performing an unsafe cast.
</member>
<member name="debug/gdscript/warnings/unsafe_method_access" type="int" setter="" getter="" default="0">
- If [code]enabled[/code], prints a warning or an error when calling a method whose presence is not guaranteed at compile-time in the class.
+ When set to [code]warn[/code] or [code]error[/code], produces a warning or an error respectively when calling a method whose presence is not guaranteed at compile-time in the class.
</member>
<member name="debug/gdscript/warnings/unsafe_property_access" type="int" setter="" getter="" default="0">
- If [code]enabled[/code], prints a warning or an error when accessing a property whose presence is not guaranteed at compile-time in the class.
+ When set to [code]warn[/code] or [code]error[/code], produces a warning or an error respectively when accessing a property whose presence is not guaranteed at compile-time in the class.
</member>
<member name="debug/gdscript/warnings/unused_local_constant" type="int" setter="" getter="" default="1">
- If [code]enabled[/code], prints a warning or an error when a local constant is never used.
+ When set to [code]warn[/code] or [code]error[/code], produces a warning or an error respectively when a local constant is never used.
</member>
<member name="debug/gdscript/warnings/unused_parameter" type="int" setter="" getter="" default="1">
- If [code]enabled[/code], prints a warning or an error when a function parameter is never used.
+ When set to [code]warn[/code] or [code]error[/code], produces a warning or an error respectively when a function parameter is never used.
</member>
<member name="debug/gdscript/warnings/unused_private_class_variable" type="int" setter="" getter="" default="1">
- If [code]enabled[/code], prints a warning or an error when a class variable is never used.
+ When set to [code]warn[/code] or [code]error[/code], produces a warning or an error respectively when a private member variable is never used.
</member>
<member name="debug/gdscript/warnings/unused_signal" type="int" setter="" getter="" default="1">
- If [code]enabled[/code], prints a warning or an error when a signal is unused.
+ When set to [code]warn[/code] or [code]error[/code], produces a warning or an error respectively when a signal is declared but never emitted.
</member>
<member name="debug/gdscript/warnings/unused_variable" type="int" setter="" getter="" default="1">
- If [code]enabled[/code], prints a warning or an error when a local variable is unused.
+ When set to [code]warn[/code] or [code]error[/code], produces a warning or an error respectively when a local variable is unused.
</member>
<member name="debug/gdscript/warnings/void_assignment" type="int" setter="" getter="" default="1">
- If [code]enabled[/code], prints a warning or an error when assigning the result of a function that returns [code]void[/code] to a variable.
+ When set to [code]warn[/code] or [code]error[/code], produces a warning or an error respectively when assigning the result of a function that returns [code]void[/code] to a variable.
</member>
<member name="debug/settings/crash_handler/message" type="String" setter="" getter="" default="&quot;Please include this when reporting the bug to the project developer.&quot;">
Message to be displayed before the backtrace when the engine crashes. By default, this message is only used in exported projects due to the editor-only override applied to this setting.
@@ -456,28 +473,20 @@
<member name="debug/settings/crash_handler/message.editor" type="String" setter="" getter="" default="&quot;Please include this when reporting the bug on: https://github.com/godotengine/godot/issues&quot;">
Editor-only override for [member debug/settings/crash_handler/message]. Does not affect exported projects in debug or release mode.
</member>
- <member name="debug/settings/fps/force_fps" type="int" setter="" getter="" default="0">
- Maximum number of frames per second allowed. The actual number of frames per second may still be below this value if the game is lagging.
- If [member display/window/vsync/vsync_mode] is set to [code]Enabled[/code] or [code]Adaptive[/code], it takes precedence and the forced FPS number cannot exceed the monitor's refresh rate. See also [member physics/common/physics_ticks_per_second].
- This setting is therefore mostly relevant for lowering the maximum FPS below VSync, e.g. to perform non-real-time rendering of static frames, or test the project under lag conditions.
- [b]Note:[/b] This property is only read when the project starts. To change the rendering FPS cap at runtime, set [member Engine.target_fps] instead.
- </member>
<member name="debug/settings/gdscript/max_call_stack" type="int" setter="" getter="" default="1024">
Maximum call stack allowed for debugging GDScript.
</member>
<member name="debug/settings/profiler/max_functions" type="int" setter="" getter="" default="16384">
- Maximum amount of functions per frame allowed when profiling.
+ Maximum number of functions per frame allowed when profiling.
</member>
<member name="debug/settings/stdout/print_fps" type="bool" setter="" getter="" default="false">
Print frames per second to standard output every second.
</member>
<member name="debug/settings/stdout/print_gpu_profile" type="bool" setter="" getter="" default="false">
+ Print GPU profile information to standard output every second. This includes how long each frame takes the GPU to render on average, broken down into different steps of the render pipeline, such as CanvasItems, shadows, glow, etc.
</member>
<member name="debug/settings/stdout/verbose_stdout" type="bool" setter="" getter="" default="false">
- Print more information to standard output when running. It displays information such as memory leaks, which scenes and resources are being loaded, etc. This can also be enabled using the [code]--verbose[/code] or [code]-v[/code] command line argument, even on an exported project. See also [method OS.is_stdout_verbose] and [method @GlobalScope.print_verbose].
- </member>
- <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.
+ Print more information to standard output when running. It displays information such as memory leaks, which scenes and resources are being loaded, etc. This can also be enabled using the [code]--verbose[/code] or [code]-v[/code] [url=$DOCS_URL/tutorials/editor/command_line_tutorial.html]command line argument[/url], even on an exported project. See also [method OS.is_stdout_verbose] and [method @GlobalScope.print_verbose].
</member>
<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.
@@ -491,9 +500,6 @@
<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)">
- Color of the disabled navigation geometry, visible when "Visible Navigation" is enabled in the Debug menu.
- </member>
<member name="debug/shapes/navigation/edge_connection_color" type="Color" setter="" getter="" default="Color(1, 0, 1, 1)">
Color to display edge connections between navigation regions, visible when "Visible Navigation" is enabled in the Debug menu.
</member>
@@ -512,8 +518,11 @@
<member name="debug/shapes/navigation/enable_geometry_face_random_color" type="bool" setter="" getter="" default="true">
If enabled, colorizes each navigation mesh polygon face with a random color when "Visible Navigation" is enabled in the Debug menu.
</member>
- <member name="debug/shapes/navigation/geometry_color" type="Color" setter="" getter="" default="Color(0.1, 1, 0.7, 0.4)">
- Color of the navigation geometry, visible when "Visible Navigation" is enabled in the Debug menu.
+ <member name="debug/shapes/navigation/enable_link_connections" type="bool" setter="" getter="" default="true">
+ If enabled, displays navigation link connections when "Visible Navigation" is enabled in the Debug menu.
+ </member>
+ <member name="debug/shapes/navigation/enable_link_connections_xray" type="bool" setter="" getter="" default="true">
+ If enabled, displays navigation link connections through geometry when "Visible Navigation" is enabled in the Debug menu.
</member>
<member name="debug/shapes/navigation/geometry_edge_color" type="Color" setter="" getter="" default="Color(0.5, 1, 1, 1)">
Color to display enabled navigation mesh polygon edges, visible when "Visible Navigation" is enabled in the Debug menu.
@@ -527,6 +536,12 @@
<member name="debug/shapes/navigation/geometry_face_disabled_color" type="Color" setter="" getter="" default="Color(0.5, 0.5, 0.5, 0.4)">
Color to display disabled navigation mesh polygon faces, visible when "Visible Navigation" is enabled in the Debug menu.
</member>
+ <member name="debug/shapes/navigation/link_connection_color" type="Color" setter="" getter="" default="Color(1, 0.5, 1, 1)">
+ Color to use to display navigation link connections, visible when "Visible Navigation" is enabled in the Debug menu.
+ </member>
+ <member name="debug/shapes/navigation/link_connection_disabled_color" type="Color" setter="" getter="" default="Color(0.5, 0.5, 0.5, 1)">
+ Color to use to display disabled navigation link connections, visible when "Visible Navigation" is enabled in the Debug menu.
+ </member>
<member name="debug/shapes/paths/geometry_color" type="Color" setter="" getter="" default="Color(0.1, 1, 0.7, 0.4)">
Color of the curve path geometry, visible when "Visible Paths" is enabled in the Debug menu.
</member>
@@ -543,7 +558,7 @@
Position offset for tooltips, relative to the mouse cursor's hotspot.
</member>
<member name="display/window/dpi/allow_hidpi" type="bool" setter="" getter="" default="true">
- If [code]true[/code], allows HiDPI display on Windows, macOS, Android, iOS and HTML5. If [code]false[/code], the platform's low-DPI fallback will be used on HiDPI displays, which causes the window to be displayed in a blurry or pixelated manner (and can cause various window management bugs). Therefore, it is recommended to make your project scale to [url=$DOCS_URL/tutorials/viewports/multiple_resolutions.html]multiple resolutions[/url] instead of disabling this setting.
+ If [code]true[/code], allows HiDPI display on Windows, macOS, Android, iOS and Web. If [code]false[/code], the platform's low-DPI fallback will be used on HiDPI displays, which causes the window to be displayed in a blurry or pixelated manner (and can cause various window management bugs). Therefore, it is recommended to make your project scale to [url=$DOCS_URL/tutorials/rendering/multiple_resolutions.html]multiple resolutions[/url] instead of disabling this setting.
[b]Note:[/b] This setting has no effect on Linux as DPI-awareness fallbacks are not supported there.
</member>
<member name="display/window/energy_saving/keep_screen_on" type="bool" setter="" getter="" default="true">
@@ -556,39 +571,62 @@
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/viewport_width] and [member display/window/size/viewport_height] accordingly.
</member>
+ <member name="display/window/ios/allow_high_refresh_rate" type="bool" setter="" getter="" default="true">
+ If [code]true[/code], iOS devices that support high refresh rate/"ProMotion" will be allowed to render at up to 120 frames per second.
+ </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.
</member>
+ <member name="display/window/ios/hide_status_bar" type="bool" setter="" getter="" default="true">
+ If [code]true[/code], the status bar is hidden while the app is running.
+ </member>
+ <member name="display/window/ios/suppress_ui_gesture" type="bool" setter="" getter="" default="true">
+ If [code]true[/code], it will require two swipes to access iOS UI that uses gestures.
+ [b]Note:[/b] This setting has no effect on the home indicator if [code]hide_home_indicator[/code] is [code]true[/code].
+ </member>
+ <member name="display/window/per_pixel_transparency/allowed" type="bool" setter="" getter="" default="false">
+ If [code]true[/code], allows per-pixel transparency for the window background. This affects performance, so leave it on [code]false[/code] unless you need it. See also [member display/window/size/transparent] and [member rendering/transparent_background].
+ </member>
<member name="display/window/size/always_on_top" type="bool" setter="" getter="" default="false">
Forces the main window to be always on top.
- [b]Note:[/b] This setting is ignored on iOS, Android, and HTML5.
+ [b]Note:[/b] This setting is ignored on iOS, Android, and Web.
</member>
<member name="display/window/size/borderless" type="bool" setter="" getter="" default="false">
Forces the main window to be borderless.
- [b]Note:[/b] This setting is ignored on iOS, Android, and HTML5.
+ [b]Note:[/b] This setting is ignored on iOS, Android, and Web.
+ </member>
+ <member name="display/window/size/extend_to_title" type="bool" setter="" getter="" default="false">
+ Main window content is expanded to the full size of the window. Unlike a borderless window, the frame is left intact and can be used to resize the window, and the title bar is transparent, but has minimize/maximize/close buttons.
+ [b]Note:[/b] This setting is implemented only on macOS.
</member>
- <member name="display/window/size/fullscreen" type="bool" setter="" getter="" default="false">
- Sets the main window to full screen when the project starts. Note that this is not [i]exclusive[/i] fullscreen. On Windows and Linux, a borderless window is used to emulate fullscreen. On macOS, a new desktop is used to display the running project.
- Regardless of the platform, enabling fullscreen will change the window size to match the monitor's size. Therefore, make sure your project supports [url=$DOCS_URL/tutorials/rendering/multiple_resolutions.html]multiple resolutions[/url] when enabling fullscreen mode.
- [b]Note:[/b] This setting is ignored on iOS, Android, and HTML5.
+ <member name="display/window/size/mode" type="int" setter="" getter="" default="0">
+ Main window mode. See [enum DisplayServer.WindowMode] for possible values and how each mode behaves.
+ </member>
+ <member name="display/window/size/no_focus" type="bool" setter="" getter="" default="false">
+ Main window can't be focused. No-focus window will ignore all input, except mouse clicks.
</member>
<member name="display/window/size/resizable" type="bool" setter="" getter="" default="true">
Allows the window to be resizable by default.
[b]Note:[/b] This setting is ignored on iOS.
</member>
- <member name="display/window/size/viewport_height" type="int" setter="" getter="" default="600">
- Sets the game's main viewport height. On desktop platforms, this is also the initial window height.
+ <member name="display/window/size/transparent" type="bool" setter="" getter="" default="false">
+ If [code]true[/code], enables a window manager hint that the main window background [i]can[/i] be transparent. This does not make the background actually transparent. For the background to be transparent, the root viewport must also be made transparent by enabling [member rendering/transparent_background].
+ [b]Note:[/b] To use a transparent splash screen, set [member application/boot_splash/bg_color] to [code]Color(0, 0, 0, 0)[/code].
+ [b]Note:[/b] This setting has no effect if [member display/window/per_pixel_transparency/allowed] is set to [code]false[/code].
+ </member>
+ <member name="display/window/size/viewport_height" type="int" setter="" getter="" default="648">
+ Sets the game's main viewport height. On desktop platforms, this is also the initial window height, represented by an indigo-colored rectangle in the 2D editor. Stretch mode settings also use this as a reference when using the [code]canvas_items[/code] or [code]viewport[/code] stretch modes. See also [member display/window/size/viewport_width], [member display/window/size/window_width_override] and [member display/window/size/window_height_override].
</member>
- <member name="display/window/size/viewport_width" type="int" setter="" getter="" default="1024">
- Sets the game's main viewport width. On desktop platforms, this is also the initial window width.
+ <member name="display/window/size/viewport_width" type="int" setter="" getter="" default="1152">
+ Sets the game's main viewport width. On desktop platforms, this is also the initial window width, represented by an indigo-colored rectangle in the 2D editor. Stretch mode settings also use this as a reference when using the [code]canvas_items[/code] or [code]viewport[/code] stretch modes. See also [member display/window/size/viewport_height], [member display/window/size/window_width_override] and [member display/window/size/window_height_override].
</member>
<member name="display/window/size/window_height_override" type="int" setter="" getter="" default="0">
- On desktop platforms, sets the game's initial window height.
- [b]Note:[/b] By default, or when set to 0, the initial window height is the [member display/window/size/viewport_height]. This setting is ignored on iOS, Android, and HTML5.
+ On desktop platforms, overrides the game's initial window height. See also [member display/window/size/window_width_override], [member display/window/size/viewport_width] and [member display/window/size/viewport_height].
+ [b]Note:[/b] By default, or when set to [code]0[/code], the initial window height is the [member display/window/size/viewport_height]. This setting is ignored on iOS, Android, and Web.
</member>
<member name="display/window/size/window_width_override" type="int" setter="" getter="" default="0">
- On desktop platforms, sets the game's initial window width.
- [b]Note:[/b] By default, or when set to 0, the initial window width is the viewport [member display/window/size/viewport_width]. This setting is ignored on iOS, Android, and HTML5.
+ On desktop platforms, overrides the game's initial window width. See also [member display/window/size/window_height_override], [member display/window/size/viewport_width] and [member display/window/size/viewport_height].
+ [b]Note:[/b] By default, or when set to [code]0[/code], the initial window width is the viewport [member display/window/size/viewport_width]. This setting is ignored on iOS, Android, and Web.
</member>
<member name="display/window/vsync/vsync_mode" type="int" setter="" getter="" default="1">
Sets the V-Sync mode for the main game window.
@@ -601,7 +639,7 @@
</member>
<member name="editor/movie_writer/fps" type="int" setter="" getter="" default="60">
The number of frames per second to record in the video when writing a movie. Simulation speed will adjust to always match the specified framerate, which means the engine will appear to run slower at higher [member editor/movie_writer/fps] values. Certain FPS values will require you to adjust [member editor/movie_writer/mix_rate] to prevent audio from desynchronizing over time.
- This can be specified manually on the command line using the [code]--fixed-fps &lt;fps&gt;[/code] command line argument.
+ This can be specified manually on the command line using the [code]--fixed-fps &lt;fps&gt;[/code] [url=$DOCS_URL/tutorials/editor/command_line_tutorial.html]command line argument[/url].
</member>
<member name="editor/movie_writer/mix_rate" type="int" setter="" getter="" default="48000">
The audio mix rate to use in the recorded audio when writing a movie (in Hz). This can be different from [member audio/driver/mix_rate], but this value must be divisible by [member editor/movie_writer/fps] to prevent audio from desynchronizing over time.
@@ -645,26 +683,40 @@
If [code]true[/code], Blender 3D scene files with the [code].blend[/code] extension will be imported by converting them to glTF 2.0.
This requires configuring a path to a Blender executable in the editor settings at [code]filesystem/import/blender/blender3_path[/code]. Blender 3.0 or later is required.
</member>
+ <member name="filesystem/import/blender/enabled.android" type="bool" setter="" getter="" default="false">
+ Override for [member filesystem/import/blender/enabled] on Android where Blender can't easily be accessed from Godot.
+ </member>
+ <member name="filesystem/import/blender/enabled.web" type="bool" setter="" getter="" default="false">
+ Override for [member filesystem/import/blender/enabled] on the Web where Blender can't easily be accessed from Godot.
+ </member>
<member name="filesystem/import/fbx/enabled" type="bool" setter="" getter="" default="true">
If [code]true[/code], Autodesk FBX 3D scene files with the [code].fbx[/code] extension will be imported by converting them to glTF 2.0.
This requires configuring a path to a FBX2glTF executable in the editor settings at [code]filesystem/import/fbx/fbx2gltf_path[/code].
</member>
+ <member name="filesystem/import/fbx/enabled.android" type="bool" setter="" getter="" default="false">
+ Override for [member filesystem/import/fbx/enabled] on Android where FBX2glTF can't easily be accessed from Godot.
+ </member>
+ <member name="filesystem/import/fbx/enabled.web" type="bool" setter="" getter="" default="false">
+ Override for [member filesystem/import/fbx/enabled] on the Web where FBX2glTF can't easily be accessed from Godot.
+ </member>
<member name="gui/common/default_scroll_deadzone" type="int" setter="" getter="" default="0">
Default value for [member ScrollContainer.scroll_deadzone], which will be used for all [ScrollContainer]s unless overridden.
</member>
<member name="gui/common/swap_cancel_ok" type="bool" setter="" getter="">
- If [code]true[/code], swaps Cancel and OK buttons in dialogs on Windows and UWP to follow interface conventions.
+ If [code]true[/code], swaps [b]Cancel[/b] and [b]OK[/b] buttons in dialogs on Windows and UWP to follow interface conventions. [method DisplayServer.get_swap_cancel_ok] can be used to query whether buttons are swapped at run-time.
+ [b]Note:[/b] This doesn't affect native dialogs such as the ones spawned by [method DisplayServer.dialog_show].
</member>
<member name="gui/common/text_edit_undo_stack_max_size" type="int" setter="" getter="" default="1024">
+ Maximum undo/redo history size for [TextEdit] fields.
</member>
<member name="gui/theme/custom" type="String" setter="" getter="" default="&quot;&quot;">
- Path to a custom [Theme] resource file to use for the project ([code]theme[/code] or generic [code]tres[/code]/[code]res[/code] extension).
+ Path to a custom [Theme] resource file to use for the project ([code].theme[/code] or generic [code].tres[/code]/[code].res[/code] extension).
</member>
<member name="gui/theme/custom_font" type="String" setter="" getter="" default="&quot;&quot;">
Path to a custom [Font] resource to use as default for all GUI elements of the project.
</member>
- <member name="gui/theme/default_font_antialiased" type="bool" setter="" getter="" default="true">
- If set to [code]true[/code], default font uses 8-bit anitialiased glyph rendering. See [member FontFile.antialiased].
+ <member name="gui/theme/default_font_antialiasing" type="int" setter="" getter="" default="1">
+ Font anti-aliasing mode. See [member FontFile.antialiasing],
</member>
<member name="gui/theme/default_font_generate_mipmaps" type="bool" setter="" getter="" default="false">
If set to [code]true[/code], the default font will have mipmaps generated. This prevents text from looking grainy when a [Control] is scaled down, or when a [Label3D] is viewed from a long distance (if [member Label3D.texture_filter] is set to a mode that displays mipmaps).
@@ -680,9 +732,14 @@
[b]Note:[/b] This setting does not affect custom [Font]s used within the project.
</member>
<member name="gui/theme/default_font_subpixel_positioning" type="int" setter="" getter="" default="1">
- Default font glyph sub-pixel positioning mode. See [member FontFile.subpixel_positioning].
+ Default font glyph subpixel positioning mode. See [member FontFile.subpixel_positioning].
</member>
<member name="gui/theme/default_theme_scale" type="float" setter="" getter="" default="1.0">
+ The default scale factor for [Control]s, when not overridden by a [Theme].
+ [b]Note:[/b] This property is only read when the project starts. To change the default scale at runtime, set [member ThemeDB.fallback_base_scale] instead.
+ </member>
+ <member name="gui/theme/lcd_subpixel_layout" type="int" setter="" getter="" default="1">
+ LCD subpixel layout used for font anti-aliasing. See [enum TextServer.FontLCDSubpixelLayout].
</member>
<member name="gui/timers/incremental_search_max_interval_msec" type="int" setter="" getter="" default="2000">
Timer setting for incremental search in [Tree], [ItemList], etc. controls (in milliseconds).
@@ -702,8 +759,12 @@
[b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
</member>
<member name="input/ui_copy" type="Dictionary" setter="" getter="">
+ Default [InputEventAction] to copy a selection to the clipboard.
+ [b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
</member>
<member name="input/ui_cut" type="Dictionary" setter="" getter="">
+ Default [InputEventAction] to cut a selection to the clipboard.
+ [b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
</member>
<member name="input/ui_down" type="Dictionary" setter="" getter="">
Default [InputEventAction] to move down in the UI.
@@ -714,10 +775,16 @@
[b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
</member>
<member name="input/ui_filedialog_refresh" type="Dictionary" setter="" getter="">
+ Default [InputEventAction] to refresh the contents of the current directory of a [FileDialog].
+ [b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
</member>
<member name="input/ui_filedialog_show_hidden" type="Dictionary" setter="" getter="">
+ Default [InputEventAction] to toggle showing hidden files and directories in a [FileDialog].
+ [b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
</member>
<member name="input/ui_filedialog_up_one_level" type="Dictionary" setter="" getter="">
+ Default [InputEventAction] to go up one directory in a [FileDialog].
+ [b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
</member>
<member name="input/ui_focus_next" type="Dictionary" setter="" getter="">
Default [InputEventAction] to focus the next [Control] in the scene. The focus behavior can be configured via [member Control.focus_next].
@@ -728,8 +795,12 @@
[b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
</member>
<member name="input/ui_graph_delete" type="Dictionary" setter="" getter="">
+ Default [InputEventAction] to delete a [GraphNode] in a [GraphEdit].
+ [b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
</member>
<member name="input/ui_graph_duplicate" type="Dictionary" setter="" getter="">
+ Default [InputEventAction] to duplicate a [GraphNode] in a [GraphEdit].
+ [b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
</member>
<member name="input/ui_home" type="Dictionary" setter="" getter="">
Default [InputEventAction] to go to the start position of a [Control] (e.g. first item in an [ItemList] or a [Tree]), matching the behavior of [constant KEY_HOME] on typical desktop UI systems.
@@ -740,6 +811,8 @@
[b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
</member>
<member name="input/ui_menu" type="Dictionary" setter="" getter="">
+ Default [InputEventAction] to open a context menu in a text field.
+ [b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
</member>
<member name="input/ui_page_down" type="Dictionary" setter="" getter="">
Default [InputEventAction] to go down a page in a [Control] (e.g. in an [ItemList] or a [Tree]), matching the behavior of [constant KEY_PAGEDOWN] on typical desktop UI systems.
@@ -750,8 +823,12 @@
[b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
</member>
<member name="input/ui_paste" type="Dictionary" setter="" getter="">
+ Default [InputEventAction] to paste from the clipboard.
+ [b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
</member>
<member name="input/ui_redo" type="Dictionary" setter="" getter="">
+ Default [InputEventAction] to redo an undone action.
+ [b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
</member>
<member name="input/ui_right" type="Dictionary" setter="" getter="">
Default [InputEventAction] to move right in the UI.
@@ -763,97 +840,197 @@
</member>
<member name="input/ui_swap_input_direction" type="Dictionary" setter="" getter="">
</member>
+ <member name="input/ui_text_add_selection_for_next_occurrence" type="Dictionary" setter="" getter="">
+ If a selection is currently active with the last caret in text fields, searches for the next occurrence of the selection, adds a caret and selects the next occurrence.
+ If no selection is currently active with the last caret in text fields, selects the word currently under the caret.
+ The action can be performed sequentially for all occurrences of the selection of the last caret and for all existing carets.
+ The viewport is adjusted to the latest newly added caret.
+ [b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
+ </member>
<member name="input/ui_text_backspace" type="Dictionary" setter="" getter="">
+ Default [InputEventAction] to delete the character before the text cursor.
+ [b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
</member>
<member name="input/ui_text_backspace_all_to_left" type="Dictionary" setter="" getter="">
+ Default [InputEventAction] to delete [b]all[/b] text before the text cursor.
+ [b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
</member>
<member name="input/ui_text_backspace_all_to_left.macos" type="Dictionary" setter="" getter="">
+ macOS specific override for the shortcut to delete all text before the text cursor.
</member>
<member name="input/ui_text_backspace_word" type="Dictionary" setter="" getter="">
+ Default [InputEventAction] to delete all characters before the cursor up until a whitespace or punctuation character.
+ [b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
</member>
<member name="input/ui_text_backspace_word.macos" type="Dictionary" setter="" getter="">
+ macOS specific override for the shortcut to delete a word.
+ </member>
+ <member name="input/ui_text_caret_add_above" type="Dictionary" setter="" getter="">
+ Default [InputEventAction] to add an additional caret above every caret of a text
+ </member>
+ <member name="input/ui_text_caret_add_above.macos" type="Dictionary" setter="" getter="">
+ macOS specific override for the shortcut to add a caret above every caret
+ </member>
+ <member name="input/ui_text_caret_add_below" type="Dictionary" setter="" getter="">
+ Default [InputEventAction] to add an additional caret below every caret of a text
+ </member>
+ <member name="input/ui_text_caret_add_below.macos" type="Dictionary" setter="" getter="">
+ macOS specific override for the shortcut to add a caret below every caret
</member>
<member name="input/ui_text_caret_document_end" type="Dictionary" setter="" getter="">
+ Default [InputEventAction] to move the text cursor the the end of the text.
+ [b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
</member>
<member name="input/ui_text_caret_document_end.macos" type="Dictionary" setter="" getter="">
+ macOS specific override for the shortcut to move the text cursor to the end of the text.
</member>
<member name="input/ui_text_caret_document_start" type="Dictionary" setter="" getter="">
+ Default [InputEventAction] to move the text cursor to the start of the text.
+ [b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
</member>
<member name="input/ui_text_caret_document_start.macos" type="Dictionary" setter="" getter="">
+ macOS specific override for the shortcut to move the text cursor to the start of the text.
</member>
<member name="input/ui_text_caret_down" type="Dictionary" setter="" getter="">
+ Default [InputEventAction] to move the text cursor down.
+ [b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
</member>
<member name="input/ui_text_caret_left" type="Dictionary" setter="" getter="">
+ Default [InputEventAction] to move the text cursor left.
+ [b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
</member>
<member name="input/ui_text_caret_line_end" type="Dictionary" setter="" getter="">
+ Default [InputEventAction] to move the text cursor to the end of the line.
+ [b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
</member>
<member name="input/ui_text_caret_line_end.macos" type="Dictionary" setter="" getter="">
+ macOS specific override for the shortcut to move the text cursor to the end of the line.
</member>
<member name="input/ui_text_caret_line_start" type="Dictionary" setter="" getter="">
+ Default [InputEventAction] to move the text cursor to the start of the line.
+ [b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
</member>
<member name="input/ui_text_caret_line_start.macos" type="Dictionary" setter="" getter="">
+ macOS specific override for the shortcut to move the text cursor to the start of the line.
</member>
<member name="input/ui_text_caret_page_down" type="Dictionary" setter="" getter="">
+ Default [InputEventAction] to move the text cursor down one page.
+ [b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
</member>
<member name="input/ui_text_caret_page_up" type="Dictionary" setter="" getter="">
+ Default [InputEventAction] to move the text cursor up one page.
+ [b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
</member>
<member name="input/ui_text_caret_right" type="Dictionary" setter="" getter="">
+ Default [InputEventAction] to move the text cursor right.
+ [b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
</member>
<member name="input/ui_text_caret_up" type="Dictionary" setter="" getter="">
+ Default [InputEventAction] to move the text cursor up.
+ [b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
</member>
<member name="input/ui_text_caret_word_left" type="Dictionary" setter="" getter="">
+ Default [InputEventAction] to move the text cursor left to the next whitespace or punctuation.
+ [b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
</member>
<member name="input/ui_text_caret_word_left.macos" type="Dictionary" setter="" getter="">
+ macOS specific override for the shortcut to move the text cursor back one word.
</member>
<member name="input/ui_text_caret_word_right" type="Dictionary" setter="" getter="">
+ Default [InputEventAction] to move the text cursor right to the next whitespace or punctuation.
+ [b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
</member>
<member name="input/ui_text_caret_word_right.macos" type="Dictionary" setter="" getter="">
+ macOS specific override for the shortcut to move the text cursor forward one word.
+ </member>
+ <member name="input/ui_text_clear_carets_and_selection" type="Dictionary" setter="" getter="">
+ If there's only one caret active and with a selection, clears the selection.
+ In case there's more than one caret active, removes the secondary carets and clears their selections.
+ [b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
</member>
<member name="input/ui_text_completion_accept" type="Dictionary" setter="" getter="">
+ Default [InputEventAction] to accept an autocompetion hint.
+ [b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
</member>
<member name="input/ui_text_completion_query" type="Dictionary" setter="" getter="">
+ Default [InputEventAction] to request autocompetion.
+ [b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
</member>
<member name="input/ui_text_completion_replace" type="Dictionary" setter="" getter="">
+ Default [InputEventAction] to accept an autocompetion hint, replacing existing text.
+ [b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
</member>
<member name="input/ui_text_dedent" type="Dictionary" setter="" getter="">
+ Default [InputEventAction] to unindent text.
+ [b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
</member>
<member name="input/ui_text_delete" type="Dictionary" setter="" getter="">
+ Default [InputEventAction] to delete the character after the text cursor.
+ [b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
</member>
<member name="input/ui_text_delete_all_to_right" type="Dictionary" setter="" getter="">
+ Default [InputEventAction] to delete [b]all[/b] text after the text cursor.
+ [b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
</member>
<member name="input/ui_text_delete_all_to_right.macos" type="Dictionary" setter="" getter="">
+ macOS specific override for the shortcut to delete all text after the text cursor.
</member>
<member name="input/ui_text_delete_word" type="Dictionary" setter="" getter="">
+ Default [InputEventAction] to delete all characters after the cursor up until a whitespace or punctuation character.
+ [b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
</member>
<member name="input/ui_text_delete_word.macos" type="Dictionary" setter="" getter="">
+ macOS specific override for the shortcut to delete a word after the text cursor.
</member>
<member name="input/ui_text_indent" type="Dictionary" setter="" getter="">
+ Default [InputEventAction] to indent the current line.
+ [b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
</member>
<member name="input/ui_text_newline" type="Dictionary" setter="" getter="">
+ Default [InputEventAction] to insert a new line at the position of the text cursor.
+ [b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
</member>
<member name="input/ui_text_newline_above" type="Dictionary" setter="" getter="">
+ Default [InputEventAction] to insert a new line before the current one.
+ [b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
</member>
<member name="input/ui_text_newline_blank" type="Dictionary" setter="" getter="">
+ Default [InputEventAction] to insert a new line after the current one.
+ [b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
</member>
<member name="input/ui_text_scroll_down" type="Dictionary" setter="" getter="">
+ Default [InputEventAction] to scroll down one line of text.
+ [b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
</member>
<member name="input/ui_text_scroll_down.macos" type="Dictionary" setter="" getter="">
+ macOS specific override for the shortcut to scroll down one line.
</member>
<member name="input/ui_text_scroll_up" type="Dictionary" setter="" getter="">
+ Default [InputEventAction] to scroll up one line of text.
+ [b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
</member>
<member name="input/ui_text_scroll_up.macos" type="Dictionary" setter="" getter="">
+ macOS specific override for the shortcut to scroll up one line.
</member>
<member name="input/ui_text_select_all" type="Dictionary" setter="" getter="">
+ Default [InputEventAction] to select all text.
+ [b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
</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].
+ [b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
</member>
<member name="input/ui_text_submit" type="Dictionary" setter="" getter="">
+ Default [InputEventAction] to submit a text field.
+ [b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
</member>
<member name="input/ui_text_toggle_insert_mode" type="Dictionary" setter="" getter="">
+ Default [InputEventAction] to toggle [i]insert mode[/i] in a text field. While in insert mode, inserting new text overrides the character after the cursor, unless the next character is a new line.
+ [b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
</member>
<member name="input/ui_undo" type="Dictionary" setter="" getter="">
+ Default [InputEventAction] to undo the most recent action.
+ [b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
</member>
<member name="input/ui_up" type="Dictionary" setter="" getter="">
Default [InputEventAction] to move up in the UI.
@@ -867,6 +1044,7 @@
</member>
<member name="input_devices/pen_tablet/driver" type="String" setter="" getter="">
Specifies the tablet driver to use. If left empty, the default driver will be used.
+ [b]Note:[/b] The driver in use can be overridden at runtime via the [code]--tablet-driver[/code] [url=$DOCS_URL/tutorials/editor/command_line_tutorial.html]command line argument[/url].
</member>
<member name="input_devices/pen_tablet/driver.windows" type="String" setter="" getter="">
Override for [member input_devices/pen_tablet/driver] on Windows.
@@ -930,6 +1108,9 @@
</member>
<member name="internationalization/rendering/text_driver" type="String" setter="" getter="" default="&quot;&quot;">
Specifies the [TextServer] to use. If left empty, the default will be used.
+ "ICU / HarfBuzz / Graphite" is the most advanced text driver, supporting right-to-left typesetting and complex scripts (for languages like Arabic, Hebrew, etc). The "Fallback" text driver does not support right-to-left typesetting and complex scripts.
+ [b]Note:[/b] The driver in use can be overridden at runtime via the [code]--text-driver[/code] [url=$DOCS_URL/tutorials/editor/command_line_tutorial.html]command line argument[/url].
+ [b]Note:[/b] There is an additional [code]Dummy[/code] text driver available, which disables all text rendering and font-related functionality. This driver is not listed in the project settings, but it can be enabled when running the editor or project using the [code]--text-driver Dummy[/code] [url=$DOCS_URL/tutorials/editor/command_line_tutorial.html]command line argument[/url].
</member>
<member name="layer_names/2d_navigation/layer_1" type="String" setter="" getter="" default="&quot;&quot;">
Optional name for the 2D navigation layer 1. If left empty, the layer will display as "Layer 1".
@@ -1441,40 +1622,32 @@
<member name="memory/limits/multithreaded_server/rid_pool_prealloc" type="int" setter="" getter="" default="60">
This is used by servers when used in multi-threading mode (servers and visual). RIDs are preallocated to avoid stalling the server requesting them on threads. If servers get stalled too often when loading resources in a thread, increase this number.
</member>
- <member name="mono/debugger_agent/port" type="int" setter="" getter="" default="23685">
- </member>
- <member name="mono/debugger_agent/wait_for_debugger" type="bool" setter="" getter="" default="false">
- </member>
- <member name="mono/debugger_agent/wait_timeout" type="int" setter="" getter="" default="3000">
- </member>
- <member name="mono/profiler/args" type="String" setter="" getter="" default="&quot;log:calls,alloc,sample,output=output.mlpd&quot;">
- </member>
- <member name="mono/profiler/enabled" type="bool" setter="" getter="" default="false">
- </member>
- <member name="mono/runtime/unhandled_exception_policy" type="int" setter="" getter="" default="0">
- The policy to use for unhandled Mono (C#) exceptions. The default "Terminate Application" exits the project as soon as an unhandled exception is thrown. "Log Error" logs an error message to the console instead, and will not interrupt the project execution when an unhandled exception is thrown.
- [b]Note:[/b] The unhandled exception policy is always set to "Log Error" in the editor, which also includes C# [code]tool[/code] scripts running within the editor as well as editor plugin code.
- </member>
<member name="navigation/2d/default_cell_size" type="int" setter="" getter="" default="1">
Default cell size for 2D navigation maps. See [method NavigationServer2D.map_set_cell_size].
</member>
<member name="navigation/2d/default_edge_connection_margin" type="int" setter="" getter="" default="1">
Default edge connection margin for 2D navigation maps. See [method NavigationServer2D.map_set_edge_connection_margin].
</member>
+ <member name="navigation/2d/default_link_connection_radius" type="int" setter="" getter="" default="4">
+ Default link connection radius for 2D navigation maps. See [method NavigationServer2D.map_set_link_connection_radius].
+ </member>
<member name="navigation/3d/default_cell_size" type="float" setter="" getter="" default="0.25">
Default cell size for 3D navigation maps. See [method NavigationServer3D.map_set_cell_size].
</member>
<member name="navigation/3d/default_edge_connection_margin" type="float" setter="" getter="" default="0.25">
Default edge connection margin for 3D navigation maps. See [method NavigationServer3D.map_set_edge_connection_margin].
</member>
+ <member name="navigation/3d/default_link_connection_radius" type="float" setter="" getter="" default="1.0">
+ Default link connection radius for 3D navigation maps. See [method NavigationServer3D.map_set_link_connection_radius].
+ </member>
<member name="network/limits/debugger/max_chars_per_second" type="int" setter="" getter="" default="32768">
- Maximum amount of characters allowed to send as output from the debugger. Over this value, content is dropped. This helps not to stall the debugger connection.
+ Maximum number of characters allowed to send as output from the debugger. Over this value, content is dropped. This helps not to stall the debugger connection.
</member>
<member name="network/limits/debugger/max_errors_per_second" type="int" setter="" getter="" default="400">
Maximum number of errors allowed to be sent from the debugger. Over this value, content is dropped. This helps not to stall the debugger connection.
</member>
<member name="network/limits/debugger/max_queued_messages" type="int" setter="" getter="" default="2048">
- Maximum amount of messages in the debugger queue. Over this value, content is dropped. This helps to limit the debugger memory usage.
+ Maximum number of messages in the debugger queue. Over this value, content is dropped. This helps to limit the debugger memory usage.
</member>
<member name="network/limits/debugger/max_warnings_per_second" type="int" setter="" getter="" default="400">
Maximum number of warnings allowed to be sent from the debugger. Over this value, content is dropped. This helps not to stall the debugger connection.
@@ -1494,8 +1667,8 @@
<member name="network/remote_fs/page_size" type="int" setter="" getter="" default="65536">
Page size used by remote filesystem (in bytes).
</member>
- <member name="network/ssl/certificate_bundle_override" type="String" setter="" getter="" default="&quot;&quot;">
- 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.
+ <member name="network/tls/certificate_bundle_override" type="String" setter="" getter="" default="&quot;&quot;">
+ The CA certificates bundle to use for TLS 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/default_angular_damp" type="float" setter="" getter="" default="1.0">
@@ -1565,7 +1738,7 @@
Individual shapes can have a specific bias value (see [member Shape2D.custom_solver_bias]).
</member>
<member name="physics/2d/solver/solver_iterations" type="int" setter="" getter="" default="16">
- Number of solver iterations for all contacts and constraints. The greater the amount of iterations, the more accurate the collisions will be. However, a greater amount of iterations requires more CPU power, which can decrease performance. See [constant PhysicsServer2D.SPACE_PARAM_SOLVER_ITERATIONS].
+ Number of solver iterations for all contacts and constraints. The greater the number of iterations, the more accurate the collisions will be. However, a greater number of iterations requires more CPU power, which can decrease performance. See [constant PhysicsServer2D.SPACE_PARAM_SOLVER_ITERATIONS].
</member>
<member name="physics/2d/time_before_sleep" type="float" setter="" getter="" default="0.5">
Time (in seconds) of inactivity before which a 2D physics body will put to sleep. See [constant PhysicsServer2D.SPACE_PARAM_BODY_TIME_TO_SLEEP].
@@ -1633,7 +1806,7 @@
Individual shapes can have a specific bias value (see [member Shape3D.custom_solver_bias]).
</member>
<member name="physics/3d/solver/solver_iterations" type="int" setter="" getter="" default="16">
- Number of solver iterations for all contacts and constraints. The greater the amount of iterations, the more accurate the collisions will be. However, a greater amount of iterations requires more CPU power, which can decrease performance. See [constant PhysicsServer3D.SPACE_PARAM_SOLVER_ITERATIONS].
+ Number of solver iterations for all contacts and constraints. The greater the number of iterations, the more accurate the collisions will be. However, a greater number of iterations requires more CPU power, which can decrease performance. See [constant PhysicsServer3D.SPACE_PARAM_SOLVER_ITERATIONS].
</member>
<member name="physics/3d/time_before_sleep" type="float" setter="" getter="" default="0.5">
Time (in seconds) of inactivity before which a 3D physics body will put to sleep. See [constant PhysicsServer3D.SPACE_PARAM_BODY_TIME_TO_SLEEP].
@@ -1641,15 +1814,19 @@
<member name="physics/common/enable_object_picking" type="bool" setter="" getter="" default="true">
Enables [member Viewport.physics_object_picking] on the root viewport.
</member>
+ <member name="physics/common/max_physics_steps_per_frame" type="int" setter="" getter="" default="8">
+ Controls the maximum number of physics steps that can be simulated each rendered frame. The default value is tuned to avoid "spiral of death" situations where expensive physics simulations trigger more expensive simulations indefinitely. However, the game will appear to slow down if the rendering FPS is less than [code]1 / max_physics_steps_per_frame[/code] of [member physics/common/physics_ticks_per_second]. This occurs even if [code]delta[/code] is consistently used in physics calculations. To avoid this, increase [member physics/common/max_physics_steps_per_frame] if you have increased [member physics/common/physics_ticks_per_second] significantly above its default value.
+ [b]Note:[/b] This property is only read when the project starts. To change the maximum number of simulated physics steps per frame at runtime, set [member Engine.max_physics_steps_per_frame] instead.
+ </member>
<member name="physics/common/physics_jitter_fix" type="float" setter="" getter="" 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/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="physics/common/physics_ticks_per_second" type="int" setter="" getter="" default="60">
- The number of fixed iterations per second. This controls how often physics simulation and [method Node._physics_process] methods are run. See also [member debug/settings/fps/force_fps].
+ The number of fixed iterations per second. This controls how often physics simulation and [method Node._physics_process] methods are run. See also [member application/run/max_fps].
[b]Note:[/b] This property is only read when the project starts. To change the physics FPS at runtime, set [member Engine.physics_ticks_per_second] instead.
- [b]Note:[/b] Only 8 physics ticks may be simulated per rendered frame at most. If more than 8 physics ticks have to be simulated per rendered frame to keep up with rendering, the game will appear to slow down (even if [code]delta[/code] is used consistently in physics calculations). Therefore, it is recommended not to increase [member physics/common/physics_ticks_per_second] above 240. Otherwise, the game will slow down when the rendering framerate goes below 30 FPS.
+ [b]Note:[/b] Only [member physics/common/max_physics_steps_per_frame] physics ticks may be simulated per rendered frame at most. If more physics ticks have to be simulated per rendered frame to keep up with rendering, the project will appear to slow down (even if [code]delta[/code] is used consistently in physics calculations). Therefore, it is recommended to also increase [member physics/common/max_physics_steps_per_frame] if increasing [member physics/common/physics_ticks_per_second] significantly above its default value.
</member>
<member name="rendering/2d/sdf/oversize" type="int" setter="" getter="" default="1">
</member>
@@ -1661,17 +1838,23 @@
</member>
<member name="rendering/2d/snap/snap_2d_vertices_to_pixel" type="bool" setter="" getter="" default="false">
</member>
- <member name="rendering/anti_aliasing/quality/msaa" type="int" setter="" getter="" default="0">
- Sets the number of MSAA samples to use (as a power of two). MSAA is used to reduce aliasing around the edges of polygons. A higher MSAA value results in smoother edges but can be significantly slower on some hardware. See also bilinear scaling 3d [member rendering/scaling_3d/mode] for supersampling, which provides higher quality but is much more expensive.
+ <member name="rendering/anti_aliasing/quality/msaa_2d" type="int" setter="" getter="" default="0">
+ Sets the number of MSAA samples to use for 2D/Canvas rendering (as a power of two). MSAA is used to reduce aliasing around the edges of polygons. A higher MSAA value results in smoother edges but can be significantly slower on some hardware. This has no effect on shader-induced aliasing or texture aliasing.
+ </member>
+ <member name="rendering/anti_aliasing/quality/msaa_3d" type="int" setter="" getter="" default="0">
+ Sets the number of MSAA samples to use for 3D rendering (as a power of two). MSAA is used to reduce aliasing around the edges of polygons. A higher MSAA value results in smoother edges but can be significantly slower on some hardware. See also bilinear scaling 3d [member rendering/scaling_3d/mode] for supersampling, which provides higher quality but is much more expensive. This has no effect on shader-induced aliasing or texture aliasing.
</member>
<member name="rendering/anti_aliasing/quality/screen_space_aa" type="int" setter="" getter="" default="0">
- Sets the screen-space antialiasing mode for the default screen [Viewport]. Screen-space antialiasing works by selectively blurring edges in a post-process shader. It differs from MSAA which takes multiple coverage samples while rendering objects. Screen-space AA methods are typically faster than MSAA and will smooth out specular aliasing, but tend to make scenes appear blurry. The blurriness can be counteracted to an extent by using a negative mipmap LOD bias ([member rendering/textures/default_filters/texture_mipmap_bias]).
+ Sets the screen-space antialiasing mode for the default screen [Viewport]. Screen-space antialiasing works by selectively blurring edges in a post-process shader. It differs from MSAA which takes multiple coverage samples while rendering objects. Screen-space AA methods are typically faster than MSAA and will smooth out specular aliasing, but tend to make scenes appear blurry. The blurriness is partially counteracted by automatically using a negative mipmap LOD bias (see [member rendering/textures/default_filters/texture_mipmap_bias]).
Another way to combat specular aliasing is to enable [member rendering/anti_aliasing/screen_space_roughness_limiter/enabled].
</member>
<member name="rendering/anti_aliasing/quality/use_debanding" type="bool" setter="" getter="" default="false">
+ If [code]true[/code], uses a fast post-processing filter to make banding significantly less visible in 3D. 2D rendering is [i]not[/i] affected by debanding unless the [member Environment.background_mode] is [constant Environment.BG_CANVAS].
+ In some cases, debanding may introduce a slightly noticeable dithering pattern. It's recommended to enable debanding only when actually needed since the dithering pattern will make lossless-compressed screenshots larger.
+ [b]Note:[/b] This property is only read when the project starts. To set debanding at run-time, set [member Viewport.use_debanding] on the root [Viewport] instead.
</member>
<member name="rendering/anti_aliasing/quality/use_taa" type="bool" setter="" getter="" default="false">
- Enables Temporal Anti-Aliasing for the default screen [Viewport]. TAA works by jittering the camera and accumulating the images of the last rendered frames, motion vector rendering is used to account for camera and object motion. Enabling TAA can make the image blurrier, which can be counteracted to an extent by using a negative mipmap LOD bias ([member rendering/textures/default_filters/texture_mipmap_bias]).
+ Enables Temporal Anti-Aliasing for the default screen [Viewport]. TAA works by jittering the camera and accumulating the images of the last rendered frames, motion vector rendering is used to account for camera and object motion. Enabling TAA can make the image blurrier, which is partially counteracted by automatically using a negative mipmap LOD bias (see [member rendering/textures/default_filters/texture_mipmap_bias]).
[b]Note:[/b] The implementation is not complete yet, some visual instances such as particles and skinned meshes may show artifacts.
</member>
<member name="rendering/anti_aliasing/screen_space_roughness_limiter/amount" type="float" setter="" getter="" default="0.25">
@@ -1696,13 +1879,6 @@
If [code]true[/code], performs a previous depth pass before rendering 3D materials. This increases performance significantly in scenes with high overdraw, when complex materials and lighting are used. However, in scenes with few occluded surfaces, the depth prepass may reduce performance. If your game is viewed from a fixed angle that makes it easy to avoid overdraw (such as top-down or side-scrolling perspective), consider disabling the depth prepass to improve performance. This setting can be changed at run-time to optimize performance depending on the scene currently being viewed.
[b]Note:[/b] Only supported when using the Vulkan Clustered backend or the OpenGL backend. When using Vulkan Mobile there is no depth prepass performed.
</member>
- <member name="rendering/driver/driver_name" type="String" setter="" getter="" default="&quot;vulkan&quot;">
- The video driver to use.
- [b]Note:[/b] OpenGL support is currently incomplete. Only basic rendering is supported.
- [b]Note:[/b] The backend in use can be overridden at runtime via the [code]--rendering-driver[/code] command line argument.
- [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/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>
@@ -1725,7 +1901,7 @@
Sets the quality for rough screen-space reflections. Turning off will make all screen space reflections sharp, while higher values make rough reflections look better.
</member>
<member name="rendering/environment/ssao/adaptive_target" type="float" setter="" getter="" default="0.5">
- Quality target to use when [member rendering/environment/ssao/quality] is set to [code]ULTRA[/code]. A value of [code]0.0[/code] provides a quality and speed similar to [code]MEDIUM[/code] while a value of [code]1.0[/code] provides much higher quality than any of the other settings at the cost of performance.
+ Quality target to use when [member rendering/environment/ssao/quality] is set to [code]Ultra[/code]. A value of [code]0.0[/code] provides a quality and speed similar to [code]Medium[/code] while a value of [code]1.0[/code] provides much higher quality than any of the other settings at the cost of performance.
</member>
<member name="rendering/environment/ssao/blur_passes" type="int" setter="" getter="" default="2">
Number of blur passes to use when computing screen-space ambient occlusion. A higher number will result in a smoother look, but will be slower to compute and will have less high-frequency detail.
@@ -1740,10 +1916,10 @@
If [code]true[/code], screen-space ambient occlusion will be rendered at half size and then upscaled before being added to the scene. This is significantly faster but may miss small details. If [code]false[/code], screen-space ambient occlusion will be rendered at full size.
</member>
<member name="rendering/environment/ssao/quality" type="int" setter="" getter="" default="2">
- Sets the quality of the screen-space ambient occlusion effect. Higher values take more samples and so will result in better quality, at the cost of performance. Setting to [code]ULTRA[/code] will use the [member rendering/environment/ssao/adaptive_target] setting.
+ Sets the quality of the screen-space ambient occlusion effect. Higher values take more samples and so will result in better quality, at the cost of performance. Setting to [code]Ultra[/code] will use the [member rendering/environment/ssao/adaptive_target] setting.
</member>
<member name="rendering/environment/ssil/adaptive_target" type="float" setter="" getter="" default="0.5">
- Quality target to use when [member rendering/environment/ssil/quality] is set to [code]ULTRA[/code]. A value of [code]0.0[/code] provides a quality and speed similar to [code]MEDIUM[/code] while a value of [code]1.0[/code] provides much higher quality than any of the other settings at the cost of performance. When using the adaptive target, the performance cost scales with the complexity of the scene.
+ Quality target to use when [member rendering/environment/ssil/quality] is set to [code]Ultra[/code]. A value of [code]0.0[/code] provides a quality and speed similar to [code]Medium[/code] while a value of [code]1.0[/code] provides much higher quality than any of the other settings at the cost of performance. When using the adaptive target, the performance cost scales with the complexity of the scene.
</member>
<member name="rendering/environment/ssil/blur_passes" type="int" setter="" getter="" default="4">
Number of blur passes to use when computing screen-space indirect lighting. A higher number will result in a smoother look, but will be slower to compute and will have less high-frequency detail.
@@ -1758,7 +1934,7 @@
If [code]true[/code], screen-space indirect lighting will be rendered at half size and then upscaled before being added to the scene. This is significantly faster but may miss small details and may result in some objects appearing to glow at their edges.
</member>
<member name="rendering/environment/ssil/quality" type="int" setter="" getter="" default="2">
- Sets the quality of the screen-space indirect lighting effect. Higher values take more samples and so will result in better quality, at the cost of performance. Setting to [code]ULTRA[/code] will use the [member rendering/environment/ssil/adaptive_target] setting.
+ Sets the quality of the screen-space indirect lighting effect. Higher values take more samples and so will result in better quality, at the cost of performance. Setting to [code]Ultra[/code] will use the [member rendering/environment/ssil/adaptive_target] setting.
</member>
<member name="rendering/environment/subsurface_scattering/subsurface_scattering_depth_scale" type="float" setter="" getter="" default="0.01">
Scales the depth over which the subsurface scattering effect is applied. A high value may allow light to scatter into a part of the mesh or another mesh that is close in screen space but far in depth.
@@ -1773,11 +1949,35 @@
Enables filtering of the volumetric fog effect prior to integration. This substantially blurs the fog which reduces fine details but also smooths out harsh edges and aliasing artifacts. Disable when more detail is required.
</member>
<member name="rendering/environment/volumetric_fog/volume_depth" type="int" setter="" getter="" default="64">
- Number of slices to use along the depth of the froxel buffer for volumetric fog. A lower number will be more efficient but may result in artifacts appearing during camera movement.
+ Number of slices to use along the depth of the froxel buffer for volumetric fog. A lower number will be more efficient but may result in artifacts appearing during camera movement. See also [member Environment.volumetric_fog_length].
</member>
<member name="rendering/environment/volumetric_fog/volume_size" type="int" setter="" getter="" default="64">
Base size used to determine size of froxel buffer in the camera X-axis and Y-axis. The final size is scaled by the aspect ratio of the screen, so actual values may differ from what is set. Set a larger size for more detailed fog, set a smaller size for better performance.
</member>
+ <member name="rendering/gl_compatibility/driver" type="String" setter="" getter="" default="&quot;opengl3&quot;">
+ Sets the driver to be used by the renderer when using the Compatibility renderer. This property can not be edited directly, instead, set the driver using the platform-specific overrides.
+ </member>
+ <member name="rendering/gl_compatibility/driver.android" type="String" setter="" getter="" default="&quot;opengl3&quot;">
+ Android override for [member rendering/gl_compatibility/driver].
+ </member>
+ <member name="rendering/gl_compatibility/driver.ios" type="String" setter="" getter="" default="&quot;opengl3&quot;">
+ iOS override for [member rendering/gl_compatibility/driver].
+ </member>
+ <member name="rendering/gl_compatibility/driver.linuxbsd" type="String" setter="" getter="" default="&quot;opengl3&quot;">
+ LinuxBSD override for [member rendering/gl_compatibility/driver].
+ </member>
+ <member name="rendering/gl_compatibility/driver.macos" type="String" setter="" getter="" default="&quot;opengl3&quot;">
+ macOS override for [member rendering/gl_compatibility/driver].
+ </member>
+ <member name="rendering/gl_compatibility/driver.web" type="String" setter="" getter="" default="&quot;opengl3&quot;">
+ Web override for [member rendering/gl_compatibility/driver].
+ </member>
+ <member name="rendering/gl_compatibility/driver.windows" type="String" setter="" getter="" default="&quot;opengl3&quot;">
+ Windows override for [member rendering/gl_compatibility/driver].
+ </member>
+ <member name="rendering/gl_compatibility/item_buffer_size" type="int" setter="" getter="" default="16384">
+ Maximum number of canvas items commands that can be drawn in a single viewport update. If more render commands are issued they will be ignored. Decreasing this limit may improve performance on bandwidth limited devices. Increase this limit if you find that not all objects are being drawn in a frame.
+ </member>
<member name="rendering/global_illumination/gi/use_half_resolution" type="bool" setter="" getter="" default="false">
If [code]true[/code], renders [VoxelGI] and SDFGI ([member Environment.sdfgi_enabled]) buffers at halved resolution (e.g. 960×540 when the viewport size is 1920×1080). This improves performance significantly when VoxelGI or SDFGI is enabled, at the cost of artifacts that may be visible on polygon edges. The loss in quality becomes less noticeable as the viewport resolution increases. [LightmapGI] rendering is not affected by this setting.
[b]Note:[/b] This property is only read when the project starts. To set half-resolution GI at run-time, call [method RenderingServer.gi_set_use_half_resolution] instead.
@@ -1823,9 +2023,61 @@
<member name="rendering/lightmapping/bake_quality/ultra_quality_ray_count" type="int" setter="" getter="" default="1024">
The number of rays to use for baking lightmaps with [LightmapGI] when [member LightmapGI.quality] is [constant LightmapGI.BAKE_QUALITY_ULTRA].
</member>
+ <member name="rendering/lightmapping/primitive_meshes/texel_size" type="float" setter="" getter="" default="0.2">
+ The texel_size that is used to calculate the [member Mesh.lightmap_size_hint] on [PrimitiveMesh] resources if [member PrimitiveMesh.add_uv2] is enabled.
+ </member>
<member name="rendering/lightmapping/probe_capture/update_speed" type="float" setter="" getter="" default="15">
The framerate-independent update speed when representing dynamic object lighting from [LightmapProbe]s. Higher values make dynamic object lighting update faster. Higher values can prevent fast-moving objects from having "outdated" indirect lighting displayed on them, at the cost of possible flickering when an object moves from a bright area to a shaded area.
</member>
+ <member name="rendering/lights_and_shadows/directional_shadow/16_bits" type="bool" setter="" getter="" default="true">
+ Use 16 bits for shadow depth map. Enabling this results in shadows having less precision and may result in shadow acne, but can lead to performance improvements on some devices.
+ </member>
+ <member name="rendering/lights_and_shadows/directional_shadow/size" type="int" setter="" getter="" default="4096">
+ The directional shadow's size in pixels. Higher values will result in sharper shadows, at the cost of performance. The value will be rounded up to the nearest power of 2.
+ </member>
+ <member name="rendering/lights_and_shadows/directional_shadow/size.mobile" type="int" setter="" getter="" default="2048">
+ Lower-end override for [member rendering/lights_and_shadows/directional_shadow/size] on mobile devices, due to performance concerns or driver support.
+ </member>
+ <member name="rendering/lights_and_shadows/directional_shadow/soft_shadow_filter_quality" type="int" setter="" getter="" default="2">
+ Quality setting for shadows cast by [DirectionalLight3D]s. Higher quality settings use more samples when reading from shadow maps and are thus slower. Low quality settings may result in shadows looking grainy.
+ [b]Note:[/b] The Soft Very Low setting will automatically multiply [i]constant[/i] shadow blur by 0.75x to reduce the amount of noise visible. This automatic blur change only affects the constant blur factor defined in [member Light3D.shadow_blur], not the variable blur performed by [DirectionalLight3D]s' [member Light3D.light_angular_distance].
+ [b]Note:[/b] The Soft High and Soft Ultra settings will automatically multiply [i]constant[/i] shadow blur by 1.5× and 2× respectively to make better use of the increased sample count. This increased blur also improves stability of dynamic object shadows.
+ </member>
+ <member name="rendering/lights_and_shadows/directional_shadow/soft_shadow_filter_quality.mobile" type="int" setter="" getter="" default="0">
+ Lower-end override for [member rendering/lights_and_shadows/directional_shadow/soft_shadow_filter_quality] on mobile devices, due to performance concerns or driver support.
+ </member>
+ <member name="rendering/lights_and_shadows/positional_shadow/atlas_16_bits" type="bool" setter="" getter="" default="true">
+ Use 16 bits for shadow depth map. Enabling this results in shadows having less precision and may result in shadow acne, but can lead to performance improvements on some devices.
+ </member>
+ <member name="rendering/lights_and_shadows/positional_shadow/atlas_quadrant_0_subdiv" type="int" setter="" getter="" default="2">
+ Subdivision quadrant size for shadow mapping. See shadow mapping documentation.
+ </member>
+ <member name="rendering/lights_and_shadows/positional_shadow/atlas_quadrant_1_subdiv" type="int" setter="" getter="" default="2">
+ Subdivision quadrant size for shadow mapping. See shadow mapping documentation.
+ </member>
+ <member name="rendering/lights_and_shadows/positional_shadow/atlas_quadrant_2_subdiv" type="int" setter="" getter="" default="3">
+ Subdivision quadrant size for shadow mapping. See shadow mapping documentation.
+ </member>
+ <member name="rendering/lights_and_shadows/positional_shadow/atlas_quadrant_3_subdiv" type="int" setter="" getter="" default="4">
+ Subdivision quadrant size for shadow mapping. See shadow mapping documentation.
+ </member>
+ <member name="rendering/lights_and_shadows/positional_shadow/atlas_size" type="int" setter="" getter="" default="4096">
+ Size for shadow atlas (used for OmniLights and SpotLights). See documentation.
+ </member>
+ <member name="rendering/lights_and_shadows/positional_shadow/atlas_size.mobile" type="int" setter="" getter="" default="2048">
+ Lower-end override for [member rendering/lights_and_shadows/positional_shadow/atlas_size] on mobile devices, due to performance concerns or driver support.
+ </member>
+ <member name="rendering/lights_and_shadows/positional_shadow/soft_shadow_filter_quality" type="int" setter="" getter="" default="2">
+ Quality setting for shadows cast by [OmniLight3D]s and [SpotLight3D]s. Higher quality settings use more samples when reading from shadow maps and are thus slower. Low quality settings may result in shadows looking grainy.
+ [b]Note:[/b] The Soft Very Low setting will automatically multiply [i]constant[/i] shadow blur by 0.75x to reduce the amount of noise visible. This automatic blur change only affects the constant blur factor defined in [member Light3D.shadow_blur], not the variable blur performed by [DirectionalLight3D]s' [member Light3D.light_angular_distance].
+ [b]Note:[/b] The Soft High and Soft Ultra settings will automatically multiply shadow blur by 1.5× and 2× respectively to make better use of the increased sample count. This increased blur also improves stability of dynamic object shadows.
+ </member>
+ <member name="rendering/lights_and_shadows/positional_shadow/soft_shadow_filter_quality.mobile" type="int" setter="" getter="" default="0">
+ Lower-end override for [member rendering/lights_and_shadows/positional_shadow/soft_shadow_filter_quality] on mobile devices, due to performance concerns or driver support.
+ </member>
+ <member name="rendering/lights_and_shadows/use_physical_light_units" type="bool" setter="" getter="" default="false">
+ Enables the use of physically based units for light sources. Physically based units tend to be much larger than the arbitrary units used by Godot, but they can be used to match lighting within Godot to real-world lighting. Due to the large dynamic range of lighting conditions present in nature, Godot bakes exposure into the various lighting quantities before rendering. Most light sources bake exposure automatically at run time based on the active [CameraAttributes] resource, but [LightmapGI] and [VoxelGI] require a [CameraAttributes] resource to be set at bake time to reduce the dynamic range. At run time, Godot will automatically reconcile the baked exposure with the active exposure to ensure lighting remains consistent.
+ </member>
<member name="rendering/limits/cluster_builder/max_clustered_elements" type="float" setter="" getter="" default="512">
</member>
<member name="rendering/limits/forward_renderer/threaded_render_minimum_instances" type="int" setter="" getter="" default="500">
@@ -1836,7 +2088,7 @@
Max number of omnilights and spotlights renderable per object. At the default value of 8, this means that each surface can be affected by up to 8 omnilights and 8 spotlights. This is further limited by hardware support and [member rendering/limits/opengl/max_renderable_lights]. Setting this low will slightly reduce memory usage, may decrease shader compile times, and may result in faster rendering on low-end, mobile, or web devices.
</member>
<member name="rendering/limits/opengl/max_renderable_elements" type="int" setter="" getter="" default="65536">
- Max amount of elements renderable in a frame. If more elements than this are visible per frame, they will not be drawn. Keep in mind elements refer to mesh surfaces and not meshes themselves. Setting this low will slightly reduce memory usage and may decrease shader compile times, particularly on web. For most uses, the default value is suitable, but consider lowering as much as possible on web export.
+ Max number of elements renderable in a frame. If more elements than this are visible per frame, they will not be drawn. Keep in mind elements refer to mesh surfaces and not meshes themselves. Setting this low will slightly reduce memory usage and may decrease shader compile times, particularly on web. For most uses, the default value is suitable, but consider lowering as much as possible on web export.
</member>
<member name="rendering/limits/opengl/max_renderable_lights" type="int" setter="" getter="" default="32">
Max number of positional lights renderable in a frame. If more lights than this number are used, they will be ignored. Setting this low will slightly reduce memory usage and may decrease shader compile times, particularly on web. For most uses, the default value is suitable, but consider lowering as much as possible on web export.
@@ -1889,6 +2141,44 @@
<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/renderer/rendering_method" type="String" setter="" getter="" default="&quot;forward_plus&quot;">
+ Sets the renderer that will be used by the project. Options are:
+ [b]Forward Plus[/b]: High-end renderer designed for Desktop devices. Has a higher base overhead, but scales well with complex scenes. Not suitable for older devices or mobile.
+ [b]Mobile[/b]: Modern renderer designed for mobile devices. Has a lower base overhead than Forward Plus, but does not scale as well to large scenes with many elements.
+ [b]GL Compatibility[/b]: Low-end renderer designed for older devices. Based on the limitations of the OpenGL 3.3/ OpenGL ES 3.0 / WebGL 2 APIs.
+ </member>
+ <member name="rendering/renderer/rendering_method.mobile" type="String" setter="" getter="" default="&quot;mobile&quot;">
+ Override for [member rendering/renderer/rendering_method] on mobile devices.
+ </member>
+ <member name="rendering/renderer/rendering_method.web" type="String" setter="" getter="" default="&quot;gl_compatibility&quot;">
+ Override for [member rendering/renderer/rendering_method] on web.
+ </member>
+ <member name="rendering/rendering_device/driver" type="String" setter="" getter="" default="&quot;vulkan&quot;">
+ Sets the driver to be used by the renderer when using a RenderingDevice-based renderer like the clustered renderer or the mobile renderer. This property can not be edited directly, instead, set the driver using the platform-specific overrides.
+ </member>
+ <member name="rendering/rendering_device/driver.android" type="String" setter="" getter="" default="&quot;vulkan&quot;">
+ Android override for [member rendering/rendering_device/driver].
+ </member>
+ <member name="rendering/rendering_device/driver.ios" type="String" setter="" getter="" default="&quot;vulkan&quot;">
+ iOS override for [member rendering/rendering_device/driver].
+ </member>
+ <member name="rendering/rendering_device/driver.linuxbsd" type="String" setter="" getter="" default="&quot;vulkan&quot;">
+ LinuxBSD override for [member rendering/rendering_device/driver].
+ </member>
+ <member name="rendering/rendering_device/driver.macos" type="String" setter="" getter="" default="&quot;vulkan&quot;">
+ macOS override for [member rendering/rendering_device/driver].
+ </member>
+ <member name="rendering/rendering_device/driver.windows" type="String" setter="" getter="" default="&quot;vulkan&quot;">
+ Windows override for [member rendering/rendering_device/driver].
+ </member>
+ <member name="rendering/rendering_device/staging_buffer/block_size_kb" type="int" setter="" getter="" default="256">
+ </member>
+ <member name="rendering/rendering_device/staging_buffer/max_size_mb" type="int" setter="" getter="" default="128">
+ </member>
+ <member name="rendering/rendering_device/staging_buffer/texture_upload_region_size_px" type="int" setter="" getter="" default="64">
+ </member>
+ <member name="rendering/rendering_device/vulkan/max_descriptors_per_pool" type="int" setter="" getter="" default="64">
+ </member>
<member name="rendering/scaling_3d/fsr_sharpness" type="float" setter="" getter="" default="0.2">
Determines how sharp the upscaled image will be when using the FSR upscaling mode. Sharpness halves with every whole number. Values go from 0.0 (sharpest) to 2.0. Values above 2.0 won't make a visible difference.
</member>
@@ -1896,11 +2186,12 @@
Sets the scaling 3D mode. Bilinear scaling renders at different resolution to either undersample or supersample the viewport. FidelityFX Super Resolution 1.0, abbreviated to FSR, is an upscaling technology that produces high quality images at fast framerates by using a spatially aware upscaling algorithm. FSR is slightly more expensive than bilinear, but it produces significantly higher image quality. FSR should be used where possible.
</member>
<member name="rendering/scaling_3d/scale" type="float" setter="" getter="" default="1.0">
- Scales the 3D render buffer based on the viewport size uses an image filter specified in [member rendering/scaling_3d/mode] to scale the output image to the full viewport size. Values lower than [code]1.0[/code] can be used to speed up 3D rendering at the cost of quality (undersampling). Values greater than [code]1.0[/code] are only valid for bilinear mode and can be used to improve 3D rendering quality at a high performance cost (supersampling). See also [member rendering/anti_aliasing/quality/msaa] for multi-sample antialiasing, which is significantly cheaper but only smoothens the edges of polygons.
+ Scales the 3D render buffer based on the viewport size uses an image filter specified in [member rendering/scaling_3d/mode] to scale the output image to the full viewport size. Values lower than [code]1.0[/code] can be used to speed up 3D rendering at the cost of quality (undersampling). Values greater than [code]1.0[/code] are only valid for bilinear mode and can be used to improve 3D rendering quality at a high performance cost (supersampling). See also [member rendering/anti_aliasing/quality/msaa_3d] for multi-sample antialiasing, which is significantly cheaper but only smooths the edges of polygons.
</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">
+ Enable the shader cache, which stores compiled shaders to disk to prevent stuttering from shader compilation the next time the shader is needed.
</member>
<member name="rendering/shader_compiler/shader_cache/strip_debug" type="bool" setter="" getter="" default="false">
</member>
@@ -1920,61 +2211,19 @@
<member name="rendering/shading/overrides/force_vertex_shading.mobile" type="bool" setter="" getter="" default="true">
Lower-end override for [member rendering/shading/overrides/force_vertex_shading] on mobile devices, due to performance concerns or driver support.
</member>
- <member name="rendering/shadows/directional_shadow/16_bits" type="bool" setter="" getter="" default="true">
- </member>
- <member name="rendering/shadows/directional_shadow/size" type="int" setter="" getter="" default="4096">
- The directional shadow's size in pixels. Higher values will result in sharper shadows, at the cost of performance. The value will be rounded up to the nearest power of 2.
- </member>
- <member name="rendering/shadows/directional_shadow/size.mobile" type="int" setter="" getter="" default="2048">
- Lower-end override for [member rendering/shadows/directional_shadow/size] on mobile devices, due to performance concerns or driver support.
- </member>
- <member name="rendering/shadows/directional_shadow/soft_shadow_filter_quality" type="int" setter="" getter="" default="2">
- Quality setting for shadows cast by [DirectionalLight3D]s. Higher quality settings use more samples when reading from shadow maps and are thus slower. Low quality settings may result in shadows looking grainy.
- [b]Note:[/b] The Soft Very Low setting will automatically multiply [i]constant[/i] shadow blur by 0.75x to reduce the amount of noise visible. This automatic blur change only affects the constant blur factor defined in [member Light3D.shadow_blur], not the variable blur performed by [DirectionalLight3D]s' [member Light3D.light_angular_distance].
- [b]Note:[/b] The Soft High and Soft Ultra settings will automatically multiply [i]constant[/i] shadow blur by 1.5× and 2× respectively to make better use of the increased sample count. This increased blur also improves stability of dynamic object shadows.
- </member>
- <member name="rendering/shadows/directional_shadow/soft_shadow_filter_quality.mobile" type="int" setter="" getter="" default="0">
- Lower-end override for [member rendering/shadows/directional_shadow/soft_shadow_filter_quality] on mobile devices, due to performance concerns or driver support.
- </member>
- <member name="rendering/shadows/positional_shadow/atlas_16_bits" type="bool" setter="" getter="" default="true">
- </member>
- <member name="rendering/shadows/positional_shadow/atlas_quadrant_0_subdiv" type="int" setter="" getter="" default="2">
- Subdivision quadrant size for shadow mapping. See shadow mapping documentation.
- </member>
- <member name="rendering/shadows/positional_shadow/atlas_quadrant_1_subdiv" type="int" setter="" getter="" default="2">
- Subdivision quadrant size for shadow mapping. See shadow mapping documentation.
- </member>
- <member name="rendering/shadows/positional_shadow/atlas_quadrant_2_subdiv" type="int" setter="" getter="" default="3">
- Subdivision quadrant size for shadow mapping. See shadow mapping documentation.
- </member>
- <member name="rendering/shadows/positional_shadow/atlas_quadrant_3_subdiv" type="int" setter="" getter="" default="4">
- Subdivision quadrant size for shadow mapping. See shadow mapping documentation.
- </member>
- <member name="rendering/shadows/positional_shadow/atlas_size" type="int" setter="" getter="" default="4096">
- Size for shadow atlas (used for OmniLights and SpotLights). See documentation.
- </member>
- <member name="rendering/shadows/positional_shadow/atlas_size.mobile" type="int" setter="" getter="" default="2048">
- Lower-end override for [member rendering/shadows/positional_shadow/atlas_size] on mobile devices, due to performance concerns or driver support.
- </member>
- <member name="rendering/shadows/positional_shadow/soft_shadow_filter_quality" type="int" setter="" getter="" default="2">
- Quality setting for shadows cast by [OmniLight3D]s and [SpotLight3D]s. Higher quality settings use more samples when reading from shadow maps and are thus slower. Low quality settings may result in shadows looking grainy.
- [b]Note:[/b] The Soft Very Low setting will automatically multiply [i]constant[/i] shadow blur by 0.75x to reduce the amount of noise visible. This automatic blur change only affects the constant blur factor defined in [member Light3D.shadow_blur], not the variable blur performed by [DirectionalLight3D]s' [member Light3D.light_angular_distance].
- [b]Note:[/b] The Soft High and Soft Ultra settings will automatically multiply shadow blur by 1.5× and 2× respectively to make better use of the increased sample count. This increased blur also improves stability of dynamic object shadows.
- </member>
- <member name="rendering/shadows/positional_shadow/soft_shadow_filter_quality.mobile" type="int" setter="" getter="" default="0">
- Lower-end override for [member rendering/shadows/positional_shadow/soft_shadow_filter_quality] on mobile devices, due to performance concerns or driver support.
- </member>
<member name="rendering/textures/decals/filter" type="int" setter="" getter="" default="3">
The filtering quality to use for [Decal] nodes. When using one of the anisotropic filtering modes, the anisotropic filtering level is controlled by [member rendering/textures/default_filters/anisotropic_filtering_level].
</member>
<member name="rendering/textures/default_filters/anisotropic_filtering_level" type="int" setter="" getter="" default="2">
Sets the maximum number of samples to take when using anisotropic filtering on textures (as a power of two). A higher sample count will result in sharper textures at oblique angles, but is more expensive to compute. A value of [code]0[/code] forcibly disables anisotropic filtering, even on materials where it is enabled.
The anisotropic filtering level also affects decals and light projectors if they are configured to use anisotropic filtering. See [member rendering/textures/decals/filter] and [member rendering/textures/light_projectors/filter].
+ [b]Note:[/b] For performance reasons, anisotropic filtering [i]is not enabled by default[/i] on 2D and 3D materials. For this setting to have an effect in 3D, set [member BaseMaterial3D.texture_filter] to [constant BaseMaterial3D.TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC] or [constant BaseMaterial3D.TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC] on materials. For this setting to have an effect in 2D, set [member CanvasItem.texture_filter] to [constant CanvasItem.TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC] or [constant CanvasItem.TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC] on the [CanvasItem] node displaying the texture (or in [CanvasTexture]). However, anisotropic filtering is rarely useful in 2D, so only enable it for textures in 2D if it makes a meaningful visual difference.
[b]Note:[/b] This property is only read when the project starts. There is currently no way to change this setting at run-time.
</member>
<member name="rendering/textures/default_filters/texture_mipmap_bias" type="float" setter="" getter="" default="0.0">
- Affects the final texture sharpness by reading from a lower or higher mipmap (also called "texture LOD bias"). Negative values make mipmapped textures sharper but grainier when viewed at a distance, while positive values make mipmapped textures blurrier (even when up close). To get sharper textures at a distance without introducing too much graininess, set this between [code]-0.75[/code] and [code]0.0[/code]. Enabling temporal antialiasing ([member rendering/anti_aliasing/quality/use_taa]) can help reduce the graininess visible when using negative mipmap bias.
- [b]Note:[/b] When the 3D scaling mode is set to FSR 1.0, this value is used to adjust the automatic mipmap bias which is calculated internally based on the scale factor. The formula for this is [code]-log2(1.0 / scale) + mipmap_bias[/code].
+ Affects the final texture sharpness by reading from a lower or higher mipmap (also called "texture LOD bias"). Negative values make mipmapped textures sharper but grainier when viewed at a distance, while positive values make mipmapped textures blurrier (even when up close).
+ Enabling temporal antialiasing ([member rendering/anti_aliasing/quality/use_taa]) will automatically apply a [code]-0.5[/code] offset to this value, while enabling FXAA ([member rendering/anti_aliasing/quality/screen_space_aa]) will automatically apply a [code]-0.25[/code] offset to this value. If both TAA and FXAA are enbled at the same time, an offset of [code]-0.75[/code] is applied to this value.
+ [b]Note:[/b] If [member rendering/scaling_3d/scale] is lower than [code]1.0[/code] (exclusive), [member rendering/textures/default_filters/texture_mipmap_bias] is used to adjust the automatic mipmap bias which is calculated internally based on the scale factor. The formula for this is [code]log2(scaling_3d_scale) + mipmap_bias[/code].
[b]Note:[/b] This property is only read when the project starts. To change the mipmap LOD bias at run-time, set [member Viewport.texture_mipmap_bias] instead.
</member>
<member name="rendering/textures/default_filters/use_nearest_mipmap_filter" type="bool" setter="" getter="" default="false">
@@ -1987,9 +2236,6 @@
<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 (see [member application/config/use_hidden_project_data_directory]).
@@ -2006,24 +2252,21 @@
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 (see [member application/config/use_hidden_project_data_directory]).
</member>
+ <member name="rendering/textures/webp_compression/compression_method" type="int" setter="" getter="" default="2">
+ The default compression method for WebP. Affects both lossy and lossless WebP. A higher value results in smaller files at the cost of compression speed. Decompression speed is mostly unaffected by the compression method. Supported values are 0 to 6. Note that compression methods above 4 are very slow and offer very little savings.
+ </member>
+ <member name="rendering/textures/webp_compression/lossless_compression_factor" type="float" setter="" getter="" default="25">
+ The default compression factor for lossless WebP. Decompression speed is mostly unaffected by the compression factor. Supported values are 0 to 100.
+ </member>
+ <member name="rendering/transparent_background" type="bool" setter="" getter="" default="false">
+ If [code]true[/code], enables [member Viewport.transparent_bg] on the root viewport. This allows per-pixel transparency to be effective after also enabling [member display/window/size/transparent] and [member display/window/per_pixel_transparency/allowed].
+ </member>
<member name="rendering/vrs/mode" type="int" setter="" getter="" default="0">
Set the default Variable Rate Shading (VRS) mode for the main viewport. See [member Viewport.vrs_mode] to change this at runtime, and [enum Viewport.VRSMode] for possible values.
</member>
<member name="rendering/vrs/texture" type="String" setter="" getter="" default="&quot;&quot;">
If [member rendering/vrs/mode] is set to texture, this is the path to default texture loaded as the VRS image.
</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="threading/worker_pool/low_priority_thread_ratio" type="float" setter="" getter="" default="0.3">
</member>
<member name="threading/worker_pool/max_threads" type="int" setter="" getter="" default="-1">
@@ -2034,7 +2277,7 @@
Action map configuration to load by default.
</member>
<member name="xr/openxr/enabled" type="bool" setter="" getter="" default="false">
- If [code]true[/code] Godot will setup and initialise OpenXR on startup.
+ If [code]true[/code] Godot will setup and initialize OpenXR on startup.
</member>
<member name="xr/openxr/form_factor" type="int" setter="" getter="" default="&quot;0&quot;">
Specify whether OpenXR should be configured for an HMD or a hand held device.
diff --git a/doc/classes/Projection.xml b/doc/classes/Projection.xml
index b8f6e54d87..602833bca5 100644
--- a/doc/classes/Projection.xml
+++ b/doc/classes/Projection.xml
@@ -1,8 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="Projection" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
+ 3D projection (4x4 matrix).
</brief_description>
<description>
+ A 4x4 matrix used for 3D projective transformations. It can represent transformations such as translation, rotation, scaling, shearing, and perspective division. It consists of four [Vector4] columns.
+ For purely linear transformations (translation, rotation, and scale), it is recommended to use [Transform3D], as it is more performant and has a lower memory footprint.
+ Used internally as [Camera3D]'s projection matrix.
</description>
<tutorials>
</tutorials>
@@ -10,18 +14,31 @@
<constructor name="Projection">
<return type="Projection" />
<description>
+ Constructs a default-initialized [Projection] set to [constant IDENTITY].
</description>
</constructor>
<constructor name="Projection">
<return type="Projection" />
<param index="0" name="from" type="Projection" />
<description>
+ Constructs a [Projection] as a copy of the given [Projection].
</description>
</constructor>
<constructor name="Projection">
<return type="Projection" />
<param index="0" name="from" type="Transform3D" />
<description>
+ Constructs a Projection as a copy of the given [Transform3D].
+ </description>
+ </constructor>
+ <constructor name="Projection">
+ <return type="Projection" />
+ <param index="0" name="x_axis" type="Vector4" />
+ <param index="1" name="y_axis" type="Vector4" />
+ <param index="2" name="z_axis" type="Vector4" />
+ <param index="3" name="w_axis" type="Vector4" />
+ <description>
+ Constructs a Projection from four [Vector4] values (matrix columns).
</description>
</constructor>
</constructors>
@@ -30,12 +47,14 @@
<return type="Projection" />
<param index="0" name="flip_y" type="bool" />
<description>
+ Creates a new [Projection] that projects positions from a depth range of [code]-1[/code] to [code]1[/code] to one that ranges from [code]0[/code] to [code]1[/code], and flips the projected positions vertically, according to [param flip_y].
</description>
</method>
<method name="create_fit_aabb" qualifiers="static">
<return type="Projection" />
<param index="0" name="aabb" type="AABB" />
<description>
+ Creates a new [Projection] that scales a given projection to fit around a given [AABB] in projection space.
</description>
</method>
<method name="create_for_hmd" qualifiers="static">
@@ -49,6 +68,8 @@
<param index="6" name="z_near" type="float" />
<param index="7" name="z_far" type="float" />
<description>
+ Creates a new [Projection] for projecting positions onto a head-mounted display with the given X:Y aspect ratio, distance between eyes, display width, distance to lens, oversampling factor, and depth clipping planes.
+ [param eye] creates the projection for the left eye when set to 1, or the right eye when set to 2.
</description>
</method>
<method name="create_frustum" qualifiers="static">
@@ -60,6 +81,7 @@
<param index="4" name="z_near" type="float" />
<param index="5" name="z_far" type="float" />
<description>
+ Creates a new [Projection] that projects positions in a frustum with the given clipping planes.
</description>
</method>
<method name="create_frustum_aspect" qualifiers="static">
@@ -71,12 +93,15 @@
<param index="4" name="z_far" type="float" />
<param index="5" name="flip_fov" type="bool" default="false" />
<description>
+ Creates a new [Projection] that projects positions in a frustum with the given size, X:Y aspect ratio, offset, and clipping planes.
+ [param flip_fov] determines whether the projection's field of view is flipped over its diagonal.
</description>
</method>
<method name="create_light_atlas_rect" qualifiers="static">
<return type="Projection" />
<param index="0" name="rect" type="Rect2" />
<description>
+ Creates a new [Projection] that projects positions into the given [Rect2].
</description>
</method>
<method name="create_orthogonal" qualifiers="static">
@@ -88,6 +113,7 @@
<param index="4" name="z_near" type="float" />
<param index="5" name="z_far" type="float" />
<description>
+ Creates a new [Projection] that projects positions using an orthogonal projection with the given clipping planes.
</description>
</method>
<method name="create_orthogonal_aspect" qualifiers="static">
@@ -98,6 +124,8 @@
<param index="3" name="z_far" type="float" />
<param index="4" name="flip_fov" type="bool" default="false" />
<description>
+ Creates a new [Projection] that projects positions using an orthogonal projection with the given size, X:Y aspect ratio, and clipping planes.
+ [param flip_fov] determines whether the projection's field of view is flipped over its diagonal.
</description>
</method>
<method name="create_perspective" qualifiers="static">
@@ -108,6 +136,8 @@
<param index="3" name="z_far" type="float" />
<param index="4" name="flip_fov" type="bool" default="false" />
<description>
+ Creates a new [Projection] that projects positions using a perspective projection with the given Y-axis field of view (in degrees), X:Y aspect ratio, and clipping planes.
+ [param flip_fov] determines whether the projection's field of view is flipped over its diagonal.
</description>
</method>
<method name="create_perspective_hmd" qualifiers="static">
@@ -121,31 +151,40 @@
<param index="6" name="intraocular_dist" type="float" />
<param index="7" name=" convergence_dist" type="float" />
<description>
+ Creates a new [Projection] that projects positions using a perspective projection with the given Y-axis field of view (in degrees), X:Y aspect ratio, and clipping distances. The projection is adjusted for a head-mounted display with the given distance between eyes and distance to a point that can be focused on.
+ [param eye] creates the projection for the left eye when set to 1, or the right eye when set to 2.
+ [param flip_fov] determines whether the projection's field of view is flipped over its diagonal.
</description>
</method>
<method name="determinant" qualifiers="const">
<return type="float" />
<description>
+ Returns a scalar value that is the signed factor by which areas are scaled by this matrix. If the sign is negative, the matrix flips the orientation of the area.
+ The determinant can be used to calculate the invertibility of a matrix or solve linear systems of equations involving the matrix, among other applications.
</description>
</method>
<method name="flipped_y" qualifiers="const">
<return type="Projection" />
<description>
+ Returns a copy of this [Projection] with the signs of the values of the Y column flipped.
</description>
</method>
<method name="get_aspect" qualifiers="const">
<return type="float" />
<description>
+ Returns the X:Y aspect ratio of this [Projection]'s viewport.
</description>
</method>
<method name="get_far_plane_half_extents" qualifiers="const">
<return type="Vector2" />
<description>
+ Returns the dimensions of the far clipping plane of the projection, divided by two.
</description>
</method>
<method name="get_fov" qualifiers="const">
<return type="float" />
<description>
+ Returns the horizontal field of view of the projection (in degrees).
</description>
</method>
<method name="get_fovy" qualifiers="static">
@@ -153,89 +192,114 @@
<param index="0" name="fovx" type="float" />
<param index="1" name="aspect" type="float" />
<description>
+ Returns the vertical field of view of the projection (in degrees) associated with the given horizontal field of view (in degrees) and aspect ratio.
</description>
</method>
<method name="get_lod_multiplier" qualifiers="const">
<return type="float" />
<description>
+ Returns the factor by which the visible level of detail is scaled by this [Projection].
</description>
</method>
<method name="get_pixels_per_meter" qualifiers="const">
<return type="int" />
<param index="0" name="for_pixel_width" type="int" />
<description>
+ Returns the number of pixels with the given pixel width displayed per meter, after this [Projection] is applied.
</description>
</method>
<method name="get_projection_plane" qualifiers="const">
<return type="Plane" />
<param index="0" name="plane" type="int" />
<description>
+ Returns the clipping plane of this [Projection] whose index is given by [param plane].
+ [param plane] should be equal to one of [constant PLANE_NEAR], [constant PLANE_FAR], [constant PLANE_LEFT], [constant PLANE_TOP], [constant PLANE_RIGHT], or [constant PLANE_BOTTOM].
</description>
</method>
<method name="get_viewport_half_extents" qualifiers="const">
<return type="Vector2" />
<description>
+ Returns the dimensions of the viewport plane that this [Projection] projects positions onto, divided by two.
</description>
</method>
<method name="get_z_far" qualifiers="const">
<return type="float" />
<description>
+ Returns the distance for this [Projection] beyond which positions are clipped.
</description>
</method>
<method name="get_z_near" qualifiers="const">
<return type="float" />
<description>
+ Returns the distance for this [Projection] before which positions are clipped.
</description>
</method>
<method name="inverse" qualifiers="const">
<return type="Projection" />
<description>
+ Returns a [Projection] that performs the inverse of this [Projection]'s projective transformation.
</description>
</method>
<method name="is_orthogonal" qualifiers="const">
<return type="bool" />
<description>
+ Returns [code]true[/code] if this [Projection] performs an orthogonal projection.
</description>
</method>
<method name="jitter_offseted" qualifiers="const">
<return type="Projection" />
<param index="0" name="offset" type="Vector2" />
<description>
+ Returns a [Projection] with the X and Y values from the given [Vector2] added to the first and second values of the final column respectively.
</description>
</method>
<method name="perspective_znear_adjusted" qualifiers="const">
<return type="Projection" />
<param index="0" name="new_znear" type="float" />
<description>
+ Returns a [Projection] with the near clipping distance adjusted to be [param new_znear].
+ [b]Note:[/b] The original [Projection] must be a perspective projection.
</description>
</method>
</methods>
<members>
<member name="w" type="Vector4" setter="" getter="" default="Vector4(0, 0, 0, 1)">
+ The projection matrix's W vector (column 3). Equivalent to array index [code]3[/code].
</member>
<member name="x" type="Vector4" setter="" getter="" default="Vector4(1, 0, 0, 0)">
+ The projection matrix's X vector (column 0). Equivalent to array index [code]0[/code].
</member>
<member name="y" type="Vector4" setter="" getter="" default="Vector4(0, 1, 0, 0)">
+ The projection matrix's Y vector (column 1). Equivalent to array index [code]1[/code].
</member>
<member name="z" type="Vector4" setter="" getter="" default="Vector4(0, 0, 1, 0)">
+ The projection matrix's Z vector (column 2). Equivalent to array index [code]2[/code].
</member>
</members>
<constants>
<constant name="PLANE_NEAR" value="0">
+ The index value of the projection's near clipping plane.
</constant>
<constant name="PLANE_FAR" value="1">
+ The index value of the projection's far clipping plane.
</constant>
<constant name="PLANE_LEFT" value="2">
+ The index value of the projection's left clipping plane.
</constant>
<constant name="PLANE_TOP" value="3">
+ The index value of the projection's top clipping plane.
</constant>
<constant name="PLANE_RIGHT" value="4">
+ The index value of the projection's right clipping plane.
</constant>
<constant name="PLANE_BOTTOM" value="5">
+ The index value of the projection bottom clipping plane.
</constant>
<constant name="IDENTITY" value="Projection(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)">
+ A [Projection] with no transformation defined. When applied to other data structures, no transformation is performed.
</constant>
<constant name="ZERO" value="Projection(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)">
+ A [Projection] with all values initialized to 0. When applied to other data structures, they will be zeroed.
</constant>
</constants>
<operators>
@@ -243,30 +307,38 @@
<return type="bool" />
<param index="0" name="right" type="Projection" />
<description>
+ Returns [code]true[/code] if the projections are not equal.
+ [b]Note:[/b] Due to floating-point precision errors, this may return [code]true[/code], even if the projections are virtually equal. An [code]is_equal_approx[/code] method may be added in a future version of Godot.
</description>
</operator>
<operator name="operator *">
<return type="Projection" />
<param index="0" name="right" type="Projection" />
<description>
+ Returns a [Projection] that applies the combined transformations of this [Projection] and [param right].
</description>
</operator>
<operator name="operator *">
<return type="Vector4" />
<param index="0" name="right" type="Vector4" />
<description>
+ Projects (multiplies) the given [Vector4] by this [Projection] matrix.
</description>
</operator>
<operator name="operator ==">
<return type="bool" />
<param index="0" name="right" type="Projection" />
<description>
+ Returns [code]true[/code] if the projections are equal.
+ [b]Note:[/b] Due to floating-point precision errors, this may return [code]false[/code], even if the projections are virtually equal. An [code]is_equal_approx[/code] method may be added in a future version of Godot.
</description>
</operator>
<operator name="operator []">
<return type="Vector4" />
<param index="0" name="index" type="int" />
<description>
+ Returns the column of the [Projection] with the given index.
+ Indices are in the following order: x, y, z, w.
</description>
</operator>
</operators>
diff --git a/doc/classes/PropertyTweener.xml b/doc/classes/PropertyTweener.xml
index 75d9c919aa..61e8357809 100644
--- a/doc/classes/PropertyTweener.xml
+++ b/doc/classes/PropertyTweener.xml
@@ -13,7 +13,8 @@
<method name="as_relative">
<return type="PropertyTweener" />
<description>
- When called, the final value will be used as a relative value instead. Example:
+ When called, the final value will be used as a relative value instead.
+ [b]Example:[/b]
[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
@@ -24,10 +25,11 @@
<return type="PropertyTweener" />
<param index="0" name="value" type="Variant" />
<description>
- Sets a custom initial value to the [PropertyTweener]. Example:
+ Sets a custom initial value to the [PropertyTweener].
+ [b]Example:[/b]
[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)
+ 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>
diff --git a/doc/classes/ProxyTexture.xml b/doc/classes/ProxyTexture.xml
deleted file mode 100644
index 778e3f3f69..0000000000
--- a/doc/classes/ProxyTexture.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ProxyTexture" inherits="Texture2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <tutorials>
- </tutorials>
- <members>
- <member name="base" type="Texture2D" setter="set_base" getter="get_base">
- </member>
- </members>
-</class>
diff --git a/doc/classes/QuadMesh.xml b/doc/classes/QuadMesh.xml
index d641ebaa1f..b869774601 100644
--- a/doc/classes/QuadMesh.xml
+++ b/doc/classes/QuadMesh.xml
@@ -1,21 +1,17 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="QuadMesh" inherits="PrimitiveMesh" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+<class name="QuadMesh" inherits="PlaneMesh" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
- Class representing a square mesh.
+ Class representing a square mesh facing the camera.
</brief_description>
<description>
- Class representing a square [PrimitiveMesh]. This flat mesh does not have a thickness. By default, this mesh is aligned on the X and Y axes; this default rotation is more suited for use with billboarded materials. Unlike [PlaneMesh], this mesh doesn't provide subdivision options.
+ Class representing a square [PrimitiveMesh]. This flat mesh does not have a thickness. By default, this mesh is aligned on the X and Y axes; this rotation is more suited for use with billboarded materials. A [QuadMesh] is equivalent to a [PlaneMesh] except its default [member PlaneMesh.orientation] is [constant PlaneMesh.FACE_Z].
</description>
<tutorials>
<link title="GUI in 3D Demo">https://godotengine.org/asset-library/asset/127</link>
<link title="2D in 3D Demo">https://godotengine.org/asset-library/asset/129</link>
</tutorials>
<members>
- <member name="center_offset" type="Vector3" setter="set_center_offset" getter="get_center_offset" default="Vector3(0, 0, 0)">
- Offset of the generated Quad. Useful for particles.
- </member>
- <member name="size" type="Vector2" setter="set_size" getter="get_size" default="Vector2(1, 1)">
- Size on the X and Y axes.
- </member>
+ <member name="orientation" type="int" setter="set_orientation" getter="get_orientation" overrides="PlaneMesh" enum="PlaneMesh.Orientation" default="2" />
+ <member name="size" type="Vector2" setter="set_size" getter="get_size" overrides="PlaneMesh" default="Vector2(1, 1)" />
</members>
</class>
diff --git a/doc/classes/Quaternion.xml b/doc/classes/Quaternion.xml
index e75d4ea737..ac2eda9f28 100644
--- a/doc/classes/Quaternion.xml
+++ b/doc/classes/Quaternion.xml
@@ -43,12 +43,6 @@
</constructor>
<constructor name="Quaternion">
<return type="Quaternion" />
- <param index="0" name="euler_yxz" type="Vector3" />
- <description>
- </description>
- </constructor>
- <constructor name="Quaternion">
- <return type="Quaternion" />
<param index="0" name="from" type="Basis" />
<description>
Constructs a quaternion from the given [Basis].
@@ -70,8 +64,8 @@
<return type="float" />
<param index="0" name="to" type="Quaternion" />
<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.
+ Returns the angle between this quaternion and [param to]. This is the magnitude of the angle you would need to rotate by to get from one to the other.
+ [b]Note:[/b] The magnitude of the floating-point error for this method is abnormally high, so methods such as [code]is_zero_approx[/code] will not work reliably.
</description>
</method>
<method name="dot" qualifiers="const">
@@ -86,6 +80,13 @@
<description>
</description>
</method>
+ <method name="from_euler" qualifiers="static">
+ <return type="Quaternion" />
+ <param index="0" name="euler" type="Vector3" />
+ <description>
+ Constructs a Quaternion from Euler angles in YXZ rotation order.
+ </description>
+ </method>
<method name="get_angle" qualifiers="const">
<return type="float" />
<description>
@@ -98,8 +99,9 @@
</method>
<method name="get_euler" qualifiers="const">
<return type="Vector3" />
+ <param index="0" name="order" type="int" default="2" />
<description>
- Returns Euler angles (in the YXZ convention: when decomposing, first Z, then X, and Y last) corresponding to the rotation represented by the unit quaternion. Returned vector contains the rotation angles in the format (X angle, Y angle, Z angle).
+ Returns the quaternion's rotation in the form of Euler angles. The Euler order depends on the [param order] parameter, for example using the YXZ convention: since this method decomposes, first Z, then X, and Y last. See the [enum EulerOrder] enum for possible values. The returned vector contains the rotation angles in the format (X angle, Y angle, Z angle).
</description>
</method>
<method name="inverse" qualifiers="const">
@@ -112,7 +114,13 @@
<return type="bool" />
<param index="0" name="to" type="Quaternion" />
<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.
+ Returns [code]true[/code] if this quaternion and [param to] are approximately equal, by running [method @GlobalScope.is_equal_approx] on each component.
+ </description>
+ </method>
+ <method name="is_finite" qualifiers="const">
+ <return type="bool" />
+ <description>
+ Returns [code]true[/code] if this quaternion is finite, by calling [method @GlobalScope.is_finite] on each component.
</description>
</method>
<method name="is_normalized" qualifiers="const">
@@ -149,7 +157,7 @@
<param index="0" name="to" type="Quaternion" />
<param index="1" name="weight" type="float" />
<description>
- Returns the result of the spherical linear interpolation between this quaternion and [code]to[/code] by amount [code]weight[/code].
+ Returns the result of the spherical linear interpolation between this quaternion and [param to] by amount [param weight].
[b]Note:[/b] Both quaternions must be normalized.
</description>
</method>
@@ -158,7 +166,7 @@
<param index="0" name="to" type="Quaternion" />
<param index="1" name="weight" type="float" />
<description>
- Returns the result of the spherical linear interpolation between this quaternion and [code]to[/code] by amount [code]weight[/code], but without checking if the rotation path is not bigger than 90 degrees.
+ Returns the result of the spherical linear interpolation between this quaternion and [param to] by amount [param weight], but without checking if the rotation path is not bigger than 90 degrees.
</description>
</method>
<method name="spherical_cubic_interpolate" qualifiers="const">
@@ -168,7 +176,21 @@
<param index="2" name="post_b" type="Quaternion" />
<param index="3" name="weight" type="float" />
<description>
- Performs a spherical cubic interpolation between quaternions [code]pre_a[/code], this vector, [code]b[/code], and [code]post_b[/code], by the given amount [code]weight[/code].
+ Performs a spherical cubic interpolation between quaternions [param pre_a], this vector, [param b], and [param post_b], by the given amount [param weight].
+ </description>
+ </method>
+ <method name="spherical_cubic_interpolate_in_time" qualifiers="const">
+ <return type="Quaternion" />
+ <param index="0" name="b" type="Quaternion" />
+ <param index="1" name="pre_a" type="Quaternion" />
+ <param index="2" name="post_b" type="Quaternion" />
+ <param index="3" name="weight" type="float" />
+ <param index="4" name="b_t" type="float" />
+ <param index="5" name="pre_a_t" type="float" />
+ <param index="6" name="post_b_t" type="float" />
+ <description>
+ Performs a spherical cubic interpolation between quaternions [param pre_a], this vector, [param b], and [param post_b], by the given amount [param weight].
+ It can perform smoother interpolation than [code]spherical_cubic_interpolate()[/code] by the time values.
</description>
</method>
</methods>
diff --git a/doc/classes/RDPipelineRasterizationState.xml b/doc/classes/RDPipelineRasterizationState.xml
index 39a64c730a..48599b6262 100644
--- a/doc/classes/RDPipelineRasterizationState.xml
+++ b/doc/classes/RDPipelineRasterizationState.xml
@@ -13,7 +13,7 @@
</member>
<member name="depth_bias_constant_factor" type="float" setter="set_depth_bias_constant_factor" getter="get_depth_bias_constant_factor" default="0.0">
</member>
- <member name="depth_bias_enable" type="bool" setter="set_depth_bias_enable" getter="get_depth_bias_enable" default="false">
+ <member name="depth_bias_enabled" type="bool" setter="set_depth_bias_enabled" getter="get_depth_bias_enabled" default="false">
</member>
<member name="depth_bias_slope_factor" type="float" setter="set_depth_bias_slope_factor" getter="get_depth_bias_slope_factor" default="0.0">
</member>
diff --git a/doc/classes/RDUniform.xml b/doc/classes/RDUniform.xml
index d144024000..e4b7883f02 100644
--- a/doc/classes/RDUniform.xml
+++ b/doc/classes/RDUniform.xml
@@ -19,7 +19,7 @@
</description>
</method>
<method name="get_ids" qualifiers="const">
- <return type="Array" />
+ <return type="RID[]" />
<description>
</description>
</method>
diff --git a/doc/classes/RandomNumberGenerator.xml b/doc/classes/RandomNumberGenerator.xml
index 726f9e91d8..a6254788ce 100644
--- a/doc/classes/RandomNumberGenerator.xml
+++ b/doc/classes/RandomNumberGenerator.xml
@@ -10,10 +10,9 @@
[codeblock]
var rng = RandomNumberGenerator.new()
func _ready():
- rng.randomize()
var my_random_number = rng.randf_range(-10.0, 10.0)
[/codeblock]
- [b]Note:[/b] The default values of [member seed] and [member state] properties are pseudo-random, and changes when calling [method randomize]. The [code]0[/code] value documented here is a placeholder, and not the actual default seed.
+ [b]Note:[/b] The default values of [member seed] and [member state] properties are pseudo-random, and change when calling [method randomize]. The [code]0[/code] value documented here is a placeholder, and not the actual default seed.
</description>
<tutorials>
<link title="Random number generation">$DOCS_URL/tutorials/math/random_number_generation.html</link>
@@ -30,7 +29,7 @@
<param index="0" name="from" type="float" />
<param index="1" name="to" type="float" />
<description>
- Returns a pseudo-random float between [code]from[/code] and [code]to[/code] (inclusive).
+ Returns a pseudo-random float between [param from] and [param to] (inclusive).
</description>
</method>
<method name="randfn">
@@ -38,7 +37,7 @@
<param index="0" name="mean" type="float" default="0.0" />
<param index="1" name="deviation" type="float" default="1.0" />
<description>
- Returns a [url=https://en.wikipedia.org/wiki/Normal_distribution]normally-distributed[/url] pseudo-random number, using Box-Muller transform with the specified [code]mean[/code] and a standard [code]deviation[/code]. This is also called Gaussian distribution.
+ Returns a [url=https://en.wikipedia.org/wiki/Normal_distribution]normally-distributed[/url] pseudo-random number, using Box-Muller transform with the specified [param mean] and a standard [param deviation]. This is also called Gaussian distribution.
</description>
</method>
<method name="randi">
@@ -52,7 +51,7 @@
<param index="0" name="from" type="int" />
<param index="1" name="to" type="int" />
<description>
- Returns a pseudo-random 32-bit signed integer between [code]from[/code] and [code]to[/code] (inclusive).
+ Returns a pseudo-random 32-bit signed integer between [param from] and [param to] (inclusive).
</description>
</method>
<method name="randomize">
diff --git a/doc/classes/Range.xml b/doc/classes/Range.xml
index a4be738395..2dcfc90955 100644
--- a/doc/classes/Range.xml
+++ b/doc/classes/Range.xml
@@ -16,6 +16,13 @@
Called when the [Range]'s value is changed (following the same conditions as [signal value_changed]).
</description>
</method>
+ <method name="set_value_no_signal">
+ <return type="void" />
+ <param index="0" name="value" type="float" />
+ <description>
+ Sets the [Range]'s current value to the specified [param value], without emitting the [signal value_changed] signal.
+ </description>
+ </method>
<method name="share">
<return type="void" />
<param index="0" name="with" type="Node" />
@@ -31,35 +38,36 @@
</method>
</methods>
<members>
- <member name="allow_greater" type="bool" setter="set_allow_greater" getter="is_greater_allowed">
+ <member name="allow_greater" type="bool" setter="set_allow_greater" getter="is_greater_allowed" default="false">
If [code]true[/code], [member value] may be greater than [member max_value].
</member>
- <member name="allow_lesser" type="bool" setter="set_allow_lesser" getter="is_lesser_allowed">
+ <member name="allow_lesser" type="bool" setter="set_allow_lesser" getter="is_lesser_allowed" default="false">
If [code]true[/code], [member value] may be less than [member min_value].
</member>
- <member name="exp_edit" type="bool" setter="set_exp_ratio" getter="is_ratio_exp">
+ <member name="exp_edit" type="bool" setter="set_exp_ratio" getter="is_ratio_exp" default="false">
If [code]true[/code], and [code]min_value[/code] is greater than 0, [code]value[/code] will be represented exponentially rather than linearly.
</member>
- <member name="max_value" type="float" setter="set_max" getter="get_max">
+ <member name="max_value" type="float" setter="set_max" getter="get_max" default="100.0">
Maximum value. Range is clamped if [code]value[/code] is greater than [code]max_value[/code].
</member>
- <member name="min_value" type="float" setter="set_min" getter="get_min">
+ <member name="min_value" type="float" setter="set_min" getter="get_min" default="0.0">
Minimum value. Range is clamped if [code]value[/code] is less than [code]min_value[/code].
</member>
- <member name="page" type="float" setter="set_page" getter="get_page">
+ <member name="page" type="float" setter="set_page" getter="get_page" default="0.0">
Page size. Used mainly for [ScrollBar]. ScrollBar's length is its size multiplied by [code]page[/code] over the difference between [code]min_value[/code] and [code]max_value[/code].
</member>
<member name="ratio" type="float" setter="set_as_ratio" getter="get_as_ratio">
The value mapped between 0 and 1.
</member>
- <member name="rounded" type="bool" setter="set_use_rounded_values" getter="is_using_rounded_values">
+ <member name="rounded" type="bool" setter="set_use_rounded_values" getter="is_using_rounded_values" default="false">
If [code]true[/code], [code]value[/code] will always be rounded to the nearest integer.
</member>
- <member name="step" type="float" setter="set_step" getter="get_step">
+ <member name="size_flags_vertical" type="int" setter="set_v_size_flags" getter="get_v_size_flags" overrides="Control" default="0" />
+ <member name="step" type="float" setter="set_step" getter="get_step" default="0.01">
If greater than 0, [code]value[/code] will always be rounded to a multiple of [code]step[/code]. If [code]rounded[/code] is also [code]true[/code], [code]value[/code] will first be rounded to a multiple of [code]step[/code] then rounded to the nearest integer.
</member>
- <member name="value" type="float" setter="set_value" getter="get_value">
- Range's current value.
+ <member name="value" type="float" setter="set_value" getter="get_value" default="0.0">
+ Range's current value. Changing this property (even via code) will trigger [signal value_changed] signal. Use [method set_value_no_signal] if you want to avoid it.
</member>
</members>
<signals>
@@ -72,7 +80,7 @@
<param index="0" name="value" type="float" />
<description>
Emitted when [member value] changes. When used on a [Slider], this is called continuously while dragging (potentially every frame). If you are performing an expensive operation in a function connected to [signal value_changed], consider using a [i]debouncing[/i] [Timer] to call the function less often.
- [b]Note:[/b] Unlike signals such as [signal LineEdit.text_changed], [signal value_changed] is also emitted when [code]value[/code] is set directly via code.
+ [b]Note:[/b] Unlike signals such as [signal LineEdit.text_changed], [signal value_changed] is also emitted when [param value] is set directly via code.
</description>
</signal>
</signals>
diff --git a/doc/classes/RayCast2D.xml b/doc/classes/RayCast2D.xml
index bbf29c1f44..08627b0bd5 100644
--- a/doc/classes/RayCast2D.xml
+++ b/doc/classes/RayCast2D.xml
@@ -47,6 +47,12 @@
Returns the first object that the ray intersects, or [code]null[/code] if no object is intersecting the ray (i.e. [method is_colliding] returns [code]false[/code]).
</description>
</method>
+ <method name="get_collider_rid" qualifiers="const">
+ <return type="RID" />
+ <description>
+ Returns the [RID] of the first object that the ray intersects, or an empty [RID] if no object is intersecting the ray (i.e. [method is_colliding] returns [code]false[/code]).
+ </description>
+ </method>
<method name="get_collider_shape" qualifiers="const">
<return type="int" />
<description>
@@ -57,7 +63,7 @@
<return type="bool" />
<param index="0" name="layer_number" type="int" />
<description>
- Returns whether or not the specified layer of the [member collision_mask] is enabled, given a [code]layer_number[/code] between 1 and 32.
+ Returns whether or not the specified layer of the [member collision_mask] is enabled, given a [param layer_number] between 1 and 32.
</description>
</method>
<method name="get_collision_normal" qualifiers="const">
@@ -98,7 +104,7 @@
<param index="0" name="layer_number" type="int" />
<param index="1" name="value" type="bool" />
<description>
- Based on [code]value[/code], enables or disables the specified layer in the [member collision_mask], given a [code]layer_number[/code] between 1 and 32.
+ Based on [param value], enables or disables the specified layer in the [member collision_mask], given a [param layer_number] between 1 and 32.
</description>
</method>
</methods>
diff --git a/doc/classes/RayCast3D.xml b/doc/classes/RayCast3D.xml
index 09ce79191d..1bcd6f1f31 100644
--- a/doc/classes/RayCast3D.xml
+++ b/doc/classes/RayCast3D.xml
@@ -48,6 +48,12 @@
Returns the first object that the ray intersects, or [code]null[/code] if no object is intersecting the ray (i.e. [method is_colliding] returns [code]false[/code]).
</description>
</method>
+ <method name="get_collider_rid" qualifiers="const">
+ <return type="RID" />
+ <description>
+ Returns the [RID] of the first object that the ray intersects, or an empty [RID] if no object is intersecting the ray (i.e. [method is_colliding] returns [code]false[/code]).
+ </description>
+ </method>
<method name="get_collider_shape" qualifiers="const">
<return type="int" />
<description>
@@ -58,7 +64,7 @@
<return type="bool" />
<param index="0" name="layer_number" type="int" />
<description>
- Returns whether or not the specified layer of the [member collision_mask] is enabled, given a [code]layer_number[/code] between 1 and 32.
+ Returns whether or not the specified layer of the [member collision_mask] is enabled, given a [param layer_number] between 1 and 32.
</description>
</method>
<method name="get_collision_normal" qualifiers="const">
@@ -99,7 +105,7 @@
<param index="0" name="layer_number" type="int" />
<param index="1" name="value" type="bool" />
<description>
- Based on [code]value[/code], enables or disables the specified layer in the [member collision_mask], given a [code]layer_number[/code] between 1 and 32.
+ Based on [param value], enables or disables the specified layer in the [member collision_mask], given a [param layer_number] between 1 and 32.
</description>
</method>
</methods>
diff --git a/doc/classes/Rect2.xml b/doc/classes/Rect2.xml
index 082075b161..d39e50d5f0 100644
--- a/doc/classes/Rect2.xml
+++ b/doc/classes/Rect2.xml
@@ -82,9 +82,9 @@
var rect2 = rect.expand(Vector2(0, -1))
[/gdscript]
[csharp]
- # position (-3, 2), size (1, 1)
+ // position (-3, 2), size (1, 1)
var rect = new Rect2(new Vector2(-3, 2), new Vector2(1, 1));
- # position (-3, -1), size (3, 4), so we fit both rect and Vector2(0, -1)
+ // position (-3, -1), size (3, 4), so we fit both rect and Vector2(0, -1)
var rect2 = rect.Expand(new Vector2(0, -1));
[/csharp]
[/codeblocks]
@@ -93,7 +93,7 @@
<method name="get_area" qualifiers="const">
<return type="float" />
<description>
- Returns the area of the [Rect2]. See also [method has_no_area].
+ Returns the area of the [Rect2]. See also [method has_area].
</description>
</method>
<method name="get_center" qualifiers="const">
@@ -106,7 +106,7 @@
<return type="Rect2" />
<param index="0" name="amount" type="float" />
<description>
- Returns a copy of the [Rect2] grown by the specified [code]amount[/code] on all sides.
+ Returns a copy of the [Rect2] grown by the specified [param amount] on all sides.
</description>
</method>
<method name="grow_individual" qualifiers="const">
@@ -124,14 +124,13 @@
<param index="0" name="side" type="int" />
<param index="1" name="amount" type="float" />
<description>
- Returns a copy of the [Rect2] grown by the specified [code]amount[/code] on the specified [enum Side].
+ Returns a copy of the [Rect2] grown by the specified [param amount] on the specified [enum Side].
</description>
</method>
- <method name="has_no_area" qualifiers="const">
+ <method name="has_area" qualifiers="const">
<return type="bool" />
<description>
- Returns [code]true[/code] if the [Rect2] is flat or empty, [code]false[/code] otherwise. See also [method get_area].
- [b]Note:[/b] If the [Rect2] has a negative size and is not flat or empty, [method has_no_area] will return [code]true[/code].
+ Returns [code]true[/code] if the [Rect2] has area, and [code]false[/code] if the [Rect2] is linear, empty, or has a negative [member size]. See also [method get_area].
</description>
</method>
<method name="has_point" qualifiers="const">
@@ -146,7 +145,7 @@
<return type="Rect2" />
<param index="0" name="b" type="Rect2" />
<description>
- Returns the intersection of this [Rect2] and [code]b[/code].
+ Returns the intersection of this [Rect2] and [param b].
If the rectangles do not intersect, an empty [Rect2] is returned.
</description>
</method>
@@ -156,21 +155,27 @@
<param index="1" name="include_borders" type="bool" default="false" />
<description>
Returns [code]true[/code] if the [Rect2] overlaps with [code]b[/code] (i.e. they have at least one point in common).
- If [code]include_borders[/code] is [code]true[/code], they will also be considered overlapping if their borders touch, even without intersection.
+ If [param include_borders] is [code]true[/code], they will also be considered overlapping if their borders touch, even without intersection.
</description>
</method>
<method name="is_equal_approx" qualifiers="const">
<return type="bool" />
<param index="0" name="rect" type="Rect2" />
<description>
- Returns [code]true[/code] if this [Rect2] and [code]rect[/code] are approximately equal, by calling [code]is_equal_approx[/code] on each component.
+ Returns [code]true[/code] if this [Rect2] and [param rect] are approximately equal, by calling [code]is_equal_approx[/code] on each component.
+ </description>
+ </method>
+ <method name="is_finite" qualifiers="const">
+ <return type="bool" />
+ <description>
+ Returns [code]true[/code] if this [Rect2] is finite, by calling [method @GlobalScope.is_finite] on each component.
</description>
</method>
<method name="merge" qualifiers="const">
<return type="Rect2" />
<param index="0" name="b" type="Rect2" />
<description>
- Returns a larger [Rect2] that contains this [Rect2] and [code]b[/code].
+ Returns a larger [Rect2] that contains this [Rect2] and [param b].
</description>
</method>
</methods>
diff --git a/doc/classes/Rect2i.xml b/doc/classes/Rect2i.xml
index a71380c69a..325ead0cfa 100644
--- a/doc/classes/Rect2i.xml
+++ b/doc/classes/Rect2i.xml
@@ -79,9 +79,9 @@
var rect2 = rect.expand(Vector2i(0, -1))
[/gdscript]
[csharp]
- # position (-3, 2), size (1, 1)
+ // position (-3, 2), size (1, 1)
var rect = new Rect2i(new Vector2i(-3, 2), new Vector2i(1, 1));
- # position (-3, -1), size (3, 4), so we fit both rect and Vector2i(0, -1)
+ // position (-3, -1), size (3, 4), so we fit both rect and Vector2i(0, -1)
var rect2 = rect.Expand(new Vector2i(0, -1));
[/csharp]
[/codeblocks]
@@ -90,7 +90,7 @@
<method name="get_area" qualifiers="const">
<return type="int" />
<description>
- Returns the area of the [Rect2i]. See also [method has_no_area].
+ Returns the area of the [Rect2i]. See also [method has_area].
</description>
</method>
<method name="get_center" qualifiers="const">
@@ -104,7 +104,7 @@
<return type="Rect2i" />
<param index="0" name="amount" type="int" />
<description>
- Returns a copy of the [Rect2i] grown by the specified [code]amount[/code] on all sides.
+ Returns a copy of the [Rect2i] grown by the specified [param amount] on all sides.
</description>
</method>
<method name="grow_individual" qualifiers="const">
@@ -122,14 +122,13 @@
<param index="0" name="side" type="int" />
<param index="1" name="amount" type="int" />
<description>
- Returns a copy of the [Rect2i] grown by the specified [code]amount[/code] on the specified [enum Side].
+ Returns a copy of the [Rect2i] grown by the specified [param amount] on the specified [enum Side].
</description>
</method>
- <method name="has_no_area" qualifiers="const">
+ <method name="has_area" qualifiers="const">
<return type="bool" />
<description>
- Returns [code]true[/code] if the [Rect2i] is flat or empty, [code]false[/code] otherwise. See also [method get_area].
- [b]Note:[/b] If the [Rect2i] has a negative size and is not flat or empty, [method has_no_area] will return [code]true[/code].
+ Returns [code]true[/code] if the [Rect2i] has area, and [code]false[/code] if the [Rect2i] is linear, empty, or has a negative [member size]. See also [method get_area].
</description>
</method>
<method name="has_point" qualifiers="const">
@@ -159,7 +158,7 @@
<return type="Rect2i" />
<param index="0" name="b" type="Rect2i" />
<description>
- Returns a larger [Rect2i] that contains this [Rect2i] and [code]b[/code].
+ Returns a larger [Rect2i] that contains this [Rect2i] and [param b].
</description>
</method>
</methods>
diff --git a/doc/classes/RefCounted.xml b/doc/classes/RefCounted.xml
index 3daf3534b0..223e572254 100644
--- a/doc/classes/RefCounted.xml
+++ b/doc/classes/RefCounted.xml
@@ -13,6 +13,12 @@
<link title="When and how to avoid using nodes for everything">$DOCS_URL/tutorials/best_practices/node_alternatives.html</link>
</tutorials>
<methods>
+ <method name="get_reference_count" qualifiers="const">
+ <return type="int" />
+ <description>
+ Returns the current reference count.
+ </description>
+ </method>
<method name="init_ref">
<return type="bool" />
<description>
diff --git a/doc/classes/ReflectionProbe.xml b/doc/classes/ReflectionProbe.xml
index ff66a89cb7..fee48dd246 100644
--- a/doc/classes/ReflectionProbe.xml
+++ b/doc/classes/ReflectionProbe.xml
@@ -50,7 +50,7 @@
[b]Note:[/b] [member mesh_lod_threshold] does not affect [GeometryInstance3D] visibility ranges (also known as "manual" LOD or hierarchical LOD).
</member>
<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 [ReflectionProbe] is in [member box_projection] mode. This can be set to a non-zero value to ensure a reflection fits a rectangle-shaped room, while reducing the amount of objects that "get in the way" of the reflection.
+ Sets the origin offset to be used when this [ReflectionProbe] is in [member box_projection] mode. This can be set to a non-zero value to ensure a reflection fits a rectangle-shaped room, while reducing the number of objects that "get in the way" of the reflection.
</member>
<member name="update_mode" type="int" setter="set_update_mode" getter="get_update_mode" enum="ReflectionProbe.UpdateMode" default="0">
Sets how frequently the [ReflectionProbe] is updated. Can be [constant UPDATE_ONCE] or [constant UPDATE_ALWAYS].
diff --git a/doc/classes/RenderingDevice.xml b/doc/classes/RenderingDevice.xml
index 2f0b9dae72..580ce6f382 100644
--- a/doc/classes/RenderingDevice.xml
+++ b/doc/classes/RenderingDevice.xml
@@ -9,8 +9,8 @@
<methods>
<method name="barrier">
<return type="void" />
- <param index="0" name="from" type="int" default="7" />
- <param index="1" name="to" type="int" default="7" />
+ <param index="0" name="from" type="int" enum="RenderingDevice.BarrierMask" default="7" />
+ <param index="1" name="to" type="int" enum="RenderingDevice.BarrierMask" default="7" />
<description>
</description>
</method>
@@ -19,7 +19,7 @@
<param index="0" name="buffer" type="RID" />
<param index="1" name="offset" type="int" />
<param index="2" name="size_bytes" type="int" />
- <param index="3" name="post_barrier" type="int" default="7" />
+ <param index="3" name="post_barrier" type="int" enum="RenderingDevice.BarrierMask" default="7" />
<description>
</description>
</method>
@@ -35,7 +35,7 @@
<param index="1" name="offset" type="int" />
<param index="2" name="size_bytes" type="int" />
<param index="3" name="data" type="PackedByteArray" />
- <param index="4" name="post_barrier" type="int" default="7" />
+ <param index="4" name="post_barrier" type="int" enum="RenderingDevice.BarrierMask" default="7" />
<description>
</description>
</method>
@@ -83,7 +83,7 @@
</method>
<method name="compute_list_end">
<return type="void" />
- <param index="0" name="post_barrier" type="int" default="7" />
+ <param index="0" name="post_barrier" type="int" enum="RenderingDevice.BarrierMask" default="7" />
<description>
</description>
</method>
@@ -223,10 +223,18 @@
</method>
<method name="draw_list_end">
<return type="void" />
- <param index="0" name="post_barrier" type="int" default="7" />
+ <param index="0" name="post_barrier" type="int" enum="RenderingDevice.BarrierMask" default="7" />
<description>
</description>
</method>
+ <method name="draw_list_set_blend_constants">
+ <return type="void" />
+ <param index="0" name="draw_list" type="int" />
+ <param index="1" name="color" type="Color" />
+ <description>
+ Sets blend constants for draw list, blend constants are used only if the graphics pipeline is created with [constant DYNAMIC_STATE_BLEND_CONSTANTS] flag set.
+ </description>
+ </method>
<method name="draw_list_set_push_constant">
<return type="void" />
<param index="0" name="draw_list" type="int" />
@@ -526,7 +534,7 @@
<param index="3" name="mipmap_count" type="int" />
<param index="4" name="base_layer" type="int" />
<param index="5" name="layer_count" type="int" />
- <param index="6" name="post_barrier" type="int" default="7" />
+ <param index="6" name="post_barrier" type="int" enum="RenderingDevice.BarrierMask" default="7" />
<description>
</description>
</method>
@@ -541,7 +549,7 @@
<param index="6" name="dst_mipmap" type="int" />
<param index="7" name="src_layer" type="int" />
<param index="8" name="dst_layer" type="int" />
- <param index="9" name="post_barrier" type="int" default="7" />
+ <param index="9" name="post_barrier" type="int" enum="RenderingDevice.BarrierMask" default="7" />
<description>
</description>
</method>
@@ -601,7 +609,7 @@
<return type="int" enum="Error" />
<param index="0" name="from_texture" type="RID" />
<param index="1" name="to_texture" type="RID" />
- <param index="2" name="post_barrier" type="int" default="7" />
+ <param index="2" name="post_barrier" type="int" enum="RenderingDevice.BarrierMask" default="7" />
<description>
</description>
</method>
@@ -610,7 +618,7 @@
<param index="0" name="texture" type="RID" />
<param index="1" name="layer" type="int" />
<param index="2" name="data" type="PackedByteArray" />
- <param index="3" name="post_barrier" type="int" default="7" />
+ <param index="3" name="post_barrier" type="int" enum="RenderingDevice.BarrierMask" default="7" />
<description>
</description>
</method>
@@ -623,7 +631,7 @@
</method>
<method name="uniform_set_create">
<return type="RID" />
- <param index="0" name="uniforms" type="Array" />
+ <param index="0" name="uniforms" type="RDUniform[]" />
<param index="1" name="shader" type="RID" />
<param index="2" name="shader_set" type="int" />
<description>
@@ -635,6 +643,16 @@
<description>
</description>
</method>
+ <method name="vertex_array_create">
+ <return type="RID" />
+ <param index="0" name="vertex_count" type="int" />
+ <param index="1" name="vertex_format" type="int" />
+ <param index="2" name="src_buffers" type="RID[]" />
+ <param index="3" name="offsets" type="PackedInt64Array" default="PackedInt64Array()" />
+ <description>
+ Creates a vertex array based on the specified buffers. Optionally, [param offsets] (in bytes) may be defined for each buffer.
+ </description>
+ </method>
<method name="vertex_buffer_create">
<return type="RID" />
<param index="0" name="size_bytes" type="int" />
@@ -651,16 +669,6 @@
</method>
</methods>
<constants>
- <constant name="BARRIER_MASK_RASTER" value="1">
- </constant>
- <constant name="BARRIER_MASK_COMPUTE" value="2">
- </constant>
- <constant name="BARRIER_MASK_TRANSFER" value="4">
- </constant>
- <constant name="BARRIER_MASK_ALL" value="7">
- </constant>
- <constant name="BARRIER_MASK_NO_BARRIER" value="8">
- </constant>
<constant name="DEVICE_TYPE_OTHER" value="0" enum="DeviceType">
Rendering device type does not match any of the other enum values or is unknown.
</constant>
@@ -1143,6 +1151,16 @@
</constant>
<constant name="DATA_FORMAT_MAX" value="218" enum="DataFormat">
</constant>
+ <constant name="BARRIER_MASK_RASTER" value="1" enum="BarrierMask" is_bitfield="true">
+ </constant>
+ <constant name="BARRIER_MASK_COMPUTE" value="2" enum="BarrierMask" is_bitfield="true">
+ </constant>
+ <constant name="BARRIER_MASK_TRANSFER" value="4" enum="BarrierMask" is_bitfield="true">
+ </constant>
+ <constant name="BARRIER_MASK_ALL_BARRIERS" value="7" enum="BarrierMask" is_bitfield="true">
+ </constant>
+ <constant name="BARRIER_MASK_NO_BARRIER" value="8" enum="BarrierMask" is_bitfield="true">
+ </constant>
<constant name="TEXTURE_TYPE_1D" value="0" enum="TextureType">
</constant>
<constant name="TEXTURE_TYPE_2D" value="1" enum="TextureType">
@@ -1573,6 +1591,10 @@
</constant>
<constant name="LIMIT_MAX_COMPUTE_WORKGROUP_SIZE_Z" value="34" enum="Limit">
</constant>
+ <constant name="LIMIT_MAX_VIEWPORT_DIMENSIONS_X" value="35" enum="Limit">
+ </constant>
+ <constant name="LIMIT_MAX_VIEWPORT_DIMENSIONS_Y" value="36" enum="Limit">
+ </constant>
<constant name="MEMORY_TEXTURES" value="0" enum="MemoryType">
</constant>
<constant name="MEMORY_BUFFERS" value="1" enum="MemoryType">
diff --git a/doc/classes/RenderingServer.xml b/doc/classes/RenderingServer.xml
index 19a75c8515..2ffa4dc50b 100644
--- a/doc/classes/RenderingServer.xml
+++ b/doc/classes/RenderingServer.xml
@@ -13,6 +13,7 @@
Similarly, in 2D, a canvas is needed to draw all canvas items.
In 3D, all visible objects are comprised of a resource and an instance. A resource can be a mesh, a particle system, a light, or any other 3D object. In order to be visible resources must be attached to an instance using [method instance_set_base]. The instance must also be attached to the scenario using [method instance_set_scenario] in order to be visible.
In 2D, all visible objects are some form of canvas item. In order to be visible, a canvas item needs to be the child of a canvas attached to a viewport, or it needs to be the child of another canvas item that is eventually attached to the canvas.
+ [b]Headless mode:[/b] Starting the engine with the [code]--headless[/code] [url=$DOCS_URL/tutorials/editor/command_line_tutorial.html]command line argument[/url] disables all rendering and window management functions. Most functions from [RenderingServer] will return dummy values in this case.
</description>
<tutorials>
<link title="Optimization using Servers">$DOCS_URL/tutorials/performance/using_servers.html</link>
@@ -21,34 +22,32 @@
<method name="bake_render_uv2">
<return type="Image[]" />
<param index="0" name="base" type="RID" />
- <param index="1" name="material_overrides" type="Array" />
+ <param index="1" name="material_overrides" type="RID[]" />
<param index="2" name="image_size" type="Vector2i" />
<description>
</description>
</method>
- <method name="camera_create">
+ <method name="camera_attributes_create">
<return type="RID" />
<description>
- Creates a camera and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all [code]camera_*[/code] RenderingServer functions.
+ Creates a camera attributes object and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all [code]camera_attributes_[/code] RenderingServer functions.
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="camera_effects_create">
- <return type="RID" />
- <description>
- </description>
- </method>
- <method name="camera_effects_set_custom_exposure">
+ <method name="camera_attributes_set_auto_exposure">
<return type="void" />
- <param index="0" name="camera_effects" type="RID" />
+ <param index="0" name="camera_attributes" type="RID" />
<param index="1" name="enable" type="bool" />
- <param index="2" name="exposure" type="float" />
+ <param index="2" name="min_sensitivity" type="float" />
+ <param index="3" name="max_sensitivity" type="float" />
+ <param index="4" name="speed" type="float" />
+ <param index="5" name="scale" type="float" />
<description>
</description>
</method>
- <method name="camera_effects_set_dof_blur">
+ <method name="camera_attributes_set_dof_blur">
<return type="void" />
- <param index="0" name="camera_effects" type="RID" />
+ <param index="0" name="camera_attributes" type="RID" />
<param index="1" name="far_enable" type="bool" />
<param index="2" name="far_distance" type="float" />
<param index="3" name="far_transition" type="float" />
@@ -59,20 +58,46 @@
<description>
</description>
</method>
- <method name="camera_effects_set_dof_blur_bokeh_shape">
+ <method name="camera_attributes_set_dof_blur_bokeh_shape">
<return type="void" />
<param index="0" name="shape" type="int" enum="RenderingServer.DOFBokehShape" />
<description>
</description>
</method>
- <method name="camera_effects_set_dof_blur_quality">
+ <method name="camera_attributes_set_dof_blur_quality">
<return type="void" />
<param index="0" name="quality" type="int" enum="RenderingServer.DOFBlurQuality" />
<param index="1" name="use_jitter" type="bool" />
<description>
</description>
</method>
- <method name="camera_set_camera_effects">
+ <method name="camera_attributes_set_exposure">
+ <return type="void" />
+ <param index="0" name="camera_attributes" type="RID" />
+ <param index="1" name="multiplier" type="float" />
+ <param index="2" name="normalization" type="float" />
+ <description>
+ Sets the exposure values that will be used by the renderers. The normalization amount is used to bake a given Exposure Value (EV) into rendering calculations to reduce the dynamic range of the scene.
+ The normalization factor can be calculated from exposure value (EV100) as follows:
+ [codeblock]
+ func get_exposure_normalization(float ev100):
+ return 1.0 / (pow(2.0, ev100) * 1.2)
+ [/codeblock]
+ The exposure value can be calculated from aperture (in f-stops), shutter speed (in seconds), and sensitivity (in ISO) as follows:
+ [codeblock]
+ func get_exposure(float aperture, float shutter_speed, float sensitivity):
+ return log2((aperture * aperture) / shutterSpeed * (100.0 / sensitivity))
+ [/codeblock]
+ </description>
+ </method>
+ <method name="camera_create">
+ <return type="RID" />
+ <description>
+ Creates a camera and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all [code]camera_*[/code] RenderingServer functions.
+ 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="camera_set_camera_attributes">
<return type="void" />
<param index="0" name="camera" type="RID" />
<param index="1" name="effects" type="RID" />
@@ -103,7 +128,7 @@
<param index="3" name="z_near" type="float" />
<param index="4" name="z_far" type="float" />
<description>
- Sets camera to use frustum projection. This mode allows adjusting the [code]offset[/code] argument to create "tilted frustum" effects.
+ Sets camera to use frustum projection. This mode allows adjusting the [param offset] argument to create "tilted frustum" effects.
</description>
</method>
<method name="camera_set_orthogonal">
@@ -176,6 +201,16 @@
<description>
</description>
</method>
+ <method name="canvas_item_add_lcd_texture_rect_region">
+ <return type="void" />
+ <param index="0" name="item" type="RID" />
+ <param index="1" name="rect" type="Rect2" />
+ <param index="2" name="texture" type="RID" />
+ <param index="3" name="src_rect" type="Rect2" />
+ <param index="4" name="modulate" type="Color" />
+ <description>
+ </description>
+ </method>
<method name="canvas_item_add_line">
<return type="void" />
<param index="0" name="item" type="RID" />
@@ -464,6 +499,14 @@
Sets if the [CanvasItem] uses its parent's material.
</description>
</method>
+ <method name="canvas_item_set_visibility_layer">
+ <return type="void" />
+ <param index="0" name="item" type="RID" />
+ <param index="1" name="visibility_layer" type="int" />
+ <description>
+ Sets the rendering visibility layer associated with this [CanvasItem]. Only [Viewport] nodes with a matching rendering mask will render this [CanvasItem].
+ </description>
+ </method>
<method name="canvas_item_set_visibility_notifier">
<return type="void" />
<param index="0" name="item" type="RID" />
@@ -795,6 +838,8 @@
<method name="create_local_rendering_device" qualifiers="const">
<return type="RenderingDevice" />
<description>
+ Creates a RenderingDevice that can be used to do draw and compute operations on a separate thread. Cannot draw to the screen nor share data with the global RenderingDevice.
+ [b]Note:[/b] When using the OpenGL backend or when running in headless mode, this function always returns [code]null[/code].
</description>
</method>
<method name="decal_create">
@@ -966,7 +1011,8 @@
<method name="environment_set_bg_energy">
<return type="void" />
<param index="0" name="env" type="RID" />
- <param index="1" name="energy" type="float" />
+ <param index="1" name="multiplier" type="float" />
+ <param index="2" name="exposure_value" type="float" />
<description>
Sets the intensity of the background color.
</description>
@@ -990,6 +1036,7 @@
<param index="6" name="height" type="float" />
<param index="7" name="height_density" type="float" />
<param index="8" name="aerial_perspective" type="float" />
+ <param index="9" name="sky_affect" type="float" />
<description>
</description>
</method>
@@ -1133,11 +1180,6 @@
<param index="1" name="tone_mapper" type="int" enum="RenderingServer.EnvironmentToneMapper" />
<param index="2" name="exposure" type="float" />
<param index="3" name="white" type="float" />
- <param index="4" name="auto_exposure" type="bool" />
- <param index="5" name="min_luminance" type="float" />
- <param index="6" name="max_luminance" type="float" />
- <param index="7" name="auto_exp_speed" type="float" />
- <param index="8" name="auto_exp_grey" type="float" />
<description>
Sets the variables to be used with the "tonemap" post-process effect. See [Environment] for more details.
</description>
@@ -1157,6 +1199,7 @@
<param index="10" name="temporal_reprojection" type="bool" />
<param index="11" name="temporal_reprojection_amount" type="float" />
<param index="12" name="ambient_inject" type="float" />
+ <param index="13" name="sky_affect" type="float" />
<description>
</description>
</method>
@@ -1172,7 +1215,7 @@
<param index="0" name="size" type="int" />
<param index="1" name="depth" type="int" />
<description>
- Sets the resolution of the volumetric fog's froxel buffer. [code]size[/code] is modified by the screen's aspect ratio and then used to set the width and height of the buffer. While [code]depth[/code] is directly used to set the depth of the buffer.
+ Sets the resolution of the volumetric fog's froxel buffer. [param size] is modified by the screen's aspect ratio and then used to set the width and height of the buffer. While [param depth] is directly used to set the depth of the buffer.
</description>
</method>
<method name="fog_volume_create">
@@ -1232,6 +1275,8 @@
<method name="get_rendering_device" qualifiers="const">
<return type="RenderingDevice" />
<description>
+ Returns the global RenderingDevice.
+ [b]Note:[/b] When using the OpenGL backend or when running in headless mode, this function always returns [code]null[/code].
</description>
</method>
<method name="get_rendering_info">
@@ -1240,6 +1285,13 @@
<description>
</description>
</method>
+ <method name="get_shader_parameter_list" qualifiers="const">
+ <return type="Dictionary[]" />
+ <param index="0" name="shader" type="RID" />
+ <description>
+ Returns the parameters of a shader.
+ </description>
+ </method>
<method name="get_test_cube">
<return type="RID" />
<description>
@@ -1290,48 +1342,48 @@
<return type="void" />
<param index="0" name="half_resolution" type="bool" />
<description>
- If [code]half_resolution[/code] is [code]true[/code], renders [VoxelGI] and SDFGI ([member Environment.sdfgi_enabled]) buffers at halved resolution (e.g. 960×540 when the viewport size is 1920×1080). This improves performance significantly when VoxelGI or SDFGI is enabled, at the cost of artifacts that may be visible on polygon edges. The loss in quality becomes less noticeable as the viewport resolution increases. [LightmapGI] rendering is not affected by this setting. See also [member ProjectSettings.rendering/global_illumination/gi/use_half_resolution].
+ If [param half_resolution] is [code]true[/code], renders [VoxelGI] and SDFGI ([member Environment.sdfgi_enabled]) buffers at halved resolution (e.g. 960×540 when the viewport size is 1920×1080). This improves performance significantly when VoxelGI or SDFGI is enabled, at the cost of artifacts that may be visible on polygon edges. The loss in quality becomes less noticeable as the viewport resolution increases. [LightmapGI] rendering is not affected by this setting. See also [member ProjectSettings.rendering/global_illumination/gi/use_half_resolution].
</description>
</method>
- <method name="global_shader_uniform_add">
+ <method name="global_shader_parameter_add">
<return type="void" />
<param index="0" name="name" type="StringName" />
- <param index="1" name="type" type="int" enum="RenderingServer.GlobalShaderUniformType" />
+ <param index="1" name="type" type="int" enum="RenderingServer.GlobalShaderParameterType" />
<param index="2" name="default_value" type="Variant" />
<description>
</description>
</method>
- <method name="global_shader_uniform_get" qualifiers="const">
+ <method name="global_shader_parameter_get" qualifiers="const">
<return type="Variant" />
<param index="0" name="name" type="StringName" />
<description>
</description>
</method>
- <method name="global_shader_uniform_get_list" qualifiers="const">
+ <method name="global_shader_parameter_get_list" qualifiers="const">
<return type="PackedStringArray" />
<description>
</description>
</method>
- <method name="global_shader_uniform_get_type" qualifiers="const">
- <return type="int" enum="RenderingServer.GlobalShaderUniformType" />
+ <method name="global_shader_parameter_get_type" qualifiers="const">
+ <return type="int" enum="RenderingServer.GlobalShaderParameterType" />
<param index="0" name="name" type="StringName" />
<description>
</description>
</method>
- <method name="global_shader_uniform_remove">
+ <method name="global_shader_parameter_remove">
<return type="void" />
<param index="0" name="name" type="StringName" />
<description>
</description>
</method>
- <method name="global_shader_uniform_set">
+ <method name="global_shader_parameter_set">
<return type="void" />
<param index="0" name="name" type="StringName" />
<param index="1" name="value" type="Variant" />
<description>
</description>
</method>
- <method name="global_shader_uniform_set_override">
+ <method name="global_shader_parameter_set_override">
<return type="void" />
<param index="0" name="name" type="StringName" />
<param index="1" name="value" type="Variant" />
@@ -1355,7 +1407,7 @@
<return type="bool" />
<param index="0" name="feature" type="String" />
<description>
- Returns [code]true[/code] if the OS supports a certain feature. Features might be [code]s3tc[/code], [code]etc[/code], and [code]etc2[/code].
+ Returns [code]true[/code] if the OS supports a certain [param feature]. Features might be [code]s3tc[/code], [code]etc[/code], and [code]etc2[/code].
</description>
</method>
<method name="instance_attach_object_instance_id">
@@ -1391,22 +1443,22 @@
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_get_shader_uniform" qualifiers="const">
+ <method name="instance_geometry_get_shader_parameter" qualifiers="const">
<return type="Variant" />
<param index="0" name="instance" type="RID" />
<param index="1" name="parameter" type="StringName" />
<description>
</description>
</method>
- <method name="instance_geometry_get_shader_uniform_default_value" qualifiers="const">
+ <method name="instance_geometry_get_shader_parameter_default_value" qualifiers="const">
<return type="Variant" />
<param index="0" name="instance" type="RID" />
<param index="1" name="parameter" type="StringName" />
<description>
</description>
</method>
- <method name="instance_geometry_get_shader_uniform_list" qualifiers="const">
- <return type="Array" />
+ <method name="instance_geometry_get_shader_parameter_list" qualifiers="const">
+ <return type="Dictionary[]" />
<param index="0" name="instance" type="RID" />
<description>
</description>
@@ -1460,7 +1512,7 @@
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_shader_uniform">
+ <method name="instance_geometry_set_shader_parameter">
<return type="void" />
<param index="0" name="instance" type="RID" />
<param index="1" name="parameter" type="StringName" />
@@ -1474,9 +1526,9 @@
<param index="1" name="transparency" type="float" />
<description>
Sets the transparency for the given geometry instance. Equivalent to [member GeometryInstance3D.transparency].
- A transparency of [code]0.0[/code] is fully opaque, while [code]1.0[/code] is fully transparent. Values greater than [code]0.0[/code] (exclusive) will force the geometry's materials to go through the transparent pipeline, which is slower to render and can exhibit rendering issues due to incorrect transparency sorting. However, unlike using a transparent material, setting [code]transparency[/code] to a value greater than [code]0.0[/code] (exclusive) will [i]not[/i] disable shadow rendering.
+ A transparency of [code]0.0[/code] is fully opaque, while [code]1.0[/code] is fully transparent. Values greater than [code]0.0[/code] (exclusive) will force the geometry's materials to go through the transparent pipeline, which is slower to render and can exhibit rendering issues due to incorrect transparency sorting. However, unlike using a transparent material, setting [param transparency] to a value greater than [code]0.0[/code] (exclusive) will [i]not[/i] disable shadow rendering.
In spatial shaders, [code]1.0 - transparency[/code] is set as the default value of the [code]ALPHA[/code] built-in.
- [b]Note:[/b] [code]transparency[/code] is clamped between [code]0.0[/code] and [code]1.0[/code], so this property cannot be used to make transparent materials more opaque than they originally are.
+ [b]Note:[/b] [param transparency] is clamped between [code]0.0[/code] and [code]1.0[/code], so this property cannot be used to make transparent materials more opaque than they originally are.
</description>
</method>
<method name="instance_geometry_set_visibility_range">
@@ -1581,7 +1633,7 @@
</description>
</method>
<method name="instances_cull_aabb" qualifiers="const">
- <return type="Array" />
+ <return type="PackedInt64Array" />
<param index="0" name="aabb" type="AABB" />
<param index="1" name="scenario" type="RID" />
<description>
@@ -1590,8 +1642,8 @@
</description>
</method>
<method name="instances_cull_convex" qualifiers="const">
- <return type="Array" />
- <param index="0" name="convex" type="Array" />
+ <return type="PackedInt64Array" />
+ <param index="0" name="convex" type="Plane[]" />
<param index="1" name="scenario" type="RID" />
<description>
Returns an array of object IDs intersecting with the provided convex shape. Only visual 3D nodes are considered, such as [MeshInstance3D] or [DirectionalLight3D]. Use [method @GlobalScope.instance_from_id] to obtain the actual nodes. A scenario RID must be provided, which is available in the [World3D] you want to query. This forces an update for all resources queued to update.
@@ -1599,7 +1651,7 @@
</description>
</method>
<method name="instances_cull_ray" qualifiers="const">
- <return type="Array" />
+ <return type="PackedInt64Array" />
<param index="0" name="from" type="Vector3" />
<param index="1" name="to" type="Vector3" />
<param index="2" name="scenario" type="RID" />
@@ -1757,6 +1809,14 @@
<description>
</description>
</method>
+ <method name="lightmap_set_baked_exposure_normalization">
+ <return type="void" />
+ <param index="0" name="lightmap" type="RID" />
+ <param index="1" name="baked_exposure" type="float" />
+ <description>
+ Used to inform the renderer what exposure normalization value was used while baking the lightmap. This value will be used and modulated at run time to ensure that the lightmap maintains a consistent level of exposure even if the scene-wide exposure normalization is changed at run time. For more information see [method camera_attributes_set_exposure].
+ </description>
+ </method>
<method name="lightmap_set_probe_bounds">
<return type="void" />
<param index="0" name="lightmap" type="RID" />
@@ -1801,7 +1861,7 @@
<param index="1" name="longitudes" type="int" />
<param index="2" name="radius" type="float" />
<description>
- Returns a mesh of a sphere with the given amount of horizontal and vertical subdivisions.
+ Returns a mesh of a sphere with the given number of horizontal and vertical subdivisions.
</description>
</method>
<method name="material_create">
@@ -1959,7 +2019,7 @@
</description>
</method>
<method name="mesh_surface_get_blend_shape_arrays" qualifiers="const">
- <return type="Array" />
+ <return type="Array[]" />
<param index="0" name="mesh" type="RID" />
<param index="1" name="surface" type="int" />
<description>
@@ -2655,7 +2715,7 @@
The scenario is the 3D world that all the visual instances exist in.
</description>
</method>
- <method name="scenario_set_camera_effects">
+ <method name="scenario_set_camera_attributes">
<return type="void" />
<param index="0" name="scenario" type="RID" />
<param index="1" name="effects" type="RID" />
@@ -2693,7 +2753,7 @@
<param index="2" name="scale" type="bool" />
<param index="3" name="use_filter" type="bool" default="true" />
<description>
- Sets a boot image. The color defines the background color. If [code]scale[/code] is [code]true[/code], the image will be scaled to fit the screen size. If [code]use_filter[/code] is [code]true[/code], the image will be scaled with linear interpolation. If [code]use_filter[/code] is [code]false[/code], the image will be scaled with nearest-neighbor interpolation.
+ Sets a boot image. The color defines the background color. If [param scale] is [code]true[/code], the image will be scaled to fit the screen size. If [param use_filter] is [code]true[/code], the image will be scaled with linear interpolation. If [param use_filter] is [code]false[/code], the image will be scaled with nearest-neighbor interpolation.
</description>
</method>
<method name="set_debug_generate_wireframes">
@@ -2724,28 +2784,21 @@
Returns a shader's code.
</description>
</method>
- <method name="shader_get_default_texture_param" qualifiers="const">
+ <method name="shader_get_default_texture_parameter" qualifiers="const">
<return type="RID" />
<param index="0" name="shader" type="RID" />
- <param index="1" name="param" type="StringName" />
+ <param index="1" name="name" type="StringName" />
<param index="2" name="index" type="int" default="0" />
<description>
Returns a default texture from a shader searched by name.
- [b]Note:[/b] If the sampler array is used use [code]index[/code] to access the specified texture.
+ [b]Note:[/b] If the sampler array is used use [param index] to access the specified texture.
</description>
</method>
- <method name="shader_get_param_default" qualifiers="const">
+ <method name="shader_get_parameter_default" qualifiers="const">
<return type="Variant" />
<param index="0" name="shader" type="RID" />
- <param index="1" name="param" type="StringName" />
- <description>
- </description>
- </method>
- <method name="shader_get_shader_uniform_list" qualifiers="const">
- <return type="Dictionary[]" />
- <param index="0" name="shader" type="RID" />
+ <param index="1" name="name" type="StringName" />
<description>
- Returns the parameters of a shader.
</description>
</method>
<method name="shader_set_code">
@@ -2755,15 +2808,15 @@
<description>
</description>
</method>
- <method name="shader_set_default_texture_param">
+ <method name="shader_set_default_texture_parameter">
<return type="void" />
<param index="0" name="shader" type="RID" />
- <param index="1" name="param" type="StringName" />
+ <param index="1" name="name" type="StringName" />
<param index="2" name="texture" type="RID" />
<param index="3" name="index" type="int" default="0" />
<description>
Sets a shader's default texture. Overwrites the texture given by name.
- [b]Note:[/b] If the sampler array is used use [code]index[/code] to access the specified texture.
+ [b]Note:[/b] If the sampler array is used use [param index] to access the specified texture.
</description>
</method>
<method name="shader_set_path_hint">
@@ -2975,6 +3028,14 @@
<description>
</description>
</method>
+ <method name="texture_get_rd_texture" qualifiers="const">
+ <return type="RID" />
+ <param index="0" name="texture" type="RID" />
+ <param index="1" name="srgb" type="bool" default="false" />
+ <description>
+ Returns a texture [RID] that can be used with [RenderingDevice].
+ </description>
+ </method>
<method name="texture_proxy_create">
<return type="RID" />
<param index="0" name="base" type="RID" />
@@ -3039,7 +3100,7 @@
<param index="1" name="rect" type="Rect2" default="Rect2(0, 0, 0, 0)" />
<param index="2" name="screen" type="int" default="0" />
<description>
- Copies the viewport to a region of the screen specified by [code]rect[/code]. If [method viewport_set_render_direct_to_screen] is [code]true[/code], then the viewport does not use a framebuffer and the contents of the viewport are rendered directly to screen. However, note that the root viewport is drawn last, therefore it will draw over the screen. Accordingly, you must set the root viewport to an area that does not cover the area that you have attached this viewport to.
+ Copies the viewport to a region of the screen specified by [param rect]. If [method viewport_set_render_direct_to_screen] is [code]true[/code], then the viewport does not use a framebuffer and the contents of the viewport are rendered directly to screen. However, note that the root viewport is drawn last, therefore it will draw over the screen. Accordingly, you must set the root viewport to an area that does not cover the area that you have attached this viewport to.
For example, you can set the root viewport to not render at all with the following code:
FIXME: The method seems to be non-existent.
[codeblocks]
@@ -3102,6 +3163,14 @@
If [code]true[/code], sets the viewport active, else sets it inactive.
</description>
</method>
+ <method name="viewport_set_canvas_cull_mask">
+ <return type="void" />
+ <param index="0" name="viewport" type="RID" />
+ <param index="1" name="canvas_cull_mask" type="int" />
+ <description>
+ Sets the rendering mask associated with this [Viewport]. Only [CanvasItem] nodes with a matching rendering visibility layer will be rendered by this [Viewport].
+ </description>
+ </method>
<method name="viewport_set_canvas_stacking">
<return type="void" />
<param index="0" name="viewport" type="RID" />
@@ -3110,7 +3179,7 @@
<param index="3" name="sublayer" type="int" />
<description>
Sets the stacking order for a viewport's canvas.
- [code]layer[/code] is the actual canvas layer, while [code]sublayer[/code] specifies the stacking order of the canvas among those in the same layer.
+ [param layer] is the actual canvas layer, while [param sublayer] specifies the stacking order of the canvas among those in the same layer.
</description>
</method>
<method name="viewport_set_canvas_transform">
@@ -3198,12 +3267,20 @@
<description>
</description>
</method>
- <method name="viewport_set_msaa">
+ <method name="viewport_set_msaa_2d">
<return type="void" />
<param index="0" name="viewport" type="RID" />
<param index="1" name="msaa" type="int" enum="RenderingServer.ViewportMSAA" />
<description>
- Sets the anti-aliasing mode. See [enum ViewportMSAA] for options.
+ Sets the multisample anti-aliasing mode for 2D/Canvas. See [enum ViewportMSAA] for options.
+ </description>
+ </method>
+ <method name="viewport_set_msaa_3d">
+ <return type="void" />
+ <param index="0" name="viewport" type="RID" />
+ <param index="1" name="msaa" type="int" enum="RenderingServer.ViewportMSAA" />
+ <description>
+ Sets the multisample anti-aliasing mode for 3D. See [enum ViewportMSAA] for options.
</description>
</method>
<method name="viewport_set_occlusion_culling_build_quality">
@@ -3462,6 +3539,14 @@
<description>
</description>
</method>
+ <method name="voxel_gi_set_baked_exposure_normalization">
+ <return type="void" />
+ <param index="0" name="voxel_gi" type="RID" />
+ <param index="1" name="baked_exposure" type="float" />
+ <description>
+ Used to inform the renderer what exposure normalization value was used while baking the voxel gi. This value will be used and modulated at run time to ensure that the voxel gi maintains a consistent level of exposure even if the scene-wide exposure normalization is changed at run time. For more information see [method camera_attributes_set_exposure].
+ </description>
+ </method>
<method name="voxel_gi_set_bias">
<return type="void" />
<param index="0" name="voxel_gi" type="RID" />
@@ -3774,64 +3859,65 @@
Is a spot light.
</constant>
<constant name="LIGHT_PARAM_ENERGY" value="0" enum="LightParam">
- The light's energy.
+ The light's energy multiplier.
</constant>
<constant name="LIGHT_PARAM_INDIRECT_ENERGY" value="1" enum="LightParam">
The light's indirect energy multiplier (final indirect energy is [constant LIGHT_PARAM_ENERGY] * [constant LIGHT_PARAM_INDIRECT_ENERGY]).
</constant>
- <constant name="LIGHT_PARAM_SPECULAR" value="2" enum="LightParam">
+ <constant name="LIGHT_PARAM_VOLUMETRIC_FOG_ENERGY" value="2" enum="LightParam">
+ The light's volumetric fog energy multiplier (final volumetric fog energy is [constant LIGHT_PARAM_ENERGY] * [constant LIGHT_PARAM_VOLUMETRIC_FOG_ENERGY]).
+ </constant>
+ <constant name="LIGHT_PARAM_SPECULAR" value="3" enum="LightParam">
The light's influence on specularity.
</constant>
- <constant name="LIGHT_PARAM_RANGE" value="3" enum="LightParam">
+ <constant name="LIGHT_PARAM_RANGE" value="4" enum="LightParam">
The light's range.
</constant>
- <constant name="LIGHT_PARAM_SIZE" value="4" enum="LightParam">
+ <constant name="LIGHT_PARAM_SIZE" value="5" enum="LightParam">
The size of the light when using spot light or omni light. The angular size of the light when using directional light.
</constant>
- <constant name="LIGHT_PARAM_ATTENUATION" value="5" enum="LightParam">
+ <constant name="LIGHT_PARAM_ATTENUATION" value="6" enum="LightParam">
The light's attenuation.
</constant>
- <constant name="LIGHT_PARAM_SPOT_ANGLE" value="6" enum="LightParam">
+ <constant name="LIGHT_PARAM_SPOT_ANGLE" value="7" enum="LightParam">
The spotlight's angle.
</constant>
- <constant name="LIGHT_PARAM_SPOT_ATTENUATION" value="7" enum="LightParam">
+ <constant name="LIGHT_PARAM_SPOT_ATTENUATION" value="8" enum="LightParam">
The spotlight's attenuation.
</constant>
- <constant name="LIGHT_PARAM_SHADOW_MAX_DISTANCE" value="8" enum="LightParam">
+ <constant name="LIGHT_PARAM_SHADOW_MAX_DISTANCE" value="9" enum="LightParam">
Max distance that shadows will be rendered.
</constant>
- <constant name="LIGHT_PARAM_SHADOW_SPLIT_1_OFFSET" value="9" enum="LightParam">
+ <constant name="LIGHT_PARAM_SHADOW_SPLIT_1_OFFSET" value="10" enum="LightParam">
Proportion of shadow atlas occupied by the first split.
</constant>
- <constant name="LIGHT_PARAM_SHADOW_SPLIT_2_OFFSET" value="10" enum="LightParam">
+ <constant name="LIGHT_PARAM_SHADOW_SPLIT_2_OFFSET" value="11" enum="LightParam">
Proportion of shadow atlas occupied by the second split.
</constant>
- <constant name="LIGHT_PARAM_SHADOW_SPLIT_3_OFFSET" value="11" enum="LightParam">
+ <constant name="LIGHT_PARAM_SHADOW_SPLIT_3_OFFSET" value="12" enum="LightParam">
Proportion of shadow atlas occupied by the third split. The fourth split occupies the rest.
</constant>
- <constant name="LIGHT_PARAM_SHADOW_FADE_START" value="12" enum="LightParam">
+ <constant name="LIGHT_PARAM_SHADOW_FADE_START" value="13" enum="LightParam">
Proportion of shadow max distance where the shadow will start to fade out.
</constant>
- <constant name="LIGHT_PARAM_SHADOW_NORMAL_BIAS" value="13" enum="LightParam">
+ <constant name="LIGHT_PARAM_SHADOW_NORMAL_BIAS" value="14" enum="LightParam">
Normal bias used to offset shadow lookup by object normal. Can be used to fix self-shadowing artifacts.
</constant>
- <constant name="LIGHT_PARAM_SHADOW_BIAS" value="14" enum="LightParam">
+ <constant name="LIGHT_PARAM_SHADOW_BIAS" value="15" enum="LightParam">
Bias the shadow lookup to fix self-shadowing artifacts.
</constant>
- <constant name="LIGHT_PARAM_SHADOW_PANCAKE_SIZE" value="15" enum="LightParam">
+ <constant name="LIGHT_PARAM_SHADOW_PANCAKE_SIZE" value="16" enum="LightParam">
Sets the size of the directional shadow pancake. The pancake offsets the start of the shadow's camera frustum to provide a higher effective depth resolution for the shadow. However, a high pancake size can cause artifacts in the shadows of large objects that are close to the edge of the frustum. Reducing the pancake size can help. Setting the size to [code]0[/code] turns off the pancaking effect.
</constant>
- <constant name="LIGHT_PARAM_SHADOW_OPACITY" value="16" enum="LightParam">
+ <constant name="LIGHT_PARAM_SHADOW_OPACITY" value="17" enum="LightParam">
The light's shadow opacity. Values lower than [code]1.0[/code] make the light appear through shadows. This can be used to fake global illumination at a low performance cost.
</constant>
- <constant name="LIGHT_PARAM_SHADOW_BLUR" value="17" enum="LightParam">
+ <constant name="LIGHT_PARAM_SHADOW_BLUR" value="18" enum="LightParam">
Blurs the edges of the shadow. Can be used to hide pixel artifacts in low resolution shadow maps. A high value can make shadows appear grainy and can cause other unwanted artifacts. Try to keep as near default as possible.
</constant>
- <constant name="LIGHT_PARAM_SHADOW_VOLUMETRIC_FOG_FADE" value="18" enum="LightParam">
- </constant>
<constant name="LIGHT_PARAM_TRANSMITTANCE_BIAS" value="19" enum="LightParam">
</constant>
- <constant name="LIGHT_PARAM_MAX" value="20" enum="LightParam">
+ <constant name="LIGHT_PARAM_MAX" value="21" enum="LightParam">
Represents the size of the [enum LightParam] enum.
</constant>
<constant name="LIGHT_BAKE_DISABLED" value="0" enum="LightBakeMode">
@@ -4519,9 +4605,11 @@
</constant>
<constant name="CANVAS_GROUP_MODE_DISABLED" value="0" enum="CanvasGroupMode">
</constant>
- <constant name="CANVAS_GROUP_MODE_OPAQUE" value="1" enum="CanvasGroupMode">
+ <constant name="CANVAS_GROUP_MODE_CLIP_ONLY" value="1" enum="CanvasGroupMode">
+ </constant>
+ <constant name="CANVAS_GROUP_MODE_CLIP_AND_DRAW" value="2" enum="CanvasGroupMode">
</constant>
- <constant name="CANVAS_GROUP_MODE_TRANSPARENT" value="2" enum="CanvasGroupMode">
+ <constant name="CANVAS_GROUP_MODE_TRANSPARENT" value="3" enum="CanvasGroupMode">
</constant>
<constant name="CANVAS_LIGHT_MODE_POINT" value="0" enum="CanvasLightMode">
</constant>
@@ -4557,63 +4645,63 @@
<constant name="CANVAS_OCCLUDER_POLYGON_CULL_COUNTER_CLOCKWISE" value="2" enum="CanvasOccluderPolygonCullMode">
Culling of the canvas occluder is counterclockwise.
</constant>
- <constant name="GLOBAL_VAR_TYPE_BOOL" value="0" enum="GlobalShaderUniformType">
+ <constant name="GLOBAL_VAR_TYPE_BOOL" value="0" enum="GlobalShaderParameterType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_BVEC2" value="1" enum="GlobalShaderUniformType">
+ <constant name="GLOBAL_VAR_TYPE_BVEC2" value="1" enum="GlobalShaderParameterType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_BVEC3" value="2" enum="GlobalShaderUniformType">
+ <constant name="GLOBAL_VAR_TYPE_BVEC3" value="2" enum="GlobalShaderParameterType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_BVEC4" value="3" enum="GlobalShaderUniformType">
+ <constant name="GLOBAL_VAR_TYPE_BVEC4" value="3" enum="GlobalShaderParameterType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_INT" value="4" enum="GlobalShaderUniformType">
+ <constant name="GLOBAL_VAR_TYPE_INT" value="4" enum="GlobalShaderParameterType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_IVEC2" value="5" enum="GlobalShaderUniformType">
+ <constant name="GLOBAL_VAR_TYPE_IVEC2" value="5" enum="GlobalShaderParameterType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_IVEC3" value="6" enum="GlobalShaderUniformType">
+ <constant name="GLOBAL_VAR_TYPE_IVEC3" value="6" enum="GlobalShaderParameterType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_IVEC4" value="7" enum="GlobalShaderUniformType">
+ <constant name="GLOBAL_VAR_TYPE_IVEC4" value="7" enum="GlobalShaderParameterType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_RECT2I" value="8" enum="GlobalShaderUniformType">
+ <constant name="GLOBAL_VAR_TYPE_RECT2I" value="8" enum="GlobalShaderParameterType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_UINT" value="9" enum="GlobalShaderUniformType">
+ <constant name="GLOBAL_VAR_TYPE_UINT" value="9" enum="GlobalShaderParameterType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_UVEC2" value="10" enum="GlobalShaderUniformType">
+ <constant name="GLOBAL_VAR_TYPE_UVEC2" value="10" enum="GlobalShaderParameterType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_UVEC3" value="11" enum="GlobalShaderUniformType">
+ <constant name="GLOBAL_VAR_TYPE_UVEC3" value="11" enum="GlobalShaderParameterType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_UVEC4" value="12" enum="GlobalShaderUniformType">
+ <constant name="GLOBAL_VAR_TYPE_UVEC4" value="12" enum="GlobalShaderParameterType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_FLOAT" value="13" enum="GlobalShaderUniformType">
+ <constant name="GLOBAL_VAR_TYPE_FLOAT" value="13" enum="GlobalShaderParameterType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_VEC2" value="14" enum="GlobalShaderUniformType">
+ <constant name="GLOBAL_VAR_TYPE_VEC2" value="14" enum="GlobalShaderParameterType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_VEC3" value="15" enum="GlobalShaderUniformType">
+ <constant name="GLOBAL_VAR_TYPE_VEC3" value="15" enum="GlobalShaderParameterType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_VEC4" value="16" enum="GlobalShaderUniformType">
+ <constant name="GLOBAL_VAR_TYPE_VEC4" value="16" enum="GlobalShaderParameterType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_COLOR" value="17" enum="GlobalShaderUniformType">
+ <constant name="GLOBAL_VAR_TYPE_COLOR" value="17" enum="GlobalShaderParameterType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_RECT2" value="18" enum="GlobalShaderUniformType">
+ <constant name="GLOBAL_VAR_TYPE_RECT2" value="18" enum="GlobalShaderParameterType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_MAT2" value="19" enum="GlobalShaderUniformType">
+ <constant name="GLOBAL_VAR_TYPE_MAT2" value="19" enum="GlobalShaderParameterType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_MAT3" value="20" enum="GlobalShaderUniformType">
+ <constant name="GLOBAL_VAR_TYPE_MAT3" value="20" enum="GlobalShaderParameterType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_MAT4" value="21" enum="GlobalShaderUniformType">
+ <constant name="GLOBAL_VAR_TYPE_MAT4" value="21" enum="GlobalShaderParameterType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_TRANSFORM_2D" value="22" enum="GlobalShaderUniformType">
+ <constant name="GLOBAL_VAR_TYPE_TRANSFORM_2D" value="22" enum="GlobalShaderParameterType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_TRANSFORM" value="23" enum="GlobalShaderUniformType">
+ <constant name="GLOBAL_VAR_TYPE_TRANSFORM" value="23" enum="GlobalShaderParameterType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_SAMPLER2D" value="24" enum="GlobalShaderUniformType">
+ <constant name="GLOBAL_VAR_TYPE_SAMPLER2D" value="24" enum="GlobalShaderParameterType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_SAMPLER2DARRAY" value="25" enum="GlobalShaderUniformType">
+ <constant name="GLOBAL_VAR_TYPE_SAMPLER2DARRAY" value="25" enum="GlobalShaderParameterType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_SAMPLER3D" value="26" enum="GlobalShaderUniformType">
+ <constant name="GLOBAL_VAR_TYPE_SAMPLER3D" value="26" enum="GlobalShaderParameterType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_SAMPLERCUBE" value="27" enum="GlobalShaderUniformType">
+ <constant name="GLOBAL_VAR_TYPE_SAMPLERCUBE" value="27" enum="GlobalShaderParameterType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_MAX" value="28" enum="GlobalShaderUniformType">
+ <constant name="GLOBAL_VAR_TYPE_MAX" value="28" enum="GlobalShaderParameterType">
</constant>
<constant name="RENDERING_INFO_TOTAL_OBJECTS_IN_FRAME" value="0" enum="RenderingInfo">
</constant>
diff --git a/doc/classes/Resource.xml b/doc/classes/Resource.xml
index b5a2179463..e533fc1e32 100644
--- a/doc/classes/Resource.xml
+++ b/doc/classes/Resource.xml
@@ -4,7 +4,8 @@
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 [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.
+ 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 can also be nested within other resources, and saved on disk. Once loaded from disk, further attempts to load a resource by [member resource_path] returns the same reference. [PackedScene], one of the most common [Object]s in a Godot project, is also a resource, uniquely capable of storing and instantiating the [Node]s it contains as many times as desired.
+ In GDScript, resources can loaded from disk by their [member resource_path] using [method @GDScript.load] or [method @GDScript.preload].
[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>
@@ -15,77 +16,94 @@
<method name="_get_rid" qualifiers="virtual">
<return type="RID" />
<description>
+ Override this method to return a custom [RID] when [method get_rid] is called.
</description>
</method>
<method name="duplicate" qualifiers="const">
<return type="Resource" />
<param index="0" name="subresources" type="bool" default="false" />
<description>
- Duplicates the resource, returning a new resource with the exported members copied. [b]Note:[/b] To duplicate the resource the constructor is called without arguments. This method will error when the constructor doesn't have default values.
- 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.
+ Duplicates this resource, returning a new resource with its [code]export[/code]ed or [constant PROPERTY_USAGE_STORAGE] properties copied from the original.
+ If [param subresources] is [code]false[/code], a shallow copy is returned. Nested resources within subresources are not duplicated and are shared from the original resource. This behavior can be overridden by the [constant PROPERTY_USAGE_DO_NOT_SHARE_ON_DUPLICATE] flag.
+ [b]Note:[/b] For custom resources, this method will fail if [method Object._init] has been defined with required parameters.
</description>
</method>
<method name="emit_changed">
<return type="void" />
<description>
- Emits the [signal changed] signal.
- If external objects which depend on this resource should be updated, this method must be called manually whenever the state of this resource has changed (such as modification of properties).
- The method is equivalent to:
+ Emits the [signal changed] signal. This method is called automatically for built-in resources.
+ [b]Note:[/b] For custom resources, it's recommended to call this method whenever a meaningful change occurs, such as a modified property. This ensures that custom [Object]s depending on the resource are properly updated.
[codeblock]
- emit_signal("changed")
+ var damage:
+ set(new_value):
+ if damage != new_value:
+ damage = new_value
+ emit_changed()
[/codeblock]
- [b]Note:[/b] This method is called automatically for built-in resources.
</description>
</method>
<method name="get_local_scene" qualifiers="const">
<return type="Node" />
<description>
- If [member resource_local_to_scene] is enabled and the resource was loaded from a [PackedScene] instantiation, returns the local scene where this resource's unique copy is in use. Otherwise, returns [code]null[/code].
+ If [member resource_local_to_scene] is set to [code]true[/code] and the resource has been loaded from a [PackedScene] instantiation, returns the root [Node] of the scene where this resource is used. Otherwise, returns [code]null[/code].
</description>
</method>
<method name="get_rid" qualifiers="const">
<return type="RID" />
<description>
- Returns the RID of the resource (or an empty RID). Many resources (such as [Texture2D], [Mesh], etc) are high-level abstractions of resources stored in a server, so this function will return the original RID.
+ Returns the [RID] of this resource (or an empty RID). Many resources (such as [Texture2D], [Mesh], and so on) are high-level abstractions of resources stored in a specialized server ([DisplayServer], [RenderingServer], etc.), so this function will return the original [RID].
</description>
</method>
<method name="setup_local_to_scene">
<return type="void" />
<description>
- This method is called when a resource with [member resource_local_to_scene] enabled is loaded from a [PackedScene] instantiation. Its behavior can be customized by connecting [signal setup_local_to_scene_requested] from script.
- For most resources, this method performs no base logic. [ViewportTexture] performs custom logic to properly set the proxy texture and flags in the local viewport.
+ Emits the [signal setup_local_to_scene_requested] signal. If [member resource_local_to_scene] is set to [code]true[/code], this method is called from [method PackedScene.instantiate] by the newly duplicated resource within the scene instance.
+ For most resources, this method performs no logic of its own. Custom behavior can be defined by connecting [signal setup_local_to_scene_requested] from a script, [b]not[/b] by overriding this method.
+ [b]Example:[/b] Assign a random value to [code]health[/code] for every duplicated Resource from an instantiated scene, excluding the original.
+ [codeblock]
+ extends Resource
+
+ var health = 0
+
+ func _init():
+ setup_local_to_scene_requested.connect(randomize_health)
+
+ func randomize_health():
+ health = randi_range(10, 40)
+ [/codeblock]
</description>
</method>
<method name="take_over_path">
<return type="void" />
<param index="0" name="path" type="String" />
<description>
- Sets the path of the resource, potentially overriding an existing cache entry for this path. This differs from setting [member resource_path], as the latter would error out if another resource was already cached for the given path.
+ Sets the [member resource_path] to [param path], potentially overriding an existing cache entry for this path. Further attempts to load an overridden resource by path will instead return this resource.
</description>
</method>
</methods>
<members>
<member name="resource_local_to_scene" type="bool" setter="set_local_to_scene" getter="is_local_to_scene" default="false">
- If [code]true[/code], the resource will be made unique in each instance of its local scene. It can thus be modified in a scene instance without impacting other instances of that same scene.
+ If [code]true[/code], the resource is duplicated for each instance of all scenes using it. At run-time, the resource can be modified in one scene without affecting other instances (see [method PackedScene.instantiate]).
+ [b]Note:[/b] Changing this property at run-time has no effect on already created duplicate resources.
</member>
<member name="resource_name" type="String" setter="set_name" getter="get_name" default="&quot;&quot;">
- The name of the resource. This is an optional identifier. If [member resource_name] is not empty, its value will be displayed to represent the current resource in the editor inspector. For built-in scripts, the [member resource_name] will be displayed as the tab name in the script editor.
+ An optional name for this resource. When defined, its value is displayed to represent the resource in the Inspector dock. For built-in scripts, the name is displayed as part of the tab name in the script editor.
</member>
<member name="resource_path" type="String" setter="set_path" getter="get_path" default="&quot;&quot;">
- The path to the resource. In case it has its own file, it will return its filepath. If it's tied to the scene, it will return the scene's path, followed by the resource's index.
+ The unique path to this resource. If it has been saved to disk, the value will be its filepath. If the resource is exclusively contained within a scene, the value will be the [PackedScene]'s filepath, followed by an unique identifier.
+ [b]Note:[/b] Setting this property manually may fail if a resource with the same path has already been previously loaded. If necessary, use [method take_over_path].
</member>
</members>
<signals>
<signal name="changed">
<description>
- Emitted whenever the resource changes.
- [b]Note:[/b] This signal is not emitted automatically for custom resources, which means that you need to create a setter and emit the signal yourself.
+ Emitted when the resource changes, usually when one of its properties is modified. See also [method emit_changed].
+ [b]Note:[/b] This signal is not emitted automatically for properties of custom resources. If necessary, a setter needs to be created to emit the signal.
</description>
</signal>
<signal name="setup_local_to_scene_requested">
<description>
+ Emitted when [method setup_local_to_scene] is called, usually by a newly duplicated resource with [member resource_local_to_scene] set to [code]true[/code]. Custom behavior can be defined by connecting this signal.
</description>
</signal>
</signals>
diff --git a/doc/classes/ResourceFormatLoader.xml b/doc/classes/ResourceFormatLoader.xml
index cfa1b9f5d7..2b6376f2cd 100644
--- a/doc/classes/ResourceFormatLoader.xml
+++ b/doc/classes/ResourceFormatLoader.xml
@@ -28,7 +28,7 @@
<param index="0" name="path" type="String" />
<param index="1" name="add_types" type="bool" />
<description>
- If implemented, gets the dependencies of a given resource. If [code]add_types[/code] is [code]true[/code], paths should be appended [code]::TypeName[/code], where [code]TypeName[/code] is the class name of the dependency.
+ If implemented, gets the dependencies of a given resource. If [param add_types] is [code]true[/code], paths should be appended [code]::TypeName[/code], where [code]TypeName[/code] is the class name of the dependency.
[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>
@@ -67,8 +67,17 @@
<param index="2" name="use_sub_threads" type="bool" />
<param index="3" name="cache_mode" type="int" />
<description>
- Loads a resource when the engine finds this loader to be compatible. If the loaded resource is the result of an import, [code]original_path[/code] will target the source file. Returns a [Resource] object on success, or an [enum Error] constant in case of failure.
- 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.
+ Loads a resource when the engine finds this loader to be compatible. If the loaded resource is the result of an import, [param original_path] will target the source file. Returns a [Resource] object on success, or an [enum Error] constant in case of failure.
+ The [param cache_mode] 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="_recognize_path" qualifiers="virtual const">
+ <return type="bool" />
+ <param index="0" name="path" type="String" />
+ <param index="1" name="type" type="StringName" />
+ <description>
+ Tells whether or not this loader should load a resource from its resource path for a given type.
+ If it is not implemented, the default behavior returns whether the path's extension is within the ones provided by [method _get_recognized_extensions], and if the type is within the ones provided by [method _get_resource_type].
</description>
</method>
<method name="_rename_dependencies" qualifiers="virtual const">
@@ -76,7 +85,7 @@
<param index="0" name="path" type="String" />
<param index="1" name="renames" type="Dictionary" />
<description>
- If implemented, renames dependencies within the given resource and saves it. [code]renames[/code] is a dictionary [code]{ String =&gt; String }[/code] mapping old dependency paths to new paths.
+ If implemented, renames dependencies within the given resource and saves it. [param renames] is a dictionary [code]{ String =&gt; String }[/code] mapping old dependency paths to new paths.
Returns [constant OK] on success, or an [enum Error] constant in case of failure.
</description>
</method>
diff --git a/doc/classes/ResourceFormatSaver.xml b/doc/classes/ResourceFormatSaver.xml
index 93f3a732bc..1f2af6d157 100644
--- a/doc/classes/ResourceFormatSaver.xml
+++ b/doc/classes/ResourceFormatSaver.xml
@@ -24,13 +24,22 @@
Returns whether the given resource object can be saved by this saver.
</description>
</method>
+ <method name="_recognize_path" qualifiers="virtual const">
+ <return type="bool" />
+ <param index="0" name="resource" type="Resource" />
+ <param index="1" name="path" type="String" />
+ <description>
+ Returns [code]true[/code] if this saver handles a given save path and [code]false[/code] otherwise.
+ If this method is not implemented, the default behavior returns whether the path's extension is within the ones provided by [method _get_recognized_extensions].
+ </description>
+ </method>
<method name="_save" qualifiers="virtual">
<return type="int" />
- <param index="0" name="path" type="Resource" />
- <param index="1" name="resource" type="String" />
+ <param index="0" name="resource" type="Resource" />
+ <param index="1" name="path" type="String" />
<param index="2" name="flags" type="int" />
<description>
- Saves the given resource object to a file at the target [code]path[/code]. [code]flags[/code] is a bitmask composed with [enum ResourceSaver.SaverFlags] constants.
+ Saves the given resource object to a file at the target [param path]. [param flags] is a bitmask composed with [enum ResourceSaver.SaverFlags] constants.
Returns [constant OK] on success, or an [enum Error] constant in case of failure.
</description>
</method>
diff --git a/doc/classes/ResourceLoader.xml b/doc/classes/ResourceLoader.xml
index 1632be7e88..d51a5293ec 100644
--- a/doc/classes/ResourceLoader.xml
+++ b/doc/classes/ResourceLoader.xml
@@ -26,15 +26,15 @@
<param index="0" name="path" type="String" />
<param index="1" name="type_hint" type="String" default="&quot;&quot;" />
<description>
- Returns whether a recognized resource exists for the given [code]path[/code].
- An optional [code]type_hint[/code] can be used to further specify the [Resource] type that should be handled by the [ResourceFormatLoader]. Anything that inherits from [Resource] can be used as a type hint, for example [Image].
+ Returns whether a recognized resource exists for the given [param path].
+ An optional [param type_hint] can be used to further specify the [Resource] type that should be handled by the [ResourceFormatLoader]. Anything that inherits from [Resource] can be used as a type hint, for example [Image].
</description>
</method>
<method name="get_dependencies">
<return type="PackedStringArray" />
<param index="0" name="path" type="String" />
<description>
- Returns the dependencies for the resource at the given [code]path[/code].
+ Returns the dependencies for the resource at the given [param path].
</description>
</method>
<method name="get_recognized_extensions_for_type">
@@ -55,7 +55,7 @@
<return type="bool" />
<param index="0" name="path" type="String" />
<description>
- Returns whether a cached resource is available for the given [code]path[/code].
+ Returns whether a cached resource is available for the given [param path].
Once a resource has been loaded by the engine, it is cached in memory for faster access, and future calls to the [method load] method will use the cached version. The cached resource can be overridden by using [method Resource.take_over_path] on a new resource for that same path.
</description>
</method>
@@ -65,10 +65,10 @@
<param index="1" name="type_hint" type="String" default="&quot;&quot;" />
<param index="2" name="cache_mode" type="int" enum="ResourceLoader.CacheMode" default="1" />
<description>
- Loads a resource at the given [code]path[/code], caching the result for further access.
+ Loads a resource at the given [param path], caching the result for further access.
The registered [ResourceFormatLoader]s are queried sequentially to find the first one which can handle the file's extension, and then attempt loading. If loading fails, the remaining ResourceFormatLoaders are also attempted.
- An optional [code]type_hint[/code] can be used to further specify the [Resource] type that should be handled by the [ResourceFormatLoader]. Anything that inherits from [Resource] can be used as a type hint, for example [Image].
- 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.
+ An optional [param type_hint] can be used to further specify the [Resource] type that should be handled by the [ResourceFormatLoader]. Anything that inherits from [Resource] can be used as a type hint, for example [Image].
+ The [param cache_mode] property defines whether and how the cache should be used or updated when loading the resource. See [enum CacheMode] for details.
Returns an empty resource if no [ResourceFormatLoader] could handle the file.
GDScript has a simplified [method @GDScript.load] built-in method which can be used in most situations, leaving the use of [ResourceLoader] for more advanced scenarios.
</description>
@@ -86,8 +86,8 @@
<param index="0" name="path" type="String" />
<param index="1" name="progress" type="Array" default="[]" />
<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.
- An array variable can optionally be passed via [code]progress[/code], and will return a one-element array containing the percentage of completion of the threaded loading.
+ Returns the status of a threaded loading operation started with [method load_threaded_request] for the resource at [param path]. See [enum ThreadLoadStatus] for possible return values.
+ An array variable can optionally be passed via [param progress], and will return a one-element array containing the percentage of completion of the threaded loading.
</description>
</method>
<method name="load_threaded_request">
@@ -97,8 +97,8 @@
<param index="2" name="use_sub_threads" type="bool" default="false" />
<param index="3" name="cache_mode" type="int" enum="ResourceLoader.CacheMode" default="1" />
<description>
- Loads the resource using threads. If [code]use_sub_threads[/code] is [code]true[/code], multiple threads will be used to load the resource, which makes loading faster, but may affect the main thread (and thus cause game slowdowns).
- The [code]cache_mode[/code] property defines whether and how the cache should be used or updated when loading the resource. See [enum CacheMode] for details.
+ Loads the resource using threads. If [param use_sub_threads] is [code]true[/code], multiple threads will be used to load the resource, which makes loading faster, but may affect the main thread (and thus cause game slowdowns).
+ The [param cache_mode] property defines whether and how the cache should be used or updated when loading the resource. See [enum CacheMode] for details.
</description>
</method>
<method name="remove_resource_format_loader">
diff --git a/doc/classes/ResourcePreloader.xml b/doc/classes/ResourcePreloader.xml
index e52434c2a4..17904697e6 100644
--- a/doc/classes/ResourcePreloader.xml
+++ b/doc/classes/ResourcePreloader.xml
@@ -15,14 +15,14 @@
<param index="0" name="name" type="StringName" />
<param index="1" name="resource" type="Resource" />
<description>
- Adds a resource to the preloader with the given [code]name[/code]. If a resource with the given [code]name[/code] already exists, the new resource will be renamed to "[code]name[/code] N" where N is an incrementing number starting from 2.
+ Adds a resource to the preloader with the given [param name]. If a resource with the given [param name] already exists, the new resource will be renamed to "[param name] N" where N is an incrementing number starting from 2.
</description>
</method>
<method name="get_resource" qualifiers="const">
<return type="Resource" />
<param index="0" name="name" type="StringName" />
<description>
- Returns the resource associated to [code]name[/code].
+ Returns the resource associated to [param name].
</description>
</method>
<method name="get_resource_list" qualifiers="const">
@@ -35,14 +35,14 @@
<return type="bool" />
<param index="0" name="name" type="StringName" />
<description>
- Returns [code]true[/code] if the preloader contains a resource associated to [code]name[/code].
+ Returns [code]true[/code] if the preloader contains a resource associated to [param name].
</description>
</method>
<method name="remove_resource">
<return type="void" />
<param index="0" name="name" type="StringName" />
<description>
- Removes the resource associated to [code]name[/code] from the preloader.
+ Removes the resource associated to [param name] from the preloader.
</description>
</method>
<method name="rename_resource">
@@ -50,7 +50,7 @@
<param index="0" name="name" type="StringName" />
<param index="1" name="newname" type="StringName" />
<description>
- Renames a resource inside the preloader from [code]name[/code] to [code]newname[/code].
+ Renames a resource inside the preloader from [param name] to [param newname].
</description>
</method>
</methods>
diff --git a/doc/classes/ResourceSaver.xml b/doc/classes/ResourceSaver.xml
index 4c1fad22de..8cd701e0d8 100644
--- a/doc/classes/ResourceSaver.xml
+++ b/doc/classes/ResourceSaver.xml
@@ -39,8 +39,8 @@
<param index="1" name="path" type="String" default="&quot;&quot;" />
<param index="2" name="flags" type="int" enum="ResourceSaver.SaverFlags" default="0" />
<description>
- Saves a resource to disk to the given path, using a [ResourceFormatSaver] that recognizes the resource object. If [code]path[/code] is empty, [ResourceSaver] will try to use [member Resource.resource_path].
- The [code]flags[/code] bitmask can be specified to customize the save behavior using [enum SaverFlags] flags.
+ Saves a resource to disk to the given path, using a [ResourceFormatSaver] that recognizes the resource object. If [param path] is empty, [ResourceSaver] will try to use [member Resource.resource_path].
+ The [param flags] bitmask can be specified to customize the save behavior using [enum SaverFlags] flags.
Returns [constant OK] on success.
</description>
</method>
@@ -62,10 +62,10 @@
Do not save editor-specific metadata (identified by their [code]__editor[/code] prefix).
</constant>
<constant name="FLAG_SAVE_BIG_ENDIAN" value="16" enum="SaverFlags" is_bitfield="true">
- Save as big endian (see [member File.big_endian]).
+ Save as big endian (see [member FileAccess.big_endian]).
</constant>
<constant name="FLAG_COMPRESS" value="32" enum="SaverFlags" is_bitfield="true">
- Compress the resource on save using [constant File.COMPRESSION_ZSTD]. Only available for binary resource types.
+ Compress the resource on save using [constant FileAccess.COMPRESSION_ZSTD]. Only available for binary resource types.
</constant>
<constant name="FLAG_REPLACE_SUBRESOURCE_PATHS" value="64" enum="SaverFlags" is_bitfield="true">
Take over the paths of the saved subresources (see [method Resource.take_over_path]).
diff --git a/doc/classes/RichTextEffect.xml b/doc/classes/RichTextEffect.xml
index 304950d97c..c01546524d 100644
--- a/doc/classes/RichTextEffect.xml
+++ b/doc/classes/RichTextEffect.xml
@@ -27,7 +27,7 @@
<return type="bool" />
<param index="0" name="char_fx" type="CharFXTransform" />
<description>
- Override this method to modify properties in [code]char_fx[/code]. The method must return [code]true[/code] if the character could be transformed successfully. If the method returns [code]false[/code], it will skip transformation to avoid displaying broken text.
+ Override this method to modify properties in [param char_fx]. The method must return [code]true[/code] if the character could be transformed successfully. If the method returns [code]false[/code], it will skip transformation to avoid displaying broken text.
</description>
</method>
</methods>
diff --git a/doc/classes/RichTextLabel.xml b/doc/classes/RichTextLabel.xml
index ef01eba49d..cb2481f705 100644
--- a/doc/classes/RichTextLabel.xml
+++ b/doc/classes/RichTextLabel.xml
@@ -23,9 +23,11 @@
<param index="2" name="height" type="int" default="0" />
<param index="3" name="color" type="Color" default="Color(1, 1, 1, 1)" />
<param index="4" name="inline_align" type="int" enum="InlineAlignment" default="5" />
+ <param index="5" name="region" type="Rect2" default="Rect2(0, 0, 0, 0)" />
<description>
- Adds an image's opening and closing tags to the tag stack, optionally providing a [code]width[/code] and [code]height[/code] to resize the image and a [code]color[/code] to tint the image.
- If [code]width[/code] or [code]height[/code] is set to 0, the image size will be adjusted in order to keep the original aspect ratio.
+ Adds an image's opening and closing tags to the tag stack, optionally providing a [param width] and [param height] to resize the image, a [param color] to tint the image and a [param region] to only use parts of the image.
+ If [param width] or [param height] is set to 0, the image size will be adjusted in order to keep the original aspect ratio.
+ If [param width] and [param height] are not set, but [param region] is, the region's rect will be used.
</description>
</method>
<method name="add_text">
@@ -39,7 +41,7 @@
<return type="void" />
<param index="0" name="bbcode" type="String" />
<description>
- Parses [code]bbcode[/code] and adds tags to the tag stack as needed.
+ Parses [param bbcode] and adds tags to the tag stack as needed.
[b]Note:[/b] Using this method, you can't close a tag that was opened in a previous [method append_text] call. This is done to improve performance, especially when updating large RichTextLabels since rebuilding the whole BBCode every time would be slower. If you absolutely need to close a tag in a future method call, append the [member text] instead of using [method append_text].
</description>
</method>
@@ -176,7 +178,7 @@
<return type="void" />
<param index="0" name="effect" type="Variant" />
<description>
- Installs a custom effect. [code]effect[/code] should be a valid [RichTextEffect].
+ Installs a custom effect. [param effect] should be a valid [RichTextEffect].
</description>
</method>
<method name="is_menu_visible" qualifiers="const">
@@ -208,7 +210,7 @@
<return type="Dictionary" />
<param index="0" name="expressions" type="PackedStringArray" />
<description>
- Parses BBCode parameter [code]expressions[/code] into a dictionary.
+ Parses BBCode parameter [param expressions] into a dictionary.
</description>
</method>
<method name="pop">
@@ -294,7 +296,7 @@
<return type="void" />
<param index="0" name="level" type="int" />
<description>
- Adds an [code][indent][/code] tag to the tag stack. Multiplies [code]level[/code] by current [member tab_size] to determine new margin length.
+ Adds an [code][indent][/code] tag to the tag stack. Multiplies [param level] by current [member tab_size] to determine new margin length.
</description>
</method>
<method name="push_italics">
@@ -309,7 +311,7 @@
<param index="1" name="type" type="int" enum="RichTextLabel.ListType" />
<param index="2" name="capitalize" type="bool" />
<description>
- Adds [code][ol][/code] or [code][ul][/code] tag to the tag stack. Multiplies [code]level[/code] by current [member tab_size] to determine new margin length.
+ Adds [code][ol][/code] or [code][ul][/code] tag to the tag stack. Multiplies [param level] by current [member tab_size] to determine new margin length.
</description>
</method>
<method name="push_meta">
@@ -380,21 +382,21 @@
<param index="0" name="line" type="int" />
<description>
Removes a line of content from the label. Returns [code]true[/code] if the line exists.
- The [code]line[/code] argument is the index of the line to remove, it can take values in the interval [code][0, get_line_count() - 1][/code].
+ The [param line] argument is the index of the line to remove, it can take values in the interval [code][0, get_line_count() - 1][/code].
</description>
</method>
<method name="scroll_to_line">
<return type="void" />
<param index="0" name="line" type="int" />
<description>
- Scrolls the window's top line to match [code]line[/code].
+ Scrolls the window's top line to match [param line].
</description>
</method>
<method name="scroll_to_paragraph">
<return type="void" />
<param index="0" name="paragraph" type="int" />
<description>
- Scrolls the window's top line to match first line of the [code]paragraph[/code].
+ Scrolls the window's top line to match first line of the [param paragraph].
</description>
</method>
<method name="select_all">
@@ -440,9 +442,9 @@
<param index="1" name="expand" type="bool" />
<param index="2" name="ratio" type="int" />
<description>
- Edits the selected column's expansion options. If [code]expand[/code] is [code]true[/code], the column expands in proportion to its expansion ratio versus the other columns' ratios.
+ Edits the selected column's expansion options. If [param expand] is [code]true[/code], the column expands in proportion to its expansion ratio versus the other columns' ratios.
For example, 2 columns with ratios 3 and 4 plus 70 pixels in available width would expand 30 and 40 pixels, respectively.
- If [code]expand[/code] is [code]false[/code], the column will not contribute to the total ratio.
+ If [param expand] is [code]false[/code], the column will not contribute to the total ratio.
</description>
</method>
</methods>
@@ -477,13 +479,6 @@
<member name="meta_underlined" type="bool" setter="set_meta_underline" getter="is_meta_underlined" default="true">
If [code]true[/code], the label underlines meta tags such as [code][url]{text}[/url][/code].
</member>
- <member name="override_selected_font_color" type="bool" setter="set_override_selected_font_color" getter="is_overriding_selected_font_color" default="false">
- If [code]true[/code], the label uses the custom font color.
- </member>
- <member name="percent_visible" type="float" setter="set_percent_visible" getter="get_percent_visible" default="1.0">
- The range of characters to display, as a [float] between 0.0 and 1.0. When assigned an out of range value, it's the same as assigning 1.0.
- [b]Note:[/b] Setting this property updates [member visible_characters] based on current [method get_total_character_count].
- </member>
<member name="progress_bar_delay" type="int" setter="set_progress_bar_delay" getter="get_progress_bar_delay" default="1000">
The delay after which the loading progress bar is displayed, in milliseconds. Set to [code]-1[/code] to disable progress bar entirely.
[b]Note:[/b] Progress bar is displayed only if [member threaded] is enabled.
@@ -520,11 +515,15 @@
If [code]true[/code], text processing is done in a background thread.
</member>
<member name="visible_characters" type="int" setter="set_visible_characters" getter="get_visible_characters" default="-1">
- The restricted number of characters to display in the label. If [code]-1[/code], all characters will be displayed.
- [b]Note:[/b] Setting this property updates [member percent_visible] based on current [method get_total_character_count].
+ The number of characters to display. If set to [code]-1[/code], all characters are displayed. This can be useful when animating the text appearing in a dialog box.
+ [b]Note:[/b] Setting this property updates [member visible_ratio] accordingly.
</member>
<member name="visible_characters_behavior" type="int" setter="set_visible_characters_behavior" getter="get_visible_characters_behavior" enum="TextServer.VisibleCharactersBehavior" default="0">
- Sets the clipping behavior when [member visible_characters] or [member percent_visible] is set. See [enum TextServer.VisibleCharactersBehavior] for more info.
+ Sets the clipping behavior when [member visible_characters] or [member visible_ratio] is set. See [enum TextServer.VisibleCharactersBehavior] for more info.
+ </member>
+ <member name="visible_ratio" type="float" setter="set_visible_ratio" getter="get_visible_ratio" default="1.0">
+ The fraction of characters to display, relative to the total number of characters (see [method get_total_character_count]). If set to [code]1.0[/code], all characters are displayed. If set to [code]0.5[/code], only half of the characters will be displayed. This can be useful when animating the text appearing in a dialog box.
+ [b]Note:[/b] Setting this property updates [member visible_characters] accordingly.
</member>
</members>
<signals>
@@ -627,8 +626,8 @@
<theme_item name="font_outline_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
The default tint of text outline.
</theme_item>
- <theme_item name="font_selected_color" data_type="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 name="font_selected_color" data_type="color" type="Color" default="Color(0, 0, 0, 0)">
+ The color of selected text, used when [member selection_enabled] is [code]true[/code]. If equal to [code]Color(0, 0, 0, 0)[/code], it will be ignored.
</theme_item>
<theme_item name="font_shadow_color" data_type="color" type="Color" default="Color(0, 0, 0, 0)">
The color of the font's shadow.
@@ -666,6 +665,12 @@
<theme_item name="table_v_separation" data_type="constant" type="int" default="3">
The vertical separation of elements in a table.
</theme_item>
+ <theme_item name="text_highlight_h_padding" data_type="constant" type="int" default="3">
+ The horizontal padding around a highlighting and background color box.
+ </theme_item>
+ <theme_item name="text_highlight_v_padding" data_type="constant" type="int" default="3">
+ The vertical padding around a highlighting and background color box.
+ </theme_item>
<theme_item name="bold_font" data_type="font" type="Font">
The font used for bold text.
</theme_item>
diff --git a/doc/classes/RigidDynamicBody2D.xml b/doc/classes/RigidBody2D.xml
index c50da89a26..6e3535f14a 100644
--- a/doc/classes/RigidDynamicBody2D.xml
+++ b/doc/classes/RigidBody2D.xml
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="RigidDynamicBody2D" inherits="PhysicsBody2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+<class name="RigidBody2D" inherits="PhysicsBody2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Physics Body which is moved by 2D physics simulation. Useful for objects that have gravity and can be pushed by other objects.
</brief_description>
<description>
- This node implements simulated 2D physics. You do not control a RigidDynamicBody2D 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.
+ 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.
You can switch the body's behavior using [member lock_rotation], [member freeze], and [member freeze_mode].
- [b]Note:[/b] You should not change a RigidDynamicBody2D'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.
+ [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].
</description>
@@ -36,7 +36,7 @@
<param index="1" name="position" type="Vector2" default="Vector2(0, 0)" />
<description>
Adds a constant positioned force to the body that keeps being applied over time until cleared with [code]constant_force = Vector2(0, 0)[/code].
- [code]position[/code] is the offset from the body origin in global coordinates.
+ [param position] is the offset from the body origin in global coordinates.
</description>
</method>
<method name="add_constant_torque">
@@ -69,7 +69,7 @@
<param index="1" name="position" type="Vector2" default="Vector2(0, 0)" />
<description>
Applies a positioned force to the body. A force is time dependent and meant to be applied every physics update.
- [code]position[/code] is the offset from the body origin in global coordinates.
+ [param position] is the offset from the body origin in global coordinates.
</description>
</method>
<method name="apply_impulse">
@@ -79,7 +79,7 @@
<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).
- [code]position[/code] is the offset from the body origin in global coordinates.
+ [param position] is the offset from the body origin in global coordinates.
</description>
</method>
<method name="apply_torque">
@@ -87,6 +87,7 @@
<param index="0" name="torque" type="float" />
<description>
Applies a rotational force without affecting position. A force is time dependent and meant to be applied every physics update.
+ [b]Note:[/b] [member inertia] is required for this to work. To have [member inertia], an active [CollisionShape2D] must be a child of the node, or you can manually set [member inertia].
</description>
</method>
<method name="apply_torque_impulse">
@@ -95,15 +96,23 @@
<description>
Applies a rotational impulse to the body without affecting the position.
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).
+ [b]Note:[/b] [member inertia] is required for this to work. To have [member inertia], an active [CollisionShape2D] must be a child of the node, or you can manually set [member inertia].
</description>
</method>
<method name="get_colliding_bodies" qualifiers="const">
<return type="Node2D[]" />
<description>
- Returns a list of the bodies colliding with this one. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions.
+ Returns a list of the bodies colliding with this one. Requires [member contact_monitor] to be set to [code]true[/code] and [member max_contacts_reported] to be set high enough to detect all the collisions.
[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_contact_count" qualifiers="const">
+ <return type="int" />
+ <description>
+ Returns the number of contacts this body has with other bodies. By default, this returns 0 unless bodies are configured to monitor contacts (see [member contact_monitor]).
+ [b]Note:[/b] To retrieve the colliding bodies, use [method get_colliding_bodies].
+ </description>
+ </method>
<method name="set_axis_velocity">
<return type="void" />
<param index="0" name="axis_velocity" type="Vector2" />
@@ -117,7 +126,7 @@
Damps the body's rotation. By default, the body will use the [b]Default Angular Damp[/b] in [b]Project &gt; Project Settings &gt; Physics &gt; 2d[/b] or any value override set by an [Area2D] the body is in. Depending on [member angular_damp_mode], you can set [member angular_damp] to be added to or to replace the body's damping value.
See [member ProjectSettings.physics/2d/default_angular_damp] for more details about damping.
</member>
- <member name="angular_damp_mode" type="int" setter="set_angular_damp_mode" getter="get_angular_damp_mode" enum="RigidDynamicBody2D.DampMode" default="0">
+ <member name="angular_damp_mode" type="int" setter="set_angular_damp_mode" getter="get_angular_damp_mode" enum="RigidBody2D.DampMode" default="0">
Defines how [member angular_damp] is applied. See [enum DampMode] for possible values.
</member>
<member name="angular_velocity" type="float" setter="set_angular_velocity" getter="get_angular_velocity" default="0.0">
@@ -130,7 +139,7 @@
The body's custom center of mass, relative to the body's origin position, when [member center_of_mass_mode] is set to [constant CENTER_OF_MASS_MODE_CUSTOM]. This is the balanced point of the body, where applied forces only cause linear acceleration. Applying forces outside of the center of mass causes angular acceleration.
When [member center_of_mass_mode] is set to [constant CENTER_OF_MASS_MODE_AUTO] (default value), the center of mass is automatically computed.
</member>
- <member name="center_of_mass_mode" type="int" setter="set_center_of_mass_mode" getter="get_center_of_mass_mode" enum="RigidDynamicBody2D.CenterOfMassMode" default="0">
+ <member name="center_of_mass_mode" type="int" setter="set_center_of_mass_mode" getter="get_center_of_mass_mode" enum="RigidBody2D.CenterOfMassMode" default="0">
Defines the way the body's center of mass is set. See [enum CenterOfMassMode] for possible values.
</member>
<member name="constant_force" type="Vector2" setter="set_constant_force" getter="get_constant_force" default="Vector2(0, 0)">
@@ -142,13 +151,10 @@
See [method add_constant_torque].
</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 RigidDynamicBody2D. See also [member contacts_reported].
+ If [code]true[/code], the RigidBody2D will emit signals when it collides with another RigidBody2D.
+ [b]Note:[/b] By default the maximum contacts reported is set to 0, meaning nothing will be recorded, see [member max_contacts_reported].
</member>
- <member name="contacts_reported" type="int" setter="set_max_contacts_reported" getter="get_max_contacts_reported" default="0">
- The maximum number of contacts that will be recorded. Requires [member contact_monitor] to be set to [code]true[/code].
- [b]Note:[/b] The number of contacts is different from the number of collisions. Collisions between parallel edges will result in two contacts (one at each end).
- </member>
- <member name="continuous_cd" type="int" setter="set_continuous_collision_detection_mode" getter="get_continuous_collision_detection_mode" enum="RigidDynamicBody2D.CCDMode" default="0">
+ <member name="continuous_cd" type="int" setter="set_continuous_collision_detection_mode" getter="get_continuous_collision_detection_mode" enum="RigidBody2D.CCDMode" default="0">
Continuous collision detection mode.
Continuous collision detection tries to predict where a moving body will collide instead of moving it and correcting its movement after collision. Continuous collision detection is slower, but more precise and misses fewer collisions with small, fast-moving objects. Raycasting and shapecasting methods are available. See [enum CCDMode] for details.
</member>
@@ -160,7 +166,7 @@
See [member freeze_mode] to set the body's behavior when frozen.
For a body that is always frozen, use [StaticBody2D] or [AnimatableBody2D] instead.
</member>
- <member name="freeze_mode" type="int" setter="set_freeze_mode" getter="get_freeze_mode" enum="RigidDynamicBody2D.FreezeMode" default="0">
+ <member name="freeze_mode" type="int" setter="set_freeze_mode" getter="get_freeze_mode" enum="RigidBody2D.FreezeMode" default="0">
The body's freeze mode. Can be used to set the body's behavior when [member freeze] is enabled. See [enum FreezeMode] for possible values.
For a body that is always frozen, use [StaticBody2D] or [AnimatableBody2D] instead.
</member>
@@ -175,7 +181,7 @@
Damps the body's movement. By default, the body will use the [b]Default Linear Damp[/b] in [b]Project &gt; Project Settings &gt; Physics &gt; 2d[/b] or any value override set by an [Area2D] the body is in. Depending on [member linear_damp_mode], you can set [member linear_damp] to be added to or to replace the body's damping value.
See [member ProjectSettings.physics/2d/default_linear_damp] for more details about damping.
</member>
- <member name="linear_damp_mode" type="int" setter="set_linear_damp_mode" getter="get_linear_damp_mode" enum="RigidDynamicBody2D.DampMode" default="0">
+ <member name="linear_damp_mode" type="int" setter="set_linear_damp_mode" getter="get_linear_damp_mode" enum="RigidBody2D.DampMode" default="0">
Defines how [member linear_damp] is applied. See [enum DampMode] for possible values.
</member>
<member name="linear_velocity" type="Vector2" setter="set_linear_velocity" getter="get_linear_velocity" default="Vector2(0, 0)">
@@ -187,6 +193,10 @@
<member name="mass" type="float" setter="set_mass" getter="get_mass" default="1.0">
The body's mass.
</member>
+ <member name="max_contacts_reported" type="int" setter="set_max_contacts_reported" getter="get_max_contacts_reported" default="0">
+ The maximum number of contacts that will be recorded. Requires a value greater than 0 and [member contact_monitor] to be set to [code]true[/code] to start to register contacts. Use [method get_contact_count] to retrieve the count or [method get_colliding_bodies] to retrieve bodies that have been collided with.
+ [b]Note:[/b] The number of contacts is different from the number of collisions. Collisions between parallel edges will result in two contacts (one at each end), and collisions between parallel faces will result in four contacts (one at each corner).
+ </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.
If a material is assigned to this property, it will be used instead of any other physics material, such as an inherited one.
@@ -199,15 +209,15 @@
<signal name="body_entered">
<param index="0" name="body" type="Node" />
<description>
- Emitted when a collision with another [PhysicsBody2D] or [TileMap] occurs. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions. [TileMap]s are detected if the [TileSet] has Collision [Shape2D]s.
- [code]body[/code] the [Node], if it exists in the tree, of the other [PhysicsBody2D] or [TileMap].
+ Emitted when a collision with another [PhysicsBody2D] or [TileMap] occurs. Requires [member contact_monitor] to be set to [code]true[/code] and [member max_contacts_reported] to be set high enough to detect all the collisions. [TileMap]s are detected if the [TileSet] has Collision [Shape2D]s.
+ [param body] the [Node], if it exists in the tree, of the other [PhysicsBody2D] or [TileMap].
</description>
</signal>
<signal name="body_exited">
<param index="0" name="body" type="Node" />
<description>
- Emitted when the collision with another [PhysicsBody2D] or [TileMap] ends. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions. [TileMap]s are detected if the [TileSet] has Collision [Shape2D]s.
- [code]body[/code] the [Node], if it exists in the tree, of the other [PhysicsBody2D] or [TileMap].
+ Emitted when the collision with another [PhysicsBody2D] or [TileMap] ends. Requires [member contact_monitor] to be set to [code]true[/code] and [member max_contacts_reported] to be set high enough to detect all the collisions. [TileMap]s are detected if the [TileSet] has Collision [Shape2D]s.
+ [param body] the [Node], if it exists in the tree, of the other [PhysicsBody2D] or [TileMap].
</description>
</signal>
<signal name="body_shape_entered">
@@ -216,11 +226,11 @@
<param index="2" name="body_shape_index" type="int" />
<param index="3" name="local_shape_index" type="int" />
<description>
- Emitted when one of this RigidDynamicBody2D's [Shape2D]s collides with another [PhysicsBody2D] or [TileMap]'s [Shape2D]s. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions. [TileMap]s are detected if the [TileSet] has Collision [Shape2D]s.
- [code]body_rid[/code] the [RID] of the other [PhysicsBody2D] or [TileSet]'s [CollisionObject2D] used by the [PhysicsServer2D].
- [code]body[/code] the [Node], if it exists in the tree, of the other [PhysicsBody2D] or [TileMap].
- [code]body_shape_index[/code] the index of the [Shape2D] of the other [PhysicsBody2D] or [TileMap] used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with [code]body.shape_owner_get_owner(body.shape_find_owner(body_shape_index))[/code].
- [code]local_shape_index[/code] the index of the [Shape2D] of this RigidDynamicBody2D used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with [code]self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))[/code].
+ Emitted when one of this RigidBody2D's [Shape2D]s collides with another [PhysicsBody2D] or [TileMap]'s [Shape2D]s. Requires [member contact_monitor] to be set to [code]true[/code] and [member max_contacts_reported] to be set high enough to detect all the collisions. [TileMap]s are detected if the [TileSet] has Collision [Shape2D]s.
+ [param body_rid] the [RID] of the other [PhysicsBody2D] or [TileSet]'s [CollisionObject2D] used by the [PhysicsServer2D].
+ [param body] the [Node], if it exists in the tree, of the other [PhysicsBody2D] or [TileMap].
+ [param body_shape_index] the index of the [Shape2D] of the other [PhysicsBody2D] or [TileMap] used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with [code]body.shape_owner_get_owner(body.shape_find_owner(body_shape_index))[/code].
+ [param local_shape_index] the index of the [Shape2D] of this RigidBody2D used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with [code]self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))[/code].
</description>
</signal>
<signal name="body_shape_exited">
@@ -229,11 +239,11 @@
<param index="2" name="body_shape_index" type="int" />
<param index="3" name="local_shape_index" type="int" />
<description>
- Emitted when the collision between one of this RigidDynamicBody2D's [Shape2D]s and another [PhysicsBody2D] or [TileMap]'s [Shape2D]s ends. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions. [TileMap]s are detected if the [TileSet] has Collision [Shape2D]s.
- [code]body_rid[/code] the [RID] of the other [PhysicsBody2D] or [TileSet]'s [CollisionObject2D] used by the [PhysicsServer2D].
- [code]body[/code] the [Node], if it exists in the tree, of the other [PhysicsBody2D] or [TileMap].
- [code]body_shape_index[/code] the index of the [Shape2D] of the other [PhysicsBody2D] or [TileMap] used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with [code]body.shape_owner_get_owner(body.shape_find_owner(body_shape_index))[/code].
- [code]local_shape_index[/code] the index of the [Shape2D] of this RigidDynamicBody2D used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with [code]self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))[/code].
+ Emitted when the collision between one of this RigidBody2D's [Shape2D]s and another [PhysicsBody2D] or [TileMap]'s [Shape2D]s ends. Requires [member contact_monitor] to be set to [code]true[/code] and [member max_contacts_reported] to be set high enough to detect all the collisions. [TileMap]s are detected if the [TileSet] has Collision [Shape2D]s.
+ [param body_rid] the [RID] of the other [PhysicsBody2D] or [TileSet]'s [CollisionObject2D] used by the [PhysicsServer2D].
+ [param body] the [Node], if it exists in the tree, of the other [PhysicsBody2D] or [TileMap].
+ [param body_shape_index] the index of the [Shape2D] of the other [PhysicsBody2D] or [TileMap] used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with [code]body.shape_owner_get_owner(body.shape_find_owner(body_shape_index))[/code].
+ [param local_shape_index] the index of the [Shape2D] of this RigidBody2D used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with [code]self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))[/code].
</description>
</signal>
<signal name="sleeping_state_changed">
diff --git a/doc/classes/RigidDynamicBody3D.xml b/doc/classes/RigidBody3D.xml
index 5c89dbbf44..8380d56de3 100644
--- a/doc/classes/RigidDynamicBody3D.xml
+++ b/doc/classes/RigidBody3D.xml
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="RigidDynamicBody3D" inherits="PhysicsBody3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+<class name="RigidBody3D" inherits="PhysicsBody3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Physics Body which is moved by 3D physics simulation. Useful for objects that have gravity and can be pushed by other objects.
</brief_description>
<description>
- This is the node that implements full 3D physics. This means that you do not control a RigidDynamicBody3D directly. Instead, you can apply forces to it (gravity, impulses, etc.), and the physics simulation will calculate the resulting movement, collision, bouncing, rotating, etc.
+ 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.
You can switch the body's behavior using [member lock_rotation], [member freeze], and [member freeze_mode].
- [b]Note:[/b] Don't change a RigidDynamicBody3D'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.
+ [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].
</description>
<tutorials>
@@ -36,7 +36,7 @@
<param index="1" name="position" type="Vector3" default="Vector3(0, 0, 0)" />
<description>
Adds a constant positioned force to the body that keeps being applied over time until cleared with [code]constant_force = Vector3(0, 0, 0)[/code].
- [code]position[/code] is the offset from the body origin in global coordinates.
+ [param position] is the offset from the body origin in global coordinates.
</description>
</method>
<method name="add_constant_torque">
@@ -69,7 +69,7 @@
<param index="1" name="position" type="Vector3" default="Vector3(0, 0, 0)" />
<description>
Applies a positioned force to the body. A force is time dependent and meant to be applied every physics update.
- [code]position[/code] is the offset from the body origin in global coordinates.
+ [param position] is the offset from the body origin in global coordinates.
</description>
</method>
<method name="apply_impulse">
@@ -79,7 +79,7 @@
<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).
- [code]position[/code] is the offset from the body origin in global coordinates.
+ [param position] is the offset from the body origin in global coordinates.
</description>
</method>
<method name="apply_torque">
@@ -87,6 +87,7 @@
<param index="0" name="torque" type="Vector3" />
<description>
Applies a rotational force without affecting position. A force is time dependent and meant to be applied every physics update.
+ [b]Note:[/b] [member inertia] is required for this to work. To have [member inertia], an active [CollisionShape3D] must be a child of the node, or you can manually set [member inertia].
</description>
</method>
<method name="apply_torque_impulse">
@@ -95,19 +96,27 @@
<description>
Applies a rotational impulse to the body without affecting the position.
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).
+ [b]Note:[/b] [member inertia] is required for this to work. To have [member inertia], an active [CollisionShape3D] must be a child of the node, or you can manually set [member inertia].
</description>
</method>
<method name="get_colliding_bodies" qualifiers="const">
- <return type="Array" />
+ <return type="Node3D[]" />
<description>
- Returns a list of the bodies colliding with this one. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions.
+ Returns a list of the bodies colliding with this one. Requires [member contact_monitor] to be set to [code]true[/code] and [member max_contacts_reported] to be set high enough to detect all the collisions.
[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_contact_count" qualifiers="const">
+ <return type="int" />
+ <description>
+ Returns the number of contacts this body has with other bodies. By default, this returns 0 unless bodies are configured to monitor contacts (see [member contact_monitor]).
+ [b]Note:[/b] To retrieve the colliding bodies, use [method get_colliding_bodies].
+ </description>
+ </method>
<method name="get_inverse_inertia_tensor" qualifiers="const">
<return type="Basis" />
<description>
- Returns the inverse inertia tensor basis. This is used to calculate the angular acceleration resulting from a torque applied to the [RigidDynamicBody3D].
+ 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_velocity">
@@ -123,11 +132,11 @@
Damps the body's rotation. By default, the body will use the [b]Default Angular Damp[/b] in [b]Project &gt; Project Settings &gt; Physics &gt; 3d[/b] or any value override set by an [Area3D] the body is in. Depending on [member angular_damp_mode], you can set [member angular_damp] to be added to or to replace the body's damping value.
See [member ProjectSettings.physics/3d/default_angular_damp] for more details about damping.
</member>
- <member name="angular_damp_mode" type="int" setter="set_angular_damp_mode" getter="get_angular_damp_mode" enum="RigidDynamicBody3D.DampMode" default="0">
+ <member name="angular_damp_mode" type="int" setter="set_angular_damp_mode" getter="get_angular_damp_mode" enum="RigidBody3D.DampMode" default="0">
Defines how [member angular_damp] is applied. See [enum DampMode] for possible values.
</member>
<member name="angular_velocity" type="Vector3" setter="set_angular_velocity" getter="get_angular_velocity" default="Vector3(0, 0, 0)">
- The RigidDynamicBody3D's rotational velocity in [i]radians[/i] per second.
+ The RigidBody3D's rotational velocity in [i]radians[/i] per second.
</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].
@@ -136,7 +145,7 @@
The body's custom center of mass, relative to the body's origin position, when [member center_of_mass_mode] is set to [constant CENTER_OF_MASS_MODE_CUSTOM]. This is the balanced point of the body, where applied forces only cause linear acceleration. Applying forces outside of the center of mass causes angular acceleration.
When [member center_of_mass_mode] is set to [constant CENTER_OF_MASS_MODE_AUTO] (default value), the center of mass is automatically computed.
</member>
- <member name="center_of_mass_mode" type="int" setter="set_center_of_mass_mode" getter="get_center_of_mass_mode" enum="RigidDynamicBody3D.CenterOfMassMode" default="0">
+ <member name="center_of_mass_mode" type="int" setter="set_center_of_mass_mode" getter="get_center_of_mass_mode" enum="RigidBody3D.CenterOfMassMode" default="0">
Defines the way the body's center of mass is set. See [enum CenterOfMassMode] for possible values.
</member>
<member name="constant_force" type="Vector3" setter="set_constant_force" getter="get_constant_force" default="Vector3(0, 0, 0)">
@@ -148,11 +157,8 @@
See [method add_constant_torque].
</member>
<member name="contact_monitor" type="bool" setter="set_contact_monitor" getter="is_contact_monitor_enabled" default="false">
- If [code]true[/code], the RigidDynamicBody3D will emit signals when it collides with another RigidDynamicBody3D. See also [member contacts_reported].
- </member>
- <member name="contacts_reported" type="int" setter="set_max_contacts_reported" getter="get_max_contacts_reported" default="0">
- The maximum number of contacts that will be recorded. Requires [member contact_monitor] to be set to [code]true[/code].
- [b]Note:[/b] The number of contacts is different from the number of collisions. Collisions between parallel edges will result in two contacts (one at each end), and collisions between parallel faces will result in four contacts (one at each corner).
+ If [code]true[/code], the RigidBody3D will emit signals when it collides with another RigidBody3D.
+ [b]Note:[/b] By default the maximum contacts reported is set to 0, meaning nothing will be recorded, see [member max_contacts_reported].
</member>
<member name="continuous_cd" type="bool" setter="set_use_continuous_collision_detection" getter="is_using_continuous_collision_detection" default="false">
If [code]true[/code], continuous collision detection is used.
@@ -166,12 +172,12 @@
See [member freeze_mode] to set the body's behavior when frozen.
For a body that is always frozen, use [StaticBody3D] or [AnimatableBody3D] instead.
</member>
- <member name="freeze_mode" type="int" setter="set_freeze_mode" getter="get_freeze_mode" enum="RigidDynamicBody3D.FreezeMode" default="0">
+ <member name="freeze_mode" type="int" setter="set_freeze_mode" getter="get_freeze_mode" enum="RigidBody3D.FreezeMode" default="0">
The body's freeze mode. Can be used to set the body's behavior when [member freeze] is enabled. See [enum FreezeMode] for possible values.
For a body that is always frozen, use [StaticBody3D] or [AnimatableBody3D] instead.
</member>
<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 RigidDynamicBody3D'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.
+ This is multiplied by the global 3D gravity setting found in [b]Project &gt; Project Settings &gt; Physics &gt; 3d[/b] to produce RigidBody3D'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="inertia" type="Vector3" setter="set_inertia" getter="get_inertia" default="Vector3(0, 0, 0)">
The body's moment of inertia. This is like mass, but for rotation: it determines how much torque it takes to rotate the body on each axis. The moment of inertia is usually computed automatically from the mass and the shapes, but this property allows you to set a custom value.
@@ -181,7 +187,7 @@
Damps the body's movement. By default, the body will use the [b]Default Linear Damp[/b] in [b]Project &gt; Project Settings &gt; Physics &gt; 3d[/b] or any value override set by an [Area3D] the body is in. Depending on [member linear_damp_mode], you can set [member linear_damp] to be added to or to replace the body's damping value.
See [member ProjectSettings.physics/3d/default_linear_damp] for more details about damping.
</member>
- <member name="linear_damp_mode" type="int" setter="set_linear_damp_mode" getter="get_linear_damp_mode" enum="RigidDynamicBody3D.DampMode" default="0">
+ <member name="linear_damp_mode" type="int" setter="set_linear_damp_mode" getter="get_linear_damp_mode" enum="RigidBody3D.DampMode" default="0">
Defines how [member linear_damp] is applied. See [enum DampMode] for possible values.
</member>
<member name="linear_velocity" type="Vector3" setter="set_linear_velocity" getter="get_linear_velocity" default="Vector3(0, 0, 0)">
@@ -193,6 +199,10 @@
<member name="mass" type="float" setter="set_mass" getter="get_mass" default="1.0">
The body's mass.
</member>
+ <member name="max_contacts_reported" type="int" setter="set_max_contacts_reported" getter="get_max_contacts_reported" default="0">
+ The maximum number of contacts that will be recorded. Requires a value greater than 0 and [member contact_monitor] to be set to [code]true[/code] to start to register contacts. Use [method get_contact_count] to retrieve the count or [method get_colliding_bodies] to retrieve bodies that have been collided with.
+ [b]Note:[/b] The number of contacts is different from the number of collisions. Collisions between parallel edges will result in two contacts (one at each end), and collisions between parallel faces will result in four contacts (one at each corner).
+ </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.
If a material is assigned to this property, it will be used instead of any other physics material, such as an inherited one.
@@ -205,15 +215,15 @@
<signal name="body_entered">
<param index="0" name="body" type="Node" />
<description>
- Emitted when a collision with another [PhysicsBody3D] or [GridMap] occurs. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions. [GridMap]s are detected if the [MeshLibrary] has Collision [Shape3D]s.
- [code]body[/code] the [Node], if it exists in the tree, of the other [PhysicsBody3D] or [GridMap].
+ Emitted when a collision with another [PhysicsBody3D] or [GridMap] occurs. Requires [member contact_monitor] to be set to [code]true[/code] and [member max_contacts_reported] to be set high enough to detect all the collisions. [GridMap]s are detected if the [MeshLibrary] has Collision [Shape3D]s.
+ [param body] the [Node], if it exists in the tree, of the other [PhysicsBody3D] or [GridMap].
</description>
</signal>
<signal name="body_exited">
<param index="0" name="body" type="Node" />
<description>
- Emitted when the collision with another [PhysicsBody3D] or [GridMap] ends. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions. [GridMap]s are detected if the [MeshLibrary] has Collision [Shape3D]s.
- [code]body[/code] the [Node], if it exists in the tree, of the other [PhysicsBody3D] or [GridMap].
+ Emitted when the collision with another [PhysicsBody3D] or [GridMap] ends. Requires [member contact_monitor] to be set to [code]true[/code] and [member max_contacts_reported] to be set high enough to detect all the collisions. [GridMap]s are detected if the [MeshLibrary] has Collision [Shape3D]s.
+ [param body] the [Node], if it exists in the tree, of the other [PhysicsBody3D] or [GridMap].
</description>
</signal>
<signal name="body_shape_entered">
@@ -222,11 +232,11 @@
<param index="2" name="body_shape_index" type="int" />
<param index="3" name="local_shape_index" type="int" />
<description>
- Emitted when one of this RigidDynamicBody3D's [Shape3D]s collides with another [PhysicsBody3D] or [GridMap]'s [Shape3D]s. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions. [GridMap]s are detected if the [MeshLibrary] has Collision [Shape3D]s.
- [code]body_rid[/code] the [RID] of the other [PhysicsBody3D] or [MeshLibrary]'s [CollisionObject3D] used by the [PhysicsServer3D].
- [code]body[/code] the [Node], if it exists in the tree, of the other [PhysicsBody3D] or [GridMap].
- [code]body_shape_index[/code] the index of the [Shape3D] of the other [PhysicsBody3D] or [GridMap] used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with [code]body.shape_owner_get_owner(body.shape_find_owner(body_shape_index))[/code].
- [code]local_shape_index[/code] the index of the [Shape3D] of this RigidDynamicBody3D used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with [code]self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))[/code].
+ Emitted when one of this RigidBody3D's [Shape3D]s collides with another [PhysicsBody3D] or [GridMap]'s [Shape3D]s. Requires [member contact_monitor] to be set to [code]true[/code] and [member max_contacts_reported] to be set high enough to detect all the collisions. [GridMap]s are detected if the [MeshLibrary] has Collision [Shape3D]s.
+ [param body_rid] the [RID] of the other [PhysicsBody3D] or [MeshLibrary]'s [CollisionObject3D] used by the [PhysicsServer3D].
+ [param body] the [Node], if it exists in the tree, of the other [PhysicsBody3D] or [GridMap].
+ [param body_shape_index] the index of the [Shape3D] of the other [PhysicsBody3D] or [GridMap] used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with [code]body.shape_owner_get_owner(body.shape_find_owner(body_shape_index))[/code].
+ [param local_shape_index] the index of the [Shape3D] of this RigidBody3D used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with [code]self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))[/code].
</description>
</signal>
<signal name="body_shape_exited">
@@ -235,11 +245,11 @@
<param index="2" name="body_shape_index" type="int" />
<param index="3" name="local_shape_index" type="int" />
<description>
- Emitted when the collision between one of this RigidDynamicBody3D's [Shape3D]s and another [PhysicsBody3D] or [GridMap]'s [Shape3D]s ends. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions. [GridMap]s are detected if the [MeshLibrary] has Collision [Shape3D]s.
- [code]body_rid[/code] the [RID] of the other [PhysicsBody3D] or [MeshLibrary]'s [CollisionObject3D] used by the [PhysicsServer3D]. [GridMap]s are detected if the Meshes have [Shape3D]s.
- [code]body[/code] the [Node], if it exists in the tree, of the other [PhysicsBody3D] or [GridMap].
- [code]body_shape_index[/code] the index of the [Shape3D] of the other [PhysicsBody3D] or [GridMap] used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with [code]body.shape_owner_get_owner(body.shape_find_owner(body_shape_index))[/code].
- [code]local_shape_index[/code] the index of the [Shape3D] of this RigidDynamicBody3D used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with [code]self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))[/code].
+ Emitted when the collision between one of this RigidBody3D's [Shape3D]s and another [PhysicsBody3D] or [GridMap]'s [Shape3D]s ends. Requires [member contact_monitor] to be set to [code]true[/code] and [member max_contacts_reported] to be set high enough to detect all the collisions. [GridMap]s are detected if the [MeshLibrary] has Collision [Shape3D]s.
+ [param body_rid] the [RID] of the other [PhysicsBody3D] or [MeshLibrary]'s [CollisionObject3D] used by the [PhysicsServer3D]. [GridMap]s are detected if the Meshes have [Shape3D]s.
+ [param body] the [Node], if it exists in the tree, of the other [PhysicsBody3D] or [GridMap].
+ [param body_shape_index] the index of the [Shape3D] of the other [PhysicsBody3D] or [GridMap] used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with [code]body.shape_owner_get_owner(body.shape_find_owner(body_shape_index))[/code].
+ [param local_shape_index] the index of the [Shape3D] of this RigidBody3D used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with [code]self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))[/code].
</description>
</signal>
<signal name="sleeping_state_changed">
diff --git a/doc/classes/SceneState.xml b/doc/classes/SceneState.xml
index f171d29b84..acb29838ba 100644
--- a/doc/classes/SceneState.xml
+++ b/doc/classes/SceneState.xml
@@ -14,7 +14,7 @@
<return type="Array" />
<param index="0" name="idx" type="int" />
<description>
- Returns the list of bound parameters for the signal at [code]idx[/code].
+ Returns the list of bound parameters for the signal at [param idx].
</description>
</method>
<method name="get_connection_count" qualifiers="const">
@@ -28,42 +28,42 @@
<return type="int" />
<param index="0" name="idx" type="int" />
<description>
- Returns the connection flags for the signal at [code]idx[/code]. See [enum Object.ConnectFlags] constants.
+ Returns the connection flags for the signal at [param idx]. See [enum Object.ConnectFlags] constants.
</description>
</method>
<method name="get_connection_method" qualifiers="const">
<return type="StringName" />
<param index="0" name="idx" type="int" />
<description>
- Returns the method connected to the signal at [code]idx[/code].
+ Returns the method connected to the signal at [param idx].
</description>
</method>
<method name="get_connection_signal" qualifiers="const">
<return type="StringName" />
<param index="0" name="idx" type="int" />
<description>
- Returns the name of the signal at [code]idx[/code].
+ Returns the name of the signal at [param idx].
</description>
</method>
<method name="get_connection_source" qualifiers="const">
<return type="NodePath" />
<param index="0" name="idx" type="int" />
<description>
- Returns the path to the node that owns the signal at [code]idx[/code], relative to the root node.
+ Returns the path to the node that owns the signal at [param idx], relative to the root node.
</description>
</method>
<method name="get_connection_target" qualifiers="const">
<return type="NodePath" />
<param index="0" name="idx" type="int" />
<description>
- Returns the path to the node that owns the method connected to the signal at [code]idx[/code], relative to the root node.
+ Returns the path to the node that owns the method connected to the signal at [param idx], relative to the root node.
</description>
</method>
<method name="get_connection_unbinds" qualifiers="const">
<return type="int" />
<param index="0" name="idx" type="int" />
<description>
- Returns the number of unbound parameters for the signal at [code]idx[/code].
+ Returns the number of unbound parameters for the signal at [param idx].
</description>
</method>
<method name="get_node_count" qualifiers="const">
@@ -77,42 +77,42 @@
<return type="PackedStringArray" />
<param index="0" name="idx" type="int" />
<description>
- Returns the list of group names associated with the node at [code]idx[/code].
+ Returns the list of group names associated with the node at [param idx].
</description>
</method>
<method name="get_node_index" qualifiers="const">
<return type="int" />
<param index="0" name="idx" type="int" />
<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 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.
+ 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 [param idx] argument used here and in other methods.
</description>
</method>
<method name="get_node_instance" qualifiers="const">
<return type="PackedScene" />
<param index="0" name="idx" type="int" />
<description>
- Returns a [PackedScene] for the node at [code]idx[/code] (i.e. the whole branch starting at this node, with its child nodes and resources), or [code]null[/code] if the node is not an instance.
+ Returns a [PackedScene] for the node at [param idx] (i.e. the whole branch starting at this node, with its child nodes and resources), or [code]null[/code] if the node is not an instance.
</description>
</method>
<method name="get_node_instance_placeholder" qualifiers="const">
<return type="String" />
<param index="0" name="idx" type="int" />
<description>
- Returns the path to the represented scene file if the node at [code]idx[/code] is an [InstancePlaceholder].
+ Returns the path to the represented scene file if the node at [param idx] is an [InstancePlaceholder].
</description>
</method>
<method name="get_node_name" qualifiers="const">
<return type="StringName" />
<param index="0" name="idx" type="int" />
<description>
- Returns the name of the node at [code]idx[/code].
+ Returns the name of the node at [param idx].
</description>
</method>
<method name="get_node_owner_path" qualifiers="const">
<return type="NodePath" />
<param index="0" name="idx" type="int" />
<description>
- Returns the path to the owner of the node at [code]idx[/code], relative to the root node.
+ Returns the path to the owner of the node at [param idx], relative to the root node.
</description>
</method>
<method name="get_node_path" qualifiers="const">
@@ -120,15 +120,15 @@
<param index="0" name="idx" type="int" />
<param index="1" name="for_parent" type="bool" default="false" />
<description>
- Returns the path to the node at [code]idx[/code].
- If [code]for_parent[/code] is [code]true[/code], returns the path of the [code]idx[/code] node's parent instead.
+ Returns the path to the node at [param idx].
+ If [param for_parent] is [code]true[/code], returns the path of the [param idx] node's parent instead.
</description>
</method>
<method name="get_node_property_count" qualifiers="const">
<return type="int" />
<param index="0" name="idx" type="int" />
<description>
- Returns the number of exported or overridden properties for the node at [code]idx[/code].
+ Returns the number of exported or overridden properties for the node at [param idx].
The [code]prop_idx[/code] argument used to query node property data in other [code]get_node_property_*[/code] methods in the interval [code][0, get_node_property_count() - 1][/code].
</description>
</method>
@@ -137,7 +137,7 @@
<param index="0" name="idx" type="int" />
<param index="1" name="prop_idx" type="int" />
<description>
- Returns the name of the property at [code]prop_idx[/code] for the node at [code]idx[/code].
+ Returns the name of the property at [param prop_idx] for the node at [param idx].
</description>
</method>
<method name="get_node_property_value" qualifiers="const">
@@ -145,21 +145,21 @@
<param index="0" name="idx" type="int" />
<param index="1" name="prop_idx" type="int" />
<description>
- Returns the value of the property at [code]prop_idx[/code] for the node at [code]idx[/code].
+ Returns the value of the property at [param prop_idx] for the node at [param idx].
</description>
</method>
<method name="get_node_type" qualifiers="const">
<return type="StringName" />
<param index="0" name="idx" type="int" />
<description>
- Returns the type of the node at [code]idx[/code].
+ Returns the type of the node at [param idx].
</description>
</method>
<method name="is_node_instance_placeholder" qualifiers="const">
<return type="bool" />
<param index="0" name="idx" type="int" />
<description>
- Returns [code]true[/code] if the node at [code]idx[/code] is an [InstancePlaceholder].
+ Returns [code]true[/code] if the node at [param idx] is an [InstancePlaceholder].
</description>
</method>
</methods>
diff --git a/doc/classes/SceneTree.xml b/doc/classes/SceneTree.xml
index dfa5704548..070b98f21d 100644
--- a/doc/classes/SceneTree.xml
+++ b/doc/classes/SceneTree.xml
@@ -18,7 +18,7 @@
<param index="0" name="group" type="StringName" />
<param index="1" name="method" type="StringName" />
<description>
- Calls [code]method[/code] on each member of the given group. You can pass arguments to [code]method[/code] by specifying them at the end of the method call. If a node doesn't have the given method or the argument list does not match (either in count or in types), it will be skipped.
+ Calls [param method] on each member of the given group. You can pass arguments to [param method] by specifying them at the end of the method call. If a node doesn't have the given method or the argument list does not match (either in count or in types), it will be skipped.
[b]Note:[/b] [method call_group] will call methods immediately on all members at once, which can cause stuttering if an expensive method is called on lots of members. To wait for one frame after [method call_group] was called, use [method call_group_flags] with the [constant GROUP_CALL_DEFERRED] flag.
</description>
</method>
@@ -28,38 +28,43 @@
<param index="1" name="group" type="StringName" />
<param index="2" name="method" type="StringName" />
<description>
- Calls [code]method[/code] on each member of the given group, respecting the given [enum GroupCallFlags]. You can pass arguments to [code]method[/code] by specifying them at the end of the method call. If a node doesn't have the given method or the argument list does not match (either in count or in types), it will be skipped.
+ Calls [param method] on each member of the given group, respecting the given [enum GroupCallFlags]. You can pass arguments to [param method] by specifying them at the end of the method call. If a node doesn't have the given method or the argument list does not match (either in count or in types), it will be skipped.
[codeblock]
# Call the method in a deferred manner and in reverse order.
get_tree().call_group_flags(SceneTree.GROUP_CALL_DEFERRED | SceneTree.GROUP_CALL_REVERSE)
[/codeblock]
- [b]Note:[/b] Group call flags are used to control the method calling behavior. By default, methods will be called immediately in a way similar to [method call_group]. However, if the [constant GROUP_CALL_DEFERRED] flag is present in the [code]flags[/code] argument, methods will be called with a one-frame delay in a way similar to [method Object.set_deferred].
+ [b]Note:[/b] Group call flags are used to control the method calling behavior. By default, methods will be called immediately in a way similar to [method call_group]. However, if the [constant GROUP_CALL_DEFERRED] flag is present in the [param flags] argument, methods will be called with a one-frame delay in a way similar to [method Object.set_deferred].
</description>
</method>
- <method name="change_scene">
+ <method name="change_scene_to_file">
<return type="int" enum="Error" />
<param index="0" name="path" type="String" />
<description>
- Changes the running scene to the one at the given [code]path[/code], after loading it into a [PackedScene] and creating a new instance.
- Returns [constant OK] on success, [constant ERR_CANT_OPEN] if the [code]path[/code] cannot be loaded into a [PackedScene], or [constant ERR_CANT_CREATE] if that scene cannot be instantiated.
- [b]Note:[/b] The scene change is deferred, which means that the new scene node is added on the next idle frame. You won't be able to access it immediately after the [method change_scene] call.
+ Changes the running scene to the one at the given [param path], after loading it into a [PackedScene] and creating a new instance.
+ Returns [constant OK] on success, [constant ERR_CANT_OPEN] if the [param path] cannot be loaded into a [PackedScene], or [constant ERR_CANT_CREATE] if that scene cannot be instantiated.
+ [b]Note:[/b] The scene change is deferred, which means that the new scene node is added on the next idle frame. You won't be able to access it immediately after the [method change_scene_to_file] call.
</description>
</method>
- <method name="change_scene_to">
+ <method name="change_scene_to_packed">
<return type="int" enum="Error" />
<param index="0" name="packed_scene" type="PackedScene" />
<description>
Changes the running scene to a new instance of the given [PackedScene].
Returns [constant OK] on success or [constant ERR_CANT_CREATE] if the scene cannot be instantiated.
- [b]Note:[/b] The scene change is deferred, which means that the new scene node is added on the next idle frame. You won't be able to access it immediately after the [method change_scene_to] call.
+ [b]Note:[/b] The scene change is deferred, which means that the new scene node is added on the next idle frame. You won't be able to access it immediately after the [method change_scene_to_packed] call.
</description>
</method>
<method name="create_timer">
<return type="SceneTreeTimer" />
<param index="0" name="time_sec" type="float" />
<param index="1" name="process_always" type="bool" default="true" />
+ <param index="2" name="process_in_physics" type="bool" default="false" />
+ <param index="3" name="ignore_time_scale" type="bool" default="false" />
<description>
- Returns a [SceneTreeTimer] which will [signal SceneTreeTimer.timeout] after the given time in seconds elapsed in this [SceneTree]. If [code]process_always[/code] is set to [code]false[/code], pausing the [SceneTree] will also pause the timer.
+ Returns a [SceneTreeTimer] which will [signal SceneTreeTimer.timeout] after the given time in seconds elapsed in this [SceneTree].
+ If [code]process_always[/code] is set to [code]false[/code], pausing the [SceneTree] will also pause the timer.
+ If [code]process_in_physics[/code] is set to [code]true[/code], will update the [SceneTreeTimer] during the physics frame instead of the process frame (fixed framerate processing).
+ If [code]ignore_time_scale[/code] is set to [code]true[/code], will ignore [member Engine.time_scale] and update the [SceneTreeTimer] with the actual frame delta.
Commonly used to create a one-shot delay timer as in the following example:
[codeblocks]
[gdscript]
@@ -103,7 +108,7 @@
<return type="MultiplayerAPI" />
<param index="0" name="for_path" type="NodePath" default="NodePath(&quot;&quot;)" />
<description>
- Return the [MultiplayerAPI] configured for the given path, or the default one if [code]for_path[/code] is empty.
+ Return the [MultiplayerAPI] configured for the given path, or the default one if [param for_path] is empty.
</description>
</method>
<method name="get_node_count" qualifiers="const">
@@ -113,14 +118,14 @@
</description>
</method>
<method name="get_nodes_in_group">
- <return type="Array" />
+ <return type="Node[]" />
<param index="0" name="group" type="StringName" />
<description>
Returns a list of all nodes assigned to the given group.
</description>
</method>
<method name="get_processed_tweens">
- <return type="Array" />
+ <return type="Tween[]" />
<description>
Returns an array of currently existing [Tween]s in the [SceneTree] (both running and paused).
</description>
@@ -137,7 +142,7 @@
<param index="0" name="group" type="StringName" />
<param index="1" name="notification" type="int" />
<description>
- Sends the given notification to all members of the [code]group[/code].
+ Sends the given notification to all members of the [param group].
[b]Note:[/b] [method notify_group] will immediately notify all members at once, which can cause stuttering if an expensive method is called as a result of sending the notification lots of members. To wait for one frame, use [method notify_group_flags] with the [constant GROUP_CALL_DEFERRED] flag.
</description>
</method>
@@ -147,8 +152,8 @@
<param index="1" name="group" type="StringName" />
<param index="2" name="notification" type="int" />
<description>
- Sends the given notification to all members of the [code]group[/code], respecting the given [enum GroupCallFlags].
- [b]Note:[/b] Group call flags are used to control the notification sending behavior. By default, notifications will be sent immediately in a way similar to [method notify_group]. However, if the [constant GROUP_CALL_DEFERRED] flag is present in the [code]flags[/code] argument, notifications will be sent with a one-frame delay in a way similar to using [code]Object.call_deferred("notification", ...)[/code].
+ Sends the given notification to all members of the [param group], respecting the given [enum GroupCallFlags].
+ [b]Note:[/b] Group call flags are used to control the notification sending behavior. By default, notifications will be sent immediately in a way similar to [method notify_group]. However, if the [constant GROUP_CALL_DEFERRED] flag is present in the [param call_flags] argument, notifications will be sent with a one-frame delay in a way similar to using [code]Object.call_deferred("notification", ...)[/code].
</description>
</method>
<method name="queue_delete">
@@ -162,7 +167,7 @@
<return type="void" />
<param index="0" name="exit_code" type="int" default="0" />
<description>
- 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.
+ Quits the application at the end of the current iteration. Argument [param exit_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.
@@ -181,7 +186,7 @@
<param index="1" name="property" type="String" />
<param index="2" name="value" type="Variant" />
<description>
- Sets the given [code]property[/code] to [code]value[/code] on all members of the given group.
+ Sets the given [param property] to [param value] on all members of the given group.
[b]Note:[/b] [method set_group] will set the property immediately on all members at once, which can cause stuttering if a property with an expensive setter is set on lots of members. To wait for one frame, use [method set_group_flags] with the [constant GROUP_CALL_DEFERRED] flag.
</description>
</method>
@@ -192,8 +197,8 @@
<param index="2" name="property" type="String" />
<param index="3" name="value" type="Variant" />
<description>
- Sets the given [code]property[/code] to [code]value[/code] on all members of the given group, respecting the given [enum GroupCallFlags].
- [b]Note:[/b] Group call flags are used to control the property setting behavior. By default, properties will be set immediately in a way similar to [method set_group]. However, if the [constant GROUP_CALL_DEFERRED] flag is present in the [code]flags[/code] argument, properties will be set with a one-frame delay in a way similar to [method Object.call_deferred].
+ Sets the given [param property] to [param value] on all members of the given group, respecting the given [enum GroupCallFlags].
+ [b]Note:[/b] Group call flags are used to control the property setting behavior. By default, properties will be set immediately in a way similar to [method set_group]. However, if the [constant GROUP_CALL_DEFERRED] flag is present in the [param call_flags] argument, properties will be set with a one-frame delay in a way similar to [method Object.call_deferred].
</description>
</method>
<method name="set_multiplayer">
@@ -201,7 +206,7 @@
<param index="0" name="multiplayer" type="MultiplayerAPI" />
<param index="1" name="root_path" type="NodePath" default="NodePath(&quot;&quot;)" />
<description>
- Sets a custom [MultiplayerAPI] with the given [code]root_path[/code] (controlling also the relative subpaths), or override the default one if [code]root_path[/code] is empty.
+ Sets a custom [MultiplayerAPI] with the given [param root_path] (controlling also the relative subpaths), or override the default one if [param root_path] is empty.
</description>
</method>
</methods>
@@ -215,12 +220,15 @@
</member>
<member name="debug_collisions_hint" type="bool" setter="set_debug_collisions_hint" getter="is_debugging_collisions_hint" default="false">
If [code]true[/code], collision shapes will be visible when running the game from the editor for debugging purposes.
+ [b]Note:[/b] This property is not designed to be changed at run-time. Changing the value of [member debug_collisions_hint] while the project is running will not have the desired effect.
</member>
<member name="debug_navigation_hint" type="bool" setter="set_debug_navigation_hint" getter="is_debugging_navigation_hint" default="false">
If [code]true[/code], navigation polygons will be visible when running the game from the editor for debugging purposes.
+ [b]Note:[/b] This property is not designed to be changed at run-time. Changing the value of [member debug_navigation_hint] while the project is running will not have the desired effect.
</member>
<member name="debug_paths_hint" type="bool" setter="set_debug_paths_hint" getter="is_debugging_paths_hint" default="false">
If [code]true[/code], curves from [Path2D] and [Path3D] nodes will be visible when running the game from the editor for debugging purposes.
+ [b]Note:[/b] This property is not designed to be changed at run-time. Changing the value of [member debug_paths_hint] while the project is running will not have the desired effect.
</member>
<member name="edited_scene_root" type="Node" setter="set_edited_scene_root" getter="get_edited_scene_root">
The root of the edited scene.
diff --git a/doc/classes/Script.xml b/doc/classes/Script.xml
index f567a0c23c..b4b14c01c6 100644
--- a/doc/classes/Script.xml
+++ b/doc/classes/Script.xml
@@ -4,7 +4,7 @@
A class stored as a resource.
</brief_description>
<description>
- A class stored as a resource. A script extends the functionality of all objects that instance it.
+ A class stored as a resource. A script extends the functionality of all objects that instantiate it.
This is the base class for all scripts and should not be used directly. Trying to create a new script with this class will result in an error.
The [code]new[/code] method of a script subclass creates a new instance. [method Object.set_script] extends an existing object, if that object's class matches one of the script's base classes.
</description>
@@ -44,19 +44,19 @@
</description>
</method>
<method name="get_script_method_list">
- <return type="Array" />
+ <return type="Dictionary[]" />
<description>
Returns the list of methods in this [Script].
</description>
</method>
<method name="get_script_property_list">
- <return type="Array" />
+ <return type="Dictionary[]" />
<description>
Returns the list of properties in this [Script].
</description>
</method>
<method name="get_script_signal_list">
- <return type="Array" />
+ <return type="Dictionary[]" />
<description>
Returns the list of user signals defined in this [Script].
</description>
@@ -78,7 +78,7 @@
<return type="bool" />
<param index="0" name="base_object" type="Object" />
<description>
- Returns [code]true[/code] if [code]base_object[/code] is an instance of this script.
+ Returns [code]true[/code] if [param base_object] is an instance of this script.
</description>
</method>
<method name="is_tool" qualifiers="const">
diff --git a/doc/classes/ScriptEditor.xml b/doc/classes/ScriptEditor.xml
index 33ff054cce..becaff975e 100644
--- a/doc/classes/ScriptEditor.xml
+++ b/doc/classes/ScriptEditor.xml
@@ -22,13 +22,13 @@
</description>
</method>
<method name="get_open_script_editors" qualifiers="const">
- <return type="Array" />
+ <return type="ScriptEditorBase[]" />
<description>
Returns an array with all [ScriptEditorBase] objects which are currently open in editor.
</description>
</method>
<method name="get_open_scripts" qualifiers="const">
- <return type="Array" />
+ <return type="Script[]" />
<description>
Returns an array with all [Script] objects which are currently open in editor.
</description>
@@ -45,7 +45,7 @@
<param index="0" name="base_name" type="String" />
<param index="1" name="base_path" type="String" />
<description>
- Opens the script create dialog. The script will extend [code]base_name[/code]. The file extension can be omitted from [code]base_path[/code]. It will be added based on the selected scripting language.
+ Opens the script create dialog. The script will extend [param base_name]. The file extension can be omitted from [param base_path]. It will be added based on the selected scripting language.
</description>
</method>
<method name="register_syntax_highlighter">
diff --git a/doc/classes/ScriptEditorBase.xml b/doc/classes/ScriptEditorBase.xml
index c365e0971b..a3fcf53228 100644
--- a/doc/classes/ScriptEditorBase.xml
+++ b/doc/classes/ScriptEditorBase.xml
@@ -19,14 +19,14 @@
<method name="get_base_editor" qualifiers="const">
<return type="Control" />
<description>
- Returns the underlying [Control] used for editing scripts. This can be either [CodeEdit] (for text scripts) or [GraphEdit] (for visual scripts).
+ Returns the underlying [Control] used for editing scripts. For text scripts, this is a [CodeEdit].
</description>
</method>
</methods>
<signals>
<signal name="edited_script_changed">
<description>
- Emitted after script validation. For visual scripts on modification.
+ Emitted after script validation.
</description>
</signal>
<signal name="go_to_help">
@@ -35,15 +35,22 @@
Emitted when the user requests a specific documentation page.
</description>
</signal>
+ <signal name="go_to_method">
+ <param index="0" name="script" type="Object" />
+ <param index="1" name="method" type="String" />
+ <description>
+ Emitted when the user requests to view a specific method of a script, similar to [signal request_open_script_at_line].
+ </description>
+ </signal>
<signal name="name_changed">
<description>
- Emitted after script validation or when the edited resource has changed. Not used by visual scripts.
+ Emitted after script validation or when the edited resource has changed.
</description>
</signal>
<signal name="replace_in_files_requested">
<param index="0" name="text" type="String" />
<description>
- Emitted when the user request to find and replace text in the file system. Not used by visual scripts.
+ Emitted when the user request to find and replace text in the file system.
</description>
</signal>
<signal name="request_help">
@@ -56,7 +63,7 @@
<param index="0" name="script" type="Object" />
<param index="1" name="line" type="int" />
<description>
- Emitted when the user requests a script.
+ Emitted when the user requests to view a specific line of a script, similar to [signal go_to_method].
</description>
</signal>
<signal name="request_save_history">
@@ -67,7 +74,7 @@
<signal name="search_in_files_requested">
<param index="0" name="text" type="String" />
<description>
- Emitted when the user request to search text in the file system. Not used by visual scripts.
+ Emitted when the user request to search text in the file system.
</description>
</signal>
</signals>
diff --git a/doc/classes/ScriptExtension.xml b/doc/classes/ScriptExtension.xml
index b59c49d785..045eadda41 100644
--- a/doc/classes/ScriptExtension.xml
+++ b/doc/classes/ScriptExtension.xml
@@ -96,6 +96,12 @@
<description>
</description>
</method>
+ <method name="_has_property_default_value" qualifiers="virtual const">
+ <return type="bool" />
+ <param index="0" name="property" type="StringName" />
+ <description>
+ </description>
+ </method>
<method name="_has_script_signal" qualifiers="virtual const">
<return type="bool" />
<param index="0" name="signal" type="StringName" />
diff --git a/doc/classes/ScrollBar.xml b/doc/classes/ScrollBar.xml
index d0dd69408e..247e892c24 100644
--- a/doc/classes/ScrollBar.xml
+++ b/doc/classes/ScrollBar.xml
@@ -12,6 +12,7 @@
<member name="custom_step" type="float" setter="set_custom_step" getter="get_custom_step" default="-1.0">
Overrides the step used when clicking increment and decrement buttons or when using arrow keys when the [ScrollBar] is focused.
</member>
+ <member name="step" type="float" setter="set_step" getter="get_step" overrides="Range" default="0.0" />
</members>
<signals>
<signal name="scrolling">
diff --git a/doc/classes/ScrollContainer.xml b/doc/classes/ScrollContainer.xml
index 207a745696..b96b7187e4 100644
--- a/doc/classes/ScrollContainer.xml
+++ b/doc/classes/ScrollContainer.xml
@@ -6,7 +6,7 @@
<description>
A ScrollContainer node meant to contain a [Control] child.
ScrollContainers will automatically create a scrollbar child ([HScrollBar], [VScrollBar], or both) when needed and will only draw the Control within the ScrollContainer area. Scrollbars will automatically be drawn at the right (for vertical) or bottom (for horizontal) and will enable dragging to move the viewable Control (and its children) within the ScrollContainer. Scrollbars will also automatically resize the grabber based on the [member Control.custom_minimum_size] of the Control relative to the ScrollContainer.
- Works great with a [Panel] control. You can set [code]EXPAND[/code] on the children's size flags, so they will upscale to the ScrollContainer's size if it's larger (scroll is invisible for the chosen dimension).
+ Works great with a [Panel] control. You can set [constant Control.SIZE_EXPAND] on the children's size flags, so they will upscale to the ScrollContainer's size if it's larger (scroll is invisible for the chosen dimension).
</description>
<tutorials>
<link title="GUI containers">$DOCS_URL/tutorials/ui/gui_containers.html</link>
@@ -16,7 +16,7 @@
<return type="void" />
<param index="0" name="control" type="Control" />
<description>
- Ensures the given [code]control[/code] is visible (must be a direct or indirect child of the ScrollContainer). Used by [member follow_focus].
+ Ensures the given [param control] is visible (must be a direct or indirect child of the ScrollContainer). Used by [member follow_focus].
[b]Note:[/b] This will not work on a node that was just added during the same frame. If you want to scroll to a newly added child, you must wait until the next frame using [signal SceneTree.process_frame]:
[codeblock]
add_child(child_node)
@@ -87,7 +87,7 @@
</constant>
</constants>
<theme_items>
- <theme_item name="bg" data_type="style" type="StyleBox">
+ <theme_item name="panel" data_type="style" type="StyleBox">
The background [StyleBox] of the [ScrollContainer].
</theme_item>
</theme_items>
diff --git a/doc/classes/Shader.xml b/doc/classes/Shader.xml
index 6390d36bf1..75f835260a 100644
--- a/doc/classes/Shader.xml
+++ b/doc/classes/Shader.xml
@@ -10,14 +10,14 @@
<link title="Shaders documentation index">$DOCS_URL/tutorials/shaders/index.html</link>
</tutorials>
<methods>
- <method name="get_default_texture_param" qualifiers="const">
+ <method name="get_default_texture_parameter" qualifiers="const">
<return type="Texture2D" />
- <param index="0" name="param" type="StringName" />
+ <param index="0" name="name" type="StringName" />
<param index="1" name="index" type="int" default="0" />
<description>
Returns the texture that is set as default for the specified parameter.
- [b]Note:[/b] [code]param[/code] must match the name of the uniform in the code exactly.
- [b]Note:[/b] If the sampler array is used use [code]index[/code] to access the specified texture.
+ [b]Note:[/b] [param name] must match the name of the uniform in the code exactly.
+ [b]Note:[/b] If the sampler array is used use [param index] to access the specified texture.
</description>
</method>
<method name="get_mode" qualifiers="const">
@@ -26,23 +26,23 @@
Returns the shader mode for the shader, either [constant MODE_CANVAS_ITEM], [constant MODE_SPATIAL] or [constant MODE_PARTICLES].
</description>
</method>
- <method name="has_uniform" qualifiers="const">
+ <method name="has_parameter" qualifiers="const">
<return type="bool" />
<param index="0" name="name" type="StringName" />
<description>
Returns [code]true[/code] if the shader has this param defined as a uniform in its code.
- [b]Note:[/b] [code]param[/code] must match the name of the uniform in the code exactly.
+ [b]Note:[/b] [param name] must match the name of the uniform in the code exactly.
</description>
</method>
- <method name="set_default_texture_param">
+ <method name="set_default_texture_parameter">
<return type="void" />
- <param index="0" name="param" type="StringName" />
+ <param index="0" name="name" type="StringName" />
<param index="1" name="texture" type="Texture2D" />
<param index="2" name="index" type="int" default="0" />
<description>
Sets the default texture to be used with a texture uniform. The default is used if a texture is not set in the [ShaderMaterial].
- [b]Note:[/b] [code]param[/code] must match the name of the uniform in the code exactly.
- [b]Note:[/b] If the sampler array is used use [code]index[/code] to access the specified texture.
+ [b]Note:[/b] [param name] must match the name of the uniform in the code exactly.
+ [b]Note:[/b] If the sampler array is used use [param index] to access the specified texture.
</description>
</method>
</methods>
diff --git a/doc/classes/ShaderMaterial.xml b/doc/classes/ShaderMaterial.xml
index 3e2247c022..1af7ac4fc5 100644
--- a/doc/classes/ShaderMaterial.xml
+++ b/doc/classes/ShaderMaterial.xml
@@ -10,34 +10,20 @@
<link title="Shaders documentation index">$DOCS_URL/tutorials/shaders/index.html</link>
</tutorials>
<methods>
- <method name="get_shader_uniform" qualifiers="const">
+ <method name="get_shader_parameter" qualifiers="const">
<return type="Variant" />
<param index="0" name="param" type="StringName" />
<description>
Returns the current value set for this material of a uniform in the shader.
</description>
</method>
- <method name="property_can_revert">
- <return type="bool" />
- <param index="0" name="name" type="String" />
- <description>
- Returns [code]true[/code] if the property identified by [code]name[/code] can be reverted to a default value.
- </description>
- </method>
- <method name="property_get_revert">
- <return type="Variant" />
- <param index="0" name="name" type="String" />
- <description>
- Returns the default value of the material property with given [code]name[/code].
- </description>
- </method>
- <method name="set_shader_uniform">
+ <method name="set_shader_parameter">
<return type="void" />
<param index="0" name="param" type="StringName" />
<param index="1" name="value" type="Variant" />
<description>
Changes the value set for this material of a uniform in the shader.
- [b]Note:[/b] [code]param[/code] must match the name of the uniform in the code exactly.
+ [b]Note:[/b] [param param] must match the name of the uniform in the code exactly.
</description>
</method>
</methods>
diff --git a/doc/classes/Shape2D.xml b/doc/classes/Shape2D.xml
index 8f5ca034e4..7be0ba64d6 100644
--- a/doc/classes/Shape2D.xml
+++ b/doc/classes/Shape2D.xml
@@ -17,19 +17,19 @@
<param index="2" name="shape_xform" type="Transform2D" />
<description>
Returns [code]true[/code] if this shape is colliding with another.
- This method needs the transformation matrix for this shape ([code]local_xform[/code]), the shape to check collisions with ([code]with_shape[/code]), and the transformation matrix of that shape ([code]shape_xform[/code]).
+ This method needs the transformation matrix for this shape ([param local_xform]), the shape to check collisions with ([param with_shape]), and the transformation matrix of that shape ([param shape_xform]).
</description>
</method>
<method name="collide_and_get_contacts">
- <return type="Array" />
+ <return type="PackedVector2Array" />
<param index="0" name="local_xform" type="Transform2D" />
<param index="1" name="with_shape" type="Shape2D" />
<param index="2" name="shape_xform" type="Transform2D" />
<description>
Returns a list of contact point pairs where this shape touches another.
- If there are no collisions, the returned list is empty. Otherwise, the returned list contains contact points arranged in pairs, with entries alternating between points on the boundary of this shape and points on the boundary of [code]with_shape[/code].
+ If there are no collisions, the returned list is empty. Otherwise, the returned list contains contact points arranged in pairs, with entries alternating between points on the boundary of this shape and points on the boundary of [param with_shape].
A collision pair A, B can be used to calculate the collision normal with [code](B - A).normalized()[/code], and the collision depth with [code](B - A).length()[/code]. This information is typically used to separate shapes, particularly in collision solvers.
- This method needs the transformation matrix for this shape ([code]local_xform[/code]), the shape to check collisions with ([code]with_shape[/code]), and the transformation matrix of that shape ([code]shape_xform[/code]).
+ This method needs the transformation matrix for this shape ([param local_xform]), the shape to check collisions with ([param with_shape]), and the transformation matrix of that shape ([param shape_xform]).
</description>
</method>
<method name="collide_with_motion">
@@ -41,11 +41,11 @@
<param index="4" name="shape_motion" type="Vector2" />
<description>
Returns whether this shape would collide with another, if a given movement was applied.
- This method needs the transformation matrix for this shape ([code]local_xform[/code]), the movement to test on this shape ([code]local_motion[/code]), the shape to check collisions with ([code]with_shape[/code]), the transformation matrix of that shape ([code]shape_xform[/code]), and the movement to test onto the other object ([code]shape_motion[/code]).
+ This method needs the transformation matrix for this shape ([param local_xform]), the movement to test on this shape ([param local_motion]), the shape to check collisions with ([param with_shape]), the transformation matrix of that shape ([param shape_xform]), and the movement to test onto the other object ([param shape_motion]).
</description>
</method>
<method name="collide_with_motion_and_get_contacts">
- <return type="Array" />
+ <return type="PackedVector2Array" />
<param index="0" name="local_xform" type="Transform2D" />
<param index="1" name="local_motion" type="Vector2" />
<param index="2" name="with_shape" type="Shape2D" />
@@ -53,9 +53,9 @@
<param index="4" name="shape_motion" type="Vector2" />
<description>
Returns a list of contact point pairs where this shape would touch another, if a given movement was applied.
- If there would be no collisions, the returned list is empty. Otherwise, the returned list contains contact points arranged in pairs, with entries alternating between points on the boundary of this shape and points on the boundary of [code]with_shape[/code].
+ If there would be no collisions, the returned list is empty. Otherwise, the returned list contains contact points arranged in pairs, with entries alternating between points on the boundary of this shape and points on the boundary of [param with_shape].
A collision pair A, B can be used to calculate the collision normal with [code](B - A).normalized()[/code], and the collision depth with [code](B - A).length()[/code]. This information is typically used to separate shapes, particularly in collision solvers.
- This method needs the transformation matrix for this shape ([code]local_xform[/code]), the movement to test on this shape ([code]local_motion[/code]), the shape to check collisions with ([code]with_shape[/code]), the transformation matrix of that shape ([code]shape_xform[/code]), and the movement to test onto the other object ([code]shape_motion[/code]).
+ This method needs the transformation matrix for this shape ([param local_xform]), the movement to test on this shape ([param local_motion]), the shape to check collisions with ([param with_shape]), the transformation matrix of that shape ([param shape_xform]), and the movement to test onto the other object ([param shape_motion]).
</description>
</method>
<method name="draw">
@@ -63,7 +63,13 @@
<param index="0" name="canvas_item" type="RID" />
<param index="1" name="color" type="Color" />
<description>
- Draws a solid shape onto a [CanvasItem] with the [RenderingServer] API filled with the specified [code]color[/code]. The exact drawing method is specific for each shape and cannot be configured.
+ Draws a solid shape onto a [CanvasItem] with the [RenderingServer] API filled with the specified [param color]. The exact drawing method is specific for each shape and cannot be configured.
+ </description>
+ </method>
+ <method name="get_rect" qualifiers="const">
+ <return type="Rect2" />
+ <description>
+ Returns a [Rect2] representing the shapes boundary.
</description>
</method>
</methods>
diff --git a/doc/classes/ShapeCast2D.xml b/doc/classes/ShapeCast2D.xml
index 652cacfb53..5a8eec3921 100644
--- a/doc/classes/ShapeCast2D.xml
+++ b/doc/classes/ShapeCast2D.xml
@@ -55,14 +55,21 @@
<return type="Object" />
<param index="0" name="index" type="int" />
<description>
- Returns the collided [Object] of one of the multiple collisions at [code]index[/code], or [code]null[/code] if no object is intersecting the shape (i.e. [method is_colliding] returns [code]false[/code]).
+ Returns the collided [Object] of one of the multiple collisions at [param index], or [code]null[/code] if no object is intersecting the shape (i.e. [method is_colliding] returns [code]false[/code]).
+ </description>
+ </method>
+ <method name="get_collider_rid" qualifiers="const">
+ <return type="RID" />
+ <param index="0" name="index" type="int" />
+ <description>
+ Returns the [RID] of the collided object of one of the multiple collisions at [param index].
</description>
</method>
<method name="get_collider_shape" qualifiers="const">
<return type="int" />
<param index="0" name="index" type="int" />
<description>
- Returns the shape ID of the colliding shape of one of the multiple collisions at [code]index[/code], or [code]0[/code] if no object is intersecting the shape (i.e. [method is_colliding] returns [code]false[/code]).
+ Returns the shape ID of the colliding shape of one of the multiple collisions at [param index], or [code]0[/code] if no object is intersecting the shape (i.e. [method is_colliding] returns [code]false[/code]).
</description>
</method>
<method name="get_collision_count" qualifiers="const">
@@ -75,21 +82,21 @@
<return type="bool" />
<param index="0" name="layer_number" type="int" />
<description>
- Returns whether or not the specified layer of the [member collision_mask] is enabled, given a [code]layer_number[/code] between 1 and 32.
+ Returns whether or not the specified layer of the [member collision_mask] is enabled, given a [param layer_number] between 1 and 32.
</description>
</method>
<method name="get_collision_normal" qualifiers="const">
<return type="Vector2" />
<param index="0" name="index" type="int" />
<description>
- Returns the normal of one of the multiple collisions at [code]index[/code] of the intersecting object.
+ Returns the normal of one of the multiple collisions at [param index] of the intersecting object.
</description>
</method>
<method name="get_collision_point" qualifiers="const">
<return type="Vector2" />
<param index="0" name="index" type="int" />
<description>
- Returns the collision point of one of the multiple collisions at [code]index[/code] where the shape intersects the colliding object.
+ Returns the collision point of one of the multiple collisions at [param index] where the shape intersects the colliding object.
[b]Note:[/b] this point is in the [b]global[/b] coordinate system.
</description>
</method>
@@ -118,7 +125,7 @@
<param index="0" name="layer_number" type="int" />
<param index="1" name="value" type="bool" />
<description>
- Based on [code]value[/code], enables or disables the specified layer in the [member collision_mask], given a [code]layer_number[/code] between 1 and 32.
+ Based on [param value], enables or disables the specified layer in the [member collision_mask], given a [param layer_number] between 1 and 32.
</description>
</method>
</methods>
diff --git a/doc/classes/ShapeCast3D.xml b/doc/classes/ShapeCast3D.xml
index 9a5606e198..735b91cee9 100644
--- a/doc/classes/ShapeCast3D.xml
+++ b/doc/classes/ShapeCast3D.xml
@@ -55,14 +55,21 @@
<return type="Object" />
<param index="0" name="index" type="int" />
<description>
- Returns the collided [Object] of one of the multiple collisions at [code]index[/code], or [code]null[/code] if no object is intersecting the shape (i.e. [method is_colliding] returns [code]false[/code]).
+ Returns the collided [Object] of one of the multiple collisions at [param index], or [code]null[/code] if no object is intersecting the shape (i.e. [method is_colliding] returns [code]false[/code]).
+ </description>
+ </method>
+ <method name="get_collider_rid" qualifiers="const">
+ <return type="RID" />
+ <param index="0" name="index" type="int" />
+ <description>
+ Returns the [RID] of the collided object of one of the multiple collisions at [param index].
</description>
</method>
<method name="get_collider_shape" qualifiers="const">
<return type="int" />
<param index="0" name="index" type="int" />
<description>
- Returns the shape ID of the colliding shape of one of the multiple collisions at [code]index[/code], or [code]0[/code] if no object is intersecting the shape (i.e. [method is_colliding] returns [code]false[/code]).
+ Returns the shape ID of the colliding shape of one of the multiple collisions at [param index], or [code]0[/code] if no object is intersecting the shape (i.e. [method is_colliding] returns [code]false[/code]).
</description>
</method>
<method name="get_collision_count" qualifiers="const">
@@ -75,21 +82,21 @@
<return type="bool" />
<param index="0" name="layer_number" type="int" />
<description>
- Returns whether or not the specified layer of the [member collision_mask] is enabled, given a [code]layer_number[/code] between 1 and 32.
+ Returns whether or not the specified layer of the [member collision_mask] is enabled, given a [param layer_number] between 1 and 32.
</description>
</method>
<method name="get_collision_normal" qualifiers="const">
<return type="Vector3" />
<param index="0" name="index" type="int" />
<description>
- Returns the normal of one of the multiple collisions at [code]index[/code] of the intersecting object.
+ Returns the normal of one of the multiple collisions at [param index] of the intersecting object.
</description>
</method>
<method name="get_collision_point" qualifiers="const">
<return type="Vector3" />
<param index="0" name="index" type="int" />
<description>
- Returns the collision point of one of the multiple collisions at [code]index[/code] where the shape intersects the colliding object.
+ Returns the collision point of one of the multiple collisions at [param index] where the shape intersects the colliding object.
[b]Note:[/b] this point is in the [b]global[/b] coordinate system.
</description>
</method>
@@ -125,7 +132,7 @@
<param index="0" name="layer_number" type="int" />
<param index="1" name="value" type="bool" />
<description>
- Based on [code]value[/code], enables or disables the specified layer in the [member collision_mask], given a [code]layer_number[/code] between 1 and 32.
+ Based on [param value], enables or disables the specified layer in the [member collision_mask], given a [param layer_number] between 1 and 32.
</description>
</method>
</methods>
diff --git a/doc/classes/Shortcut.xml b/doc/classes/Shortcut.xml
index 329471fdb8..f30a5a5e7c 100644
--- a/doc/classes/Shortcut.xml
+++ b/doc/classes/Shortcut.xml
@@ -26,7 +26,7 @@
<return type="bool" />
<param index="0" name="event" type="InputEvent" />
<description>
- Returns whether any [InputEvent] in [member events] equals [code]event[/code].
+ Returns whether any [InputEvent] in [member events] equals [param event].
</description>
</method>
</methods>
diff --git a/doc/classes/Signal.xml b/doc/classes/Signal.xml
index dc543085cf..d99477ee95 100644
--- a/doc/classes/Signal.xml
+++ b/doc/classes/Signal.xml
@@ -28,7 +28,7 @@
<param index="0" name="object" type="Object" />
<param index="1" name="signal" type="StringName" />
<description>
- Creates a new [Signal] with the name [code]signal[/code] in the specified [code]object[/code].
+ Creates a new [Signal] with the name [param signal] in the specified [param object].
</description>
</constructor>
</constructors>
diff --git a/doc/classes/Skeleton2D.xml b/doc/classes/Skeleton2D.xml
index 0abb8be075..808f93b491 100644
--- a/doc/classes/Skeleton2D.xml
+++ b/doc/classes/Skeleton2D.xml
@@ -23,7 +23,7 @@
<return type="Bone2D" />
<param index="0" name="idx" type="int" />
<description>
- Returns a [Bone2D] from the node hierarchy parented by Skeleton2D. The object to return is identified by the parameter [code]idx[/code]. Bones are indexed by descending the node hierarchy from top to bottom, adding the children of each branch before moving to the next sibling.
+ Returns a [Bone2D] from the node hierarchy parented by Skeleton2D. The object to return is identified by the parameter [param idx]. Bones are indexed by descending the node hierarchy from top to bottom, adding the children of each branch before moving to the next sibling.
</description>
</method>
<method name="get_bone_count" qualifiers="const">
@@ -36,7 +36,7 @@
<return type="Transform2D" />
<param index="0" name="bone_idx" type="int" />
<description>
- Returns the local pose override transform for [code]bone_idx[/code].
+ Returns the local pose override transform for [param bone_idx].
</description>
</method>
<method name="get_modification_stack" qualifiers="const">
@@ -58,9 +58,9 @@
<param index="2" name="strength" type="float" />
<param index="3" name="persistent" type="bool" />
<description>
- Sets the local pose transform, [code]pose[/code], for the bone at [code]bone_idx[/code].
- [code]amount[/code] is the interpolation strength 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]!
+ Sets the local pose transform, [param override_pose], for the bone at [param bone_idx].
+ [param strength] is the interpolation strength that will be used when applying the pose, and [param persistent] 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 [param bone_idx]!
</description>
</method>
<method name="set_modification_stack">
diff --git a/doc/classes/Skeleton3D.xml b/doc/classes/Skeleton3D.xml
index c02a482a91..3bd0e04b92 100644
--- a/doc/classes/Skeleton3D.xml
+++ b/doc/classes/Skeleton3D.xml
@@ -17,16 +17,7 @@
<return type="void" />
<param index="0" name="name" type="String" />
<description>
- Adds a bone, with name [code]name[/code]. [method get_bone_count] will become the bone index.
- </description>
- </method>
- <method name="add_bone_child">
- <return type="void" />
- <param index="0" name="bone_idx" type="int" />
- <param index="1" name="child_bone_idx" type="int" />
- <description>
- Takes the given bone pose/transform and converts it to a world transform, relative to the [Skeleton3D] node.
- This is useful for using the bone transform in calculations with transforms from [Node3D]-based nodes.
+ Adds a bone, with name [param name]. [method get_bone_count] will become the bone index.
</description>
</method>
<method name="clear_bones">
@@ -41,9 +32,10 @@
Removes the global pose override on all bones in the skeleton.
</description>
</method>
- <method name="clear_bones_local_pose_override">
+ <method name="clear_bones_local_pose_override" is_deprecated="true">
<return type="void" />
<description>
+ Deprecated. Local pose overrides will be removed.
Removes the local pose override on all bones in the skeleton.
</description>
</method>
@@ -52,7 +44,7 @@
<description>
</description>
</method>
- <method name="execute_modifications">
+ <method name="execute_modifications" is_deprecated="true">
<return type="void" />
<param index="0" name="delta" type="float" />
<param index="1" name="execution_mode" type="int" />
@@ -64,10 +56,10 @@
<return type="int" />
<param index="0" name="name" type="String" />
<description>
- Returns the bone index that matches [code]name[/code] as its name.
+ Returns the bone index that matches [param name] as its name.
</description>
</method>
- <method name="force_update_all_bone_transforms">
+ <method name="force_update_all_bone_transforms" is_deprecated="true">
<return type="void" />
<description>
Force updates the bone transforms/poses for all bones in the skeleton.
@@ -77,20 +69,20 @@
<return type="void" />
<param index="0" name="bone_idx" type="int" />
<description>
- Force updates the bone transform for the bone at [code]bone_idx[/code] and all of its children.
+ Force updates the bone transform for the bone at [param bone_idx] and all of its children.
</description>
</method>
- <method name="get_bone_children">
+ <method name="get_bone_children" qualifiers="const">
<return type="PackedInt32Array" />
<param index="0" name="bone_idx" type="int" />
<description>
- Returns an array containing the bone indexes of all the children node of the passed in bone, [code]bone_idx[/code].
+ Returns an array containing the bone indexes of all the children node of the passed in bone, [param bone_idx].
</description>
</method>
<method name="get_bone_count" qualifiers="const">
<return type="int" />
<description>
- Returns the amount of bones in the skeleton.
+ Returns the number of bones in the skeleton.
</description>
</method>
<method name="get_bone_global_pose" qualifiers="const">
@@ -111,36 +103,36 @@
<return type="Transform3D" />
<param index="0" name="bone_idx" type="int" />
<description>
- Returns the global pose override transform for [code]bone_idx[/code].
+ Returns the global pose override transform for [param bone_idx].
</description>
</method>
<method name="get_bone_global_rest" qualifiers="const">
<return type="Transform3D" />
<param index="0" name="bone_idx" type="int" />
<description>
- Returns the global rest transform for [code]bone_idx[/code].
+ Returns the global rest transform for [param bone_idx].
</description>
</method>
<method name="get_bone_local_pose_override" qualifiers="const">
<return type="Transform3D" />
<param index="0" name="bone_idx" type="int" />
<description>
- Returns the local pose override transform for [code]bone_idx[/code].
+ Returns the local pose override transform for [param bone_idx].
</description>
</method>
<method name="get_bone_name" qualifiers="const">
<return type="String" />
<param index="0" name="bone_idx" type="int" />
<description>
- Returns the name of the bone at index [code]index[/code].
+ Returns the name of the bone at index [param bone_idx].
</description>
</method>
<method name="get_bone_parent" qualifiers="const">
<return type="int" />
<param index="0" name="bone_idx" type="int" />
<description>
- Returns the bone index which is the parent of the bone at [code]bone_idx[/code]. If -1, then bone has no parent.
- [b]Note:[/b] The parent bone returned will always be less than [code]bone_idx[/code].
+ Returns the bone index which is the parent of the bone at [param bone_idx]. If -1, then bone has no parent.
+ [b]Note:[/b] The parent bone returned will always be less than [param bone_idx].
</description>
</method>
<method name="get_bone_pose" qualifiers="const">
@@ -172,22 +164,22 @@
<return type="Transform3D" />
<param index="0" name="bone_idx" type="int" />
<description>
- Returns the rest transform for a bone [code]bone_idx[/code].
+ Returns the rest transform for a bone [param bone_idx].
</description>
</method>
- <method name="get_modification_stack">
+ <method name="get_modification_stack" is_deprecated="true">
<return type="SkeletonModificationStack3D" />
<description>
Returns the modification stack attached to this skeleton, if one exists.
</description>
</method>
- <method name="get_parentless_bones">
+ <method name="get_parentless_bones" qualifiers="const">
<return type="PackedInt32Array" />
<description>
Returns an array with all of the bones that are parentless. Another way to look at this is that it returns the indexes of all the bones that are not dependent or modified by other bones in the Skeleton.
</description>
</method>
- <method name="global_pose_to_local_pose">
+ <method name="global_pose_to_local_pose" is_deprecated="true">
<return type="Transform3D" />
<param index="0" name="bone_idx" type="int" />
<param index="1" name="global_pose" type="Transform3D" />
@@ -196,20 +188,21 @@
This can be used to easily convert a global pose from [method get_bone_global_pose] to a global transform in [method set_bone_local_pose_override].
</description>
</method>
- <method name="global_pose_to_world_transform">
+ <method name="global_pose_to_world_transform" is_deprecated="true">
<return type="Transform3D" />
<param index="0" name="global_pose" type="Transform3D" />
<description>
+ Deprecated. Use [Node3D] apis instead.
Takes the passed-in global pose and converts it to a world transform.
This can be used to easily convert a global pose from [method get_bone_global_pose] to a global transform usable with a node's transform, like [member Node3D.global_transform] for example.
</description>
</method>
- <method name="global_pose_z_forward_to_bone_forward">
+ <method name="global_pose_z_forward_to_bone_forward" is_deprecated="true">
<return type="Basis" />
<param index="0" name="bone_idx" type="int" />
<param index="1" name="basis" type="Basis" />
<description>
- Rotates the given [Basis] so that the forward axis of the Basis is facing in the forward direction of the bone at [code]bone_idx[/code].
+ Rotates the given [Basis] so that the forward axis of the Basis is facing in the forward direction of the bone at [param bone_idx].
This is helper function to make using [method Transform3D.looking_at] easier with bone poses.
</description>
</method>
@@ -217,15 +210,15 @@
<return type="bool" />
<param index="0" name="bone_idx" type="int" />
<description>
- Returns whether the bone pose for the bone at [code]bone_idx[/code] is enabled.
+ Returns whether the bone pose for the bone at [param bone_idx] is enabled.
</description>
</method>
- <method name="local_pose_to_global_pose">
+ <method name="local_pose_to_global_pose" is_deprecated="true">
<return type="Transform3D" />
<param index="0" name="bone_idx" type="int" />
<param index="1" name="local_pose" type="Transform3D" />
<description>
- Converts the passed-in local pose to a global pose relative to the inputted bone, [code]bone_idx[/code].
+ Converts the passed-in local pose to a global pose relative to the inputted bone, [param bone_idx].
This could be used to convert [method get_bone_pose] for use with the [method set_bone_global_pose_override] function.
</description>
</method>
@@ -240,7 +233,7 @@
<param index="0" name="exception" type="RID" />
<description>
Adds a collision exception to the physical bone.
- Works just like the [RigidDynamicBody3D] node.
+ Works just like the [RigidBody3D] node.
</description>
</method>
<method name="physical_bones_remove_collision_exception">
@@ -248,7 +241,7 @@
<param index="0" name="exception" type="RID" />
<description>
Removes a collision exception to the physical bone.
- Works just like the [RigidDynamicBody3D] node.
+ Works just like the [RigidBody3D] node.
</description>
</method>
<method name="physical_bones_start_simulation">
@@ -272,21 +265,17 @@
Binds the given Skin to the Skeleton.
</description>
</method>
- <method name="remove_bone_child">
+ <method name="reset_bone_pose">
<return type="void" />
<param index="0" name="bone_idx" type="int" />
- <param index="1" name="child_bone_idx" type="int" />
<description>
- Removes the passed in child bone index, [code]child_bone_idx[/code], from the passed-in bone, [code]bone_idx[/code], if it exists.
- [b]Note:[/b] This does not remove the child bone, but instead it removes the connection it has to the parent bone.
+ Sets the bone pose to rest for [param bone_idx].
</description>
</method>
- <method name="set_bone_children">
+ <method name="reset_bone_poses">
<return type="void" />
- <param index="0" name="bone_idx" type="int" />
- <param index="1" name="bone_children" type="PackedInt32Array" />
<description>
- Sets the children for the passed in bone, [code]bone_idx[/code], to the passed-in array of bone indexes, [code]bone_children[/code].
+ Sets all bone poses to rests.
</description>
</method>
<method name="set_bone_enabled">
@@ -294,7 +283,7 @@
<param index="0" name="bone_idx" type="int" />
<param index="1" name="enabled" type="bool" default="true" />
<description>
- Disables the pose for the bone at [code]bone_idx[/code] if [code]false[/code], enables the bone pose if [code]true[/code].
+ Disables the pose for the bone at [param bone_idx] if [code]false[/code], enables the bone pose if [code]true[/code].
</description>
</method>
<method name="set_bone_global_pose_override">
@@ -304,20 +293,21 @@
<param index="2" name="amount" type="float" />
<param index="3" name="persistent" type="bool" default="false" />
<description>
- Sets the global pose transform, [code]pose[/code], for the bone at [code]bone_idx[/code].
- [code]amount[/code] is the interpolation strength 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 global pose! Use [method world_transform_to_global_pose] to convert a world transform, like one you can get from a [Node3D], to a global pose.
+ Sets the global pose transform, [param pose], for the bone at [param bone_idx].
+ [param amount] is the interpolation strength that will be used when applying the pose, and [param persistent] determines if the applied pose will remain.
+ [b]Note:[/b] The pose transform needs to be a global pose! To convert a world transform from a [Node3D] to a global bone pose, multiply the [method Transform3D.affine_inverse] of the node's [member Node3D.global_transform] by the desired world transform
</description>
</method>
- <method name="set_bone_local_pose_override">
+ <method name="set_bone_local_pose_override" is_deprecated="true">
<return type="void" />
<param index="0" name="bone_idx" type="int" />
<param index="1" name="pose" type="Transform3D" />
<param index="2" name="amount" type="float" />
<param index="3" name="persistent" type="bool" default="false" />
<description>
- Sets the local pose transform, [code]pose[/code], for the bone at [code]bone_idx[/code].
- [code]amount[/code] is the interpolation strength that will be used when applying the pose, and [code]persistent[/code] determines if the applied pose will remain.
+ Deprecated. Local pose overrides will be removed.
+ Sets the local pose transform, [param pose], for the bone at [param bone_idx].
+ [param amount] is the interpolation strength that will be used when applying the pose, and [param persistent] determines if the applied pose will remain.
[b]Note:[/b] The pose transform needs to be a local pose! Use [method global_pose_to_local_pose] to convert a global pose to a local pose.
</description>
</method>
@@ -333,8 +323,8 @@
<param index="0" name="bone_idx" type="int" />
<param index="1" name="parent_idx" type="int" />
<description>
- Sets the bone index [code]parent_idx[/code] as the parent of the bone at [code]bone_idx[/code]. If -1, then bone has no parent.
- [b]Note:[/b] [code]parent_idx[/code] must be less than [code]bone_idx[/code].
+ Sets the bone index [param parent_idx] as the parent of the bone at [param bone_idx]. If -1, then bone has no parent.
+ [b]Note:[/b] [param parent_idx] must be less than [param bone_idx].
</description>
</method>
<method name="set_bone_pose_position">
@@ -363,27 +353,28 @@
<param index="0" name="bone_idx" type="int" />
<param index="1" name="rest" type="Transform3D" />
<description>
- Sets the rest transform for bone [code]bone_idx[/code].
+ Sets the rest transform for bone [param bone_idx].
</description>
</method>
- <method name="set_modification_stack">
+ <method name="set_modification_stack" is_deprecated="true">
<return type="void" />
<param index="0" name="modification_stack" type="SkeletonModificationStack3D" />
<description>
- Sets the modification stack for this skeleton to the passed-in modification stack, [code]modification_stack[/code].
+ Sets the modification stack for this skeleton to the passed-in modification stack, [param modification_stack].
</description>
</method>
<method name="unparent_bone_and_rest">
<return type="void" />
<param index="0" name="bone_idx" type="int" />
<description>
- Unparents the bone at [code]bone_idx[/code] and sets its rest position to that of its parent prior to being reset.
+ Unparents the bone at [param bone_idx] and sets its rest position to that of its parent prior to being reset.
</description>
</method>
- <method name="world_transform_to_global_pose">
+ <method name="world_transform_to_global_pose" is_deprecated="true">
<return type="Transform3D" />
<param index="0" name="world_transform" type="Transform3D" />
<description>
+ Deprecated. Use [Node3D] apis instead.
Takes the passed-in global transform and converts it to a global pose.
This can be used to easily convert a global transform from [member Node3D.global_transform] to a global pose usable with [method set_bone_global_pose_override], for example.
</description>
diff --git a/doc/classes/SkeletonIK3D.xml b/doc/classes/SkeletonIK3D.xml
index 788ba3e248..1d50a97954 100644
--- a/doc/classes/SkeletonIK3D.xml
+++ b/doc/classes/SkeletonIK3D.xml
@@ -1,8 +1,29 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SkeletonIK3D" inherits="Node" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+<class name="SkeletonIK3D" inherits="Node" is_deprecated="true" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
+ SkeletonIK3D is used to place the end bone of a [Skeleton3D] bone chain at a certain point in 3D by rotating all bones in the chain accordingly.
</brief_description>
<description>
+ SkeletonIK3D is used to place the end bone of a [Skeleton3D] bone chain at a certain point in 3D by rotating all bones in the chain accordingly. A typical scenario for IK in games is to place a characters feet on the ground or a characters hands on a currently hold object. SkeletonIK uses FabrikInverseKinematic internally to solve the bone chain and applies the results to the [Skeleton3D] [code]bones_global_pose_override[/code] property for all affected bones in the chain. If fully applied this overwrites any bone transform from [Animation]s or bone custom poses set by users. The applied amount can be controlled with the [code]interpolation[/code] property.
+ [codeblock]
+ # Apply IK effect automatically on every new frame (not the current)
+ skeleton_ik_node.start()
+
+ # Apply IK effect only on the current frame
+ skeleton_ik_node.start(true)
+
+ # Stop IK effect and reset bones_global_pose_override on Skeleton
+ skeleton_ik_node.stop()
+
+ # Apply full IK effect
+ skeleton_ik_node.set_interpolation(1.0)
+
+ # Apply half IK effect
+ skeleton_ik_node.set_interpolation(0.5)
+
+ # Apply zero IK effect (a value at or below 0.01 also removes bones_global_pose_override on Skeleton)
+ skeleton_ik_node.set_interpolation(0.0)
+ [/codeblock]
</description>
<tutorials>
<link title="3D Inverse Kinematics Demo">https://godotengine.org/asset-library/asset/523</link>
@@ -11,45 +32,59 @@
<method name="get_parent_skeleton" qualifiers="const">
<return type="Skeleton3D" />
<description>
+ Returns the parent [Skeleton3D] Node that was present when SkeletonIK entered the [SceneTree]. Returns null if the parent node was not a [Skeleton3D] Node when SkeletonIK3D entered the [SceneTree].
</description>
</method>
<method name="is_running">
<return type="bool" />
<description>
+ Returns [code]true[/code] if SkeletonIK is applying IK effects on continues frames to the [Skeleton3D] bones. Returns [code]false[/code] if SkeletonIK is stopped or [method start] was used with the [code]one_time[/code] parameter set to [code]true[/code].
</description>
</method>
<method name="start">
<return type="void" />
<param index="0" name="one_time" type="bool" default="false" />
<description>
+ Starts applying IK effects on each frame to the [Skeleton3D] bones but will only take effect starting on the next frame. If [code]one_time[/code] is [code]true[/code], this will take effect immediately but also reset on the next frame.
</description>
</method>
<method name="stop">
<return type="void" />
<description>
+ Stops applying IK effects on each frame to the [Skeleton3D] bones and also calls [method Skeleton3D.clear_bones_global_pose_override] to remove existing overrides on all bones.
</description>
</method>
</methods>
<members>
<member name="interpolation" type="float" setter="set_interpolation" getter="get_interpolation" default="1.0">
+ Interpolation value for how much the IK results are applied to the current skeleton bone chain. A value of [code]1.0[/code] will overwrite all skeleton bone transforms completely while a value of [code]0.0[/code] will visually disable the SkeletonIK. A value at or below [code]0.01[/code] also calls [method Skeleton3D.clear_bones_global_pose_override].
</member>
<member name="magnet" type="Vector3" setter="set_magnet_position" getter="get_magnet_position" default="Vector3(0, 0, 0)">
+ Secondary target position (first is [member target] property or [member target_node]) for the IK chain. Use magnet position (pole target) to control the bending of the IK chain. Only works if the bone chain has more than 2 bones. The middle chain bone position will be linearly interpolated with the magnet position.
</member>
<member name="max_iterations" type="int" setter="set_max_iterations" getter="get_max_iterations" default="10">
+ Number of iteration loops used by the IK solver to produce more accurate (and elegant) bone chain results.
</member>
<member name="min_distance" type="float" setter="set_min_distance" getter="get_min_distance" default="0.01">
+ The minimum distance between bone and goal target. If the distance is below this value, the IK solver stops further iterations.
</member>
<member name="override_tip_basis" type="bool" setter="set_override_tip_basis" getter="is_override_tip_basis" default="true">
+ If [code]true[/code] overwrites the rotation of the tip bone with the rotation of the [member target] (or [member target_node] if defined).
</member>
<member name="root_bone" type="StringName" setter="set_root_bone" getter="get_root_bone" default="&amp;&quot;&quot;">
+ The name of the current root bone, the first bone in the IK chain.
</member>
<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)">
+ First target of the IK chain where the tip bone is placed and, if [member override_tip_basis] is [code]true[/code], how the tip bone is rotated. If a [member target_node] path is available the nodes transform is used instead and this property is ignored.
</member>
<member name="target_node" type="NodePath" setter="set_target_node" getter="get_target_node" default="NodePath(&quot;&quot;)">
+ Target node [NodePath] for the IK chain. If available, the node's current [Transform3D] is used instead of the [member target] property.
</member>
<member name="tip_bone" type="StringName" setter="set_tip_bone" getter="get_tip_bone" default="&amp;&quot;&quot;">
+ The name of the current tip bone, the last bone in the IK chain placed at the [member target] transform (or [member target_node] if defined).
</member>
<member name="use_magnet" type="bool" setter="set_use_magnet" getter="is_using_magnet" default="false">
+ If [code]true[/code], instructs the IK solver to consider the secondary magnet target (pole target) when calculating the bone chain. Use the magnet position (pole target) to control the bending of the IK chain.
</member>
</members>
</class>
diff --git a/doc/classes/SkeletonModification2D.xml b/doc/classes/SkeletonModification2D.xml
index c9171ead51..77aaf0213b 100644
--- a/doc/classes/SkeletonModification2D.xml
+++ b/doc/classes/SkeletonModification2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SkeletonModification2D" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+<class name="SkeletonModification2D" inherits="Resource" is_experimental="true" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A resource that operates on [Bone2D] nodes in a [Skeleton2D].
</brief_description>
@@ -38,7 +38,7 @@
<param index="2" name="max" type="float" />
<param index="3" name="invert" type="bool" />
<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.
+ Takes a angle and clamps it so it is within the passed-in [param min] and [param max] range. [param invert] 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">
diff --git a/doc/classes/SkeletonModification2DCCDIK.xml b/doc/classes/SkeletonModification2DCCDIK.xml
index 048d5cb397..0d80b1b914 100644
--- a/doc/classes/SkeletonModification2DCCDIK.xml
+++ b/doc/classes/SkeletonModification2DCCDIK.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SkeletonModification2DCCDIK" inherits="SkeletonModification2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+<class name="SkeletonModification2DCCDIK" inherits="SkeletonModification2D" is_experimental="true" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A modification that uses CCDIK to manipulate a series of bones to reach a target in 2D.
</brief_description>
@@ -16,49 +16,49 @@
<return type="NodePath" />
<param index="0" name="joint_idx" type="int" />
<description>
- Returns the [Bone2D] node assigned to the CCDIK joint at [code]joint_idx[/code].
+ Returns the [Bone2D] node assigned to the CCDIK joint at [param joint_idx].
</description>
</method>
<method name="get_ccdik_joint_bone_index" qualifiers="const">
<return type="int" />
<param index="0" name="joint_idx" type="int" />
<description>
- Returns the index of the [Bone2D] node assigned to the CCDIK joint at [code]joint_idx[/code].
+ Returns the index of the [Bone2D] node assigned to the CCDIK joint at [param joint_idx].
</description>
</method>
<method name="get_ccdik_joint_constraint_angle_invert" qualifiers="const">
<return type="bool" />
<param index="0" name="joint_idx" type="int" />
<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.
+ Returns whether the CCDIK joint at [param joint_idx] 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" />
<param index="0" name="joint_idx" type="int" />
<description>
- Returns the maximum angle constraint for the joint at [code]joint_idx[/code].
+ Returns the maximum angle constraint for the joint at [param joint_idx].
</description>
</method>
<method name="get_ccdik_joint_constraint_angle_min" qualifiers="const">
<return type="float" />
<param index="0" name="joint_idx" type="int" />
<description>
- Returns the minimum angle constraint for the joint at [code]joint_idx[/code].
+ Returns the minimum angle constraint for the joint at [param joint_idx].
</description>
</method>
<method name="get_ccdik_joint_enable_constraint" qualifiers="const">
<return type="bool" />
<param index="0" name="joint_idx" type="int" />
<description>
- Returns whether angle constraints on the CCDIK joint at [code]joint_idx[/code] are enabled.
+ Returns whether angle constraints on the CCDIK joint at [param joint_idx] are enabled.
</description>
</method>
<method name="get_ccdik_joint_rotate_from_joint" qualifiers="const">
<return type="bool" />
<param index="0" name="joint_idx" type="int" />
<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.
+ Returns whether the joint at [param joint_idx] 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">
@@ -66,7 +66,7 @@
<param index="0" name="joint_idx" type="int" />
<param index="1" name="bone2d_nodepath" type="NodePath" />
<description>
- Sets the [Bone2D] node assigned to the CCDIK joint at [code]joint_idx[/code].
+ Sets the [Bone2D] node assigned to the CCDIK joint at [param joint_idx].
</description>
</method>
<method name="set_ccdik_joint_bone_index">
@@ -74,7 +74,7 @@
<param index="0" name="joint_idx" type="int" />
<param index="1" name="bone_idx" type="int" />
<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.
+ Sets the bone index, [param bone_idx], of the CCDIK joint at [param joint_idx]. 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">
@@ -82,7 +82,7 @@
<param index="0" name="joint_idx" type="int" />
<param index="1" name="invert" type="bool" />
<description>
- Sets whether the CCDIK joint at [code]joint_idx[/code] uses an inverted joint constraint.
+ Sets whether the CCDIK joint at [param joint_idx] 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>
@@ -91,7 +91,7 @@
<param index="0" name="joint_idx" type="int" />
<param index="1" name="angle_max" type="float" />
<description>
- Sets the maximum angle constraint for the joint at [code]joint_idx[/code].
+ Sets the maximum angle constraint for the joint at [param joint_idx].
</description>
</method>
<method name="set_ccdik_joint_constraint_angle_min">
@@ -99,7 +99,7 @@
<param index="0" name="joint_idx" type="int" />
<param index="1" name="angle_min" type="float" />
<description>
- Sets the minimum angle constraint for the joint at [code]joint_idx[/code].
+ Sets the minimum angle constraint for the joint at [param joint_idx].
</description>
</method>
<method name="set_ccdik_joint_enable_constraint">
@@ -107,7 +107,7 @@
<param index="0" name="joint_idx" type="int" />
<param index="1" name="enable_constraint" type="bool" />
<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.
+ Determines whether angle constraints on the CCDIK joint at [param joint_idx] 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">
@@ -115,13 +115,13 @@
<param index="0" name="joint_idx" type="int" />
<param index="1" name="rotate_from_joint" type="bool" />
<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].
+ Sets whether the joint at [param joint_idx] 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.
+ The number 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.
diff --git a/doc/classes/SkeletonModification2DFABRIK.xml b/doc/classes/SkeletonModification2DFABRIK.xml
index 3108a55deb..8d1cd4b4d4 100644
--- a/doc/classes/SkeletonModification2DFABRIK.xml
+++ b/doc/classes/SkeletonModification2DFABRIK.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SkeletonModification2DFABRIK" inherits="SkeletonModification2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+<class name="SkeletonModification2DFABRIK" inherits="SkeletonModification2D" is_experimental="true" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A modification that uses FABRIK to manipulate a series of [Bone2D] nodes to reach a target.
</brief_description>
@@ -17,21 +17,21 @@
<return type="NodePath" />
<param index="0" name="joint_idx" type="int" />
<description>
- Returns the [Bone2D] node assigned to the FABRIK joint at [code]joint_idx[/code].
+ Returns the [Bone2D] node assigned to the FABRIK joint at [param joint_idx].
</description>
</method>
<method name="get_fabrik_joint_bone_index" qualifiers="const">
<return type="int" />
<param index="0" name="joint_idx" type="int" />
<description>
- Returns the index of the [Bone2D] node assigned to the FABRIK joint at [code]joint_idx[/code].
+ Returns the index of the [Bone2D] node assigned to the FABRIK joint at [param joint_idx].
</description>
</method>
<method name="get_fabrik_joint_magnet_position" qualifiers="const">
<return type="Vector2" />
<param index="0" name="joint_idx" type="int" />
<description>
- Returns the magnet position vector for the joint at [code]joint_idx[/code].
+ Returns the magnet position vector for the joint at [param joint_idx].
</description>
</method>
<method name="get_fabrik_joint_use_target_rotation" qualifiers="const">
@@ -46,7 +46,7 @@
<param index="0" name="joint_idx" type="int" />
<param index="1" name="bone2d_nodepath" type="NodePath" />
<description>
- Sets the [Bone2D] node assigned to the FABRIK joint at [code]joint_idx[/code].
+ Sets the [Bone2D] node assigned to the FABRIK joint at [param joint_idx].
</description>
</method>
<method name="set_fabrik_joint_bone_index">
@@ -54,7 +54,7 @@
<param index="0" name="joint_idx" type="int" />
<param index="1" name="bone_idx" type="int" />
<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.
+ Sets the bone index, [param bone_idx], of the FABRIK joint at [param joint_idx]. 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">
@@ -62,7 +62,7 @@
<param index="0" name="joint_idx" type="int" />
<param index="1" name="magnet_position" type="Vector2" />
<description>
- Sets the magnet position vector for the joint at [code]joint_idx[/code].
+ Sets the magnet position vector for the joint at [param joint_idx].
</description>
</method>
<method name="set_fabrik_joint_use_target_rotation">
@@ -70,14 +70,14 @@
<param index="0" name="joint_idx" type="int" />
<param index="1" name="use_target_rotation" type="bool" />
<description>
- Sets whether the joint at [code]joint_idx[/code] will use the target node's rotation rather than letting FABRIK rotate the node.
+ Sets whether the joint at [param joint_idx] 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.
+ The number 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.
diff --git a/doc/classes/SkeletonModification2DJiggle.xml b/doc/classes/SkeletonModification2DJiggle.xml
index 0fadf6e6c2..3321fffe1b 100644
--- a/doc/classes/SkeletonModification2DJiggle.xml
+++ b/doc/classes/SkeletonModification2DJiggle.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SkeletonModification2DJiggle" inherits="SkeletonModification2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+<class name="SkeletonModification2DJiggle" inherits="SkeletonModification2D" is_experimental="true" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A modification that jiggles [Bone2D] nodes as they move towards a target.
</brief_description>
@@ -21,56 +21,56 @@
<return type="NodePath" />
<param index="0" name="joint_idx" type="int" />
<description>
- Returns the [Bone2D] node assigned to the Jiggle joint at [code]joint_idx[/code].
+ Returns the [Bone2D] node assigned to the Jiggle joint at [param joint_idx].
</description>
</method>
<method name="get_jiggle_joint_bone_index" qualifiers="const">
<return type="int" />
<param index="0" name="joint_idx" type="int" />
<description>
- Returns the index of the [Bone2D] node assigned to the Jiggle joint at [code]joint_idx[/code].
+ Returns the index of the [Bone2D] node assigned to the Jiggle joint at [param joint_idx].
</description>
</method>
<method name="get_jiggle_joint_damping" qualifiers="const">
<return type="float" />
<param index="0" name="joint_idx" type="int" />
<description>
- Returns the amount of damping of the Jiggle joint at [code]joint_idx[/code].
+ Returns the amount of damping of the Jiggle joint at [param joint_idx].
</description>
</method>
<method name="get_jiggle_joint_gravity" qualifiers="const">
<return type="Vector2" />
<param index="0" name="joint_idx" type="int" />
<description>
- Returns a [Vector2] representing the amount of gravity the Jiggle joint at [code]joint_idx[/code] is influenced by.
+ Returns a [Vector2] representing the amount of gravity the Jiggle joint at [param joint_idx] is influenced by.
</description>
</method>
<method name="get_jiggle_joint_mass" qualifiers="const">
<return type="float" />
<param index="0" name="joint_idx" type="int" />
<description>
- Returns the amount of mass of the jiggle joint at [code]joint_idx[/code].
+ Returns the amount of mass of the jiggle joint at [param joint_idx].
</description>
</method>
<method name="get_jiggle_joint_override" qualifiers="const">
<return type="bool" />
<param index="0" name="joint_idx" type="int" />
<description>
- Returns a boolean that indicates whether the joint at [code]joint_idx[/code] is overriding the default Jiggle joint data defined in the modification.
+ Returns a boolean that indicates whether the joint at [param joint_idx] is overriding the default Jiggle joint data defined in the modification.
</description>
</method>
<method name="get_jiggle_joint_stiffness" qualifiers="const">
<return type="float" />
<param index="0" name="joint_idx" type="int" />
<description>
- Returns the stiffness of the Jiggle joint at [code]joint_idx[/code].
+ Returns the stiffness of the Jiggle joint at [param joint_idx].
</description>
</method>
<method name="get_jiggle_joint_use_gravity" qualifiers="const">
<return type="bool" />
<param index="0" name="joint_idx" type="int" />
<description>
- Returns a boolean that indicates whether the joint at [code]joint_idx[/code] is using gravity or not.
+ Returns a boolean that indicates whether the joint at [param joint_idx] is using gravity or not.
</description>
</method>
<method name="get_use_colliders" qualifiers="const">
@@ -91,7 +91,7 @@
<param index="0" name="joint_idx" type="int" />
<param index="1" name="bone2d_node" type="NodePath" />
<description>
- Sets the [Bone2D] node assigned to the Jiggle joint at [code]joint_idx[/code].
+ Sets the [Bone2D] node assigned to the Jiggle joint at [param joint_idx].
</description>
</method>
<method name="set_jiggle_joint_bone_index">
@@ -99,7 +99,7 @@
<param index="0" name="joint_idx" type="int" />
<param index="1" name="bone_idx" type="int" />
<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.
+ Sets the bone index, [param bone_idx], of the Jiggle joint at [param joint_idx]. 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">
@@ -107,7 +107,7 @@
<param index="0" name="joint_idx" type="int" />
<param index="1" name="damping" type="float" />
<description>
- Sets the amount of dampening of the Jiggle joint at [code]joint_idx[/code].
+ Sets the amount of dampening of the Jiggle joint at [param joint_idx].
</description>
</method>
<method name="set_jiggle_joint_gravity">
@@ -115,7 +115,7 @@
<param index="0" name="joint_idx" type="int" />
<param index="1" name="gravity" type="Vector2" />
<description>
- Sets the gravity vector of the Jiggle joint at [code]joint_idx[/code].
+ Sets the gravity vector of the Jiggle joint at [param joint_idx].
</description>
</method>
<method name="set_jiggle_joint_mass">
@@ -123,7 +123,7 @@
<param index="0" name="joint_idx" type="int" />
<param index="1" name="mass" type="float" />
<description>
- Sets the of mass of the Jiggle joint at [code]joint_idx[/code].
+ Sets the of mass of the Jiggle joint at [param joint_idx].
</description>
</method>
<method name="set_jiggle_joint_override">
@@ -131,7 +131,7 @@
<param index="0" name="joint_idx" type="int" />
<param index="1" name="override" type="bool" />
<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.
+ Sets whether the Jiggle joint at [param joint_idx] 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">
@@ -139,7 +139,7 @@
<param index="0" name="joint_idx" type="int" />
<param index="1" name="stiffness" type="float" />
<description>
- Sets the of stiffness of the Jiggle joint at [code]joint_idx[/code].
+ Sets the of stiffness of the Jiggle joint at [param joint_idx].
</description>
</method>
<method name="set_jiggle_joint_use_gravity">
@@ -147,7 +147,7 @@
<param index="0" name="joint_idx" type="int" />
<param index="1" name="use_gravity" type="bool" />
<description>
- Sets whether the Jiggle joint at [code]joint_idx[/code] should use gravity.
+ Sets whether the Jiggle joint at [param joint_idx] should use gravity.
</description>
</method>
<method name="set_use_colliders">
diff --git a/doc/classes/SkeletonModification2DLookAt.xml b/doc/classes/SkeletonModification2DLookAt.xml
index 4747b06056..136fed37de 100644
--- a/doc/classes/SkeletonModification2DLookAt.xml
+++ b/doc/classes/SkeletonModification2DLookAt.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SkeletonModification2DLookAt" inherits="SkeletonModification2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+<class name="SkeletonModification2DLookAt" inherits="SkeletonModification2D" is_experimental="true" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A modification that rotates a [Bone2D] node to look at a target.
</brief_description>
diff --git a/doc/classes/SkeletonModification2DPhysicalBones.xml b/doc/classes/SkeletonModification2DPhysicalBones.xml
index 9ddb34a5d0..209602e974 100644
--- a/doc/classes/SkeletonModification2DPhysicalBones.xml
+++ b/doc/classes/SkeletonModification2DPhysicalBones.xml
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SkeletonModification2DPhysicalBones" inherits="SkeletonModification2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+<class name="SkeletonModification2DPhysicalBones" inherits="SkeletonModification2D" is_experimental="true" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<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.
+ Experimental. Physical bones may be changed in the future to perform the position update of [Bone2D] on their own.
</description>
<tutorials>
</tutorials>
@@ -19,7 +20,7 @@
<return type="NodePath" />
<param index="0" name="joint_idx" type="int" />
<description>
- Returns the [PhysicalBone2D] node at [code]joint_idx[/code].
+ Returns the [PhysicalBone2D] node at [param joint_idx].
</description>
</method>
<method name="set_physical_bone_node">
@@ -27,7 +28,7 @@
<param index="0" name="joint_idx" type="int" />
<param index="1" name="physicalbone2d_node" type="NodePath" />
<description>
- Sets the [PhysicalBone2D] node at [code]joint_idx[/code].
+ Sets the [PhysicalBone2D] node at [param joint_idx].
[b]Note:[/b] This is just the index used for this modification, not the bone index used in the [Skeleton2D].
</description>
</method>
@@ -50,7 +51,7 @@
</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.
+ The number of [PhysicalBone2D] nodes linked in this modification.
</member>
</members>
</class>
diff --git a/doc/classes/SkeletonModification2DStackHolder.xml b/doc/classes/SkeletonModification2DStackHolder.xml
index 791dea2fb1..85df111c0d 100644
--- a/doc/classes/SkeletonModification2DStackHolder.xml
+++ b/doc/classes/SkeletonModification2DStackHolder.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SkeletonModification2DStackHolder" inherits="SkeletonModification2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+<class name="SkeletonModification2DStackHolder" inherits="SkeletonModification2D" is_experimental="true" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A modification that holds and executes a [SkeletonModificationStack2D].
</brief_description>
diff --git a/doc/classes/SkeletonModification2DTwoBoneIK.xml b/doc/classes/SkeletonModification2DTwoBoneIK.xml
index edd5431a0c..c476d71d44 100644
--- a/doc/classes/SkeletonModification2DTwoBoneIK.xml
+++ b/doc/classes/SkeletonModification2DTwoBoneIK.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SkeletonModification2DTwoBoneIK" inherits="SkeletonModification2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+<class name="SkeletonModification2DTwoBoneIK" inherits="SkeletonModification2D" is_experimental="true" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A modification that rotates two bones using the law of cosigns to reach the target.
</brief_description>
diff --git a/doc/classes/SkeletonModification3D.xml b/doc/classes/SkeletonModification3D.xml
index 9a6e72baaf..25431ea96f 100644
--- a/doc/classes/SkeletonModification3D.xml
+++ b/doc/classes/SkeletonModification3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SkeletonModification3D" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+<class name="SkeletonModification3D" inherits="Resource" is_deprecated="true" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A resource that operates on bones in a [Skeleton3D].
</brief_description>
@@ -32,7 +32,7 @@
<param index="2" name="max" type="float" />
<param index="3" name="invert" type="bool" />
<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.
+ Takes a angle and clamps it so it is within the passed-in [param min] and [param max] range. [param invert] will inversely clamp the angle, clamping it to the range outside of the given bounds.
</description>
</method>
<method name="get_is_setup" qualifiers="const">
diff --git a/doc/classes/SkeletonModification3DCCDIK.xml b/doc/classes/SkeletonModification3DCCDIK.xml
index fbefca32ad..90b2e78449 100644
--- a/doc/classes/SkeletonModification3DCCDIK.xml
+++ b/doc/classes/SkeletonModification3DCCDIK.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SkeletonModification3DCCDIK" inherits="SkeletonModification3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+<class name="SkeletonModification3DCCDIK" inherits="SkeletonModification3D" is_deprecated="true" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A modification that uses CCDIK to manipulate a series of bones to reach a target.
</brief_description>
@@ -16,49 +16,49 @@
<return type="int" />
<param index="0" name="joint_idx" type="int" />
<description>
- Returns the bone index of the bone assigned to the CCDIK joint at [code]joint_idx[/code].
+ Returns the bone index of the bone assigned to the CCDIK joint at [param joint_idx].
</description>
</method>
<method name="get_ccdik_joint_bone_name" qualifiers="const">
<return type="String" />
<param index="0" name="joint_idx" type="int" />
<description>
- Returns the name of the bone that is assigned to the CCDIK joint at [code]joint_idx[/code].
+ Returns the name of the bone that is assigned to the CCDIK joint at [param joint_idx].
</description>
</method>
<method name="get_ccdik_joint_ccdik_axis" qualifiers="const">
<return type="int" />
<param index="0" name="joint_idx" type="int" />
<description>
- Returns the integer representing the joint axis of the CCDIK joint at [code]joint_idx[/code].
+ Returns the integer representing the joint axis of the CCDIK joint at [param joint_idx].
</description>
</method>
<method name="get_ccdik_joint_constraint_angle_max" qualifiers="const">
<return type="float" />
<param index="0" name="joint_idx" type="int" />
<description>
- Returns the maximum angle constraint for the joint at [code]joint_idx[/code]. [b]Note:[/b] This angle is in degrees!
+ Returns the maximum angle constraint for the joint at [param joint_idx]. [b]Note:[/b] This angle is in degrees!
</description>
</method>
<method name="get_ccdik_joint_constraint_angle_min" qualifiers="const">
<return type="float" />
<param index="0" name="joint_idx" type="int" />
<description>
- Returns the minimum angle constraint for the joint at [code]joint_idx[/code]. [b]Note:[/b] This angle is in degrees!
+ Returns the minimum angle constraint for the joint at [param joint_idx]. [b]Note:[/b] This angle is in degrees!
</description>
</method>
<method name="get_ccdik_joint_constraint_invert" qualifiers="const">
<return type="bool" />
<param index="0" name="joint_idx" type="int" />
<description>
- Returns whether the CCDIK joint at [code]joint_idx[/code] uses an inverted joint constraint. See [method set_ccdik_joint_constraint_invert] for details.
+ Returns whether the CCDIK joint at [param joint_idx] uses an inverted joint constraint. See [method set_ccdik_joint_constraint_invert] for details.
</description>
</method>
<method name="get_ccdik_joint_enable_joint_constraint" qualifiers="const">
<return type="bool" />
<param index="0" name="joint_idx" type="int" />
<description>
- Enables angle constraints to the CCDIK joint at [code]joint_idx[/code].
+ Enables angle constraints to the CCDIK joint at [param joint_idx].
</description>
</method>
<method name="set_ccdik_joint_bone_index">
@@ -66,7 +66,7 @@
<param index="0" name="joint_idx" type="int" />
<param index="1" name="bone_index" type="int" />
<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]bone_name[/code] of the CCDIK joint based on data provided by the linked skeleton.
+ Sets the bone index, [param bone_index], of the CCDIK joint at [param joint_idx]. When possible, this will also update the [code]bone_name[/code] of the CCDIK joint based on data provided by the linked skeleton.
</description>
</method>
<method name="set_ccdik_joint_bone_name">
@@ -74,7 +74,7 @@
<param index="0" name="joint_idx" type="int" />
<param index="1" name="bone_name" type="String" />
<description>
- Sets the bone name, [code]bone_name[/code], of the CCDIK joint at [code]joint_idx[/code]. When possible, this will also update the [code]bone_index[/code] of the CCDIK joint based on data provided by the linked skeleton.
+ Sets the bone name, [param bone_name], of the CCDIK joint at [param joint_idx]. When possible, this will also update the [code]bone_index[/code] of the CCDIK joint based on data provided by the linked skeleton.
</description>
</method>
<method name="set_ccdik_joint_ccdik_axis">
@@ -82,7 +82,7 @@
<param index="0" name="joint_idx" type="int" />
<param index="1" name="axis" type="int" />
<description>
- Sets the joint axis of the CCDIK joint at [code]joint_idx[/code] to the passed-in joint axis, [code]axis[/code].
+ Sets the joint axis of the CCDIK joint at [param joint_idx] to the passed-in joint axis, [param axis].
</description>
</method>
<method name="set_ccdik_joint_constraint_angle_max">
@@ -90,7 +90,7 @@
<param index="0" name="joint_idx" type="int" />
<param index="1" name="max_angle" type="float" />
<description>
- Sets the maximum angle constraint for the joint at [code]joint_idx[/code]. [b]Note:[/b] This angle must be in radians!
+ Sets the maximum angle constraint for the joint at [param joint_idx]. [b]Note:[/b] This angle must be in radians!
</description>
</method>
<method name="set_ccdik_joint_constraint_angle_min">
@@ -98,7 +98,7 @@
<param index="0" name="joint_idx" type="int" />
<param index="1" name="min_angle" type="float" />
<description>
- Sets the minimum angle constraint for the joint at [code]joint_idx[/code]. [b]Note:[/b] This angle must be in radians!
+ Sets the minimum angle constraint for the joint at [param joint_idx]. [b]Note:[/b] This angle must be in radians!
</description>
</method>
<method name="set_ccdik_joint_constraint_invert">
@@ -106,7 +106,7 @@
<param index="0" name="joint_idx" type="int" />
<param index="1" name="invert" type="bool" />
<description>
- Sets whether the CCDIK joint at [code]joint_idx[/code] uses an inverted joint constraint.
+ Sets whether the CCDIK joint at [param joint_idx] 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>
@@ -115,13 +115,13 @@
<param index="0" name="joint_idx" type="int" />
<param index="1" name="enable" type="bool" />
<description>
- Sets whether joint constraints are enabled for the CCDIK joint at [code]joint_idx[/code].
+ Sets whether joint constraints are enabled for the CCDIK joint at [param joint_idx].
</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.
+ The number of CCDIK joints in the CCDIK modification.
</member>
<member name="high_quality_solve" type="bool" setter="set_use_high_quality_solve" getter="get_use_high_quality_solve" default="true">
When true, the CCDIK algorithm will perform a higher quality solve that returns more natural results. A high quality solve requires more computation power to solve though, and therefore can be disabled to save performance.
diff --git a/doc/classes/SkeletonModification3DFABRIK.xml b/doc/classes/SkeletonModification3DFABRIK.xml
index 5908f94650..a2bec2b559 100644
--- a/doc/classes/SkeletonModification3DFABRIK.xml
+++ b/doc/classes/SkeletonModification3DFABRIK.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SkeletonModification3DFABRIK" inherits="SkeletonModification3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+<class name="SkeletonModification3DFABRIK" inherits="SkeletonModification3D" is_deprecated="true" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A modification that uses FABRIK to manipulate a series of bones to reach a target.
</brief_description>
@@ -17,49 +17,49 @@
<return type="void" />
<param index="0" name="joint_idx" type="int" />
<description>
- Will attempt to automatically calculate the length of the bone assigned to the FABRIK joint at [code]joint_idx[/code].
+ Will attempt to automatically calculate the length of the bone assigned to the FABRIK joint at [param joint_idx].
</description>
</method>
<method name="get_fabrik_joint_auto_calculate_length" qualifiers="const">
<return type="bool" />
<param index="0" name="joint_idx" type="int" />
<description>
- Returns a boolean that indicates whether this modification will attempt to autocalculate the length of the bone assigned to the FABRIK joint at [code]joint_idx[/code].
+ Returns a boolean that indicates whether this modification will attempt to autocalculate the length of the bone assigned to the FABRIK joint at [param joint_idx].
</description>
</method>
<method name="get_fabrik_joint_bone_index" qualifiers="const">
<return type="int" />
<param index="0" name="joint_idx" type="int" />
<description>
- Returns the bone index of the bone assigned to the FABRIK joint at [code]joint_idx[/code].
+ Returns the bone index of the bone assigned to the FABRIK joint at [param joint_idx].
</description>
</method>
<method name="get_fabrik_joint_bone_name" qualifiers="const">
<return type="String" />
<param index="0" name="joint_idx" type="int" />
<description>
- Returns the name of the bone that is assigned to the FABRIK joint at [code]joint_idx[/code].
+ Returns the name of the bone that is assigned to the FABRIK joint at [param joint_idx].
</description>
</method>
<method name="get_fabrik_joint_length" qualifiers="const">
<return type="float" />
<param index="0" name="joint_idx" type="int" />
<description>
- Returns the length of the FABRIK joint at [code]joint_idx[/code].
+ Returns the length of the FABRIK joint at [param joint_idx].
</description>
</method>
<method name="get_fabrik_joint_magnet" qualifiers="const">
<return type="Vector3" />
<param index="0" name="joint_idx" type="int" />
<description>
- Returns the magnet vector of the FABRIK joint at [code]joint_idx[/code].
+ Returns the magnet vector of the FABRIK joint at [param joint_idx].
</description>
</method>
<method name="get_fabrik_joint_tip_node" qualifiers="const">
<return type="NodePath" />
<param index="0" name="joint_idx" type="int" />
<description>
- Returns the [Node3D]-based node placed at the tip of the FABRIK joint at [code]joint_idx[/code], if one has been set.
+ Returns the [Node3D]-based node placed at the tip of the FABRIK joint at [param joint_idx], if one has been set.
</description>
</method>
<method name="get_fabrik_joint_use_target_basis" qualifiers="const">
@@ -74,7 +74,7 @@
<return type="bool" />
<param index="0" name="joint_idx" type="int" />
<description>
- Sets the [Node3D]-based node that will be used as the tip of the FABRIK joint at [code]joint_idx[/code].
+ Sets the [Node3D]-based node that will be used as the tip of the FABRIK joint at [param joint_idx].
</description>
</method>
<method name="set_fabrik_joint_auto_calculate_length">
@@ -82,7 +82,7 @@
<param index="0" name="joint_idx" type="int" />
<param index="1" name="auto_calculate_length" type="bool" />
<description>
- When [code]true[/code], this modification will attempt to automatically calculate the length of the bone for the FABRIK joint at [code]joint_idx[/code]. It does this by either using the tip node assigned, if there is one assigned, or the distance the of the bone's children, if the bone has any. If the bone has no children and no tip node is assigned, then the modification [b]cannot[/b] autocalculate the joint's length. In this case, the joint length should be entered manually or a tip node assigned.
+ When [code]true[/code], this modification will attempt to automatically calculate the length of the bone for the FABRIK joint at [param joint_idx]. It does this by either using the tip node assigned, if there is one assigned, or the distance the of the bone's children, if the bone has any. If the bone has no children and no tip node is assigned, then the modification [b]cannot[/b] autocalculate the joint's length. In this case, the joint length should be entered manually or a tip node assigned.
</description>
</method>
<method name="set_fabrik_joint_bone_index">
@@ -90,7 +90,7 @@
<param index="0" name="joint_idx" type="int" />
<param index="1" name="bone_index" type="int" />
<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]bone_name[/code] of the FABRIK joint based on data provided by the [Skeleton3D].
+ Sets the bone index, [param bone_index], of the FABRIK joint at [param joint_idx]. When possible, this will also update the [code]bone_name[/code] of the FABRIK joint based on data provided by the [Skeleton3D].
</description>
</method>
<method name="set_fabrik_joint_bone_name">
@@ -98,7 +98,7 @@
<param index="0" name="joint_idx" type="int" />
<param index="1" name="bone_name" type="String" />
<description>
- Sets the bone name, [code]bone_name[/code], of the FABRIK joint at [code]joint_idx[/code]. When possible, this will also update the [code]bone_index[/code] of the FABRIK joint based on data provided by the [Skeleton3D].
+ Sets the bone name, [param bone_name], of the FABRIK joint at [param joint_idx]. When possible, this will also update the [code]bone_index[/code] of the FABRIK joint based on data provided by the [Skeleton3D].
</description>
</method>
<method name="set_fabrik_joint_length">
@@ -106,7 +106,7 @@
<param index="0" name="joint_idx" type="int" />
<param index="1" name="length" type="float" />
<description>
- Sets the joint length, [code]length[/code], of the FABRIK joint at [code]joint_idx[/code].
+ Sets the joint length, [param length], of the FABRIK joint at [param joint_idx].
</description>
</method>
<method name="set_fabrik_joint_magnet">
@@ -114,7 +114,7 @@
<param index="0" name="joint_idx" type="int" />
<param index="1" name="magnet_position" type="Vector3" />
<description>
- Sets the magenet position to [code]magnet_position[/code] for the joint at [code]joint_idx[/code]. The magnet position is used to nudge the joint in that direction when solving, which gives some control over how that joint will bend when being solved.
+ Sets the magenet position to [param magnet_position] for the joint at [param joint_idx]. The magnet position is used to nudge the joint in that direction when solving, which gives some control over how that joint will bend when being solved.
</description>
</method>
<method name="set_fabrik_joint_tip_node">
@@ -122,7 +122,7 @@
<param index="0" name="joint_idx" type="int" />
<param index="1" name="tip_node" type="NodePath" />
<description>
- Sets the nodepath of the FARIK joint at [code]joint_idx[/code] to [code]tip_node[/code]. The tip node is used to calculate the length of the FABRIK joint when set to automatically calculate joint length.
+ Sets the nodepath of the FARIK joint at [param joint_idx] to [param tip_node]. The tip node is used to calculate the length of the FABRIK joint when set to automatically calculate joint length.
[b]Note:[/b] The tip node should generally be a child node of a [BoneAttachment3D] node attached to the bone that this FABRIK joint operates on, with the child node being offset so it is at the end of the bone.
</description>
</method>
@@ -131,7 +131,7 @@
<param index="0" name="joint_idx" type="int" />
<param index="1" name="use_target_basis" type="bool" />
<description>
- Sets whether the FABRIK joint at [code]joint_idx[/code] uses the target's [Basis] for its rotation.
+ Sets whether the FABRIK joint at [param joint_idx] uses the target's [Basis] for its rotation.
[b]Note:[/b] This option is only available for the final bone in the FABRIK chain, with this setting being ignored for all other bones.
</description>
</method>
@@ -140,7 +140,7 @@
<param index="0" name="joint_idx" type="int" />
<param index="1" name="use_tip_node" type="bool" />
<description>
- Sets whether the tip node should be used when autocalculating the joint length for the FABRIK joint at [code]joint_idx[/code]. This will only work if there is a node assigned to the tip nodepath for this joint.
+ Sets whether the tip node should be used when autocalculating the joint length for the FABRIK joint at [param joint_idx]. This will only work if there is a node assigned to the tip nodepath for this joint.
</description>
</method>
</methods>
diff --git a/doc/classes/SkeletonModification3DJiggle.xml b/doc/classes/SkeletonModification3DJiggle.xml
index ddbd5b4274..304f08bb20 100644
--- a/doc/classes/SkeletonModification3DJiggle.xml
+++ b/doc/classes/SkeletonModification3DJiggle.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SkeletonModification3DJiggle" inherits="SkeletonModification3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+<class name="SkeletonModification3DJiggle" inherits="SkeletonModification3D" is_deprecated="true" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A modification that jiggles bones as they move towards a target.
</brief_description>
@@ -21,42 +21,42 @@
<return type="int" />
<param index="0" name="joint_idx" type="int" />
<description>
- Returns the bone index of the bone assigned to the Jiggle joint at [code]joint_idx[/code].
+ Returns the bone index of the bone assigned to the Jiggle joint at [param joint_idx].
</description>
</method>
<method name="get_jiggle_joint_bone_name" qualifiers="const">
<return type="String" />
<param index="0" name="joint_idx" type="int" />
<description>
- Returns the name of the bone that is assigned to the Jiggle joint at [code]joint_idx[/code].
+ Returns the name of the bone that is assigned to the Jiggle joint at [param joint_idx].
</description>
</method>
<method name="get_jiggle_joint_damping" qualifiers="const">
<return type="float" />
<param index="0" name="joint_idx" type="int" />
<description>
- Returns the amount of dampening of the Jiggle joint at [code]joint_idx[/code].
+ Returns the amount of dampening of the Jiggle joint at [param joint_idx].
</description>
</method>
<method name="get_jiggle_joint_gravity" qualifiers="const">
<return type="Vector3" />
<param index="0" name="joint_idx" type="int" />
<description>
- Returns a [Vector3] representign the amount of gravity the Jiggle joint at [code]joint_idx[/code] is influenced by.
+ Returns a [Vector3] representign the amount of gravity the Jiggle joint at [param joint_idx] is influenced by.
</description>
</method>
<method name="get_jiggle_joint_mass" qualifiers="const">
<return type="float" />
<param index="0" name="joint_idx" type="int" />
<description>
- Returns the amount of mass of the Jiggle joint at [code]joint_idx[/code].
+ Returns the amount of mass of the Jiggle joint at [param joint_idx].
</description>
</method>
<method name="get_jiggle_joint_override" qualifiers="const">
<return type="bool" />
<param index="0" name="joint_idx" type="int" />
<description>
- Returns a boolean that indicates whether the joint at [code]joint_idx[/code] is overriding the default jiggle joint data defined in the modification.
+ Returns a boolean that indicates whether the joint at [param joint_idx] is overriding the default jiggle joint data defined in the modification.
</description>
</method>
<method name="get_jiggle_joint_roll" qualifiers="const">
@@ -70,14 +70,14 @@
<return type="float" />
<param index="0" name="joint_idx" type="int" />
<description>
- Returns the stiffness of the Jiggle joint at [code]joint_idx[/code].
+ Returns the stiffness of the Jiggle joint at [param joint_idx].
</description>
</method>
<method name="get_jiggle_joint_use_gravity" qualifiers="const">
<return type="bool" />
<param index="0" name="joint_idx" type="int" />
<description>
- Returns a boolean that indicates whether the joint at [code]joint_idx[/code] is using gravity or not.
+ Returns a boolean that indicates whether the joint at [param joint_idx] is using gravity or not.
</description>
</method>
<method name="get_use_colliders" qualifiers="const">
@@ -98,7 +98,7 @@
<param index="0" name="joint_idx" type="int" />
<param index="1" name="bone_idx" type="int" />
<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]bone_name[/code] of the Jiggle joint based on data provided by the [Skeleton3D].
+ Sets the bone index, [param bone_idx], of the Jiggle joint at [param joint_idx]. When possible, this will also update the [code]bone_name[/code] of the Jiggle joint based on data provided by the [Skeleton3D].
</description>
</method>
<method name="set_jiggle_joint_bone_name">
@@ -106,7 +106,7 @@
<param index="0" name="joint_idx" type="int" />
<param index="1" name="name" type="String" />
<description>
- Sets the bone name, [code]bone_name[/code], of the Jiggle joint at [code]joint_idx[/code]. When possible, this will also update the [code]bone_index[/code] of the Jiggle joint based on data provided by the [Skeleton3D].
+ Sets the bone name, [param name], of the Jiggle joint at [param joint_idx]. When possible, this will also update the [code]bone_index[/code] of the Jiggle joint based on data provided by the [Skeleton3D].
</description>
</method>
<method name="set_jiggle_joint_damping">
@@ -114,7 +114,7 @@
<param index="0" name="joint_idx" type="int" />
<param index="1" name="damping" type="float" />
<description>
- Sets the amount of dampening of the Jiggle joint at [code]joint_idx[/code].
+ Sets the amount of dampening of the Jiggle joint at [param joint_idx].
</description>
</method>
<method name="set_jiggle_joint_gravity">
@@ -122,7 +122,7 @@
<param index="0" name="joint_idx" type="int" />
<param index="1" name="gravity" type="Vector3" />
<description>
- Sets the gravity vector of the Jiggle joint at [code]joint_idx[/code].
+ Sets the gravity vector of the Jiggle joint at [param joint_idx].
</description>
</method>
<method name="set_jiggle_joint_mass">
@@ -130,7 +130,7 @@
<param index="0" name="joint_idx" type="int" />
<param index="1" name="mass" type="float" />
<description>
- Sets the of mass of the Jiggle joint at [code]joint_idx[/code].
+ Sets the of mass of the Jiggle joint at [param joint_idx].
</description>
</method>
<method name="set_jiggle_joint_override">
@@ -138,7 +138,7 @@
<param index="0" name="joint_idx" type="int" />
<param index="1" name="override" type="bool" />
<description>
- Sets whether the Jiggle joint at [code]joint_idx[/code] should override the default Jiggle joint settings. Setting this to true will make the joint use its own settings rather than the default ones attached to the modification.
+ Sets whether the Jiggle joint at [param joint_idx] should override the default Jiggle joint settings. Setting this to true will make the joint use its own settings rather than the default ones attached to the modification.
</description>
</method>
<method name="set_jiggle_joint_roll">
@@ -154,7 +154,7 @@
<param index="0" name="joint_idx" type="int" />
<param index="1" name="stiffness" type="float" />
<description>
- Sets the of stiffness of the Jiggle joint at [code]joint_idx[/code].
+ Sets the of stiffness of the Jiggle joint at [param joint_idx].
</description>
</method>
<method name="set_jiggle_joint_use_gravity">
@@ -162,7 +162,7 @@
<param index="0" name="joint_idx" type="int" />
<param index="1" name="use_gravity" type="bool" />
<description>
- Sets whether the Jiggle joint at [code]joint_idx[/code] should use gravity.
+ Sets whether the Jiggle joint at [param joint_idx] should use gravity.
</description>
</method>
<method name="set_use_colliders">
diff --git a/doc/classes/SkeletonModification3DLookAt.xml b/doc/classes/SkeletonModification3DLookAt.xml
index 3602cfad95..aeed953ca9 100644
--- a/doc/classes/SkeletonModification3DLookAt.xml
+++ b/doc/classes/SkeletonModification3DLookAt.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SkeletonModification3DLookAt" inherits="SkeletonModification3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+<class name="SkeletonModification3DLookAt" inherits="SkeletonModification3D" is_deprecated="true" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A modification that rotates a bone to look at a target.
</brief_description>
diff --git a/doc/classes/SkeletonModification3DStackHolder.xml b/doc/classes/SkeletonModification3DStackHolder.xml
index 24240236a4..9448e2c783 100644
--- a/doc/classes/SkeletonModification3DStackHolder.xml
+++ b/doc/classes/SkeletonModification3DStackHolder.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SkeletonModification3DStackHolder" inherits="SkeletonModification3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+<class name="SkeletonModification3DStackHolder" inherits="SkeletonModification3D" is_deprecated="true" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A modification that holds and executes a [SkeletonModificationStack3D].
</brief_description>
diff --git a/doc/classes/SkeletonModification3DTwoBoneIK.xml b/doc/classes/SkeletonModification3DTwoBoneIK.xml
index 2fd7afc360..0e7ffd5c80 100644
--- a/doc/classes/SkeletonModification3DTwoBoneIK.xml
+++ b/doc/classes/SkeletonModification3DTwoBoneIK.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SkeletonModification3DTwoBoneIK" inherits="SkeletonModification3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+<class name="SkeletonModification3DTwoBoneIK" inherits="SkeletonModification3D" is_deprecated="true" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A modification that moves two bones to reach the target.
</brief_description>
@@ -101,14 +101,14 @@
<return type="void" />
<param index="0" name="bone_idx" type="int" />
<description>
- Sets the bone index, [code]bone_index[/code], of the first bone. When possible, this will also update the [code]bone_name[/code] of the first bone based on data provided by the [Skeleton3D].
+ Sets the bone index, [param bone_idx], of the first bone. When possible, this will also update the [code]bone_name[/code] of the first bone based on data provided by the [Skeleton3D].
</description>
</method>
<method name="set_joint_one_bone_name">
<return type="void" />
<param index="0" name="bone_name" type="String" />
<description>
- Sets the bone name, [code]bone_name[/code], of the first bone. When possible, this will also update the [code]bone_index[/code] of the first bone based on data provided by the [Skeleton3D].
+ Sets the bone name, [param bone_name], of the first bone. When possible, this will also update the [code]bone_index[/code] of the first bone based on data provided by the [Skeleton3D].
</description>
</method>
<method name="set_joint_one_length">
@@ -129,14 +129,14 @@
<return type="void" />
<param index="0" name="bone_idx" type="int" />
<description>
- Sets the bone index, [code]bone_index[/code], of the second bone. When possible, this will also update the [code]bone_name[/code] of the second bone based on data provided by the [Skeleton3D].
+ Sets the bone index, [param bone_idx], of the second bone. When possible, this will also update the [code]bone_name[/code] of the second bone based on data provided by the [Skeleton3D].
</description>
</method>
<method name="set_joint_two_bone_name">
<return type="void" />
<param index="0" name="bone_name" type="String" />
<description>
- Sets the bone name, [code]bone_name[/code], of the second bone. When possible, this will also update the [code]bone_index[/code] of the second bone based on data provided by the [Skeleton3D].
+ Sets the bone name, [param bone_name], of the second bone. When possible, this will also update the [code]bone_index[/code] of the second bone based on data provided by the [Skeleton3D].
</description>
</method>
<method name="set_joint_two_length">
diff --git a/doc/classes/SkeletonModificationStack2D.xml b/doc/classes/SkeletonModificationStack2D.xml
index d752323231..d96833e335 100644
--- a/doc/classes/SkeletonModificationStack2D.xml
+++ b/doc/classes/SkeletonModificationStack2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SkeletonModificationStack2D" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+<class name="SkeletonModificationStack2D" inherits="Resource" is_experimental="true" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A resource that holds a stack of [SkeletonModification2D]s.
</brief_description>
@@ -22,7 +22,7 @@
<return type="void" />
<param index="0" name="mod_idx" type="int" />
<description>
- Deletes the [SkeletonModification2D] at the index position [code]mod_idx[/code], if it exists.
+ Deletes the [SkeletonModification2D] at the index position [param mod_idx], if it exists.
</description>
</method>
<method name="enable_all_modifications">
@@ -37,7 +37,7 @@
<param index="0" name="delta" type="float" />
<param index="1" name="execution_mode" type="int" />
<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].
+ Executes all of the [SkeletonModification2D]s in the stack that use the same execution mode as the passed-in [param execution_mode], 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>
@@ -51,7 +51,7 @@
<return type="SkeletonModification2D" />
<param index="0" name="mod_idx" type="int" />
<description>
- Returns the [SkeletonModification2D] at the passed-in index, [code]mod_idx[/code].
+ Returns the [SkeletonModification2D] at the passed-in index, [param mod_idx].
</description>
</method>
<method name="get_skeleton" qualifiers="const">
@@ -65,7 +65,7 @@
<param index="0" name="mod_idx" type="int" />
<param index="1" name="modification" type="SkeletonModification2D" />
<description>
- Sets the modification at [code]mod_idx[/code] to the passed-in modification, [code]modification[/code].
+ Sets the modification at [param mod_idx] to the passed-in modification, [param modification].
</description>
</method>
<method name="setup">
diff --git a/doc/classes/SkeletonModificationStack3D.xml b/doc/classes/SkeletonModificationStack3D.xml
index 010c2181e7..9eaeeefd8e 100644
--- a/doc/classes/SkeletonModificationStack3D.xml
+++ b/doc/classes/SkeletonModificationStack3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SkeletonModificationStack3D" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+<class name="SkeletonModificationStack3D" inherits="Resource" is_deprecated="true" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A resource that holds a stack of [SkeletonModification3D]s.
</brief_description>
@@ -21,7 +21,7 @@
<return type="void" />
<param index="0" name="mod_idx" type="int" />
<description>
- Deletes the [SkeletonModification3D] at the index position [code]mod_idx[/code], if it exists.
+ Deletes the [SkeletonModification3D] at the index position [param mod_idx], if it exists.
</description>
</method>
<method name="enable_all_modifications">
@@ -36,7 +36,7 @@
<param index="0" name="delta" type="float" />
<param index="1" name="execution_mode" type="int" />
<description>
- Executes all of the [SkeletonModification3D]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].
+ Executes all of the [SkeletonModification3D]s in the stack that use the same execution mode as the passed-in [param execution_mode], 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>
@@ -50,7 +50,7 @@
<return type="SkeletonModification3D" />
<param index="0" name="mod_idx" type="int" />
<description>
- Returns the [SkeletonModification3D] at the passed-in index, [code]mod_idx[/code].
+ Returns the [SkeletonModification3D] at the passed-in index, [param mod_idx].
</description>
</method>
<method name="get_skeleton" qualifiers="const">
@@ -64,7 +64,7 @@
<param index="0" name="mod_idx" type="int" />
<param index="1" name="modification" type="SkeletonModification3D" />
<description>
- Sets the modification at [code]mod_idx[/code] to the passed-in modification, [code]modification[/code].
+ Sets the modification at [param mod_idx] to the passed-in modification, [param modification].
</description>
</method>
<method name="setup">
@@ -79,7 +79,7 @@
When true, the modification's in the stack will be called. This is handled automatically through the [Skeleton3D] node.
</member>
<member name="modification_count" type="int" setter="set_modification_count" getter="get_modification_count" default="0">
- The amount of modifications in the stack.
+ 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 skeleton bone poses.
diff --git a/doc/classes/SkeletonProfile.xml b/doc/classes/SkeletonProfile.xml
index 52925c2d41..57bdd52d9e 100644
--- a/doc/classes/SkeletonProfile.xml
+++ b/doc/classes/SkeletonProfile.xml
@@ -7,20 +7,21 @@
This resource is used in [EditorScenePostImport]. Some parameters are referring to bones in [Skeleton3D], [Skin], [Animation], and some other nodes are rewritten based on the parameters of [SkeletonProfile].
</description>
<tutorials>
+ <link title="Retargeting 3D Skeletons">$DOCS_URL/tutorials/assets_pipeline/retargeting_3d_skeletons.html</link>
</tutorials>
<methods>
<method name="find_bone" qualifiers="const">
<return type="int" />
<param index="0" name="bone_name" type="StringName" />
<description>
- Returns the bone index that matches [code]bone_name[/code] as its name.
+ Returns the bone index that matches [param bone_name] as its name.
</description>
</method>
<method name="get_bone_name" qualifiers="const">
<return type="StringName" />
<param index="0" name="bone_idx" type="int" />
<description>
- Returns the name of the bone at [code]bone_idx[/code] that will be the key name in the [BoneMap].
+ Returns the name of the bone at [param bone_idx] that will be the key name in the [BoneMap].
In the retargeting process, the returned bone name is the bone name of the target skeleton.
</description>
</method>
@@ -28,35 +29,35 @@
<return type="StringName" />
<param index="0" name="bone_idx" type="int" />
<description>
- Returns the name of the bone which is the parent to the bone at [code]bone_idx[/code]. The result is empty if the bone has no parent.
+ Returns the name of the bone which is the parent to the bone at [param bone_idx]. The result is empty if the bone has no parent.
</description>
</method>
<method name="get_bone_tail" qualifiers="const">
<return type="StringName" />
<param index="0" name="bone_idx" type="int" />
<description>
- Returns the name of the bone which is the tail of the bone at [code]bone_idx[/code].
+ Returns the name of the bone which is the tail of the bone at [param bone_idx].
</description>
</method>
<method name="get_group" qualifiers="const">
<return type="StringName" />
<param index="0" name="bone_idx" type="int" />
<description>
- Returns the group of the bone at [code]bone_idx[/code].
+ Returns the group of the bone at [param bone_idx].
</description>
</method>
<method name="get_group_name" qualifiers="const">
<return type="StringName" />
<param index="0" name="group_idx" type="int" />
<description>
- Returns the name of the group at [code]group_idx[/code] that will be the drawing group in the [BoneMap] editor.
+ Returns the name of the group at [param group_idx] that will be the drawing group in the [BoneMap] editor.
</description>
</method>
<method name="get_handle_offset" qualifiers="const">
<return type="Vector2" />
<param index="0" name="bone_idx" type="int" />
<description>
- Returns the offset of the bone at [code]bone_idx[/code] that will be the button position in the [BoneMap] editor.
+ Returns the offset of the bone at [param bone_idx] that will be the button position in the [BoneMap] editor.
This is the offset with origin at the top left corner of the square.
</description>
</method>
@@ -64,21 +65,21 @@
<return type="Transform3D" />
<param index="0" name="bone_idx" type="int" />
<description>
- Returns the reference pose transform for bone [code]bone_idx[/code].
+ Returns the reference pose transform for bone [param bone_idx].
</description>
</method>
<method name="get_tail_direction" qualifiers="const">
<return type="int" enum="SkeletonProfile.TailDirection" />
<param index="0" name="bone_idx" type="int" />
<description>
- Returns the tail direction of the bone at [code]bone_idx[/code].
+ Returns the tail direction of the bone at [param bone_idx].
</description>
</method>
<method name="get_texture" qualifiers="const">
<return type="Texture2D" />
<param index="0" name="group_idx" type="int" />
<description>
- Returns the texture of the group at [code]group_idx[/code] that will be the drawing group background image in the [BoneMap] editor.
+ Returns the texture of the group at [param group_idx] that will be the drawing group background image in the [BoneMap] editor.
</description>
</method>
<method name="set_bone_name">
@@ -86,7 +87,7 @@
<param index="0" name="bone_idx" type="int" />
<param index="1" name="bone_name" type="StringName" />
<description>
- Sets the name of the bone at [code]bone_idx[/code] that will be the key name in the [BoneMap].
+ Sets the name of the bone at [param bone_idx] that will be the key name in the [BoneMap].
In the retargeting process, the setting bone name is the bone name of the target skeleton.
</description>
</method>
@@ -95,7 +96,7 @@
<param index="0" name="bone_idx" type="int" />
<param index="1" name="bone_parent" type="StringName" />
<description>
- Sets the bone with name [code]bone_parent[/code] as the parent of the bone at [code]bone_idx[/code]. If an empty string is passed, then the bone has no parent.
+ Sets the bone with name [param bone_parent] as the parent of the bone at [param bone_idx]. If an empty string is passed, then the bone has no parent.
</description>
</method>
<method name="set_bone_tail">
@@ -103,7 +104,7 @@
<param index="0" name="bone_idx" type="int" />
<param index="1" name="bone_tail" type="StringName" />
<description>
- Sets the bone with name [code]bone_tail[/code] as the tail of the bone at [code]bone_idx[/code].
+ Sets the bone with name [param bone_tail] as the tail of the bone at [param bone_idx].
</description>
</method>
<method name="set_group">
@@ -111,7 +112,7 @@
<param index="0" name="bone_idx" type="int" />
<param index="1" name="group" type="StringName" />
<description>
- Sets the group of the bone at [code]bone_idx[/code].
+ Sets the group of the bone at [param bone_idx].
</description>
</method>
<method name="set_group_name">
@@ -119,7 +120,7 @@
<param index="0" name="group_idx" type="int" />
<param index="1" name="group_name" type="StringName" />
<description>
- Sets the name of the group at [code]group_idx[/code] that will be the drawing group in the [BoneMap] editor.
+ Sets the name of the group at [param group_idx] that will be the drawing group in the [BoneMap] editor.
</description>
</method>
<method name="set_handle_offset">
@@ -127,7 +128,7 @@
<param index="0" name="bone_idx" type="int" />
<param index="1" name="handle_offset" type="Vector2" />
<description>
- Sets the offset of the bone at [code]bone_idx[/code] that will be the button position in the [BoneMap] editor.
+ Sets the offset of the bone at [param bone_idx] that will be the button position in the [BoneMap] editor.
This is the offset with origin at the top left corner of the square.
</description>
</method>
@@ -136,7 +137,7 @@
<param index="0" name="bone_idx" type="int" />
<param index="1" name="bone_name" type="Transform3D" />
<description>
- Sets the reference pose transform for bone [code]bone_idx[/code].
+ Sets the reference pose transform for bone [param bone_idx].
</description>
</method>
<method name="set_tail_direction">
@@ -144,7 +145,7 @@
<param index="0" name="bone_idx" type="int" />
<param index="1" name="tail_direction" type="int" enum="SkeletonProfile.TailDirection" />
<description>
- Sets the tail direction of the bone at [code]bone_idx[/code].
+ Sets the tail direction of the bone at [param bone_idx].
[b]Note:[/b] This only specifies the method of calculation. The actual coordinates required should be stored in an external skeleton, so the calculation itself needs to be done externally.
</description>
</method>
@@ -153,7 +154,7 @@
<param index="0" name="group_idx" type="int" />
<param index="1" name="texture" type="Texture2D" />
<description>
- Sets the texture of the group at [code]group_idx[/code] that will be the drawing group background image in the [BoneMap] editor.
+ Sets the texture of the group at [param group_idx] that will be the drawing group background image in the [BoneMap] editor.
</description>
</method>
</methods>
diff --git a/doc/classes/SkeletonProfileHumanoid.xml b/doc/classes/SkeletonProfileHumanoid.xml
index 11f0521718..0dbd66d8d6 100644
--- a/doc/classes/SkeletonProfileHumanoid.xml
+++ b/doc/classes/SkeletonProfileHumanoid.xml
@@ -6,6 +6,7 @@
A [SkeletonProfile] as a preset that is optimized for the human form. This exists for standardization, so all parameters are read-only.
</description>
<tutorials>
+ <link title="Retargeting 3D Skeletons">$DOCS_URL/tutorials/assets_pipeline/retargeting_3d_skeletons.html</link>
</tutorials>
<members>
<member name="bone_size" type="int" setter="set_bone_size" getter="get_bone_size" overrides="SkeletonProfile" default="56" />
diff --git a/doc/classes/Slider.xml b/doc/classes/Slider.xml
index 88ea7f2b49..cecca0a5fb 100644
--- a/doc/classes/Slider.xml
+++ b/doc/classes/Slider.xml
@@ -13,9 +13,11 @@
<member name="editable" type="bool" setter="set_editable" getter="is_editable" default="true">
If [code]true[/code], the slider can be interacted with. If [code]false[/code], the value can be changed only by code.
</member>
+ <member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" overrides="Control" enum="Control.FocusMode" default="2" />
<member name="scrollable" type="bool" setter="set_scrollable" getter="is_scrollable" default="true">
If [code]true[/code], the value can be changed using the mouse wheel.
</member>
+ <member name="step" type="float" setter="set_step" getter="get_step" overrides="Range" default="1.0" />
<member name="tick_count" type="int" setter="set_ticks" getter="get_ticks" default="0">
Number of ticks displayed on the slider, including border ticks. Ticks are uniformly-distributed value markers.
</member>
@@ -27,7 +29,7 @@
<signal name="drag_ended">
<param index="0" name="value_changed" type="bool" />
<description>
- Emitted when dragging stops. If [code]value_changed[/code] is true, [member Range.value] is different from the value when you started the dragging.
+ Emitted when dragging stops. If [param value_changed] is true, [member Range.value] is different from the value when you started the dragging.
</description>
</signal>
<signal name="drag_started">
diff --git a/doc/classes/SliderJoint3D.xml b/doc/classes/SliderJoint3D.xml
index 7470f89979..a67c38b12d 100644
--- a/doc/classes/SliderJoint3D.xml
+++ b/doc/classes/SliderJoint3D.xml
@@ -28,7 +28,7 @@
The amount of damping of the rotation when the limit is surpassed.
A lower damping value allows a rotation initiated by body A to travel to body B slower.
</member>
- <member name="angular_limit/lower_angle" type="float" setter="_set_lower_limit_angular" getter="_get_lower_limit_angular" default="0.0">
+ <member name="angular_limit/lower_angle" type="float" setter="set_param" getter="get_param" default="0.0">
The lower limit of rotation in the slider.
</member>
<member name="angular_limit/restitution" type="float" setter="set_param" getter="get_param" default="0.7">
@@ -39,7 +39,7 @@
A factor applied to the all rotation once the limit is surpassed.
Makes all rotation slower when between 0 and 1.
</member>
- <member name="angular_limit/upper_angle" type="float" setter="_set_upper_limit_angular" getter="_get_upper_limit_angular" default="0.0">
+ <member name="angular_limit/upper_angle" type="float" setter="set_param" getter="get_param" default="0.0">
The upper limit of rotation in the slider.
</member>
<member name="angular_motion/damping" type="float" setter="set_param" getter="get_param" default="1.0">
diff --git a/doc/classes/SoftDynamicBody3D.xml b/doc/classes/SoftBody3D.xml
index f59df90eca..7006bca6f0 100644
--- a/doc/classes/SoftDynamicBody3D.xml
+++ b/doc/classes/SoftBody3D.xml
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SoftDynamicBody3D" inherits="MeshInstance3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+<class name="SoftBody3D" inherits="MeshInstance3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A soft mesh physics body.
</brief_description>
<description>
A deformable physics body. Used to create elastic or deformable objects such as cloth, rubber, or other flexible materials.
- [b]Note:[/b] There are many known bugs in [SoftDynamicBody3D]. Therefore, it's not recommended to use them for things that can affect gameplay (such as a player character made entirely out of soft bodies).
+ [b]Note:[/b] There are many known bugs in [SoftBody3D]. Therefore, it's not recommended to use them for things that can affect gameplay (such as a player character made entirely out of soft bodies).
</description>
<tutorials>
<link title="SoftBody">$DOCS_URL/tutorials/physics/soft_body.html</link>
@@ -19,7 +19,7 @@
</description>
</method>
<method name="get_collision_exceptions">
- <return type="Array" />
+ <return type="PhysicsBody3D[]" />
<description>
Returns an array of nodes that were added as collision exceptions for this body.
</description>
@@ -28,14 +28,14 @@
<return type="bool" />
<param index="0" name="layer_number" type="int" />
<description>
- Returns whether or not the specified layer of the [member collision_layer] is enabled, given a [code]layer_number[/code] between 1 and 32.
+ Returns whether or not the specified layer of the [member collision_layer] is enabled, given a [param layer_number] between 1 and 32.
</description>
</method>
<method name="get_collision_mask_value" qualifiers="const">
<return type="bool" />
<param index="0" name="layer_number" type="int" />
<description>
- Returns whether or not the specified layer of the [member collision_mask] is enabled, given a [code]layer_number[/code] between 1 and 32.
+ Returns whether or not the specified layer of the [member collision_mask] is enabled, given a [param layer_number] between 1 and 32.
</description>
</method>
<method name="get_physics_rid" qualifiers="const">
@@ -69,7 +69,7 @@
<param index="0" name="layer_number" type="int" />
<param index="1" name="value" type="bool" />
<description>
- Based on [code]value[/code], enables or disables the specified layer in the [member collision_layer], given a [code]layer_number[/code] between 1 and 32.
+ Based on [code]value[/code], enables or disables the specified layer in the [member collision_layer], given a [param layer_number] between 1 and 32.
</description>
</method>
<method name="set_collision_mask_value">
@@ -77,7 +77,7 @@
<param index="0" name="layer_number" type="int" />
<param index="1" name="value" type="bool" />
<description>
- Based on [code]value[/code], enables or disables the specified layer in the [member collision_mask], given a [code]layer_number[/code] between 1 and 32.
+ Based on [code]value[/code], enables or disables the specified layer in the [member collision_mask], given a [param layer_number] between 1 and 32.
</description>
</method>
<method name="set_point_pinned">
@@ -86,22 +86,22 @@
<param index="1" name="pinned" type="bool" />
<param index="2" name="attachment_path" type="NodePath" default="NodePath(&quot;&quot;)" />
<description>
- Sets the pinned state of a surface vertex. When set to [code]true[/code], the optional [code]attachment_path[/code] can define a [Node3D] the pinned vertex will be attached to.
+ Sets the pinned state of a surface vertex. When set to [code]true[/code], the optional [param attachment_path] can define a [Node3D] the pinned vertex will be attached to.
</description>
</method>
</methods>
<members>
<member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer" default="1">
- The physics layers this SoftDynamicBody3D [b]is in[/b]. Collision objects can exist in one or more of 32 different layers. See also [member collision_mask].
+ The physics layers this SoftBody3D [b]is in[/b]. Collision objects can exist in one or more of 32 different layers. See also [member collision_mask].
[b]Note:[/b] Object A can detect a contact with object B only if object B is in any of the layers that object A scans. See [url=$DOCS_URL/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information.
</member>
<member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="1">
- The physics layers this SoftDynamicBody3D [b]scans[/b]. Collision objects can scan one or more of 32 different layers. See also [member collision_layer].
+ The physics layers this SoftBody3D [b]scans[/b]. Collision objects can scan one or more of 32 different layers. See also [member collision_layer].
[b]Note:[/b] Object A can detect a contact with object B only if object B is in any of the layers that object A scans. See [url=$DOCS_URL/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information.
</member>
<member name="damping_coefficient" type="float" setter="set_damping_coefficient" getter="get_damping_coefficient" default="0.01">
</member>
- <member name="disable_mode" type="int" setter="set_disable_mode" getter="get_disable_mode" enum="SoftDynamicBody3D.DisableMode" default="0">
+ <member name="disable_mode" type="int" setter="set_disable_mode" getter="get_disable_mode" enum="SoftBody3D.DisableMode" default="0">
Defines the behavior in physics when [member Node.process_mode] is set to [constant Node.PROCESS_MODE_DISABLED]. See [enum DisableMode] for more details about the different modes.
</member>
<member name="drag_coefficient" type="float" setter="set_drag_coefficient" getter="get_drag_coefficient" default="0.0">
@@ -109,23 +109,23 @@
<member name="linear_stiffness" type="float" setter="set_linear_stiffness" getter="get_linear_stiffness" default="0.5">
</member>
<member name="parent_collision_ignore" type="NodePath" setter="set_parent_collision_ignore" getter="get_parent_collision_ignore" default="NodePath(&quot;&quot;)">
- [NodePath] to a [CollisionObject3D] this SoftDynamicBody3D should avoid clipping.
+ [NodePath] to a [CollisionObject3D] this SoftBody3D should avoid clipping.
</member>
<member name="pressure_coefficient" type="float" setter="set_pressure_coefficient" getter="get_pressure_coefficient" default="0.0">
</member>
<member name="ray_pickable" type="bool" setter="set_ray_pickable" getter="is_ray_pickable" default="true">
- If [code]true[/code], the [SoftDynamicBody3D] will respond to [RayCast3D]s.
+ If [code]true[/code], the [SoftBody3D] will respond to [RayCast3D]s.
</member>
<member name="simulation_precision" type="int" setter="set_simulation_precision" getter="get_simulation_precision" default="5">
Increasing this value will improve the resulting simulation, but can affect performance. Use with care.
</member>
<member name="total_mass" type="float" setter="set_total_mass" getter="get_total_mass" default="1.0">
- The SoftDynamicBody3D's mass.
+ The SoftBody3D's mass.
</member>
</members>
<constants>
<constant name="DISABLE_MODE_REMOVE" value="0" enum="DisableMode">
- When [member Node.process_mode] is set to [constant Node.PROCESS_MODE_DISABLED], remove from the physics simulation to stop all physics interactions with this [SoftDynamicBody3D].
+ When [member Node.process_mode] is set to [constant Node.PROCESS_MODE_DISABLED], remove from the physics simulation to stop all physics interactions with this [SoftBody3D].
Automatically re-added to the physics simulation when the [Node] is processed again.
</constant>
<constant name="DISABLE_MODE_KEEP_ACTIVE" value="1" enum="DisableMode">
diff --git a/doc/classes/SpinBox.xml b/doc/classes/SpinBox.xml
index 8df039794a..e214867890 100644
--- a/doc/classes/SpinBox.xml
+++ b/doc/classes/SpinBox.xml
@@ -56,6 +56,11 @@
<member name="prefix" type="String" setter="set_prefix" getter="get_prefix" default="&quot;&quot;">
Adds the specified [code]prefix[/code] string before the numerical value of the [SpinBox].
</member>
+ <member name="select_all_on_focus" type="bool" setter="set_select_all_on_focus" getter="is_select_all_on_focus" default="false">
+ If [code]true[/code], the [SpinBox] will select the whole text when the [LineEdit] gains focus. Clicking the up and down arrows won't trigger this behavior.
+ </member>
+ <member name="size_flags_vertical" type="int" setter="set_v_size_flags" getter="get_v_size_flags" overrides="Control" default="1" />
+ <member name="step" type="float" setter="set_step" getter="get_step" overrides="Range" default="1.0" />
<member name="suffix" type="String" setter="set_suffix" getter="get_suffix" default="&quot;&quot;">
Adds the specified [code]suffix[/code] string after the numerical value of the [SpinBox].
</member>
diff --git a/doc/classes/SplitContainer.xml b/doc/classes/SplitContainer.xml
index fb4b9466b5..f0998deeae 100644
--- a/doc/classes/SplitContainer.xml
+++ b/doc/classes/SplitContainer.xml
@@ -27,6 +27,10 @@
<member name="split_offset" type="int" setter="set_split_offset" getter="get_split_offset" default="0">
The initial offset of the splitting between the two [Control]s, with [code]0[/code] being at the end of the first [Control].
</member>
+ <member name="vertical" type="bool" setter="set_vertical" getter="is_vertical" default="false">
+ If [code]true[/code], the [SplitContainer] will arrange its children vertically, rather than horizontally.
+ Can't be changed when using [HSplitContainer] and [VSplitContainer].
+ </member>
</members>
<signals>
<signal name="dragged">
@@ -47,4 +51,21 @@
The split dragger is never visible and its space collapsed.
</constant>
</constants>
+ <theme_items>
+ <theme_item name="autohide" data_type="constant" type="int" default="1">
+ Boolean value. If 1 ([code]true[/code]), the grabber will hide automatically when it isn't under the cursor. If 0 ([code]false[/code]), it's always visible.
+ </theme_item>
+ <theme_item name="minimum_grab_thickness" data_type="constant" type="int" default="6">
+ The minimum thickness of the area users can click on to grab the splitting line. If [theme_item separation] or [theme_item h_grabber] / [theme_item v_grabber]'s thickness are too small, this ensure that the splitting line can still be dragged.
+ </theme_item>
+ <theme_item name="separation" data_type="constant" type="int" default="12">
+ The space between sides of the container.
+ </theme_item>
+ <theme_item name="h_grabber" data_type="icon" type="Texture2D">
+ The icon used for the grabber drawn in the middle area when [member vertical] is [code]false[/code].
+ </theme_item>
+ <theme_item name="v_grabber" data_type="icon" type="Texture2D">
+ The icon used for the grabber drawn in the middle area when [member vertical] is [code]true[/code].
+ </theme_item>
+ </theme_items>
</class>
diff --git a/doc/classes/SpotLight3D.xml b/doc/classes/SpotLight3D.xml
index 62cb55daec..28e2ef0d95 100644
--- a/doc/classes/SpotLight3D.xml
+++ b/doc/classes/SpotLight3D.xml
@@ -14,6 +14,7 @@
<member name="shadow_bias" type="float" setter="set_param" getter="get_param" overrides="Light3D" default="0.03" />
<member name="spot_angle" type="float" setter="set_param" getter="get_param" default="45.0">
The spotlight's angle in degrees.
+ [b]Note:[/b] [member spot_angle] is not affected by [member Node3D.scale] (the light's scale or its parent's scale).
</member>
<member name="spot_angle_attenuation" type="float" setter="set_param" getter="get_param" default="1.0">
The spotlight's angular attenuation curve.
@@ -23,6 +24,7 @@
</member>
<member name="spot_range" type="float" setter="set_param" getter="get_param" default="5.0">
The maximal range that can be reached by the spotlight. Note that the effectively lit area may appear to be smaller depending on the [member spot_attenuation] in use. No matter the [member spot_attenuation] in use, the light will never reach anything outside this range.
+ [b]Note:[/b] [member spot_range] is not affected by [member Node3D.scale] (the light's scale or its parent's scale).
</member>
</members>
</class>
diff --git a/doc/classes/Sprite2D.xml b/doc/classes/Sprite2D.xml
index 83532721b2..235fef0bdd 100644
--- a/doc/classes/Sprite2D.xml
+++ b/doc/classes/Sprite2D.xml
@@ -13,7 +13,8 @@
<method name="get_rect" qualifiers="const">
<return type="Rect2" />
<description>
- Returns a [Rect2] representing the Sprite2D's boundary in local coordinates. Can be used to detect if the Sprite2D was clicked. Example:
+ Returns a [Rect2] representing the Sprite2D's boundary in local coordinates. Can be used to detect if the Sprite2D was clicked.
+ [b]Example:[/b]
[codeblocks]
[gdscript]
func _input(event):
diff --git a/doc/classes/SpriteFrames.xml b/doc/classes/SpriteFrames.xml
index f063a4c4c2..e9721495dd 100644
--- a/doc/classes/SpriteFrames.xml
+++ b/doc/classes/SpriteFrames.xml
@@ -101,7 +101,7 @@
<param index="0" name="anim" type="StringName" />
<param index="1" name="newname" type="StringName" />
<description>
- Changes the animation's name to [code]newname[/code].
+ Changes the animation's name to [param newname].
</description>
</method>
<method name="set_animation_loop">
diff --git a/doc/classes/StandardMaterial3D.xml b/doc/classes/StandardMaterial3D.xml
index bd6e5cdfa2..0f6a3168eb 100644
--- a/doc/classes/StandardMaterial3D.xml
+++ b/doc/classes/StandardMaterial3D.xml
@@ -4,7 +4,7 @@
Physically based rendering (PBR) material that can be applied to 3D objects.
</brief_description>
<description>
- StandardMaterial3D's properties are inherited from [BaseMaterial3D].
+ [StandardMaterial3D]'s properties are inherited from [BaseMaterial3D]. [StandardMaterial3D] uses separate textures for ambient occlusion, roughness and metallic maps. To use a single ORM map for all 3 textures, use an [ORMMaterial3D] instead.
</description>
<tutorials>
<link title="Standard Material 3D and ORM Material 3D">$DOCS_URL/tutorials/3d/standard_material_3d.html</link>
diff --git a/doc/classes/StaticBody2D.xml b/doc/classes/StaticBody2D.xml
index e6e3559ae0..2393790e12 100644
--- a/doc/classes/StaticBody2D.xml
+++ b/doc/classes/StaticBody2D.xml
@@ -5,7 +5,7 @@
</brief_description>
<description>
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 [RigidDynamicBody2D], it doesn't consume any CPU resources as long as they don't move.
+ A static body is a simple body that doesn't move under physics simulation, i.e. it can't be moved by external forces or contacts but its transformation can still be updated manually by the user. It is ideal for implementing objects in the environment, such as walls or platforms. In contrast to [RigidBody2D], it doesn't consume any CPU resources as long as they don't move.
They have extra functionalities to move and affect other bodies:
[b]Static transform change:[/b] Static bodies can be moved by animation or script. In this case, they are just teleported and don't affect other bodies on their path.
[b]Constant velocity:[/b] When [member constant_linear_velocity] or [member constant_angular_velocity] is set, static bodies don't move themselves but affect touching bodies as if they were moving. This is useful for simulating conveyor belts or conveyor wheels.
diff --git a/doc/classes/StaticBody3D.xml b/doc/classes/StaticBody3D.xml
index a29f5fc147..0beaa6bb52 100644
--- a/doc/classes/StaticBody3D.xml
+++ b/doc/classes/StaticBody3D.xml
@@ -5,7 +5,7 @@
</brief_description>
<description>
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 [RigidDynamicBody3D], it doesn't consume any CPU resources as long as they don't move.
+ A static body is a simple body that doesn't move under physics simulation, i.e. it can't be moved by external forces or contacts but its transformation can still be updated manually by the user. It is ideal for implementing objects in the environment, such as walls or platforms. In contrast to [RigidBody3D], it doesn't consume any CPU resources as long as they don't move.
They have extra functionalities to move and affect other bodies:
[b]Static transform change:[/b] Static bodies can be moved by animation or script. In this case, they are just teleported and don't affect other bodies on their path.
[b]Constant velocity:[/b] When [member constant_linear_velocity] or [member constant_angular_velocity] is set, static bodies don't move themselves but affect touching bodies as if they were moving. This is useful for simulating conveyor belts or conveyor wheels.
diff --git a/doc/classes/StreamPeer.xml b/doc/classes/StreamPeer.xml
index 7ce38d9d21..f05b5f7dbf 100644
--- a/doc/classes/StreamPeer.xml
+++ b/doc/classes/StreamPeer.xml
@@ -37,14 +37,14 @@
<method name="get_available_bytes" qualifiers="const">
<return type="int" />
<description>
- Returns the amount of bytes this [StreamPeer] has available.
+ Returns the number of bytes this [StreamPeer] has available.
</description>
</method>
<method name="get_data">
<return type="Array" />
<param index="0" name="bytes" type="int" />
<description>
- Returns a chunk data with the received bytes. The amount of bytes to be received can be requested in the [code]bytes[/code] argument. If not enough bytes are available, the function will block until the desired amount is received. This function returns two values, an [enum @GlobalScope.Error] code and a data array.
+ Returns a chunk data with the received bytes. The number of bytes to be received can be requested in the [param bytes] argument. If not enough bytes are available, the function will block until the desired amount is received. This function returns two values, an [enum Error] code and a data array.
</description>
</method>
<method name="get_double">
@@ -63,14 +63,14 @@
<return type="Array" />
<param index="0" name="bytes" type="int" />
<description>
- Returns a chunk data with the received bytes. The amount of bytes to be received can be requested in the "bytes" argument. If not enough bytes are available, the function will return how many were actually received. This function returns two values, an [enum @GlobalScope.Error] code, and a data array.
+ Returns a chunk data with the received bytes. The number of bytes to be received can be requested in the "bytes" argument. If not enough bytes are available, the function will return how many were actually received. This function returns two values, an [enum Error] code, and a data array.
</description>
</method>
<method name="get_string">
<return type="String" />
<param index="0" name="bytes" type="int" default="-1" />
<description>
- Gets an ASCII string with byte-length [code]bytes[/code] from the stream. If [code]bytes[/code] is negative (default) the length will be read from the stream using the reverse process of [method put_string].
+ Gets an ASCII string with byte-length [param bytes] from the stream. If [param bytes] is negative (default) the length will be read from the stream using the reverse process of [method put_string].
</description>
</method>
<method name="get_u16">
@@ -101,14 +101,14 @@
<return type="String" />
<param index="0" name="bytes" type="int" default="-1" />
<description>
- Gets an UTF-8 string with byte-length [code]bytes[/code] from the stream (this decodes the string sent as UTF-8). If [code]bytes[/code] is negative (default) the length will be read from the stream using the reverse process of [method put_utf8_string].
+ Gets an UTF-8 string with byte-length [param bytes] from the stream (this decodes the string sent as UTF-8). If [param bytes] is negative (default) the length will be read from the stream using the reverse process of [method put_utf8_string].
</description>
</method>
<method name="get_var">
<return type="Variant" />
<param index="0" name="allow_objects" type="bool" default="false" />
<description>
- Gets a Variant from the stream. If [code]allow_objects[/code] is [code]true[/code], decoding objects is allowed.
+ Gets a Variant from the stream. If [param allow_objects] is [code]true[/code], decoding objects is allowed.
[b]Warning:[/b] Deserialized objects can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats such as remote code execution.
</description>
</method>
@@ -144,7 +144,7 @@
<return type="int" enum="Error" />
<param index="0" name="data" type="PackedByteArray" />
<description>
- Sends a chunk of data through the connection, blocking if necessary until the data is done sending. This function returns an [enum @GlobalScope.Error] code.
+ Sends a chunk of data through the connection, blocking if necessary until the data is done sending. This function returns an [enum Error] code.
</description>
</method>
<method name="put_double">
@@ -165,7 +165,7 @@
<return type="Array" />
<param index="0" name="data" type="PackedByteArray" />
<description>
- Sends a chunk of data through the connection. If all the data could not be sent at once, only part of it will. This function returns two values, an [enum @GlobalScope.Error] code and an integer, describing how much data was actually sent.
+ Sends a chunk of data through the connection. If all the data could not be sent at once, only part of it will. This function returns two values, an [enum Error] code and an integer, describing how much data was actually sent.
</description>
</method>
<method name="put_string">
@@ -233,7 +233,7 @@
<param index="0" name="value" type="Variant" />
<param index="1" name="full_objects" type="bool" default="false" />
<description>
- Puts a Variant into the stream. If [code]full_objects[/code] is [code]true[/code] encoding objects is allowed (and can potentially include code).
+ Puts a Variant into the stream. If [param full_objects] is [code]true[/code] encoding objects is allowed (and can potentially include code).
</description>
</method>
</methods>
diff --git a/doc/classes/StreamPeerBuffer.xml b/doc/classes/StreamPeerBuffer.xml
index ee603360fa..f33c38e595 100644
--- a/doc/classes/StreamPeerBuffer.xml
+++ b/doc/classes/StreamPeerBuffer.xml
@@ -4,7 +4,7 @@
Data buffer stream peer.
</brief_description>
<description>
- Data buffer stream peer that uses a byte array as the stream. This object can be used to handle binary data from network sessions. To handle binary data stored in files, [File] can be used directly.
+ Data buffer stream peer that uses a byte array as the stream. This object can be used to handle binary data from network sessions. To handle binary data stored in files, [FileAccess] can be used directly.
A [StreamPeerBuffer] object keeps an internal cursor which is the offset in bytes to the start of the buffer. Get and put operations are performed at the cursor position and will move the cursor accordingly.
</description>
<tutorials>
@@ -45,7 +45,7 @@
<return type="void" />
<param index="0" name="position" type="int" />
<description>
- Moves the cursor to the specified position. [code]position[/code] must be a valid index of [member data_array].
+ Moves the cursor to the specified position. [param position] must be a valid index of [member data_array].
</description>
</method>
</methods>
diff --git a/doc/classes/StreamPeerExtension.xml b/doc/classes/StreamPeerExtension.xml
index 46783de275..ab4bcfd17c 100644
--- a/doc/classes/StreamPeerExtension.xml
+++ b/doc/classes/StreamPeerExtension.xml
@@ -13,7 +13,7 @@
</description>
</method>
<method name="_get_data" qualifiers="virtual">
- <return type="int" />
+ <return type="int" enum="Error" />
<param index="0" name="r_buffer" type="uint8_t*" />
<param index="1" name="r_bytes" type="int" />
<param index="2" name="r_received" type="int32_t*" />
@@ -21,7 +21,7 @@
</description>
</method>
<method name="_get_partial_data" qualifiers="virtual">
- <return type="int" />
+ <return type="int" enum="Error" />
<param index="0" name="r_buffer" type="uint8_t*" />
<param index="1" name="r_bytes" type="int" />
<param index="2" name="r_received" type="int32_t*" />
@@ -29,7 +29,7 @@
</description>
</method>
<method name="_put_data" qualifiers="virtual">
- <return type="int" />
+ <return type="int" enum="Error" />
<param index="0" name="p_data" type="const uint8_t*" />
<param index="1" name="p_bytes" type="int" />
<param index="2" name="r_sent" type="int32_t*" />
@@ -37,7 +37,7 @@
</description>
</method>
<method name="_put_partial_data" qualifiers="virtual">
- <return type="int" />
+ <return type="int" enum="Error" />
<param index="0" name="p_data" type="const uint8_t*" />
<param index="1" name="p_bytes" type="int" />
<param index="2" name="r_sent" type="int32_t*" />
diff --git a/doc/classes/StreamPeerGZIP.xml b/doc/classes/StreamPeerGZIP.xml
new file mode 100644
index 0000000000..71dd36160d
--- /dev/null
+++ b/doc/classes/StreamPeerGZIP.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="StreamPeerGZIP" inherits="StreamPeer" is_experimental="true" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ Stream peer handling GZIP and deflate compression/decompresison.
+ </brief_description>
+ <description>
+ This class allows to compress or decompress data using GZIP/deflate in a streaming fashion. This is particularly useful when compressing or decompressing files that has to be sent through the network without having to allocate them all in memory.
+ After starting the stream via [method start_compression] (or [method start_decompression]), calling [method StreamPeer.put_partial_data] on this stream will compress (or decompress) the data, writing it to the internal buffer. Calling [method StreamPeer.get_available_bytes] will return the pending bytes in the internal buffer, and [method StreamPeer.get_partial_data] will retrieve the compressed (or decompressed) bytes from it. When the stream is over, you must call [method finish] to ensure the internal buffer is properly flushed (make sure to call [method StreamPeer.get_available_bytes] on last time to check if more data needs to be read after that).
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="clear">
+ <return type="void" />
+ <description>
+ Clears this stream, resetting the internal state.
+ </description>
+ </method>
+ <method name="finish">
+ <return type="int" enum="Error" />
+ <description>
+ Finalizes the stream, compressing or decompressing any buffered chunk left.
+ </description>
+ </method>
+ <method name="start_compression">
+ <return type="int" enum="Error" />
+ <param index="0" name="use_deflate" type="bool" default="false" />
+ <param index="1" name="buffer_size" type="int" default="65535" />
+ <description>
+ Start the stream in compression mode with the given [param buffer_size], if [param use_deflate] is [code]true[/code] uses deflate instead of GZIP.
+ </description>
+ </method>
+ <method name="start_decompression">
+ <return type="int" enum="Error" />
+ <param index="0" name="use_deflate" type="bool" default="false" />
+ <param index="1" name="buffer_size" type="int" default="65535" />
+ <description>
+ Start the stream in decompression mode with the given [param buffer_size], if [param use_deflate] is [code]true[/code] uses deflate instead of GZIP.
+ </description>
+ </method>
+ </methods>
+</class>
diff --git a/doc/classes/StreamPeerTCP.xml b/doc/classes/StreamPeerTCP.xml
index 58f3a0e8db..c08fb82797 100644
--- a/doc/classes/StreamPeerTCP.xml
+++ b/doc/classes/StreamPeerTCP.xml
@@ -16,7 +16,7 @@
<param index="1" name="host" type="String" default="&quot;*&quot;" />
<description>
Opens the TCP socket, and binds it to the specified local address.
- This method is generally not needed, and only used to force the subsequent call to [method connect_to_host] to use the specified [code]host[/code] and [code]port[/code] as source address. This can be desired in some NAT punchthrough techniques, or when forcing the source network interface.
+ This method is generally not needed, and only used to force the subsequent call to [method connect_to_host] to use the specified [param host] and [param port] as source address. This can be desired in some NAT punchthrough techniques, or when forcing the source network interface.
</description>
</method>
<method name="connect_to_host">
@@ -67,7 +67,7 @@
<return type="void" />
<param index="0" name="enabled" type="bool" />
<description>
- If [code]enabled[/code] is [code]true[/code], packets will be sent immediately. If [code]enabled[/code] is [code]false[/code] (the default), packet transfers will be delayed and combined using [url=https://en.wikipedia.org/wiki/Nagle%27s_algorithm]Nagle's algorithm[/url].
+ If [param enabled] is [code]true[/code], packets will be sent immediately. If [param enabled] is [code]false[/code] (the default), packet transfers will be delayed and combined using [url=https://en.wikipedia.org/wiki/Nagle%27s_algorithm]Nagle's algorithm[/url].
[b]Note:[/b] It's recommended to leave this disabled for applications that send large packets or need to transfer a lot of data, as enabling this can decrease the total available bandwidth.
</description>
</method>
diff --git a/doc/classes/StreamPeerSSL.xml b/doc/classes/StreamPeerTLS.xml
index dd571226b8..d1ddb3d441 100644
--- a/doc/classes/StreamPeerSSL.xml
+++ b/doc/classes/StreamPeerTLS.xml
@@ -1,14 +1,14 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="StreamPeerSSL" inherits="StreamPeer" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+<class name="StreamPeerTLS" inherits="StreamPeer" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
- SSL stream peer.
+ TLS stream peer.
</brief_description>
<description>
- SSL stream peer. This object can be used to connect to an SSL server or accept a single SSL client connection.
+ TLS stream peer. This object can be used to connect to an TLS server or accept a single TLS client connection.
[b]Note:[/b] When exporting to Android, make sure to enable the [code]INTERNET[/code] permission in the Android export preset before exporting the project or using one-click deploy. Otherwise, network communication of any kind will be blocked by Android.
</description>
<tutorials>
- <link title="SSL certificates">$DOCS_URL/tutorials/networking/ssl_certificates.html</link>
+ <link title="TLS certificates">$DOCS_URL/tutorials/networking/ssl_certificates.html</link>
</tutorials>
<methods>
<method name="accept_stream">
@@ -18,7 +18,7 @@
<param index="2" name="certificate" type="X509Certificate" />
<param index="3" name="chain" type="X509Certificate" default="null" />
<description>
- Accepts a peer connection as a server using the given [code]private_key[/code] and providing the given [code]certificate[/code] to the client. You can pass the optional [code]chain[/code] parameter to provide additional CA chain information along with the certificate.
+ Accepts a peer connection as a server using the given [param private_key] and providing the given [param certificate] to the client. You can pass the optional [param chain] parameter to provide additional CA chain information along with the certificate.
</description>
</method>
<method name="connect_to_stream">
@@ -28,8 +28,8 @@
<param index="2" name="for_hostname" type="String" default="&quot;&quot;" />
<param index="3" name="valid_certificate" type="X509Certificate" default="null" />
<description>
- Connects to a peer using an underlying [StreamPeer] [code]stream[/code]. If [code]validate_certs[/code] is [code]true[/code], [StreamPeerSSL] will validate that the certificate presented by the peer matches the [code]for_hostname[/code].
- [b]Note:[/b] Specifying a custom [code]valid_certificate[/code] is not supported in HTML5 exports due to browsers restrictions.
+ Connects to a peer using an underlying [StreamPeer] [param stream]. If [param validate_certs] is [code]true[/code], [StreamPeerTLS] will validate that the certificate presented by the peer matches the [param for_hostname].
+ [b]Note:[/b] Specifying a custom [param valid_certificate] is not supported in Web exports due to browsers restrictions.
</description>
</method>
<method name="disconnect_from_stream">
@@ -39,7 +39,7 @@
</description>
</method>
<method name="get_status" qualifiers="const">
- <return type="int" enum="StreamPeerSSL.Status" />
+ <return type="int" enum="StreamPeerTLS.Status" />
<description>
Returns the status of the connection. See [enum Status] for values.
</description>
@@ -63,19 +63,19 @@
</members>
<constants>
<constant name="STATUS_DISCONNECTED" value="0" enum="Status">
- A status representing a [StreamPeerSSL] that is disconnected.
+ A status representing a [StreamPeerTLS] that is disconnected.
</constant>
<constant name="STATUS_HANDSHAKING" value="1" enum="Status">
- A status representing a [StreamPeerSSL] during handshaking.
+ A status representing a [StreamPeerTLS] during handshaking.
</constant>
<constant name="STATUS_CONNECTED" value="2" enum="Status">
- A status representing a [StreamPeerSSL] that is connected to a host.
+ A status representing a [StreamPeerTLS] that is connected to a host.
</constant>
<constant name="STATUS_ERROR" value="3" enum="Status">
- A status representing a [StreamPeerSSL] in error state.
+ A status representing a [StreamPeerTLS] in error state.
</constant>
<constant name="STATUS_ERROR_HOSTNAME_MISMATCH" value="4" enum="Status">
- An error status that shows a mismatch in the SSL certificate domain presented by the host and the domain requested for validation.
+ An error status that shows a mismatch in the TLS certificate domain presented by the host and the domain requested for validation.
</constant>
</constants>
</class>
diff --git a/doc/classes/String.xml b/doc/classes/String.xml
index 06579ec49e..53040b2753 100644
--- a/doc/classes/String.xml
+++ b/doc/classes/String.xml
@@ -80,7 +80,7 @@
<method name="c_unescape" qualifiers="const">
<return type="String" />
<description>
- Returns a copy of the string with escaped characters replaced by their meanings. Supported escape sequences are [code]\'[/code], [code]\"[/code], [code]\?[/code], [code]\\[/code], [code]\a[/code], [code]\b[/code], [code]\f[/code], [code]\n[/code], [code]\r[/code], [code]\t[/code], [code]\v[/code].
+ Returns a copy of the string with escaped characters replaced by their meanings. Supported escape sequences are [code]\'[/code], [code]\"[/code], [code]\\[/code], [code]\a[/code], [code]\b[/code], [code]\f[/code], [code]\n[/code], [code]\r[/code], [code]\t[/code], [code]\v[/code].
[b]Note:[/b] Unlike the GDScript parser, this method doesn't support the [code]\uXXXX[/code] escape sequence.
</description>
</method>
@@ -95,8 +95,8 @@
<param index="0" name="to" type="String" />
<description>
Performs a case-sensitive comparison to another string. Returns [code]-1[/code] if less than, [code]1[/code] if greater than, or [code]0[/code] if equal. "less than" or "greater than" are determined by the [url=https://en.wikipedia.org/wiki/List_of_Unicode_characters]Unicode code points[/url] of each string, which roughly matches the alphabetical order.
- [b]Behavior with different string lengths:[/b] Returns [code]1[/code] if the "base" string is longer than the [code]to[/code] string or [code]-1[/code] if the "base" string is shorter than the [code]to[/code] string. Keep in mind this length is determined by the number of Unicode codepoints, [i]not[/i] the actual visible characters.
- [b]Behavior with empty strings:[/b] Returns [code]-1[/code] if the "base" string is empty, [code]1[/code] if the [code]to[/code] string is empty or [code]0[/code] if both strings are empty.
+ [b]Behavior with different string lengths:[/b] Returns [code]1[/code] if the "base" string is longer than the [param to] string or [code]-1[/code] if the "base" string is shorter than the [param to] string. Keep in mind this length is determined by the number of Unicode codepoints, [i]not[/i] the actual visible characters.
+ [b]Behavior with empty strings:[/b] Returns [code]-1[/code] if the "base" string is empty, [code]1[/code] if the [param to] string is empty or [code]0[/code] if both strings are empty.
To get a boolean result from a string comparison, use the [code]==[/code] operator instead. See also [method nocasecmp_to] and [method naturalnocasecmp_to].
</description>
</method>
@@ -124,7 +124,7 @@
<param index="1" name="from" type="int" default="0" />
<param index="2" name="to" type="int" default="0" />
<description>
- Returns the number of occurrences of substring [code]what[/code] between [code]from[/code] and [code]to[/code] positions. If [code]from[/code] and [code]to[/code] equals 0 the whole string will be used. If only [code]to[/code] equals 0 the remained substring will be used.
+ Returns the number of occurrences of substring [param what] between [param from] and [param to] positions. If [param from] and [param to] equals 0 the whole string will be used. If only [param to] equals 0 the remained substring will be used.
</description>
</method>
<method name="countn" qualifiers="const">
@@ -133,7 +133,7 @@
<param index="1" name="from" type="int" default="0" />
<param index="2" name="to" type="int" default="0" />
<description>
- Returns the number of occurrences of substring [code]what[/code] (ignoring case) between [code]from[/code] and [code]to[/code] positions. If [code]from[/code] and [code]to[/code] equals 0 the whole string will be used. If only [code]to[/code] equals 0 the remained substring will be used.
+ Returns the number of occurrences of substring [param what] (ignoring case) between [param from] and [param to] positions. If [param from] and [param to] equals 0 the whole string will be used. If only [param to] equals 0 the remained substring will be used.
</description>
</method>
<method name="dedent" qualifiers="const">
@@ -180,8 +180,8 @@
<param index="0" name="values" type="Variant" />
<param index="1" name="placeholder" type="String" default="&quot;{_}&quot;" />
<description>
- Formats the string by replacing all occurrences of [code]placeholder[/code] with the elements of [code]values[/code].
- [code]values[/code] can be a [Dictionary] or an [Array]. Any underscores in [code]placeholder[/code] will be replaced with the corresponding keys in advance. Array elements use their index as keys.
+ Formats the string by replacing all occurrences of [param placeholder] with the elements of [param values].
+ [param values] can be a [Dictionary] or an [Array]. Any underscores in [param placeholder] will be replaced with the corresponding keys in advance. Array elements use their index as keys.
[codeblock]
# Prints: Waiting for Godot is a play by Samuel Beckett, and Godot Engine is named after it.
var use_array_values = "Waiting for {0} is a play by {1}, and {0} Engine is named after it."
@@ -190,7 +190,7 @@
# Prints: User 42 is Godot.
print("User {id} is {name}.".format({"id": 42, "name": "Godot"}))
[/codeblock]
- Some additional handling is performed when [code]values[/code] is an array. If [code]placeholder[/code] does not contain an underscore, the elements of the array will be used to replace one occurrence of the placeholder in turn; If an array element is another 2-element array, it'll be interpreted as a key-value pair.
+ Some additional handling is performed when [param values] is an array. If [param placeholder] does not contain an underscore, the elements of the array will be used to replace one occurrence of the placeholder in turn; If an array element is another 2-element array, it'll be interpreted as a key-value pair.
[codeblock]
# Prints: User 42 is Godot.
print("User {} is {}.".format([42, "Godot"], "{}"))
@@ -237,9 +237,9 @@
<param index="0" name="delimiter" type="String" />
<param index="1" name="slice" type="int" />
<description>
- Splits a string using a [code]delimiter[/code] and returns a substring at index [code]slice[/code]. Returns an empty string if the index doesn't exist.
+ Splits a string using a [param delimiter] and returns a substring at index [param slice]. Returns an empty string if the index doesn't exist.
This is a more performant alternative to [method split] for cases when you need only one element from the array at a fixed index.
- Example:
+ [b]Example:[/b]
[codeblock]
print("i/am/example/string".get_slice("/", 2)) # Prints 'example'.
[/codeblock]
@@ -249,7 +249,7 @@
<return type="int" />
<param index="0" name="delimiter" type="String" />
<description>
- Splits a string using a [code]delimiter[/code] and returns a number of slices.
+ Splits a string using a [param delimiter] and returns a number of slices.
</description>
</method>
<method name="get_slicec" qualifiers="const">
@@ -257,7 +257,7 @@
<param index="0" name="delimiter" type="int" />
<param index="1" name="slice" type="int" />
<description>
- Splits a string using a Unicode character with code [code]delimiter[/code] and returns a substring at index [code]slice[/code]. Returns an empty string if the index doesn't exist.
+ Splits a string using a Unicode character with code [param delimiter] and returns a substring at index [param slice]. Returns an empty string if the index doesn't exist.
This is a more performant alternative to [method split] for cases when you need only one element from the array at a fixed index.
</description>
</method>
@@ -296,7 +296,7 @@
<return type="String" />
<param index="0" name="prefix" type="String" />
<description>
- Returns a copy of the string with lines indented with [code]prefix[/code].
+ Returns a copy of the string with lines indented with [param prefix].
For example, the string can be indented with two tabs using [code]"\t\t"[/code], or four spaces using [code]" "[/code]. The prefix can be any string so it can also be used to comment out strings with e.g. [code]"# "[/code]. See also [method dedent] to remove indentation.
[b]Note:[/b] Empty lines are kept empty.
</description>
@@ -306,7 +306,7 @@
<param index="0" name="position" type="int" />
<param index="1" name="what" type="String" />
<description>
- Returns a copy of the string with the substring [code]what[/code] inserted at the given position.
+ Returns a copy of the string with the substring [param what] inserted at the given [param position].
</description>
</method>
<method name="is_absolute_path" qualifiers="const">
@@ -364,7 +364,7 @@
<return type="bool" />
<param index="0" name="with_prefix" type="bool" default="false" />
<description>
- Returns [code]true[/code] if this string contains a valid hexadecimal number. If [code]with_prefix[/code] is [code]true[/code], then a validity of the hexadecimal number is determined by [code]0x[/code] prefix, for instance: [code]0xDEADC0DE[/code].
+ Returns [code]true[/code] if this string contains a valid hexadecimal number. If [param with_prefix] is [code]true[/code], then a validity of the hexadecimal number is determined by the [code]0x[/code] prefix, for example: [code]0xDEADC0DE[/code].
</description>
</method>
<method name="is_valid_html_color" qualifiers="const">
@@ -407,8 +407,8 @@
<return type="String" />
<param index="0" name="parts" type="PackedStringArray" />
<description>
- Returns a [String] which is the concatenation of the [code]parts[/code]. The separator between elements is the string providing this method.
- Example:
+ Returns a [String] which is the concatenation of the [param parts]. The separator between elements is the string providing this method.
+ [b]Example:[/b]
[codeblocks]
[gdscript]
print(", ".join(["One", "Two", "Three", "Four"]))
@@ -429,8 +429,8 @@
<return type="String" />
<param index="0" name="length" type="int" />
<description>
- Returns a number of characters from the left of the string. If negative [code]length[/code] is used, the characters are counted downwards from [String]'s length.
- Examples:
+ Returns a number of characters from the left of the string. If negative [param length] is used, the characters are counted downwards from [String]'s length.
+ [b]Example:[/b]
[codeblock]
print("sample text".left(3)) #prints "sam"
print("sample text".left(-3)) #prints "sample t"
@@ -440,7 +440,7 @@
<method name="length" qualifiers="const">
<return type="int" />
<description>
- Returns the string's amount of characters.
+ Returns the number of characters in the string.
</description>
</method>
<method name="lpad" qualifiers="const">
@@ -448,15 +448,15 @@
<param index="0" name="min_length" type="int" />
<param index="1" name="character" type="String" default="&quot; &quot;" />
<description>
- Formats a string to be at least [code]min_length[/code] long by adding [code]character[/code]s to the left of the string.
+ Formats a string to be at least [param min_length] long by adding [param character]s to the left of the string.
</description>
</method>
<method name="lstrip" qualifiers="const">
<return type="String" />
<param index="0" name="chars" type="String" />
<description>
- Returns a copy of the string with characters removed from the left. The [code]chars[/code] argument is a string specifying the set of characters to be removed.
- [b]Note:[/b] The [code]chars[/code] is not a prefix. See [method trim_prefix] method that will remove a single prefix string rather than a set of characters.
+ Returns a copy of the string with characters removed from the left. The [param chars] argument is a string specifying the set of characters to be removed.
+ [b]Note:[/b] The [param chars] is not a prefix. See [method trim_prefix] method that will remove a single prefix string rather than a set of characters.
</description>
</method>
<method name="match" qualifiers="const">
@@ -491,8 +491,8 @@
<description>
Performs a case-insensitive [i]natural order[/i] comparison to another string. Returns [code]-1[/code] if less than, [code]1[/code] if greater than, or [code]0[/code] if equal. "less than" or "greater than" are determined by the [url=https://en.wikipedia.org/wiki/List_of_Unicode_characters]Unicode code points[/url] of each string, which roughly matches the alphabetical order. Internally, lowercase characters will be converted to uppercase during the comparison.
When used for sorting, natural order comparison will order suites of numbers as expected by most people. If you sort the numbers from 1 to 10 using natural order, you will get [code][1, 2, 3, ...][/code] instead of [code][1, 10, 2, 3, ...][/code].
- [b]Behavior with different string lengths:[/b] Returns [code]1[/code] if the "base" string is longer than the [code]to[/code] string or [code]-1[/code] if the "base" string is shorter than the [code]to[/code] string. Keep in mind this length is determined by the number of Unicode codepoints, [i]not[/i] the actual visible characters.
- [b]Behavior with empty strings:[/b] Returns [code]-1[/code] if the "base" string is empty, [code]1[/code] if the [code]to[/code] string is empty or [code]0[/code] if both strings are empty.
+ [b]Behavior with different string lengths:[/b] Returns [code]1[/code] if the "base" string is longer than the [param to] string or [code]-1[/code] if the "base" string is shorter than the [param to] string. Keep in mind this length is determined by the number of Unicode codepoints, [i]not[/i] the actual visible characters.
+ [b]Behavior with empty strings:[/b] Returns [code]-1[/code] if the "base" string is empty, [code]1[/code] if the [param to] string is empty or [code]0[/code] if both strings are empty.
To get a boolean result from a string comparison, use the [code]==[/code] operator instead. See also [method nocasecmp_to] and [method casecmp_to].
</description>
</method>
@@ -501,8 +501,8 @@
<param index="0" name="to" type="String" />
<description>
Performs a case-insensitive comparison to another string. Returns [code]-1[/code] if less than, [code]1[/code] if greater than, or [code]0[/code] if equal. "less than" or "greater than" are determined by the [url=https://en.wikipedia.org/wiki/List_of_Unicode_characters]Unicode code points[/url] of each string, which roughly matches the alphabetical order. Internally, lowercase characters will be converted to uppercase during the comparison.
- [b]Behavior with different string lengths:[/b] Returns [code]1[/code] if the "base" string is longer than the [code]to[/code] string or [code]-1[/code] if the "base" string is shorter than the [code]to[/code] string. Keep in mind this length is determined by the number of Unicode codepoints, [i]not[/i] the actual visible characters.
- [b]Behavior with empty strings:[/b] Returns [code]-1[/code] if the "base" string is empty, [code]1[/code] if the [code]to[/code] string is empty or [code]0[/code] if both strings are empty.
+ [b]Behavior with different string lengths:[/b] Returns [code]1[/code] if the "base" string is longer than the [param to] string or [code]-1[/code] if the "base" string is shorter than the [param to] string. Keep in mind this length is determined by the number of Unicode codepoints, [i]not[/i] the actual visible characters.
+ [b]Behavior with empty strings:[/b] Returns [code]-1[/code] if the "base" string is empty, [code]1[/code] if the [param to] string is empty or [code]0[/code] if both strings are empty.
To get a boolean result from a string comparison, use the [code]==[/code] operator instead. See also [method casecmp_to] and [method naturalnocasecmp_to].
</description>
</method>
@@ -512,9 +512,9 @@
<param index="1" name="decimals" type="int" default="-1" />
<description>
Converts a [float] to a string representation of a decimal number.
- The number of decimal places can be specified with [code]decimals[/code]. If [code]decimals[/code] is [code]-1[/code] (default), decimal places will be automatically adjusted so that the string representation has 14 significant digits (counting both digits to the left and the right of the decimal point).
+ The number of decimal places can be specified with [param decimals]. If [param decimals] is [code]-1[/code] (default), decimal places will be automatically adjusted so that the string representation has 14 significant digits (counting both digits to the left and the right of the decimal point).
Trailing zeros are not included in the string. The last digit will be rounded and not truncated.
- Some examples:
+ [b]Example:[/b]
[codeblock]
String.num(3.141593) # "3.141593"
String.num(3.141593, 3) # "3.142"
@@ -522,7 +522,7 @@
# Last digit will be rounded up here, which reduces total digit count since
# trailing zeros are removed:
String.num(42.129999, 5) # "42.13"
- # If `decimals` is not specified, the total amount of significant digits is 14:
+ # If `decimals` is not specified, the total number of significant digits is 14:
String.num(-0.0000012345432123454321) # "-0.00000123454321"
String.num(-10000.0000012345432123454321) # "-10000.0000012345"
[/codeblock]
@@ -556,21 +556,21 @@
<return type="String" />
<param index="0" name="digits" type="int" />
<description>
- Formats a number to have an exact number of [code]digits[/code] after the decimal point.
+ Formats a number to have an exact number of [param digits] after the decimal point.
</description>
</method>
<method name="pad_zeros" qualifiers="const">
<return type="String" />
<param index="0" name="digits" type="int" />
<description>
- Formats a number to have an exact number of [code]digits[/code] before the decimal point.
+ Formats a number to have an exact number of [param digits] before the decimal point.
</description>
</method>
- <method name="plus_file" qualifiers="const">
+ <method name="path_join" qualifiers="const">
<return type="String" />
<param index="0" name="file" type="String" />
<description>
- If the string is a path, this concatenates [code]file[/code] at the end of the string as a subpath. E.g. [code]"this/is".plus_file("path") == "this/is/path"[/code].
+ If the string is a path, this concatenates [param file] at the end of the string as a subpath. E.g. [code]"this/is".path_join("path") == "this/is/path"[/code].
</description>
</method>
<method name="repeat" qualifiers="const">
@@ -616,8 +616,8 @@
<return type="String" />
<param index="0" name="length" type="int" />
<description>
- Returns a number of characters from the right of the string. If negative [code]length[/code] is used, the characters are counted downwards from [String]'s length.
- Examples:
+ Returns a number of characters from the right of the string. If negative [param length] is used, the characters are counted downwards from [String]'s length.
+ [b]Example:[/b]
[codeblock]
print("sample text".right(3)) #prints "ext"
print("sample text".right(-3)) #prints "ple text"
@@ -629,20 +629,20 @@
<param index="0" name="min_length" type="int" />
<param index="1" name="character" type="String" default="&quot; &quot;" />
<description>
- Formats a string to be at least [code]min_length[/code] long by adding [code]character[/code]s to the right of the string.
+ Formats a string to be at least [param min_length] long by adding [param character]s to the right of the string.
</description>
</method>
<method name="rsplit" qualifiers="const">
<return type="PackedStringArray" />
- <param index="0" name="delimiter" type="String" />
+ <param index="0" name="delimiter" type="String" default="&quot;&quot;" />
<param index="1" name="allow_empty" type="bool" default="true" />
<param index="2" name="maxsplit" type="int" default="0" />
<description>
- Splits the string by a [code]delimiter[/code] string and returns an array of the substrings, starting from right.
+ Splits the string by a [param delimiter] string and returns an array of the substrings, starting from right. If [param delimiter] is an empty string, each substring will be a single character.
The splits in the returned array are sorted in the same order as the original string, from left to right.
- If [code]allow_empty[/code] is [code]true[/code], and there are two adjacent delimiters in the string, it will add an empty string to the array of substrings at this position.
- If [code]maxsplit[/code] is specified, it defines the number of splits to do from the right up to [code]maxsplit[/code]. The default value of 0 means that all items are split, thus giving the same result as [method split].
- Example:
+ If [param allow_empty] is [code]true[/code], and there are two adjacent delimiters in the string, it will add an empty string to the array of substrings at this position.
+ If [param maxsplit] is specified, it defines the number of splits to do from the right up to [param maxsplit]. The default value of 0 means that all items are split, thus giving the same result as [method split].
+ [b]Example:[/b]
[codeblocks]
[gdscript]
var some_string = "One,Two,Three,Four"
@@ -661,8 +661,8 @@
<return type="String" />
<param index="0" name="chars" type="String" />
<description>
- Returns a copy of the string with characters removed from the right. The [code]chars[/code] argument is a string specifying the set of characters to be removed.
- [b]Note:[/b] The [code]chars[/code] is not a suffix. See [method trim_suffix] method that will remove a single suffix string rather than a set of characters.
+ Returns a copy of the string with characters removed from the right. The [param chars] argument is a string specifying the set of characters to be removed.
+ [b]Note:[/b] The [param chars] is not a suffix. See [method trim_suffix] method that will remove a single suffix string rather than a set of characters.
</description>
</method>
<method name="sha1_buffer" qualifiers="const">
@@ -710,15 +710,15 @@
</method>
<method name="split" qualifiers="const">
<return type="PackedStringArray" />
- <param index="0" name="delimiter" type="String" />
+ <param index="0" name="delimiter" type="String" default="&quot;&quot;" />
<param index="1" name="allow_empty" type="bool" default="true" />
<param index="2" name="maxsplit" type="int" default="0" />
<description>
- Splits the string by a [code]delimiter[/code] string and returns an array of the substrings. The [code]delimiter[/code] can be of any length.
- If [code]allow_empty[/code] is [code]true[/code], and there are two adjacent delimiters in the string, it will add an empty string to the array of substrings at this position.
- If [code]maxsplit[/code] is specified, it defines the number of splits to do from the left up to [code]maxsplit[/code]. The default value of [code]0[/code] means that all items are split.
+ Splits the string by a [param delimiter] string and returns an array of the substrings. The [param delimiter] can be of any length. If [param delimiter] is an empty string, each substring will be a single character.
+ If [param allow_empty] is [code]true[/code], and there are two adjacent delimiters in the string, it will add an empty string to the array of substrings at this position.
+ If [param maxsplit] is specified, it defines the number of splits to do from the left up to [param maxsplit]. The default value of [code]0[/code] means that all items are split.
If you need only one element from the array at a specific index, [method get_slice] is a more performant option.
- Example:
+ [b]Example:[/b]
[codeblocks]
[gdscript]
var some_string = "One,Two,Three,Four"
@@ -738,13 +738,13 @@
</description>
</method>
<method name="split_floats" qualifiers="const">
- <return type="PackedFloat32Array" />
+ <return type="PackedFloat64Array" />
<param index="0" name="delimiter" type="String" />
<param index="1" name="allow_empty" type="bool" default="true" />
<description>
Splits the string in floats by using a delimiter string and returns an array of the substrings.
For example, [code]"1,2.5,3"[/code] will return [code][1,2.5,3][/code] if split by [code]","[/code].
- If [code]allow_empty[/code] is [code]true[/code], and there are two adjacent delimiters in the string, it will add an empty string to the array of substrings at this position.
+ If [param allow_empty] is [code]true[/code], and there are two adjacent delimiters in the string, it will add an empty string to the array of substrings at this position.
</description>
</method>
<method name="strip_edges" qualifiers="const">
@@ -766,7 +766,7 @@
<param index="0" name="from" type="int" />
<param index="1" name="len" type="int" default="-1" />
<description>
- Returns part of the string from the position [code]from[/code] with length [code]len[/code]. Argument [code]len[/code] is optional and using [code]-1[/code] will return remaining characters from given position.
+ Returns part of the string from the position [param from] with length [param len]. Argument [param len] is optional and using [code]-1[/code] will return remaining characters from given position.
</description>
</method>
<method name="to_ascii_buffer" qualifiers="const">
@@ -775,6 +775,12 @@
Converts the String (which is a character array) to ASCII/Latin-1 encoded [PackedByteArray] (which is an array of bytes). The conversion is faster compared to [method to_utf8_buffer], as this method assumes that all the characters in the String are ASCII/Latin-1 characters, unsupported characters are replaced with spaces.
</description>
</method>
+ <method name="to_camel_case" qualifiers="const">
+ <return type="String" />
+ <description>
+ Returns the string converted to [code]camelCase[/code].
+ </description>
+ </method>
<method name="to_float" qualifiers="const">
<return type="float" />
<description>
@@ -804,6 +810,18 @@
Returns the string converted to lowercase.
</description>
</method>
+ <method name="to_pascal_case" qualifiers="const">
+ <return type="String" />
+ <description>
+ Returns the string converted to [code]PascalCase[/code].
+ </description>
+ </method>
+ <method name="to_snake_case" qualifiers="const">
+ <return type="String" />
+ <description>
+ Returns the string converted to [code]snake_case[/code].
+ </description>
+ </method>
<method name="to_upper" qualifiers="const">
<return type="String" />
<description>
@@ -846,7 +864,7 @@
<return type="int" />
<param index="0" name="at" type="int" />
<description>
- Returns the character code at position [code]at[/code].
+ Returns the character code at position [param at].
</description>
</method>
<method name="uri_decode" qualifiers="const">
@@ -887,7 +905,7 @@
<return type="String" />
<param index="0" name="escape_quotes" type="bool" default="false" />
<description>
- Returns a copy of the string with special characters escaped using the XML standard. If [code]escape_quotes[/code] is [code]true[/code], the single quote ([code]'[/code]) and double quote ([code]"[/code]) characters are also escaped.
+ Returns a copy of the string with special characters escaped using the XML standard. If [param escape_quotes] is [code]true[/code], the single quote ([code]'[/code]) and double quote ([code]"[/code]) characters are also escaped.
</description>
</method>
<method name="xml_unescape" qualifiers="const">
@@ -922,12 +940,6 @@
<description>
</description>
</operator>
- <operator name="operator +">
- <return type="String" />
- <param index="0" name="right" type="int" />
- <description>
- </description>
- </operator>
<operator name="operator &lt;">
<return type="bool" />
<param index="0" name="right" type="String" />
diff --git a/doc/classes/StyleBox.xml b/doc/classes/StyleBox.xml
index 8593acd1ef..ff6d4d8821 100644
--- a/doc/classes/StyleBox.xml
+++ b/doc/classes/StyleBox.xml
@@ -94,7 +94,14 @@
<param index="0" name="margin" type="int" enum="Side" />
<param index="1" name="offset" type="float" />
<description>
- Sets the default value of the specified [enum Side] to [code]offset[/code] pixels.
+ Sets the default value of the specified [enum Side] to [param offset] pixels.
+ </description>
+ </method>
+ <method name="set_default_margin_all">
+ <return type="void" />
+ <param index="0" name="offset" type="float" />
+ <description>
+ Sets the default margin to [param offset] pixels for all sides.
</description>
</method>
<method name="test_mask" qualifiers="const">
@@ -107,21 +114,21 @@
</method>
</methods>
<members>
- <member name="content_margin_bottom" type="float" setter="set_default_margin" getter="get_default_margin">
+ <member name="content_margin_bottom" type="float" setter="set_default_margin" getter="get_default_margin" default="-1.0">
The bottom margin for the contents of this style box. Increasing this value reduces the space available to the contents from the bottom.
If this value is negative, it is ignored and a child-specific margin is used instead. For example for [StyleBoxFlat] the border thickness (if any) is used instead.
It is up to the code using this style box to decide what these contents are: for example, a [Button] respects this content margin for the textual contents of the button.
[method get_margin] should be used to fetch this value as consumer instead of reading these properties directly. This is because it correctly respects negative values and the fallback mentioned above.
</member>
- <member name="content_margin_left" type="float" setter="set_default_margin" getter="get_default_margin">
+ <member name="content_margin_left" type="float" setter="set_default_margin" getter="get_default_margin" default="-1.0">
The left margin for the contents of this style box. Increasing this value reduces the space available to the contents from the left.
Refer to [member content_margin_bottom] for extra considerations.
</member>
- <member name="content_margin_right" type="float" setter="set_default_margin" getter="get_default_margin">
+ <member name="content_margin_right" type="float" setter="set_default_margin" getter="get_default_margin" default="-1.0">
The right margin for the contents of this style box. Increasing this value reduces the space available to the contents from the right.
Refer to [member content_margin_bottom] for extra considerations.
</member>
- <member name="content_margin_top" type="float" setter="set_default_margin" getter="get_default_margin">
+ <member name="content_margin_top" type="float" setter="set_default_margin" getter="get_default_margin" default="-1.0">
The top margin for the contents of this style box. Increasing this value reduces the space available to the contents from the top.
Refer to [member content_margin_bottom] for extra considerations.
</member>
diff --git a/doc/classes/StyleBoxFlat.xml b/doc/classes/StyleBoxFlat.xml
index 48f656af8e..d6900f935c 100644
--- a/doc/classes/StyleBoxFlat.xml
+++ b/doc/classes/StyleBoxFlat.xml
@@ -9,7 +9,8 @@
- Border width (individual width for each border)
- Rounded corners (individual radius for each corner)
- Shadow (with blur and offset)
- Setting corner radius to high values is allowed. As soon as corners overlap, the stylebox will switch to a relative system. Example:
+ Setting corner radius to high values is allowed. As soon as corners overlap, the stylebox will switch to a relative system.
+ [b]Example:[/b]
[codeblock]
height = 30
corner_radius_top_left = 50
@@ -41,7 +42,7 @@
<return type="int" />
<param index="0" name="corner" type="int" enum="Corner" />
<description>
- Returns the given [code]corner[/code]'s radius. See [enum Corner] for possible values.
+ Returns the given [param corner]'s radius. See [enum Corner] for possible values.
</description>
</method>
<method name="get_expand_margin" qualifiers="const">
@@ -56,14 +57,14 @@
<param index="0" name="margin" type="int" enum="Side" />
<param index="1" name="width" type="int" />
<description>
- Sets the specified [enum Side]'s border width to [code]width[/code] pixels.
+ Sets the specified [enum Side]'s border width to [param width] pixels.
</description>
</method>
<method name="set_border_width_all">
<return type="void" />
<param index="0" name="width" type="int" />
<description>
- Sets the border width to [code]width[/code] pixels for all sides.
+ Sets the border width to [param width] pixels for all sides.
</description>
</method>
<method name="set_corner_radius">
@@ -71,24 +72,14 @@
<param index="0" name="corner" type="int" enum="Corner" />
<param index="1" name="radius" type="int" />
<description>
- Sets the corner radius to [code]radius[/code] pixels for the given [code]corner[/code]. See [enum Corner] for possible values.
+ Sets the corner radius to [param radius] pixels for the given [param corner]. See [enum Corner] for possible values.
</description>
</method>
<method name="set_corner_radius_all">
<return type="void" />
<param index="0" name="radius" type="int" />
<description>
- Sets the corner radius to [code]radius[/code] pixels for all corners.
- </description>
- </method>
- <method name="set_corner_radius_individual">
- <return type="void" />
- <param index="0" name="radius_top_left" type="int" />
- <param index="1" name="radius_top_right" type="int" />
- <param index="2" name="radius_bottom_right" type="int" />
- <param index="3" name="radius_bottom_left" type="int" />
- <description>
- Sets the corner radius for each corner to [code]radius_top_left[/code], [code]radius_top_right[/code], [code]radius_bottom_right[/code], and [code]radius_bottom_left[/code] pixels.
+ Sets the corner radius to [param radius] pixels for all corners.
</description>
</method>
<method name="set_expand_margin">
@@ -96,24 +87,14 @@
<param index="0" name="margin" type="int" enum="Side" />
<param index="1" name="size" type="float" />
<description>
- Sets the expand margin to [code]size[/code] pixels for the specified [enum Side].
+ Sets the expand margin to [param size] pixels for the specified [enum Side].
</description>
</method>
<method name="set_expand_margin_all">
<return type="void" />
<param index="0" name="size" type="float" />
<description>
- Sets the expand margin to [code]size[/code] pixels for all margins.
- </description>
- </method>
- <method name="set_expand_margin_individual">
- <return type="void" />
- <param index="0" name="size_left" type="float" />
- <param index="1" name="size_top" type="float" />
- <param index="2" name="size_right" type="float" />
- <param index="3" name="size_bottom" type="float" />
- <description>
- Sets the expand margin for each margin to [code]size_left[/code], [code]size_top[/code], [code]size_right[/code], and [code]size_bottom[/code] pixels.
+ Sets the expand margin to [param size] pixels for all margins.
</description>
</method>
</methods>
diff --git a/doc/classes/StyleBoxTexture.xml b/doc/classes/StyleBoxTexture.xml
index 2468857cf1..aeba777b43 100644
--- a/doc/classes/StyleBoxTexture.xml
+++ b/doc/classes/StyleBoxTexture.xml
@@ -27,17 +27,7 @@
<return type="void" />
<param index="0" name="size" type="float" />
<description>
- Sets the expand margin to [code]size[/code] pixels for all margins.
- </description>
- </method>
- <method name="set_expand_margin_individual">
- <return type="void" />
- <param index="0" name="size_left" type="float" />
- <param index="1" name="size_top" type="float" />
- <param index="2" name="size_right" type="float" />
- <param index="3" name="size_bottom" type="float" />
- <description>
- Sets the expand margin for each margin to [code]size_left[/code], [code]size_top[/code], [code]size_right[/code], and [code]size_bottom[/code] pixels.
+ Sets the expand margin to [param size] pixels for all margins.
</description>
</method>
<method name="set_expand_margin_size">
@@ -45,7 +35,7 @@
<param index="0" name="margin" type="int" enum="Side" />
<param index="1" name="size" type="float" />
<description>
- Sets the expand margin to [code]size[/code] pixels for the specified [enum Side].
+ Sets the expand margin to [param size] pixels for the specified [enum Side].
</description>
</method>
<method name="set_margin_size">
@@ -53,7 +43,14 @@
<param index="0" name="margin" type="int" enum="Side" />
<param index="1" name="size" type="float" />
<description>
- Sets the margin to [code]size[/code] pixels for the specified [enum Side].
+ Sets the margin to [param size] pixels for the specified [enum Side].
+ </description>
+ </method>
+ <method name="set_margin_size_all">
+ <return type="void" />
+ <param index="0" name="size" type="float" />
+ <description>
+ Sets the margin to [param size] pixels for all sides.
</description>
</method>
</methods>
diff --git a/doc/classes/SubViewport.xml b/doc/classes/SubViewport.xml
index b62c294f2c..7020cae1de 100644
--- a/doc/classes/SubViewport.xml
+++ b/doc/classes/SubViewport.xml
@@ -25,7 +25,7 @@
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(512, 512)">
- The width and height of the sub-viewport.
+ The width and height of the sub-viewport. Must be set to a value greater than or equal to 2 pixels on both dimensions. Otherwise, nothing will be displayed.
</member>
<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.
diff --git a/doc/classes/SurfaceTool.xml b/doc/classes/SurfaceTool.xml
index 51c9e59fd2..9d73e9fb39 100644
--- a/doc/classes/SurfaceTool.xml
+++ b/doc/classes/SurfaceTool.xml
@@ -86,7 +86,7 @@
<param index="1" name="flags" type="int" default="0" />
<description>
Returns a constructed [ArrayMesh] from current information passed in. If an existing [ArrayMesh] is passed in as an argument, will add an extra surface to the existing [ArrayMesh].
- [b]FIXME:[/b] Document possible values for [code]flags[/code], it changed in 4.0. Likely some combinations of [enum Mesh.ArrayFormat].
+ [b]FIXME:[/b] Document possible values for [param flags], it changed in 4.0. Likely some combinations of [enum Mesh.ArrayFormat].
</description>
</method>
<method name="commit_to_arrays">
@@ -123,7 +123,7 @@
<param index="0" name="nd_threshold" type="float" />
<param index="1" name="target_index_count" type="int" default="3" />
<description>
- Generates a LOD for a given [code]nd_threshold[/code] in linear units (square root of quadric error metric), using at most [code]target_index_count[/code] indices.
+ Generates a LOD for a given [param nd_threshold] in linear units (square root of quadric error metric), using at most [param target_index_count] indices.
Deprecated. Unused internally and neglects to preserve normals or UVs. Consider using [method ImporterMesh.generate_lods] instead.
</description>
</method>
@@ -131,8 +131,9 @@
<return type="void" />
<param index="0" name="flip" type="bool" default="false" />
<description>
- Generates normals from vertices so you do not have to do it manually. If [code]flip[/code] is [code]true[/code], the resulting normals will be inverted. [method generate_normals] should be called [i]after[/i] generating geometry and [i]before[/i] committing the mesh using [method commit] or [method commit_to_arrays]. For correct display of normal-mapped surfaces, you will also have to generate tangents using [method generate_tangents].
+ Generates normals from vertices so you do not have to do it manually. If [param flip] is [code]true[/code], the resulting normals will be inverted. [method generate_normals] should be called [i]after[/i] generating geometry and [i]before[/i] committing the mesh using [method commit] or [method commit_to_arrays]. For correct display of normal-mapped surfaces, you will also have to generate tangents using [method generate_tangents].
[b]Note:[/b] [method generate_normals] only works if the primitive type to be set to [constant Mesh.PRIMITIVE_TRIANGLES].
+ [b]Note:[/b] [method generate_normals] takes smooth groups into account. If you don't specify any smooth group for each vertex, [method generate_normals] will smooth normals for you.
</description>
</method>
<method name="generate_tangents">
@@ -151,7 +152,7 @@
<return type="int" enum="SurfaceTool.CustomFormat" />
<param index="0" name="channel_index" type="int" />
<description>
- Returns the format for custom [code]channel_index[/code] (currently up to 4). Returns [constant CUSTOM_MAX] if this custom channel is unused.
+ Returns the format for custom [param channel_index] (currently up to 4). Returns [constant CUSTOM_MAX] if this custom channel is unused.
</description>
</method>
<method name="get_primitive_type" qualifiers="const">
@@ -184,7 +185,7 @@
<return type="void" />
<param index="0" name="bones" type="PackedInt32Array" />
<description>
- Specifies an array of bones to use for the [i]next[/i] vertex. [code]bones[/code] must contain 4 integers.
+ Specifies an array of bones to use for the [i]next[/i] vertex. [param bones] must contain 4 integers.
</description>
</method>
<method name="set_color">
@@ -200,8 +201,8 @@
<param index="0" name="channel_index" type="int" />
<param index="1" name="custom_color" type="Color" />
<description>
- Sets the custom value on this vertex for [code]channel_index[/code].
- [method set_custom_format] must be called first for this [code]channel_index[/code]. Formats which are not RGBA will ignore other color channels.
+ Sets the custom value on this vertex for [param channel_index].
+ [method set_custom_format] must be called first for this [param channel_index]. Formats which are not RGBA will ignore other color channels.
</description>
</method>
<method name="set_custom_format">
@@ -209,7 +210,7 @@
<param index="0" name="channel_index" type="int" />
<param index="1" name="format" type="int" enum="SurfaceTool.CustomFormat" />
<description>
- Sets the color format for this custom [code]channel_index[/code]. Use [constant CUSTOM_MAX] to disable.
+ Sets the color format for this custom [param channel_index]. Use [constant CUSTOM_MAX] to disable.
Must be invoked after [method begin] and should be set before [method commit] or [method commit_to_arrays].
</description>
</method>
@@ -268,34 +269,34 @@
<return type="void" />
<param index="0" name="weights" type="PackedFloat32Array" />
<description>
- Specifies weight values to use for the [i]next[/i] vertex. [code]weights[/code] must contain 4 values. If every vertex needs to have this information set and you fail to submit it for the first vertex, this information may not be used at all.
+ Specifies weight values to use for the [i]next[/i] vertex. [param weights] must contain 4 values. If every vertex needs to have this information set and you fail to submit it for the first vertex, this information may not be used at all.
</description>
</method>
</methods>
<constants>
<constant name="CUSTOM_RGBA8_UNORM" value="0" enum="CustomFormat">
- Limits range of data passed to `set_custom` to unsigned normalized 0 to 1 stored in 8 bits per channel. See [constant Mesh.ARRAY_CUSTOM_RGBA8_UNORM].
+ Limits range of data passed to [method set_custom] to unsigned normalized 0 to 1 stored in 8 bits per channel. See [constant Mesh.ARRAY_CUSTOM_RGBA8_UNORM].
</constant>
<constant name="CUSTOM_RGBA8_SNORM" value="1" enum="CustomFormat">
- Limits range of data passed to `set_custom` to signed normalized -1 to 1 stored in 8 bits per channel. See [constant Mesh.ARRAY_CUSTOM_RGBA8_SNORM].
+ Limits range of data passed to [method set_custom] to signed normalized -1 to 1 stored in 8 bits per channel. See [constant Mesh.ARRAY_CUSTOM_RGBA8_SNORM].
</constant>
<constant name="CUSTOM_RG_HALF" value="2" enum="CustomFormat">
- Stores data passed to `set_custom` as half precision floats, and uses only red and green color channels. See [constant Mesh.ARRAY_CUSTOM_RG_HALF].
+ Stores data passed to [method set_custom] as half precision floats, and uses only red and green color channels. See [constant Mesh.ARRAY_CUSTOM_RG_HALF].
</constant>
<constant name="CUSTOM_RGBA_HALF" value="3" enum="CustomFormat">
- Stores data passed to `set_custom` as half precision floats and uses all color channels. See [constant Mesh.ARRAY_CUSTOM_RGBA_HALF].
+ Stores data passed to [method set_custom] as half precision floats and uses all color channels. See [constant Mesh.ARRAY_CUSTOM_RGBA_HALF].
</constant>
<constant name="CUSTOM_R_FLOAT" value="4" enum="CustomFormat">
- Stores data passed to `set_custom` as full precision floats, and uses only red color channel. See [constant Mesh.ARRAY_CUSTOM_R_FLOAT].
+ Stores data passed to [method set_custom] as full precision floats, and uses only red color channel. See [constant Mesh.ARRAY_CUSTOM_R_FLOAT].
</constant>
<constant name="CUSTOM_RG_FLOAT" value="5" enum="CustomFormat">
- Stores data passed to `set_custom` as full precision floats, and uses only red and green color channels. See [constant Mesh.ARRAY_CUSTOM_RG_FLOAT].
+ Stores data passed to [method set_custom] as full precision floats, and uses only red and green color channels. See [constant Mesh.ARRAY_CUSTOM_RG_FLOAT].
</constant>
<constant name="CUSTOM_RGB_FLOAT" value="6" enum="CustomFormat">
- Stores data passed to `set_custom` as full precision floats, and uses only red, green and blue color channels. See [constant Mesh.ARRAY_CUSTOM_RGB_FLOAT].
+ Stores data passed to [method set_custom] as full precision floats, and uses only red, green and blue color channels. See [constant Mesh.ARRAY_CUSTOM_RGB_FLOAT].
</constant>
<constant name="CUSTOM_RGBA_FLOAT" value="7" enum="CustomFormat">
- Stores data passed to `set_custom` as full precision floats, and uses all color channels. See [constant Mesh.ARRAY_CUSTOM_RGBA_FLOAT].
+ Stores data passed to [method set_custom] as full precision floats, and uses all color channels. See [constant Mesh.ARRAY_CUSTOM_RGBA_FLOAT].
</constant>
<constant name="CUSTOM_MAX" value="8" enum="CustomFormat">
Used to indicate a disabled custom channel.
diff --git a/doc/classes/SystemFont.xml b/doc/classes/SystemFont.xml
index b1b78f1705..b47d6ded7d 100644
--- a/doc/classes/SystemFont.xml
+++ b/doc/classes/SystemFont.xml
@@ -13,8 +13,8 @@
<tutorials>
</tutorials>
<members>
- <member name="antialiased" type="bool" setter="set_antialiased" getter="is_antialiased" default="true">
- If set to [code]true[/code], font 8-bit anitialiased glyph rendering is supported and enabled.
+ <member name="antialiasing" type="int" setter="set_antialiasing" getter="get_antialiasing" enum="TextServer.FontAntialiasing" default="1">
+ Font anti-aliasing mode.
</member>
<member name="fallbacks" type="Font[]" setter="set_fallbacks" getter="get_fallbacks" default="[]">
Array of fallback [Font]s.
@@ -34,11 +34,14 @@
<member name="hinting" type="int" setter="set_hinting" getter="get_hinting" enum="TextServer.Hinting" default="1">
Font hinting mode.
</member>
+ <member name="multichannel_signed_distance_field" type="bool" setter="set_multichannel_signed_distance_field" getter="is_multichannel_signed_distance_field" default="false">
+ If set to [code]true[/code], glyphs of all sizes are rendered using single multichannel signed distance field generated from the dynamic font vector data.
+ </member>
<member name="oversampling" type="float" setter="set_oversampling" getter="get_oversampling" default="0.0">
Font oversampling factor, if set to [code]0.0[/code] global oversampling factor is used instead.
</member>
<member name="subpixel_positioning" type="int" setter="set_subpixel_positioning" getter="get_subpixel_positioning" enum="TextServer.SubpixelPositioning" default="1">
- Font glyph sub-pixel positioning mode. Subpixel positioning provides shaper text and better kerning for smaller font sizes, at the cost of memory usage and font rasterization speed. Use [constant TextServer.SUBPIXEL_POSITIONING_AUTO] to automatically enable it based on the font size.
+ Font glyph subpixel positioning mode. Subpixel positioning provides shaper text and better kerning for smaller font sizes, at the cost of memory usage and font rasterization speed. Use [constant TextServer.SUBPIXEL_POSITIONING_AUTO] to automatically enable it based on the font size.
</member>
</members>
</class>
diff --git a/doc/classes/TCPServer.xml b/doc/classes/TCPServer.xml
index 0990fb853a..fbed80bcfa 100644
--- a/doc/classes/TCPServer.xml
+++ b/doc/classes/TCPServer.xml
@@ -33,10 +33,10 @@
<param index="0" name="port" type="int" />
<param index="1" name="bind_address" type="String" default="&quot;*&quot;" />
<description>
- Listen on the [code]port[/code] binding to [code]bind_address[/code].
- If [code]bind_address[/code] is set as [code]"*"[/code] (default), the server will listen on all available addresses (both IPv4 and IPv6).
- If [code]bind_address[/code] is set as [code]"0.0.0.0"[/code] (for IPv4) or [code]"::"[/code] (for IPv6), the server will listen on all available addresses matching that IP type.
- If [code]bind_address[/code] is set to any valid address (e.g. [code]"192.168.1.101"[/code], [code]"::1"[/code], etc), the server will only listen on the interface with that addresses (or fail if no interface with the given address exists).
+ Listen on the [param port] binding to [param bind_address].
+ If [param bind_address] is set as [code]"*"[/code] (default), the server will listen on all available addresses (both IPv4 and IPv6).
+ If [param bind_address] is set as [code]"0.0.0.0"[/code] (for IPv4) or [code]"::"[/code] (for IPv6), the server will listen on all available addresses matching that IP type.
+ If [param bind_address] is set to any valid address (e.g. [code]"192.168.1.101"[/code], [code]"::1"[/code], etc), the server will only listen on the interface with that addresses (or fail if no interface with the given address exists).
</description>
</method>
<method name="stop">
diff --git a/doc/classes/TabBar.xml b/doc/classes/TabBar.xml
index f4ec33e9e1..713c016651 100644
--- a/doc/classes/TabBar.xml
+++ b/doc/classes/TabBar.xml
@@ -40,21 +40,21 @@
<return type="Texture2D" />
<param index="0" name="tab_idx" type="int" />
<description>
- Returns the [Texture2D] for the right button of the tab at index [code]tab_idx[/code] or [code]null[/code] if the button has no [Texture2D].
+ Returns the [Texture2D] for the right button of the tab at index [param tab_idx] or [code]null[/code] if the button has no [Texture2D].
</description>
</method>
<method name="get_tab_icon" qualifiers="const">
<return type="Texture2D" />
<param index="0" name="tab_idx" type="int" />
<description>
- Returns the [Texture2D] for the tab at index [code]tab_idx[/code] or [code]null[/code] if the tab has no [Texture2D].
+ Returns the [Texture2D] for the tab at index [param tab_idx] or [code]null[/code] if the tab has no [Texture2D].
</description>
</method>
<method name="get_tab_idx_at_point" qualifiers="const">
<return type="int" />
<param index="0" name="point" type="Vector2" />
<description>
- Returns the index of the tab at local coordinates [code]point[/code]. Returns [code]-1[/code] if the point is outside the control boundaries or if there's no tab at the queried position.
+ Returns the index of the tab at local coordinates [param point]. Returns [code]-1[/code] if the point is outside the control boundaries or if there's no tab at the queried position.
</description>
</method>
<method name="get_tab_language" qualifiers="const">
@@ -88,21 +88,21 @@
<return type="String" />
<param index="0" name="tab_idx" type="int" />
<description>
- Returns the title of the tab at index [code]tab_idx[/code].
+ Returns the title of the tab at index [param tab_idx].
</description>
</method>
<method name="is_tab_disabled" qualifiers="const">
<return type="bool" />
<param index="0" name="tab_idx" type="int" />
<description>
- Returns [code]true[/code] if the tab at index [code]tab_idx[/code] is disabled.
+ Returns [code]true[/code] if the tab at index [param tab_idx] is disabled.
</description>
</method>
<method name="is_tab_hidden" qualifiers="const">
<return type="bool" />
<param index="0" name="tab_idx" type="int" />
<description>
- Returns [code]true[/code] if the tab at index [code]tab_idx[/code] is hidden.
+ Returns [code]true[/code] if the tab at index [param tab_idx] is hidden.
</description>
</method>
<method name="move_tab">
@@ -110,14 +110,14 @@
<param index="0" name="from" type="int" />
<param index="1" name="to" type="int" />
<description>
- Moves a tab from [code]from[/code] to [code]to[/code].
+ Moves a tab from [param from] to [param to].
</description>
</method>
<method name="remove_tab">
<return type="void" />
<param index="0" name="tab_idx" type="int" />
<description>
- Removes the tab at index [code]tab_idx[/code].
+ Removes the tab at index [param tab_idx].
</description>
</method>
<method name="set_tab_button_icon">
@@ -125,7 +125,7 @@
<param index="0" name="tab_idx" type="int" />
<param index="1" name="icon" type="Texture2D" />
<description>
- Sets an [code]icon[/code] for the button of the tab at index [code]tab_idx[/code] (located to the right, before the close button), making it visible and clickable (See [signal tab_button_pressed]). Giving it a [code]null[/code] value will hide the button.
+ Sets an [param icon] for the button of the tab at index [param tab_idx] (located to the right, before the close button), making it visible and clickable (See [signal tab_button_pressed]). Giving it a [code]null[/code] value will hide the button.
</description>
</method>
<method name="set_tab_disabled">
@@ -133,7 +133,7 @@
<param index="0" name="tab_idx" type="int" />
<param index="1" name="disabled" type="bool" />
<description>
- If [code]disabled[/code] is [code]true[/code], disables the tab at index [code]tab_idx[/code], making it non-interactable.
+ If [param disabled] is [code]true[/code], disables the tab at index [param tab_idx], making it non-interactable.
</description>
</method>
<method name="set_tab_hidden">
@@ -141,7 +141,7 @@
<param index="0" name="tab_idx" type="int" />
<param index="1" name="hidden" type="bool" />
<description>
- If [code]hidden[/code] is [code]true[/code], hides the tab at index [code]tab_idx[/code], making it disappear from the tab area.
+ If [param hidden] is [code]true[/code], hides the tab at index [param tab_idx], making it disappear from the tab area.
</description>
</method>
<method name="set_tab_icon">
@@ -149,7 +149,7 @@
<param index="0" name="tab_idx" type="int" />
<param index="1" name="icon" type="Texture2D" />
<description>
- Sets an [code]icon[/code] for the tab at index [code]tab_idx[/code].
+ Sets an [param icon] for the tab at index [param tab_idx].
</description>
</method>
<method name="set_tab_language">
@@ -173,7 +173,7 @@
<param index="0" name="tab_idx" type="int" />
<param index="1" name="title" type="String" />
<description>
- Sets a [code]title[/code] for the tab at index [code]tab_idx[/code].
+ Sets a [param title] for the tab at index [param tab_idx].
</description>
</method>
</methods>
diff --git a/doc/classes/TabContainer.xml b/doc/classes/TabContainer.xml
index 3a3b0a7b28..e2e7a0c37e 100644
--- a/doc/classes/TabContainer.xml
+++ b/doc/classes/TabContainer.xml
@@ -35,14 +35,14 @@
<return type="Texture2D" />
<param index="0" name="tab_idx" type="int" />
<description>
- Returns the button icon from the tab at index [code]tab_idx[/code].
+ Returns the button icon from the tab at index [param tab_idx].
</description>
</method>
<method name="get_tab_control" qualifiers="const">
<return type="Control" />
<param index="0" name="tab_idx" type="int" />
<description>
- Returns the [Control] node from the tab at index [code]tab_idx[/code].
+ Returns the [Control] node from the tab at index [param tab_idx].
</description>
</method>
<method name="get_tab_count" qualifiers="const">
@@ -55,42 +55,42 @@
<return type="Texture2D" />
<param index="0" name="tab_idx" type="int" />
<description>
- Returns the [Texture2D] for the tab at index [code]tab_idx[/code] or [code]null[/code] if the tab has no [Texture2D].
+ Returns the [Texture2D] for the tab at index [param tab_idx] or [code]null[/code] if the tab has no [Texture2D].
</description>
</method>
<method name="get_tab_idx_at_point" qualifiers="const">
<return type="int" />
<param index="0" name="point" type="Vector2" />
<description>
- Returns the index of the tab at local coordinates [code]point[/code]. Returns [code]-1[/code] if the point is outside the control boundaries or if there's no tab at the queried position.
+ Returns the index of the tab at local coordinates [param point]. Returns [code]-1[/code] if the point is outside the control boundaries or if there's no tab at the queried position.
</description>
</method>
<method name="get_tab_idx_from_control" qualifiers="const">
<return type="int" />
<param index="0" name="control" type="Control" />
<description>
- Returns the index of the tab tied to the given [code]control[/code]. The control must be a child of the [TabContainer].
+ Returns the index of the tab tied to the given [param control]. The control must be a child of the [TabContainer].
</description>
</method>
<method name="get_tab_title" qualifiers="const">
<return type="String" />
<param index="0" name="tab_idx" type="int" />
<description>
- Returns the title of the tab at index [code]tab_idx[/code]. Tab titles default to the name of the indexed child node, but this can be overridden with [method set_tab_title].
+ Returns the title of the tab at index [param tab_idx]. Tab titles default to the name of the indexed child node, but this can be overridden with [method set_tab_title].
</description>
</method>
<method name="is_tab_disabled" qualifiers="const">
<return type="bool" />
<param index="0" name="tab_idx" type="int" />
<description>
- Returns [code]true[/code] if the tab at index [code]tab_idx[/code] is disabled.
+ Returns [code]true[/code] if the tab at index [param tab_idx] is disabled.
</description>
</method>
<method name="is_tab_hidden" qualifiers="const">
<return type="bool" />
<param index="0" name="tab_idx" type="int" />
<description>
- Returns [code]true[/code] if the tab at index [code]tab_idx[/code] is hidden.
+ Returns [code]true[/code] if the tab at index [param tab_idx] is hidden.
</description>
</method>
<method name="set_popup">
@@ -105,7 +105,7 @@
<param index="0" name="tab_idx" type="int" />
<param index="1" name="icon" type="Texture2D" />
<description>
- Sets the button icon from the tab at index [code]tab_idx[/code].
+ Sets the button icon from the tab at index [param tab_idx].
</description>
</method>
<method name="set_tab_disabled">
@@ -113,7 +113,7 @@
<param index="0" name="tab_idx" type="int" />
<param index="1" name="disabled" type="bool" />
<description>
- If [code]disabled[/code] is [code]true[/code], disables the tab at index [code]tab_idx[/code], making it non-interactable.
+ If [param disabled] is [code]true[/code], disables the tab at index [param tab_idx], making it non-interactable.
</description>
</method>
<method name="set_tab_hidden">
@@ -121,7 +121,7 @@
<param index="0" name="tab_idx" type="int" />
<param index="1" name="hidden" type="bool" />
<description>
- If [code]hidden[/code] is [code]true[/code], hides the tab at index [code]tab_idx[/code], making it disappear from the tab area.
+ If [param hidden] is [code]true[/code], hides the tab at index [param tab_idx], making it disappear from the tab area.
</description>
</method>
<method name="set_tab_icon">
@@ -129,7 +129,7 @@
<param index="0" name="tab_idx" type="int" />
<param index="1" name="icon" type="Texture2D" />
<description>
- Sets an icon for the tab at index [code]tab_idx[/code].
+ Sets an icon for the tab at index [param tab_idx].
</description>
</method>
<method name="set_tab_title">
@@ -137,7 +137,7 @@
<param index="0" name="tab_idx" type="int" />
<param index="1" name="title" type="String" />
<description>
- Sets a custom title for the tab at index [code]tab_idx[/code] (tab titles default to the name of the indexed child node). Set it back to the child's name to make the tab default to it again.
+ Sets a custom title for the tab at index [param tab_idx] (tab titles default to the name of the indexed child node). Set it back to the child's name to make the tab default to it again.
</description>
</method>
</methods>
@@ -217,7 +217,7 @@
</theme_item>
<theme_item name="side_margin" data_type="constant" type="int" default="8">
The space at the left or right edges of the tab bar, accordingly with the current [member tab_alignment].
- The margin is ignored with [code]ALIGNMENT_RIGHT[/code] if the tabs are clipped (see [member clip_tabs]) or a popup has been set (see [method set_popup]). The margin is always ignored with [code]ALIGNMENT_CENTER[/code].
+ The margin is ignored with [constant TabBar.ALIGNMENT_RIGHT] if the tabs are clipped (see [member clip_tabs]) or a popup has been set (see [method set_popup]). The margin is always ignored with [constant TabBar.ALIGNMENT_CENTER].
</theme_item>
<theme_item name="font" data_type="font" type="Font">
The font used to draw tab names.
@@ -258,5 +258,8 @@
<theme_item name="tab_unselected" data_type="style" type="StyleBox">
The style of the other, unselected tabs.
</theme_item>
+ <theme_item name="tabbar_background" data_type="style" type="StyleBox">
+ The style for the background fill of the [TabBar] area.
+ </theme_item>
</theme_items>
</class>
diff --git a/doc/classes/TextEdit.xml b/doc/classes/TextEdit.xml
index c1fdfbf085..d4f5233438 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] Most viewport, caret and edit methods contain a [code]caret_index[/code] argument for [member caret_multiple] support. The argument should be one of the following: [code]-1[/code] for all carets, [code]0[/code] for the main caret, or greater than [code]0[/code] for secondary carets.
[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>
@@ -12,18 +13,21 @@
<methods>
<method name="_backspace" qualifiers="virtual">
<return type="void" />
+ <param index="0" name="caret_index" type="int" />
<description>
Override this method to define what happens when the user presses the backspace key.
</description>
</method>
<method name="_copy" qualifiers="virtual">
<return type="void" />
+ <param index="0" name="caret_index" type="int" />
<description>
Override this method to define what happens when the user performs a copy operation.
</description>
</method>
<method name="_cut" qualifiers="virtual">
<return type="void" />
+ <param index="0" name="caret_index" type="int" />
<description>
Override this method to define what happens when the user performs a cut operation.
</description>
@@ -31,38 +35,75 @@
<method name="_handle_unicode_input" qualifiers="virtual">
<return type="void" />
<param index="0" name="unicode_char" type="int" />
+ <param index="1" name="caret_index" type="int" />
<description>
- Override this method to define what happens when the types in the provided key [code]unicode[/code].
+ Override this method to define what happens when the user types in the provided key [param unicode_char].
</description>
</method>
<method name="_paste" qualifiers="virtual">
<return type="void" />
+ <param index="0" name="caret_index" type="int" />
<description>
Override this method to define what happens when the user performs a paste operation.
</description>
</method>
<method name="_paste_primary_clipboard" qualifiers="virtual">
<return type="void" />
+ <param index="0" name="caret_index" type="int" />
<description>
Override this method to define what happens when the user performs a paste operation with middle mouse button.
[b]Note:[/b] This method is only implemented on Linux.
</description>
</method>
+ <method name="add_caret">
+ <return type="int" />
+ <param index="0" name="line" type="int" />
+ <param index="1" name="col" type="int" />
+ <description>
+ Adds a new caret at the given location. Returns the index of the new caret, or [code]-1[/code] if the location is invalid.
+ </description>
+ </method>
+ <method name="add_caret_at_carets">
+ <return type="void" />
+ <param index="0" name="below" type="bool" />
+ <description>
+ Adds an additional caret above or below every caret. If [param below] is true the new caret will be added below and above otherwise.
+ </description>
+ </method>
<method name="add_gutter">
<return type="void" />
<param index="0" name="at" type="int" default="-1" />
<description>
- Register a new gutter to this [TextEdit]. Use [code]at[/code] to have a specific gutter order. A value of [code]-1[/code] appends the gutter to the right.
+ Register a new gutter to this [TextEdit]. Use [param at] to have a specific gutter order. A value of [code]-1[/code] appends the gutter to the right.
+ </description>
+ </method>
+ <method name="add_selection_for_next_occurrence">
+ <return type="void" />
+ <description>
+ Adds a selection and a caret for the next occurrence of the current selection. If there is no active selection, selects word under caret.
+ </description>
+ </method>
+ <method name="adjust_carets_after_edit">
+ <return type="void" />
+ <param index="0" name="caret" type="int" />
+ <param index="1" name="from_line" type="int" />
+ <param index="2" name="from_col" type="int" />
+ <param index="3" name="to_line" type="int" />
+ <param index="4" name="to_col" type="int" />
+ <description>
+ Reposition the carets affected by the edit. This assumes edits are applied in edit order, see [method get_caret_index_edit_order].
</description>
</method>
<method name="adjust_viewport_to_caret">
<return type="void" />
+ <param index="0" name="caret_index" type="int" default="0" />
<description>
Adjust the viewport so the caret is visible.
</description>
</method>
<method name="backspace">
<return type="void" />
+ <param index="0" name="caret_index" type="int" default="-1" />
<description>
Called when the user presses the backspace key. Can be overridden with [method _backspace].
</description>
@@ -75,6 +116,7 @@
</method>
<method name="center_viewport_to_caret">
<return type="void" />
+ <param index="0" name="caret_index" type="int" default="0" />
<description>
Centers the viewport on the line the editing caret is at. This also resets the [member scroll_horizontal] value to [code]0[/code].
</description>
@@ -93,28 +135,38 @@
</method>
<method name="copy">
<return type="void" />
+ <param index="0" name="caret_index" type="int" default="-1" />
<description>
Copies the current text selection. Can be overridden with [method _copy].
</description>
</method>
<method name="cut">
<return type="void" />
+ <param index="0" name="caret_index" type="int" default="-1" />
<description>
Cut's the current selection. Can be overridden with [method _cut].
</description>
</method>
<method name="delete_selection">
<return type="void" />
+ <param index="0" name="caret_index" type="int" default="-1" />
<description>
Deletes the selected text.
</description>
</method>
<method name="deselect">
<return type="void" />
+ <param index="0" name="caret_index" type="int" default="-1" />
<description>
Deselects the current selection.
</description>
</method>
+ <method name="end_action">
+ <return type="void" />
+ <description>
+ Marks the end of steps in the current action started with [method start_action].
+ </description>
+ </method>
<method name="end_complex_operation">
<return type="void" />
<description>
@@ -123,24 +175,40 @@
</method>
<method name="get_caret_column" qualifiers="const">
<return type="int" />
+ <param index="0" name="caret_index" type="int" default="0" />
<description>
Returns the column the editing caret is at.
</description>
</method>
+ <method name="get_caret_count" qualifiers="const">
+ <return type="int" />
+ <description>
+ Returns the number of carets in this [TextEdit].
+ </description>
+ </method>
<method name="get_caret_draw_pos" qualifiers="const">
<return type="Vector2" />
+ <param index="0" name="caret_index" type="int" default="0" />
<description>
Returns the caret pixel draw position.
</description>
</method>
+ <method name="get_caret_index_edit_order">
+ <return type="PackedInt32Array" />
+ <description>
+ Returns a list of caret indexes in their edit order, this done from bottom to top. Edit order refers to the way actions such as [method insert_text_at_caret] are applied.
+ </description>
+ </method>
<method name="get_caret_line" qualifiers="const">
<return type="int" />
+ <param index="0" name="caret_index" type="int" default="0" />
<description>
Returns the line the editing caret is on.
</description>
</method>
<method name="get_caret_wrap_index" qualifiers="const">
<return type="int" />
+ <param index="0" name="caret_index" type="int" default="0" />
<description>
Returns the wrap index the editing caret is on.
</description>
@@ -161,7 +229,7 @@
<method name="get_gutter_count" qualifiers="const">
<return type="int" />
<description>
- Returns the total amount of gutters registered.
+ Returns the number of gutters registered.
</description>
</method>
<method name="get_gutter_name" qualifiers="const">
@@ -185,11 +253,17 @@
Returns the width of the gutter at the given index.
</description>
</method>
+ <method name="get_h_scroll_bar" qualifiers="const">
+ <return type="HScrollBar" />
+ <description>
+ Returns the [HScrollBar] used by [TextEdit].
+ </description>
+ </method>
<method name="get_indent_level" qualifiers="const">
<return type="int" />
<param index="0" name="line" type="int" />
<description>
- Returns the amount of spaces and [code]tab * tab_size[/code] before the first char.
+ Returns the number of spaces and [code]tab * tab_size[/code] before the first char.
</description>
</method>
<method name="get_last_full_visible_line" qualifiers="const">
@@ -229,13 +303,13 @@
<param index="0" name="position" type="Vector2i" />
<param index="1" name="allow_out_of_bounds" type="bool" default="true" />
<description>
- Returns the line and column at the given position. In the returned vector, [code]x[/code] is the column, [code]y[/code] is the line. If [code]allow_out_of_bounds[/code] is [code]false[/code] and the position is not over the text, both vector values will be set to [code]-1[/code].
+ Returns the line and column at the given position. In the returned vector, [code]x[/code] is the column, [code]y[/code] is the line. If [param allow_out_of_bounds] is [code]false[/code] and the position is not over the text, both vector values will be set to [code]-1[/code].
</description>
</method>
<method name="get_line_count" qualifiers="const">
<return type="int" />
<description>
- Returns the amount of total lines in the text.
+ Returns the number of lines in the text.
</description>
</method>
<method name="get_line_gutter_icon" qualifiers="const">
@@ -243,7 +317,7 @@
<param index="0" name="line" type="int" />
<param index="1" name="gutter" type="int" />
<description>
- Returns the icon currently in [code]gutter[/code] at [code]line[/code].
+ Returns the icon currently in [param gutter] at [param line].
</description>
</method>
<method name="get_line_gutter_item_color" qualifiers="const">
@@ -251,7 +325,7 @@
<param index="0" name="line" type="int" />
<param index="1" name="gutter" type="int" />
<description>
- Returns the color currently in [code]gutter[/code] at [code]line[/code].
+ Returns the color currently in [param gutter] at [param line].
</description>
</method>
<method name="get_line_gutter_metadata" qualifiers="const">
@@ -259,7 +333,7 @@
<param index="0" name="line" type="int" />
<param index="1" name="gutter" type="int" />
<description>
- Returns the metadata currently in [code]gutter[/code] at [code]line[/code].
+ Returns the metadata currently in [param gutter] at [param line].
</description>
</method>
<method name="get_line_gutter_text" qualifiers="const">
@@ -267,7 +341,7 @@
<param index="0" name="line" type="int" />
<param index="1" name="gutter" type="int" />
<description>
- Returns the text currently in [code]gutter[/code] at [code]line[/code].
+ Returns the text currently in [param gutter] at [param line].
</description>
</method>
<method name="get_line_height" qualifiers="const">
@@ -281,7 +355,7 @@
<param index="0" name="line" type="int" />
<param index="1" name="wrap_index" type="int" default="-1" />
<description>
- Returns the width in pixels of the [code]wrap_index[/code] on [code]line[/code].
+ Returns the width in pixels of the [param wrap_index] on [param line].
</description>
</method>
<method name="get_line_wrap_count" qualifiers="const">
@@ -323,13 +397,13 @@
<return type="int" />
<param index="0" name="position" type="Vector2i" />
<description>
- Returns the equivalent minimap line at [code]position[/code]
+ Returns the equivalent minimap line at [param position]
</description>
</method>
<method name="get_minimap_visible_lines" qualifiers="const">
<return type="int" />
<description>
- Returns the total amount of lines that can be draw on the minimap.
+ Returns the number of lines that may be drawn on the minimap.
</description>
</method>
<method name="get_next_visible_line_index_offset_from" qualifiers="const">
@@ -346,7 +420,7 @@
<param index="0" name="line" type="int" />
<param index="1" name="visible_amount" type="int" />
<description>
- Returns the count to the next visible line from [code]line[/code] to [code]line + visible_amount[/code]. Can also count backwards. For example if a [TextEdit] has 5 lines with lines 2 and 3 hidden, calling this with [code]line = 1, visible_amount = 1[/code] would return 3.
+ Returns the count to the next visible line from [param line] to [code]line + visible_amount[/code]. Can also count backwards. For example if a [TextEdit] has 5 lines with lines 2 and 3 hidden, calling this with [code]line = 1, visible_amount = 1[/code] would return 3.
</description>
</method>
<method name="get_pos_at_line_column" qualifiers="const">
@@ -354,7 +428,7 @@
<param index="0" name="line" type="int" />
<param index="1" name="column" type="int" />
<description>
- Returns the local position for the given [code]line[/code] and [code]column[/code]. If [code]x[/code] or [code]y[/code] of the returned vector equal [code]-1[/code], the position is outside of the viewable area of the control.
+ Returns the local position for the given [param line] and [param column]. If [code]x[/code] or [code]y[/code] of the returned vector equal [code]-1[/code], the position is outside of the viewable area of the control.
[b]Note:[/b] The Y position corresponds to the bottom side of the line. Use [method get_rect_at_line_column] to get the top side position.
</description>
</method>
@@ -363,7 +437,7 @@
<param index="0" name="line" type="int" />
<param index="1" name="column" type="int" />
<description>
- Returns the local position and size for the grapheme at the given [code]line[/code] and [code]column[/code]. If [code]x[/code] or [code]y[/code] position of the returned rect equal [code]-1[/code], the position is outside of the viewable area of the control.
+ Returns the local position and size for the grapheme at the given [param line] and [param column]. If [code]x[/code] or [code]y[/code] position of the returned rect equal [code]-1[/code], the position is outside of the viewable area of the control.
[b]Note:[/b] The Y position of the returned rect corresponds to the top side of the line, unlike [method get_pos_at_line_column] which returns the bottom side.
</description>
</method>
@@ -378,35 +452,40 @@
<param index="0" name="line" type="int" />
<param index="1" name="wrap_index" type="int" default="0" />
<description>
- Returns the scroll position for [code]wrap_index[/code] of [code]line[/code].
+ Returns the scroll position for [param wrap_index] of [param line].
</description>
</method>
- <method name="get_selected_text" qualifiers="const">
+ <method name="get_selected_text">
<return type="String" />
+ <param index="0" name="caret_index" type="int" default="-1" />
<description>
Returns the text inside the selection.
</description>
</method>
<method name="get_selection_column" qualifiers="const">
<return type="int" />
+ <param index="0" name="caret_index" type="int" default="0" />
<description>
Returns the original start column of the selection.
</description>
</method>
<method name="get_selection_from_column" qualifiers="const">
<return type="int" />
+ <param index="0" name="caret_index" type="int" default="0" />
<description>
Returns the selection begin column.
</description>
</method>
<method name="get_selection_from_line" qualifiers="const">
<return type="int" />
+ <param index="0" name="caret_index" type="int" default="0" />
<description>
Returns the selection begin line.
</description>
</method>
<method name="get_selection_line" qualifiers="const">
<return type="int" />
+ <param index="0" name="caret_index" type="int" default="0" />
<description>
Returns the original start line of the selection.
</description>
@@ -419,12 +498,14 @@
</method>
<method name="get_selection_to_column" qualifiers="const">
<return type="int" />
+ <param index="0" name="caret_index" type="int" default="0" />
<description>
Returns the selection end column.
</description>
</method>
<method name="get_selection_to_line" qualifiers="const">
<return type="int" />
+ <param index="0" name="caret_index" type="int" default="0" />
<description>
Returns the selection end line.
</description>
@@ -444,7 +525,13 @@
<method name="get_total_visible_line_count" qualifiers="const">
<return type="int" />
<description>
- Returns the total amount of lines that could be draw.
+ Returns the number of lines that may be drawn.
+ </description>
+ </method>
+ <method name="get_v_scroll_bar" qualifiers="const">
+ <return type="VScrollBar" />
+ <description>
+ Returns the [VScrollBar] of the [TextEdit].
</description>
</method>
<method name="get_version" qualifiers="const">
@@ -471,11 +558,12 @@
<return type="String" />
<param index="0" name="position" type="Vector2" />
<description>
- Returns the word at [code]position[/code].
+ Returns the word at [param position].
</description>
</method>
<method name="get_word_under_caret" qualifiers="const">
<return type="String" />
+ <param index="0" name="caret_index" type="int" default="-1" />
<description>
Returns a [String] text with the word under the caret's location.
</description>
@@ -494,6 +582,7 @@
</method>
<method name="has_selection" qualifiers="const">
<return type="bool" />
+ <param index="0" name="caret_index" type="int" default="-1" />
<description>
Returns [code]true[/code] if the user has selected text.
</description>
@@ -509,18 +598,20 @@
<param index="0" name="line" type="int" />
<param index="1" name="text" type="String" />
<description>
- Inserts a new line with [code]text[/code] at [code]line[/code].
+ Inserts a new line with [param text] at [param line].
</description>
</method>
<method name="insert_text_at_caret">
<return type="void" />
<param index="0" name="text" type="String" />
+ <param index="1" name="caret_index" type="int" default="-1" />
<description>
Insert the specified text at the caret position.
</description>
</method>
<method name="is_caret_visible" qualifiers="const">
<return type="bool" />
+ <param index="0" name="caret_index" type="int" default="0" />
<description>
Returns [code]true[/code] if the caret is visible on the screen.
</description>
@@ -576,8 +667,9 @@
<method name="is_mouse_over_selection" qualifiers="const">
<return type="bool" />
<param index="0" name="edges" type="bool" />
+ <param index="1" name="caret_index" type="int" default="-1" />
<description>
- Returns whether the mouse is over selection. If [code]edges[/code] is [code]true[/code], the edges are considered part of the selection.
+ Returns whether the mouse is over selection. If [param edges] is [code]true[/code], the edges are considered part of the selection.
</description>
</method>
<method name="is_overtype_mode_enabled" qualifiers="const">
@@ -598,21 +690,44 @@
<param index="0" name="from_line" type="int" />
<param index="1" name="to_line" type="int" />
<description>
- Merge the gutters from [code]from_line[/code] into [code]to_line[/code]. Only overwritable gutters will be copied.
+ Merge the gutters from [param from_line] into [param to_line]. Only overwritable gutters will be copied.
+ </description>
+ </method>
+ <method name="merge_overlapping_carets">
+ <return type="void" />
+ <description>
+ Merges any overlapping carets. Will favour the newest caret, or the caret with a selection.
+ [b]Note:[/b] This is not called when a caret changes position but after certain actions, so it is possible to get into a state where carets overlap.
</description>
</method>
<method name="paste">
<return type="void" />
+ <param index="0" name="caret_index" type="int" default="-1" />
<description>
Paste at the current location. Can be overridden with [method _paste].
</description>
</method>
+ <method name="paste_primary_clipboard">
+ <return type="void" />
+ <param index="0" name="caret_index" type="int" default="-1" />
+ <description>
+ Pastes the primary clipboard.
+ </description>
+ </method>
<method name="redo">
<return type="void" />
<description>
Perform redo operation.
</description>
</method>
+ <method name="remove_caret">
+ <return type="void" />
+ <param index="0" name="caret" type="int" />
+ <description>
+ Removes the given caret index.
+ [b]Note:[/b] This can result in adjustment of all other caret indices.
+ </description>
+ </method>
<method name="remove_gutter">
<return type="void" />
<param index="0" name="gutter" type="int" />
@@ -620,6 +735,12 @@
Removes the gutter from this [TextEdit].
</description>
</method>
+ <method name="remove_secondary_carets">
+ <return type="void" />
+ <description>
+ Removes all additional carets.
+ </description>
+ </method>
<method name="remove_text">
<return type="void" />
<param index="0" name="from_line" type="int" />
@@ -666,6 +787,7 @@
<param index="1" name="from_column" type="int" />
<param index="2" name="to_line" type="int" />
<param index="3" name="to_column" type="int" />
+ <param index="4" name="caret_index" type="int" default="0" />
<description>
Perform selection, from line/column to line/column.
If [member selecting_enabled] is [code]false[/code], no selection will occur.
@@ -680,6 +802,7 @@
</method>
<method name="select_word_under_caret">
<return type="void" />
+ <param index="0" name="caret_index" type="int" default="-1" />
<description>
Selects the word under the caret.
</description>
@@ -688,9 +811,11 @@
<return type="void" />
<param index="0" name="column" type="int" />
<param index="1" name="adjust_viewport" type="bool" default="true" />
+ <param index="2" name="caret_index" type="int" default="0" />
<description>
- Moves the caret to the specified [code]column[/code] index.
- If [code]adjust_viewport[/code] is [code]true[/code], the viewport will center at the caret position after the move occurs.
+ Moves the caret to the specified [param column] index.
+ If [param adjust_viewport] is [code]true[/code], the viewport will center at the caret position after the move occurs.
+ [b]Note:[/b] If supporting multiple carets this will not check for any overlap. See [method merge_overlapping_carets].
</description>
</method>
<method name="set_caret_line">
@@ -699,10 +824,12 @@
<param index="1" name="adjust_viewport" type="bool" default="true" />
<param index="2" name="can_be_hidden" type="bool" default="true" />
<param index="3" name="wrap_index" type="int" default="0" />
+ <param index="4" name="caret_index" type="int" default="0" />
<description>
- Moves the caret to the specified [code]line[/code] index.
- If [code]adjust_viewport[/code] is [code]true[/code], the viewport will center at the caret position after the move occurs.
- If [code]can_be_hidden[/code] is [code]true[/code], the specified [code]line[/code] can be hidden.
+ Moves the caret to the specified [param line] index.
+ If [param adjust_viewport] is [code]true[/code], the viewport will center at the caret position after the move occurs.
+ If [param can_be_hidden] is [code]true[/code], the specified [code]line[/code] can be hidden.
+ [b]Note:[/b] If supporting multiple carets this will not check for any overlap. See [method merge_overlapping_carets].
</description>
</method>
<method name="set_gutter_clickable">
@@ -774,7 +901,7 @@
<param index="0" name="line" type="int" />
<param index="1" name="wrap_index" type="int" default="0" />
<description>
- Positions the [code]wrap_index[/code] of [code]line[/code] at the center of the viewport.
+ Positions the [param wrap_index] of [param line] at the center of the viewport.
</description>
</method>
<method name="set_line_as_first_visible">
@@ -782,7 +909,7 @@
<param index="0" name="line" type="int" />
<param index="1" name="wrap_index" type="int" default="0" />
<description>
- Positions the [code]wrap_index[/code] of [code]line[/code] at the top of the viewport.
+ Positions the [param wrap_index] of [param line] at the top of the viewport.
</description>
</method>
<method name="set_line_as_last_visible">
@@ -790,7 +917,7 @@
<param index="0" name="line" type="int" />
<param index="1" name="wrap_index" type="int" default="0" />
<description>
- Positions the [code]wrap_index[/code] of [code]line[/code] at the bottom of the viewport.
+ Positions the [param wrap_index] of [param line] at the bottom of the viewport.
</description>
</method>
<method name="set_line_background_color">
@@ -807,7 +934,7 @@
<param index="1" name="gutter" type="int" />
<param index="2" name="clickable" type="bool" />
<description>
- Sets the [code]gutter[/code] on [code]line[/code] as clickable.
+ If [param clickable] is [code]true[/code], makes the [param gutter] on [param line] clickable. See [signal gutter_clicked].
</description>
</method>
<method name="set_line_gutter_icon">
@@ -816,7 +943,7 @@
<param index="1" name="gutter" type="int" />
<param index="2" name="icon" type="Texture2D" />
<description>
- Sets the icon for [code]gutter[/code] on [code]line[/code].
+ Sets the icon for [param gutter] on [param line] to [param icon].
</description>
</method>
<method name="set_line_gutter_item_color">
@@ -825,7 +952,7 @@
<param index="1" name="gutter" type="int" />
<param index="2" name="color" type="Color" />
<description>
- Sets the color for [code]gutter[/code] on [code]line[/code].
+ Sets the color for [param gutter] on [param line] to [param color].
</description>
</method>
<method name="set_line_gutter_metadata">
@@ -834,7 +961,7 @@
<param index="1" name="gutter" type="int" />
<param index="2" name="metadata" type="Variant" />
<description>
- Sets the metadata for [code]gutter[/code] on [code]line[/code].
+ Sets the metadata for [param gutter] on [param line] to [param metadata].
</description>
</method>
<method name="set_line_gutter_text">
@@ -843,7 +970,7 @@
<param index="1" name="gutter" type="int" />
<param index="2" name="text" type="String" />
<description>
- Sets the text for [code]gutter[/code] on [code]line[/code].
+ Sets the text for [param gutter] on [param line] to [param text].
</description>
</method>
<method name="set_overtype_mode_enabled">
@@ -857,7 +984,7 @@
<return type="void" />
<param index="0" name="flags" type="int" />
<description>
- Sets the search flags. This is used with [method set_search_text] to highlight occurrences of the searched text. Search flags can be specified from the [enum SearchFlags] enum.
+ Sets the search [param flags]. This is used with [method set_search_text] to highlight occurrences of the searched text. Search flags can be specified from the [enum SearchFlags] enum.
</description>
</method>
<method name="set_search_text">
@@ -872,6 +999,7 @@
<param index="0" name="mode" type="int" enum="TextEdit.SelectionMode" />
<param index="1" name="line" type="int" default="-1" />
<param index="2" name="column" type="int" default="-1" />
+ <param index="3" name="caret_index" type="int" default="0" />
<description>
Sets the current selection mode.
</description>
@@ -890,6 +1018,14 @@
Provide custom tooltip text. The callback method must take the following args: [code]hovered_word: String[/code]
</description>
</method>
+ <method name="start_action">
+ <return type="void" />
+ <param index="0" name="action" type="int" enum="TextEdit.EditAction" />
+ <description>
+ Starts an action, will end the current action if [code]action[/code] is different.
+ An action will also end after a call to [method end_action], after [member ProjectSettings.gui/timers/text_edit_idle_detect_sec] is triggered or a new undoable step outside the [method start_action] and [method end_action] calls.
+ </description>
+ </method>
<method name="swap_lines">
<return type="void" />
<param index="0" name="from_line" type="int" />
@@ -915,7 +1051,7 @@
<member name="caret_blink" type="bool" setter="set_caret_blink_enabled" getter="is_caret_blink_enabled" default="false">
Sets if the caret should blink.
</member>
- <member name="caret_blink_speed" type="float" setter="set_caret_blink_speed" getter="get_caret_blink_speed" default="0.65">
+ <member name="caret_blink_interval" type="float" setter="set_caret_blink_interval" getter="get_caret_blink_interval" default="0.65">
Duration (in seconds) of a caret's blinking cycle.
</member>
<member name="caret_mid_grapheme" type="bool" setter="set_caret_mid_grapheme_enabled" getter="is_caret_mid_grapheme_enabled" default="true">
@@ -926,6 +1062,9 @@
If [code]true[/code], a right-click moves the caret at the mouse position before displaying the context menu.
If [code]false[/code], the context menu disregards mouse location.
</member>
+ <member name="caret_multiple" type="bool" setter="set_multiple_carets_enabled" getter="is_multiple_carets_enabled" default="true">
+ Sets if multiple carets are allowed.
+ </member>
<member name="caret_type" type="int" setter="set_caret_type" getter="get_caret_type" enum="TextEdit.CaretType" default="0">
Set the type of caret to draw.
</member>
@@ -971,9 +1110,6 @@
The width, in pixels, of the minimap.
</member>
<member name="mouse_default_cursor_shape" type="int" setter="set_default_cursor_shape" getter="get_default_cursor_shape" overrides="Control" enum="Control.CursorShape" default="1" />
- <member name="override_selected_font_color" type="bool" setter="set_override_selected_font_color" getter="is_overriding_selected_font_color" default="false">
- If [code]true[/code], custom [code]font_selected_color[/code] will be used for selected text.
- </member>
<member name="placeholder_text" type="String" setter="set_placeholder" getter="get_placeholder" default="&quot;&quot;">
Text shown when the [TextEdit] is empty. It is [b]not[/b] the [TextEdit]'s default value (see [member text]).
</member>
@@ -1052,7 +1188,7 @@
<param index="1" name="to_line" type="int" />
<description>
Emitted immediately when the text changes.
- When text is added [code]from_line[/code] will be less then [code]to_line[/code]. On a remove [code]to_line[/code] will be less then [code]from_line[/code].
+ When text is added [param from_line] will be less then [param to_line]. On a remove [param to_line] will be less then [param from_line].
</description>
</signal>
<signal name="text_changed">
@@ -1154,6 +1290,18 @@
<constant name="MENU_MAX" value="28" enum="MenuItems">
Represents the size of the [enum MenuItems] enum.
</constant>
+ <constant name="ACTION_NONE" value="0" enum="EditAction">
+ No current action.
+ </constant>
+ <constant name="ACTION_TYPING" value="1" enum="EditAction">
+ A typing action.
+ </constant>
+ <constant name="ACTION_BACKSPACE" value="2" enum="EditAction">
+ A backwards delete action.
+ </constant>
+ <constant name="ACTION_DELETE" value="3" enum="EditAction">
+ A forward delete action.
+ </constant>
<constant name="SEARCH_MATCH_CASE" value="1" enum="SearchFlags">
Match case when searching.
</constant>
@@ -1225,8 +1373,8 @@
<theme_item name="font_readonly_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 0.5)">
Sets the font [Color] when [member editable] is disabled.
</theme_item>
- <theme_item name="font_selected_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
- Sets the [Color] of the selected text. [member override_selected_font_color] has to be enabled.
+ <theme_item name="font_selected_color" data_type="color" type="Color" default="Color(0, 0, 0, 0)">
+ Sets the [Color] of the selected text. If equal to [code]Color(0, 0, 0, 0)[/code], it will be ignored.
</theme_item>
<theme_item name="search_result_border_color" data_type="color" type="Color" default="Color(0.3, 0.3, 0.3, 0.4)">
[Color] of the border around text that matches the search query.
diff --git a/doc/classes/TextLine.xml b/doc/classes/TextLine.xml
index c7fd767743..d1dfdecbd2 100644
--- a/doc/classes/TextLine.xml
+++ b/doc/classes/TextLine.xml
@@ -16,7 +16,7 @@
<param index="2" name="inline_align" type="int" enum="InlineAlignment" default="5" />
<param index="3" name="length" type="int" default="1" />
<description>
- Adds inline object to the text buffer, [code]key[/code] must be unique. In the text, object is represented as [code]length[/code] object replacement characters.
+ Adds inline object to the text buffer, [param key] must be unique. In the text, object is represented as [param length] object replacement characters.
</description>
</method>
<method name="add_string">
@@ -42,7 +42,7 @@
<param index="1" name="pos" type="Vector2" />
<param index="2" name="color" type="Color" default="Color(1, 1, 1, 1)" />
<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.
+ Draw text into a canvas item at a given position, with [param color]. [param pos] specifies the top left corner of the bounding box.
</description>
</method>
<method name="draw_outline" qualifiers="const">
@@ -52,7 +52,7 @@
<param index="2" name="outline_size" type="int" default="1" />
<param index="3" name="color" type="Color" default="Color(1, 1, 1, 1)" />
<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.
+ Draw text into a canvas item at a given position, with [param color]. [param pos] specifies the top left corner of the bounding box.
</description>
</method>
<method name="get_line_ascent" qualifiers="const">
@@ -144,6 +144,7 @@
</methods>
<members>
<member name="alignment" type="int" setter="set_horizontal_alignment" getter="get_horizontal_alignment" enum="HorizontalAlignment" default="0">
+ Sets text alignment within the line as if the line was horizontal.
</member>
<member name="direction" type="int" setter="set_direction" getter="get_direction" enum="TextServer.Direction" default="0">
Text writing direction.
diff --git a/doc/classes/TextMesh.xml b/doc/classes/TextMesh.xml
index 17a0ca32e4..678b95cc72 100644
--- a/doc/classes/TextMesh.xml
+++ b/doc/classes/TextMesh.xml
@@ -11,6 +11,9 @@
<tutorials>
</tutorials>
<members>
+ <member name="autowrap_mode" type="int" setter="set_autowrap_mode" getter="get_autowrap_mode" enum="TextServer.AutowrapMode" default="0">
+ If set to something other than [constant TextServer.AUTOWRAP_OFF], the text gets wrapped inside the node's bounding rectangle. If you resize the node, it will change its height automatically to show all the text. To see how each mode behaves, see [enum TextServer.AutowrapMode].
+ </member>
<member name="curve_step" type="float" setter="set_curve_step" getter="get_curve_step" default="0.5">
Step (in pixels) used to approximate Bézier curves.
</member>
@@ -29,6 +32,12 @@
<member name="language" type="String" setter="set_language" getter="get_language" default="&quot;&quot;">
Language code used for text shaping algorithms, if left empty current locale is used instead.
</member>
+ <member name="line_spacing" type="float" setter="set_line_spacing" getter="get_line_spacing" default="0.0">
+ Vertical space between lines in multiline [TextMesh].
+ </member>
+ <member name="offset" type="Vector2" setter="set_offset" getter="get_offset" default="Vector2(0, 0)">
+ The text drawing offset (in pixels).
+ </member>
<member name="pixel_size" type="float" setter="set_pixel_size" getter="get_pixel_size" default="0.01">
The size of one pixel's width on the text to scale it in 3D.
</member>
@@ -47,6 +56,9 @@
<member name="uppercase" type="bool" setter="set_uppercase" getter="is_uppercase" default="false">
If [code]true[/code], all the text displays as UPPERCASE.
</member>
+ <member name="vertical_alignment" type="int" setter="set_vertical_alignment" getter="get_vertical_alignment" enum="VerticalAlignment" default="1">
+ Controls the text's vertical alignment. Supports top, center, bottom. Set it to one of the [enum VerticalAlignment] constants.
+ </member>
<member name="width" type="float" setter="set_width" getter="get_width" default="500.0">
Text width (in pixels), used for fill alignment.
</member>
diff --git a/doc/classes/TextParagraph.xml b/doc/classes/TextParagraph.xml
index ea3815cec4..e0729ba844 100644
--- a/doc/classes/TextParagraph.xml
+++ b/doc/classes/TextParagraph.xml
@@ -16,7 +16,7 @@
<param index="2" name="inline_align" type="int" enum="InlineAlignment" default="5" />
<param index="3" name="length" type="int" default="1" />
<description>
- Adds inline object to the text buffer, [code]key[/code] must be unique. In the text, object is represented as [code]length[/code] object replacement characters.
+ Adds inline object to the text buffer, [param key] must be unique. In the text, object is represented as [param length] object replacement characters.
</description>
</method>
<method name="add_string">
@@ -49,7 +49,7 @@
<param index="2" name="color" type="Color" default="Color(1, 1, 1, 1)" />
<param index="3" name="dc_color" type="Color" default="Color(1, 1, 1, 1)" />
<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.
+ Draw all lines of the text and drop cap into a canvas item at a given position, with [param color]. [param pos] specifies the top left corner of the bounding box.
</description>
</method>
<method name="draw_dropcap" qualifiers="const">
@@ -58,7 +58,7 @@
<param index="1" name="pos" type="Vector2" />
<param index="2" name="color" type="Color" default="Color(1, 1, 1, 1)" />
<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.
+ Draw drop cap into a canvas item at a given position, with [param color]. [param pos] specifies the top left corner of the bounding box.
</description>
</method>
<method name="draw_dropcap_outline" qualifiers="const">
@@ -68,7 +68,7 @@
<param index="2" name="outline_size" type="int" default="1" />
<param index="3" name="color" type="Color" default="Color(1, 1, 1, 1)" />
<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.
+ Draw drop cap outline into a canvas item at a given position, with [param color]. [param pos] specifies the top left corner of the bounding box.
</description>
</method>
<method name="draw_line" qualifiers="const">
@@ -78,7 +78,7 @@
<param index="2" name="line" type="int" />
<param index="3" name="color" type="Color" default="Color(1, 1, 1, 1)" />
<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.
+ Draw single line of text into a canvas item at a given position, with [param color]. [param pos] specifies the top left corner of the bounding box.
</description>
</method>
<method name="draw_line_outline" qualifiers="const">
@@ -89,7 +89,7 @@
<param index="3" name="outline_size" type="int" default="1" />
<param index="4" name="color" type="Color" default="Color(1, 1, 1, 1)" />
<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.
+ Draw outline of the single line of text into a canvas item at a given position, with [param color]. [param pos] specifies the top left corner of the bounding box.
</description>
</method>
<method name="draw_outline" qualifiers="const">
@@ -100,7 +100,7 @@
<param index="3" name="color" type="Color" default="Color(1, 1, 1, 1)" />
<param index="4" name="dc_color" type="Color" default="Color(1, 1, 1, 1)" />
<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.
+ Draw outlines of all lines of the text and drop cap into a canvas item at a given position, with [param color]. [param pos] specifies the top left corner of the bounding box.
</description>
</method>
<method name="get_dropcap_lines" qualifiers="const">
diff --git a/doc/classes/TextServer.xml b/doc/classes/TextServer.xml
index be3c04e913..f4d92ab9b6 100644
--- a/doc/classes/TextServer.xml
+++ b/doc/classes/TextServer.xml
@@ -20,7 +20,7 @@
<param index="0" name="direction" type="int" enum="TextServer.Direction" default="0" />
<param index="1" name="orientation" type="int" enum="TextServer.Orientation" default="0" />
<description>
- Creates new buffer for complex text layout, with the given [code]direction[/code] and [code]orientation[/code]. To free the resulting buffer, use [method free_rid] method.
+ Creates new buffer for complex text layout, with the given [param direction] and [param orientation]. To free the resulting buffer, use [method free_rid] method.
[b]Note:[/b] Direction is ignored if server does not support [constant FEATURE_BIDI_LAYOUT] feature (supported by [TextServerAdvanced]).
[b]Note:[/b] Orientation is ignored if server does not support [constant FEATURE_VERTICAL_LAYOUT] feature (supported by [TextServerAdvanced]).
</description>
@@ -78,7 +78,7 @@
<param index="4" name="index" type="int" />
<param index="5" name="color" type="Color" default="Color(1, 1, 1, 1)" />
<description>
- Draws single glyph into a canvas item at the position, using [code]font_rid[/code] at the size [code]size[/code].
+ Draws single glyph into a canvas item at the position, using [param font_rid] at the size [param size].
[b]Note:[/b] Glyph index is specific to the font, use glyphs indices returned by [method shaped_text_get_glyphs] or [method font_get_glyph_index].
[b]Note:[/b] If there are pending glyphs to render, calling this function might trigger the texture cache update.
</description>
@@ -93,11 +93,18 @@
<param index="5" name="index" type="int" />
<param index="6" name="color" type="Color" default="Color(1, 1, 1, 1)" />
<description>
- Draws single glyph outline of size [code]outline_size[/code] into a canvas item at the position, using [code]font_rid[/code] at the size [code]size[/code].
+ Draws single glyph outline of size [param outline_size] into a canvas item at the position, using [param font_rid] at the size [param size].
[b]Note:[/b] Glyph index is specific to the font, use glyphs indices returned by [method shaped_text_get_glyphs] or [method font_get_glyph_index].
[b]Note:[/b] If there are pending glyphs to render, calling this function might trigger the texture cache update.
</description>
</method>
+ <method name="font_get_antialiasing" qualifiers="const">
+ <return type="int" enum="TextServer.FontAntialiasing" />
+ <param index="0" name="font_rid" type="RID" />
+ <description>
+ Returns font anti-aliasing mode.
+ </description>
+ </method>
<method name="font_get_ascent" qualifiers="const">
<return type="float" />
<param index="0" name="font_rid" type="RID" />
@@ -184,11 +191,11 @@
<param index="2" name="char" type="int" />
<param index="3" name="variation_selector" type="int" />
<description>
- Returns the glyph index of a [code]char[/code], optionally modified by the [code]variation_selector[/code].
+ Returns the glyph index of a [param char], optionally modified by the [param variation_selector].
</description>
</method>
<method name="font_get_glyph_list" qualifiers="const">
- <return type="Array" />
+ <return type="PackedInt32Array" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="size" type="Vector2i" />
<description>
@@ -268,7 +275,7 @@
</description>
</method>
<method name="font_get_kerning_list" qualifiers="const">
- <return type="Array" />
+ <return type="Vector2i[]" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="size" type="int" />
<description>
@@ -280,7 +287,7 @@
<param index="0" name="font_rid" type="RID" />
<param index="1" name="language" type="String" />
<description>
- Returns [code]true[/code] if support override is enabled for the [code]language[/code].
+ Returns [code]true[/code] if support override is enabled for the [param language].
</description>
</method>
<method name="font_get_language_support_overrides">
@@ -338,7 +345,7 @@
<param index="0" name="font_rid" type="RID" />
<param index="1" name="script" type="String" />
<description>
- Returns [code]true[/code] if support override is enabled for the [code]script[/code].
+ Returns [code]true[/code] if support override is enabled for the [param script].
</description>
</method>
<method name="font_get_script_support_overrides">
@@ -349,7 +356,7 @@
</description>
</method>
<method name="font_get_size_cache_list" qualifiers="const">
- <return type="Array" />
+ <return type="Vector2i[]" />
<param index="0" name="font_rid" type="RID" />
<description>
Returns list of the font sizes in the cache. Each size is [code]Vector2i[/code] with font size and outline size.
@@ -373,7 +380,7 @@
<return type="int" enum="TextServer.SubpixelPositioning" />
<param index="0" name="font_rid" type="RID" />
<description>
- Returns font sub-pixel glyph positioning mode.
+ Returns font subpixel glyph positioning mode.
</description>
</method>
<method name="font_get_supported_chars" qualifiers="const">
@@ -406,7 +413,7 @@
<param index="1" name="size" type="Vector2i" />
<param index="2" name="texture_index" type="int" />
<description>
- Returns array containing the first free pixel in the each column of texture. Should be the same size as texture width or empty.
+ Returns array containing glyph packing data.
</description>
</method>
<method name="font_get_transform" qualifiers="const">
@@ -444,14 +451,7 @@
<param index="0" name="font_rid" type="RID" />
<param index="1" name="char" type="int" />
<description>
- Returns [code]true[/code] if a Unicode [code]char[/code] is available in the font.
- </description>
- </method>
- <method name="font_is_antialiased" qualifiers="const">
- <return type="bool" />
- <param index="0" name="font_rid" type="RID" />
- <description>
- Returns [code]true[/code] if font 8-bit anitialiased glyph rendering is supported and enabled.
+ Returns [code]true[/code] if a Unicode [param char] is available in the font.
</description>
</method>
<method name="font_is_force_autohinter" qualifiers="const">
@@ -556,12 +556,12 @@
Renders the range of characters to the font cache texture.
</description>
</method>
- <method name="font_set_antialiased">
+ <method name="font_set_antialiasing">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
- <param index="1" name="antialiased" type="bool" />
+ <param index="1" name="antialiasing" type="int" enum="TextServer.FontAntialiasing" />
<description>
- If set to [code]true[/code], 8-bit antialiased glyph rendering is used, otherwise 1-bit rendering is used. Used by dynamic fonts only.
+ Sets font anti-aliasing mode.
</description>
</method>
<method name="font_set_ascent">
@@ -595,7 +595,7 @@
<param index="0" name="font_rid" type="RID" />
<param index="1" name="strength" type="float" />
<description>
- Sets font embolden strength. If [code]strength[/code] is not equal to zero, emboldens the font outlines. Negative values reduce the outline thickness.
+ Sets font embolden strength. If [param strength] is not equal to zero, emboldens the font outlines. Negative values reduce the outline thickness.
</description>
</method>
<method name="font_set_face_index">
@@ -804,7 +804,7 @@
<param index="0" name="font_rid" type="RID" />
<param index="1" name="subpixel_positioning" type="int" enum="TextServer.SubpixelPositioning" />
<description>
- Sets font sub-pixel glyph positioning mode.
+ Sets font subpixel glyph positioning mode.
</description>
</method>
<method name="font_set_texture_image">
@@ -824,7 +824,7 @@
<param index="2" name="texture_index" type="int" />
<param index="3" name="offset" type="PackedInt32Array" />
<description>
- Sets array containing the first free pixel in the each column of texture. Should be the same size as texture width or empty.
+ Sets array containing glyph packing data.
</description>
</method>
<method name="font_set_transform">
@@ -881,7 +881,7 @@
<param index="0" name="number" type="String" />
<param index="1" name="language" type="String" default="&quot;&quot;" />
<description>
- Converts a number from the Western Arabic (0..9) to the numeral systems used in [code]language[/code].
+ Converts a number from the Western Arabic (0..9) to the numeral systems used in [param language].
</description>
</method>
<method name="free_rid">
@@ -927,7 +927,7 @@
<return type="bool" />
<param index="0" name="rid" type="RID" />
<description>
- Returns [code]true[/code] if [code]rid[/code] is valid resource owned by this text server.
+ Returns [code]true[/code] if [param rid] is valid resource owned by this text server.
</description>
</method>
<method name="has_feature" qualifiers="const">
@@ -942,7 +942,7 @@
<param index="0" name="string" type="String" />
<param index="1" name="dict" type="PackedStringArray" />
<description>
- Returns index of the first string in [code]dict[/dict] which is visually confusable with the [code]string[/string], or [code]-1[/code] if none is found.
+ Returns index of the first string in [param dict] which is visually confusable with the [param string], or [code]-1[/code] if none is found.
[b]Note:[/b] This method doesn't detect invisible characters, for spoof detection use it in combination with [method spoof_check].
[b]Note:[/b] Always returns [code]-1[/code] if the server does not support the [constant FEATURE_UNICODE_SECURITY] feature.
</description>
@@ -958,7 +958,7 @@
<return type="bool" />
<param index="0" name="string" type="String" />
<description>
- Returns [code]true[/code] is [code]string[/code] is a valid identifier.
+ Returns [code]true[/code] is [param string] is a valid identifier.
If the text server supports the [constant FEATURE_UNICODE_IDENTIFIERS] feature, a valid identifier must:
- Conform to normalization form C.
- Begin with a Unicode character of class XID_Start or [code]"_"[/code].
@@ -989,11 +989,11 @@
<param index="0" name="number" type="String" />
<param index="1" name="language" type="String" default="&quot;&quot;" />
<description>
- Converts a number from the numeral systems used in [code]language[/code] to Western Arabic (0..9).
+ Converts [param number] from the numeral systems used in [param language] to Western Arabic (0..9).
</description>
</method>
<method name="parse_structured_text" qualifiers="const">
- <return type="Array" />
+ <return type="Vector2i[]" />
<param index="0" name="parser_type" type="int" enum="TextServer.StructuredTextParser" />
<param index="1" name="args" type="Array" />
<param index="2" name="text" type="String" />
@@ -1005,7 +1005,7 @@
<return type="String" />
<param index="0" name="language" type="String" default="&quot;&quot;" />
<description>
- Returns percent sign used in the [code]language[/code].
+ Returns percent sign used in the [param language].
</description>
</method>
<method name="save_support_data" qualifiers="const">
@@ -1035,7 +1035,7 @@
<return type="void" />
<param index="0" name="shaped" type="RID" />
<param index="1" name="index" type="int" />
- <param index="2" name="fonts" type="Array" />
+ <param index="2" name="fonts" type="RID[]" />
<param index="3" name="size" type="int" />
<param index="4" name="opentype_features" type="Dictionary" default="{}" />
<description>
@@ -1050,14 +1050,14 @@
<param index="3" name="inline_align" type="int" enum="InlineAlignment" default="5" />
<param index="4" name="length" type="int" default="1" />
<description>
- Adds inline object to the text buffer, [code]key[/code] must be unique. In the text, object is represented as [code]length[/code] object replacement characters.
+ Adds inline object to the text buffer, [param key] must be unique. In the text, object is represented as [param length] object replacement characters.
</description>
</method>
<method name="shaped_text_add_string">
<return type="bool" />
<param index="0" name="shaped" type="RID" />
<param index="1" name="text" type="String" />
- <param index="2" name="fonts" type="Array" />
+ <param index="2" name="fonts" type="RID[]" />
<param index="3" name="size" type="int" />
<param index="4" name="opentype_features" type="Dictionary" default="{}" />
<param index="5" name="language" type="String" default="&quot;&quot;" />
@@ -1082,7 +1082,7 @@
<param index="4" name="clip_r" type="float" default="-1" />
<param index="5" name="color" type="Color" default="Color(1, 1, 1, 1)" />
<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).
+ Draw shaped text into a canvas item at a given position, with [param color]. [param pos] specifies the leftmost point of the baseline (for horizontal layout) or topmost point of the baseline (for vertical layout).
</description>
</method>
<method name="shaped_text_draw_outline" qualifiers="const">
@@ -1095,7 +1095,7 @@
<param index="5" name="outline_size" type="int" default="1" />
<param index="6" name="color" type="Color" default="Color(1, 1, 1, 1)" />
<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).
+ Draw the outline of the shaped text into a canvas item at a given position, with [param color]. [param pos] specifies the leftmost point of the baseline (for horizontal layout) or topmost point of the baseline (for vertical layout).
</description>
</method>
<method name="shaped_text_fit_to_width">
@@ -1120,7 +1120,7 @@
<param index="0" name="shaped" type="RID" />
<param index="1" name="position" type="int" />
<description>
- Returns shapes of the carets corresponding to the character offset [code]position[/code] in the text. Returned caret shape is 1 pixel wide rectangle.
+ Returns shapes of the carets corresponding to the character offset [param position] in the text. Returned caret shape is 1 pixel wide rectangle.
</description>
</method>
<method name="shaped_text_get_custom_punctuation" qualifiers="const">
@@ -1162,7 +1162,7 @@
</description>
</method>
<method name="shaped_text_get_ellipsis_glyphs" qualifiers="const">
- <return type="Array" />
+ <return type="Dictionary[]" />
<param index="0" name="shaped" type="RID" />
<description>
Returns array of the glyphs in the ellipsis.
@@ -1183,7 +1183,7 @@
</description>
</method>
<method name="shaped_text_get_glyphs" qualifiers="const">
- <return type="Array" />
+ <return type="Dictionary[]" />
<param index="0" name="shaped" type="RID" />
<description>
Returns an array of glyphs in the visual order.
@@ -1333,7 +1333,7 @@
<param index="0" name="shaped" type="RID" />
<param index="1" name="grapheme_flags" type="int" enum="TextServer.GraphemeFlag" default="264" />
<description>
- Breaks text into words and returns array of character ranges. Use [code]grapheme_flags[/code] to set what characters are used for breaking (see [enum GraphemeFlag]).
+ Breaks text into words and returns array of character ranges. Use [param grapheme_flags] to set what characters are used for breaking (see [enum GraphemeFlag]).
</description>
</method>
<method name="shaped_text_hit_test_grapheme" qualifiers="const">
@@ -1364,7 +1364,7 @@
<param index="0" name="shaped" type="RID" />
<param index="1" name="pos" type="int" />
<description>
- Returns composite character end position closest to the [code]pos[/code].
+ Returns composite character end position closest to the [param pos].
</description>
</method>
<method name="shaped_text_overrun_trim_to_width">
@@ -1381,7 +1381,7 @@
<param index="0" name="shaped" type="RID" />
<param index="1" name="pos" type="int" />
<description>
- Returns composite character start position closest to the [code]pos[/code].
+ Returns composite character start position closest to the [param pos].
</description>
</method>
<method name="shaped_text_resize_object">
@@ -1416,7 +1416,7 @@
<param index="0" name="shaped" type="RID" />
<param index="1" name="direction" type="int" enum="TextServer.Direction" default="0" />
<description>
- Sets desired text direction. If set to [code]TEXT_DIRECTION_AUTO[/code], direction will be detected based on the buffer contents and current locale.
+ Sets desired text direction. If set to [constant DIRECTION_AUTO], direction will be detected based on the buffer contents and current locale.
[b]Note:[/b] Direction is ignored if server does not support [constant FEATURE_BIDI_LAYOUT] feature (supported by [TextServerAdvanced]).
</description>
</method>
@@ -1463,7 +1463,7 @@
</description>
</method>
<method name="shaped_text_sort_logical">
- <return type="Array" />
+ <return type="Dictionary[]" />
<param index="0" name="shaped" type="RID" />
<description>
Returns text glyphs in the logical order.
@@ -1475,7 +1475,7 @@
<param index="1" name="start" type="int" />
<param index="2" name="length" type="int" />
<description>
- Returns text buffer for the substring of the text in the [code]shaped[/code] text buffer (including inline objects).
+ Returns text buffer for the substring of the text in the [param shaped] text buffer (including inline objects).
</description>
</method>
<method name="shaped_text_tab_align">
@@ -1490,7 +1490,7 @@
<return type="bool" />
<param index="0" name="string" type="String" />
<description>
- Returns [code]true[/code] if [code]string[/code] is likely to be an attempt at confusing the reader.
+ Returns [code]true[/code] if [param string] is likely to be an attempt at confusing the reader.
[b]Note:[/b] Always returns [code]false[/code] if the server does not support the [constant FEATURE_UNICODE_SECURITY] feature.
</description>
</method>
@@ -1539,6 +1539,34 @@
</method>
</methods>
<constants>
+ <constant name="FONT_ANTIALIASING_NONE" value="0" enum="FontAntialiasing">
+ Font glyphs are rasterized as 1-bit bitmaps.
+ </constant>
+ <constant name="FONT_ANTIALIASING_GRAY" value="1" enum="FontAntialiasing">
+ Font glyphs are rasterized as 8-bit grayscale anti-aliased bitmaps.
+ </constant>
+ <constant name="FONT_ANTIALIASING_LCD" value="2" enum="FontAntialiasing">
+ Font glyphs are rasterized for LCD screens.
+ LCD subpixel layout is determined by the value of [code]gui/theme/lcd_subpixel_layout[/code] project settings.
+ LCD subpixel anti-aliasing mode is suitable only for rendering horizontal, unscaled text in 2D.
+ </constant>
+ <constant name="FONT_LCD_SUBPIXEL_LAYOUT_NONE" value="0" enum="FontLCDSubpixelLayout">
+ Unknown or unsupported subpixel layout, LCD subpixel antialiasing is disabled.
+ </constant>
+ <constant name="FONT_LCD_SUBPIXEL_LAYOUT_HRGB" value="1" enum="FontLCDSubpixelLayout">
+ Horizontal RGB subpixel layout.
+ </constant>
+ <constant name="FONT_LCD_SUBPIXEL_LAYOUT_HBGR" value="2" enum="FontLCDSubpixelLayout">
+ Horizontal BGR subpixel layout.
+ </constant>
+ <constant name="FONT_LCD_SUBPIXEL_LAYOUT_VRGB" value="3" enum="FontLCDSubpixelLayout">
+ Vertical RGB subpixel layout.
+ </constant>
+ <constant name="FONT_LCD_SUBPIXEL_LAYOUT_VBGR" value="4" enum="FontLCDSubpixelLayout">
+ Vertical BGR subpixel layout.
+ </constant>
+ <constant name="FONT_LCD_SUBPIXEL_LAYOUT_MAX" value="5" enum="FontLCDSubpixelLayout">
+ </constant>
<constant name="DIRECTION_AUTO" value="0" enum="Direction">
Text direction is determined based on contents and current locale.
</constant>
@@ -1598,6 +1626,10 @@
Break the line between any unconnected graphemes.
</constant>
<constant name="BREAK_ADAPTIVE" value="8" enum="LineBreakFlag" is_bitfield="true">
+ Should be used only in conjunction with [constant BREAK_WORD_BOUND], break the line between any unconnected graphemes, if it's impossible to break it between the words.
+ </constant>
+ <constant name="BREAK_TRIM_EDGE_SPACES" value="16" enum="LineBreakFlag" is_bitfield="true">
+ Remove edge spaces from the broken line segments.
</constant>
<constant name="VC_CHARS_BEFORE_SHAPING" value="0" enum="VisibleCharactersBehavior">
Trims text before the shaping. e.g, increasing [member Label.visible_characters] or [member RichTextLabel.visible_characters] value is visually identical to typing the text.
@@ -1606,13 +1638,13 @@
Displays glyphs that are mapped to the first [member Label.visible_characters] or [member RichTextLabel.visible_characters] characters from the beginning of the text.
</constant>
<constant name="VC_GLYPHS_AUTO" value="2" enum="VisibleCharactersBehavior">
- Displays [member Label.percent_visible] or [member RichTextLabel.percent_visible] glyphs, starting from the left or from the right, depending on [member Control.layout_direction] value.
+ Displays [member Label.visible_ratio] or [member RichTextLabel.visible_ratio] glyphs, starting from the left or from the right, depending on [member Control.layout_direction] value.
</constant>
<constant name="VC_GLYPHS_LTR" value="3" enum="VisibleCharactersBehavior">
- Displays [member Label.percent_visible] or [member RichTextLabel.percent_visible] glyphs, starting from the left.
+ Displays [member Label.visible_ratio] or [member RichTextLabel.visible_ratio] glyphs, starting from the left.
</constant>
<constant name="VC_GLYPHS_RTL" value="4" enum="VisibleCharactersBehavior">
- Displays [member Label.percent_visible] or [member RichTextLabel.percent_visible] glyphs, starting from the right.
+ Displays [member Label.visible_ratio] or [member RichTextLabel.visible_ratio] glyphs, starting from the right.
</constant>
<constant name="OVERRUN_NO_TRIMMING" value="0" enum="OverrunBehavior">
No text trimming is performed.
@@ -1690,6 +1722,7 @@
</constant>
<constant name="HINTING_NORMAL" value="2" enum="Hinting">
Use the default font hinting mode (crisper but less smooth).
+ [b]Note:[/b] This hinting mode changes both horizontal and vertical glyph metrics. If applied to monospace font, some glyphs might have different width.
</constant>
<constant name="SUBPIXEL_POSITIONING_DISABLED" value="0" enum="SubpixelPositioning">
Glyph horizontal position is rounded to the whole pixel size, each glyph is rasterized once.
@@ -1707,10 +1740,10 @@
Glyph horizontal position is rounded to one quarter of the pixel size, each glyph is rasterized up to four times.
</constant>
<constant name="SUBPIXEL_POSITIONING_ONE_HALF_MAX_SIZE" value="20" enum="SubpixelPositioning">
- Maximum font size which will use one half of the pixel subpixel positioning in [constants SUBPIXEL_POSITIONING_AUTO] mode.
+ Maximum font size which will use one half of the pixel subpixel positioning in [constant SUBPIXEL_POSITIONING_AUTO] mode.
</constant>
<constant name="SUBPIXEL_POSITIONING_ONE_QUARTER_MAX_SIZE" value="16" enum="SubpixelPositioning">
- Maximum font size which will use one quarter of the pixel subpixel positioning in [constants SUBPIXEL_POSITIONING_AUTO] mode.
+ Maximum font size which will use one quarter of the pixel subpixel positioning in [constant SUBPIXEL_POSITIONING_AUTO] mode.
</constant>
<constant name="FEATURE_SIMPLE_LAYOUT" value="1" enum="Feature">
TextServer supports simple text layouts.
@@ -1790,7 +1823,7 @@
Font have fixed-width characters.
</constant>
<constant name="STRUCTURED_TEXT_DEFAULT" value="0" enum="StructuredTextParser">
- Use default behavior. Same as [code]STRUCTURED_TEXT_NONE[/code] unless specified otherwise in the control description.
+ Use default behavior. Same as [constant STRUCTURED_TEXT_NONE] unless specified otherwise in the control description.
</constant>
<constant name="STRUCTURED_TEXT_URI" value="1" enum="StructuredTextParser">
BiDi override for URI.
diff --git a/doc/classes/TextServerExtension.xml b/doc/classes/TextServerExtension.xml
index acf6e5833d..37d2698dd4 100644
--- a/doc/classes/TextServerExtension.xml
+++ b/doc/classes/TextServerExtension.xml
@@ -9,21 +9,19 @@
<tutorials>
</tutorials>
<methods>
- <method name="create_font" qualifiers="virtual">
+ <method name="_create_font" qualifiers="virtual">
<return type="RID" />
<description>
- Creates new, empty font cache entry resource. To free the resulting resourec, use [method free_rid] method.
</description>
</method>
- <method name="create_shaped_text" qualifiers="virtual">
+ <method name="_create_shaped_text" qualifiers="virtual">
<return type="RID" />
<param index="0" name="direction" type="int" enum="TextServer.Direction" />
<param index="1" name="orientation" type="int" enum="TextServer.Orientation" />
<description>
- Creates new buffer for complex text layout, with the given [code]direction[/code] and [code]orientation[/code]. To free the resulting buffer, use [method free_rid] method.
</description>
</method>
- <method name="draw_hex_code_box" qualifiers="virtual const">
+ <method name="_draw_hex_code_box" qualifiers="virtual const">
<return type="void" />
<param index="0" name="canvas" type="RID" />
<param index="1" name="size" type="int" />
@@ -31,42 +29,36 @@
<param index="3" name="index" type="int" />
<param index="4" name="color" type="Color" />
<description>
- Draws box displaying character hexadecimal code. Used for replacing missing characters.
- [b]Note:[/b] If this method is not implemented in the plugin, the default implementation will be used.
</description>
</method>
- <method name="font_clear_glyphs" qualifiers="virtual">
+ <method name="_font_clear_glyphs" qualifiers="virtual">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="size" type="Vector2i" />
<description>
- Removes all rendered glyphs information from the cache entry.
</description>
</method>
- <method name="font_clear_kerning_map" qualifiers="virtual">
+ <method name="_font_clear_kerning_map" qualifiers="virtual">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="size" type="int" />
<description>
- Removes all kerning overrides.
</description>
</method>
- <method name="font_clear_size_cache" qualifiers="virtual">
+ <method name="_font_clear_size_cache" qualifiers="virtual">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
<description>
- Removes all font sizes from the cache entry.
</description>
</method>
- <method name="font_clear_textures" qualifiers="virtual">
+ <method name="_font_clear_textures" qualifiers="virtual">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="size" type="Vector2i" />
<description>
- Removes all textures from font cache entry.
</description>
</method>
- <method name="font_draw_glyph" qualifiers="virtual const">
+ <method name="_font_draw_glyph" qualifiers="virtual const">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="canvas" type="RID" />
@@ -75,10 +67,9 @@
<param index="4" name="index" type="int" />
<param index="5" name="color" type="Color" />
<description>
- Draws single glyph into a canvas item at the position, using [code]font_rid[/code] at the size [code]size[/code].
</description>
</method>
- <method name="font_draw_glyph_outline" qualifiers="virtual const">
+ <method name="_font_draw_glyph_outline" qualifiers="virtual const">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="canvas" type="RID" />
@@ -88,946 +79,822 @@
<param index="5" name="index" type="int" />
<param index="6" name="color" type="Color" />
<description>
- Draws single glyph outline of size [code]outline_size[/code] into a canvas item at the position, using [code]font_rid[/code] at the size [code]size[/code].
</description>
</method>
- <method name="font_get_ascent" qualifiers="virtual const">
+ <method name="_font_get_antialiasing" qualifiers="virtual const">
+ <return type="int" enum="TextServer.FontAntialiasing" />
+ <param index="0" name="font_rid" type="RID" />
+ <description>
+ </description>
+ </method>
+ <method name="_font_get_ascent" qualifiers="virtual const">
<return type="float" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="size" type="int" />
<description>
- Returns the font ascent (number of pixels above the baseline).
</description>
</method>
- <method name="font_get_descent" qualifiers="virtual const">
+ <method name="_font_get_descent" qualifiers="virtual const">
<return type="float" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="size" type="int" />
<description>
- Returns the font descent (number of pixels below the baseline).
</description>
</method>
- <method name="font_get_embolden" qualifiers="virtual const">
+ <method name="_font_get_embolden" qualifiers="virtual const">
<return type="float" />
<param index="0" name="font_rid" type="RID" />
<description>
- Returns font embolden strength.
</description>
</method>
- <method name="font_get_face_count" qualifiers="virtual const">
+ <method name="_font_get_face_count" qualifiers="virtual const">
<return type="int" />
<param index="0" name="font_rid" type="RID" />
<description>
- Returns number of faces in the TrueType / OpenType collection.
</description>
</method>
- <method name="font_get_face_index" qualifiers="virtual const">
+ <method name="_font_get_face_index" qualifiers="virtual const">
<return type="int" />
<param index="0" name="font_rid" type="RID" />
<description>
- Returns an active face index in the TrueType / OpenType collection.
</description>
</method>
- <method name="font_get_fixed_size" qualifiers="virtual const">
+ <method name="_font_get_fixed_size" qualifiers="virtual const">
<return type="int" />
<param index="0" name="font_rid" type="RID" />
<description>
- Returns bitmap font fixed size.
</description>
</method>
- <method name="font_get_generate_mipmaps" qualifiers="virtual const">
+ <method name="_font_get_generate_mipmaps" qualifiers="virtual const">
<return type="bool" />
<param index="0" name="font_rid" type="RID" />
<description>
- Returns [code]true[/code] if font texture mipmap generation is enabled.
</description>
</method>
- <method name="font_get_global_oversampling" qualifiers="virtual const">
+ <method name="_font_get_global_oversampling" qualifiers="virtual const">
<return type="float" />
<description>
- Returns the font oversampling factor, shared by all fonts in the TextServer.
</description>
</method>
- <method name="font_get_glyph_advance" qualifiers="virtual const">
+ <method name="_font_get_glyph_advance" qualifiers="virtual const">
<return type="Vector2" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="size" type="int" />
<param index="2" name="glyph" type="int" />
<description>
- Returns glyph advance (offset of the next glyph).
</description>
</method>
- <method name="font_get_glyph_contours" qualifiers="virtual const">
+ <method name="_font_get_glyph_contours" qualifiers="virtual const">
<return type="Dictionary" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="size" type="int" />
<param index="2" name="index" type="int" />
<description>
- Returns outline contours of the glyph as a [code]Dictionary[/code] with the following contents:
- [code]points[/code] - [PackedVector3Array], containing outline points. [code]x[/code] and [code]y[/code] are point coordinates. [code]z[/code] is the type of the point, using the [enum TextServer.ContourPointTag] values.
- [code]contours[/code] - [PackedInt32Array], containing indices the end points of each contour.
- [code]orientation[/code] - [bool], contour orientation. If [code]true[/code], clockwise contours must be filled.
</description>
</method>
- <method name="font_get_glyph_index" qualifiers="virtual const">
+ <method name="_font_get_glyph_index" qualifiers="virtual const">
<return type="int" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="size" type="int" />
<param index="2" name="char" type="int" />
<param index="3" name="variation_selector" type="int" />
<description>
- Returns the glyph index of a [code]char[/code], optionally modified by the [code]variation_selector[/code].
</description>
</method>
- <method name="font_get_glyph_list" qualifiers="virtual const">
- <return type="Array" />
+ <method name="_font_get_glyph_list" qualifiers="virtual const">
+ <return type="PackedInt32Array" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="size" type="Vector2i" />
<description>
- Returns list of rendered glyphs in the cache entry.
</description>
</method>
- <method name="font_get_glyph_offset" qualifiers="virtual const">
+ <method name="_font_get_glyph_offset" qualifiers="virtual const">
<return type="Vector2" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="size" type="Vector2i" />
<param index="2" name="glyph" type="int" />
<description>
- Returns glyph offset from the baseline.
</description>
</method>
- <method name="font_get_glyph_size" qualifiers="virtual const">
+ <method name="_font_get_glyph_size" qualifiers="virtual const">
<return type="Vector2" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="size" type="Vector2i" />
<param index="2" name="glyph" type="int" />
<description>
- Returns size of the glyph.
</description>
</method>
- <method name="font_get_glyph_texture_idx" qualifiers="virtual const">
+ <method name="_font_get_glyph_texture_idx" qualifiers="virtual const">
<return type="int" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="size" type="Vector2i" />
<param index="2" name="glyph" type="int" />
<description>
- Returns index of the cache texture containing the glyph.
</description>
</method>
- <method name="font_get_glyph_texture_rid" qualifiers="virtual const">
+ <method name="_font_get_glyph_texture_rid" qualifiers="virtual const">
<return type="RID" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="size" type="Vector2i" />
<param index="2" name="glyph" type="int" />
<description>
- Returns resource id of the cache texture containing the glyph.
</description>
</method>
- <method name="font_get_glyph_texture_size" qualifiers="virtual const">
+ <method name="_font_get_glyph_texture_size" qualifiers="virtual const">
<return type="Vector2" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="size" type="Vector2i" />
<param index="2" name="glyph" type="int" />
<description>
- Returns size of the cache texture containing the glyph.
</description>
</method>
- <method name="font_get_glyph_uv_rect" qualifiers="virtual const">
+ <method name="_font_get_glyph_uv_rect" qualifiers="virtual const">
<return type="Rect2" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="size" type="Vector2i" />
<param index="2" name="glyph" type="int" />
<description>
- Returns rectangle in the cache texture containing the glyph.
</description>
</method>
- <method name="font_get_hinting" qualifiers="virtual const">
+ <method name="_font_get_hinting" qualifiers="virtual const">
<return type="int" enum="TextServer.Hinting" />
<param index="0" name="font_rid" type="RID" />
<description>
- Returns the font hinting mode. Used by dynamic fonts only.
</description>
</method>
- <method name="font_get_kerning" qualifiers="virtual const">
+ <method name="_font_get_kerning" qualifiers="virtual const">
<return type="Vector2" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="size" type="int" />
<param index="2" name="glyph_pair" type="Vector2i" />
<description>
- Returns kerning for the pair of glyphs.
</description>
</method>
- <method name="font_get_kerning_list" qualifiers="virtual const">
- <return type="Array" />
+ <method name="_font_get_kerning_list" qualifiers="virtual const">
+ <return type="Vector2i[]" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="size" type="int" />
<description>
- Returns list of the kerning overrides.
</description>
</method>
- <method name="font_get_language_support_override" qualifiers="virtual">
+ <method name="_font_get_language_support_override" qualifiers="virtual">
<return type="bool" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="language" type="String" />
<description>
- Returns [code]true[/code] if support override is enabled for the [code]language[/code].
</description>
</method>
- <method name="font_get_language_support_overrides" qualifiers="virtual">
+ <method name="_font_get_language_support_overrides" qualifiers="virtual">
<return type="PackedStringArray" />
<param index="0" name="font_rid" type="RID" />
<description>
- Returns list of language support overrides.
</description>
</method>
- <method name="font_get_msdf_pixel_range" qualifiers="virtual const">
+ <method name="_font_get_msdf_pixel_range" qualifiers="virtual const">
<return type="int" />
<param index="0" name="font_rid" type="RID" />
<description>
- Returns the width of the range around the shape between the minimum and maximum representable signed distance.
</description>
</method>
- <method name="font_get_msdf_size" qualifiers="virtual const">
+ <method name="_font_get_msdf_size" qualifiers="virtual const">
<return type="int" />
<param index="0" name="font_rid" type="RID" />
<description>
- Returns source font size used to generate MSDF textures.
</description>
</method>
- <method name="font_get_name" qualifiers="virtual const">
+ <method name="_font_get_name" qualifiers="virtual const">
<return type="String" />
<param index="0" name="font_rid" type="RID" />
<description>
- Returns font family name.
</description>
</method>
- <method name="font_get_opentype_feature_overrides" qualifiers="virtual const">
+ <method name="_font_get_opentype_feature_overrides" qualifiers="virtual const">
<return type="Dictionary" />
<param index="0" name="font_rid" type="RID" />
<description>
- Returns font OpenType feature set override.
</description>
</method>
- <method name="font_get_oversampling" qualifiers="virtual const">
+ <method name="_font_get_oversampling" qualifiers="virtual const">
<return type="float" />
<param index="0" name="font_rid" type="RID" />
<description>
- Returns font oversampling factor, if set to [code]0.0[/code] global oversampling factor is used instead. Used by dynamic fonts only.
</description>
</method>
- <method name="font_get_scale" qualifiers="virtual const">
+ <method name="_font_get_scale" qualifiers="virtual const">
<return type="float" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="size" type="int" />
<description>
- Returns scaling factor of the color bitmap font.
</description>
</method>
- <method name="font_get_script_support_override" qualifiers="virtual">
+ <method name="_font_get_script_support_override" qualifiers="virtual">
<return type="bool" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="script" type="String" />
<description>
- Returns [code]true[/code] if support override is enabled for the [code]script[/code].
</description>
</method>
- <method name="font_get_script_support_overrides" qualifiers="virtual">
+ <method name="_font_get_script_support_overrides" qualifiers="virtual">
<return type="PackedStringArray" />
<param index="0" name="font_rid" type="RID" />
<description>
- Returns list of script support overrides.
</description>
</method>
- <method name="font_get_size_cache_list" qualifiers="virtual const">
- <return type="Array" />
+ <method name="_font_get_size_cache_list" qualifiers="virtual const">
+ <return type="Vector2i[]" />
<param index="0" name="font_rid" type="RID" />
<description>
- Returns list of the font sizes in the cache. Each size is [code]Vector2i[/code] with font size and outline size.
</description>
</method>
- <method name="font_get_style" qualifiers="virtual const">
+ <method name="_font_get_style" qualifiers="virtual const">
<return type="int" enum="TextServer.FontStyle" />
<param index="0" name="font_rid" type="RID" />
<description>
- Returns font style flags, see [enum TextServer.FontStyle].
</description>
</method>
- <method name="font_get_style_name" qualifiers="virtual const">
+ <method name="_font_get_style_name" qualifiers="virtual const">
<return type="String" />
<param index="0" name="font_rid" type="RID" />
<description>
- Returns font style name.
</description>
</method>
- <method name="font_get_subpixel_positioning" qualifiers="virtual const">
+ <method name="_font_get_subpixel_positioning" qualifiers="virtual const">
<return type="int" enum="TextServer.SubpixelPositioning" />
<param index="0" name="font_rid" type="RID" />
<description>
- Returns font sub-pixel glyph positioning mode.
</description>
</method>
- <method name="font_get_supported_chars" qualifiers="virtual const">
+ <method name="_font_get_supported_chars" qualifiers="virtual const">
<return type="String" />
<param index="0" name="font_rid" type="RID" />
<description>
- Returns a string containing all the characters available in the font.
</description>
</method>
- <method name="font_get_texture_count" qualifiers="virtual const">
+ <method name="_font_get_texture_count" qualifiers="virtual const">
<return type="int" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="size" type="Vector2i" />
<description>
- Returns number of textures used by font cache entry.
</description>
</method>
- <method name="font_get_texture_image" qualifiers="virtual const">
+ <method name="_font_get_texture_image" qualifiers="virtual const">
<return type="Image" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="size" type="Vector2i" />
<param index="2" name="texture_index" type="int" />
<description>
- Returns font cache texture image data.
</description>
</method>
- <method name="font_get_texture_offsets" qualifiers="virtual const">
+ <method name="_font_get_texture_offsets" qualifiers="virtual const">
<return type="PackedInt32Array" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="size" type="Vector2i" />
<param index="2" name="texture_index" type="int" />
<description>
- Returns array containing the first free pixel in the each column of texture. Should be the same size as texture width or empty.
</description>
</method>
- <method name="font_get_transform" qualifiers="virtual const">
+ <method name="_font_get_transform" qualifiers="virtual const">
<return type="Transform2D" />
<param index="0" name="font_rid" type="RID" />
<description>
- Returns 2D transform applied to the font outlines.
</description>
</method>
- <method name="font_get_underline_position" qualifiers="virtual const">
+ <method name="_font_get_underline_position" qualifiers="virtual const">
<return type="float" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="size" type="int" />
<description>
- Returns pixel offset of the underline below the baseline.
</description>
</method>
- <method name="font_get_underline_thickness" qualifiers="virtual const">
+ <method name="_font_get_underline_thickness" qualifiers="virtual const">
<return type="float" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="size" type="int" />
<description>
- Returns thickness of the underline in pixels.
</description>
</method>
- <method name="font_get_variation_coordinates" qualifiers="virtual const">
+ <method name="_font_get_variation_coordinates" qualifiers="virtual const">
<return type="Dictionary" />
<param index="0" name="font_rid" type="RID" />
<description>
- Returns variation coordinates for the specified font cache entry. See [method font_supported_variation_list] for more info.
</description>
</method>
- <method name="font_has_char" qualifiers="virtual const">
+ <method name="_font_has_char" qualifiers="virtual const">
<return type="bool" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="char" type="int" />
<description>
- Returns [code]true[/code] if a Unicode [code]char[/code] is available in the font.
</description>
</method>
- <method name="font_is_antialiased" qualifiers="virtual const">
+ <method name="_font_is_force_autohinter" qualifiers="virtual const">
<return type="bool" />
<param index="0" name="font_rid" type="RID" />
<description>
- Returns [code]true[/code] if font 8-bit anitialiased glyph rendering is supported and enabled.
</description>
</method>
- <method name="font_is_force_autohinter" qualifiers="virtual const">
- <return type="bool" />
- <param index="0" name="font_rid" type="RID" />
- <description>
- Returns [code]true[/code] if auto-hinting is supported and preferred over font built-in hinting. Used by dynamic fonts only.
- </description>
- </method>
- <method name="font_is_language_supported" qualifiers="virtual const">
+ <method name="_font_is_language_supported" qualifiers="virtual const">
<return type="bool" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="language" type="String" />
<description>
- Returns [code]true[/code], if font supports given language ([url=https://en.wikipedia.org/wiki/ISO_639-1]ISO 639[/url] code).
</description>
</method>
- <method name="font_is_multichannel_signed_distance_field" qualifiers="virtual const">
+ <method name="_font_is_multichannel_signed_distance_field" qualifiers="virtual const">
<return type="bool" />
<param index="0" name="font_rid" type="RID" />
<description>
- Returns [code]true[/code] if glyphs of all sizes are rendered using single multichannel signed distance field generated from the dynamic font vector data.
</description>
</method>
- <method name="font_is_script_supported" qualifiers="virtual const">
+ <method name="_font_is_script_supported" qualifiers="virtual const">
<return type="bool" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="script" type="String" />
<description>
- Returns [code]true[/code], if font supports given script (ISO 15924 code).
</description>
</method>
- <method name="font_remove_glyph" qualifiers="virtual">
+ <method name="_font_remove_glyph" qualifiers="virtual">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="size" type="Vector2i" />
<param index="2" name="glyph" type="int" />
<description>
- Removes specified rendered glyph information from the cache entry.
</description>
</method>
- <method name="font_remove_kerning" qualifiers="virtual">
+ <method name="_font_remove_kerning" qualifiers="virtual">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="size" type="int" />
<param index="2" name="glyph_pair" type="Vector2i" />
<description>
- Removes kerning override for the pair of glyphs.
</description>
</method>
- <method name="font_remove_language_support_override" qualifiers="virtual">
+ <method name="_font_remove_language_support_override" qualifiers="virtual">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="language" type="String" />
<description>
- Remove language support override.
</description>
</method>
- <method name="font_remove_script_support_override" qualifiers="virtual">
+ <method name="_font_remove_script_support_override" qualifiers="virtual">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="script" type="String" />
<description>
- Removes script support override.
</description>
</method>
- <method name="font_remove_size_cache" qualifiers="virtual">
+ <method name="_font_remove_size_cache" qualifiers="virtual">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="size" type="Vector2i" />
<description>
- Removes specified font size from the cache entry.
</description>
</method>
- <method name="font_remove_texture" qualifiers="virtual">
+ <method name="_font_remove_texture" qualifiers="virtual">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="size" type="Vector2i" />
<param index="2" name="texture_index" type="int" />
<description>
- Removes specified texture from the cache entry.
</description>
</method>
- <method name="font_render_glyph" qualifiers="virtual">
+ <method name="_font_render_glyph" qualifiers="virtual">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="size" type="Vector2i" />
<param index="2" name="index" type="int" />
<description>
- Renders specified glyph to the font cache texture.
</description>
</method>
- <method name="font_render_range" qualifiers="virtual">
+ <method name="_font_render_range" qualifiers="virtual">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="size" type="Vector2i" />
<param index="2" name="start" type="int" />
<param index="3" name="end" type="int" />
<description>
- Renders the range of characters to the font cache texture.
</description>
</method>
- <method name="font_set_antialiased" qualifiers="virtual">
+ <method name="_font_set_antialiasing" qualifiers="virtual">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
- <param index="1" name="antialiased" type="bool" />
+ <param index="1" name="antialiasing" type="int" enum="TextServer.FontAntialiasing" />
<description>
- If set to [code]true[/code], 8-bit antialiased glyph rendering is used, otherwise 1-bit rendering is used. Used by dynamic fonts only.
</description>
</method>
- <method name="font_set_ascent" qualifiers="virtual">
+ <method name="_font_set_ascent" qualifiers="virtual">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="size" type="int" />
<param index="2" name="ascent" type="float" />
<description>
- Sets the font ascent (number of pixels above the baseline).
</description>
</method>
- <method name="font_set_data" qualifiers="virtual">
+ <method name="_font_set_data" qualifiers="virtual">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="data" type="PackedByteArray" />
<description>
- Sets font source data, e.g contents of the dynamic font source file.
</description>
</method>
- <method name="font_set_data_ptr" qualifiers="virtual">
+ <method name="_font_set_data_ptr" qualifiers="virtual">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="data_ptr" type="const uint8_t*" />
<param index="2" name="data_size" type="int" />
<description>
- Sets font source data, e.g contents of the dynamic font source file. [code]data_ptr[/code] memory buffer must remain accessible during font lifetime.
</description>
</method>
- <method name="font_set_descent" qualifiers="virtual">
+ <method name="_font_set_descent" qualifiers="virtual">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="size" type="int" />
<param index="2" name="descent" type="float" />
<description>
- Sets the font descent (number of pixels below the baseline).
</description>
</method>
- <method name="font_set_embolden" qualifiers="virtual">
+ <method name="_font_set_embolden" qualifiers="virtual">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="strength" type="float" />
<description>
- Sets font embolden strength. If [code]strength[/code] is not equal to zero, emboldens the font outlines. Negative values reduce the outline thickness.
</description>
</method>
- <method name="font_set_face_index" qualifiers="virtual">
+ <method name="_font_set_face_index" qualifiers="virtual">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="face_index" type="int" />
<description>
- Sets an active face index in the TrueType / OpenType collection.
</description>
</method>
- <method name="font_set_fixed_size" qualifiers="virtual">
+ <method name="_font_set_fixed_size" qualifiers="virtual">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="fixed_size" type="int" />
<description>
- Sets bitmap font fixed size. If set to value greater than zero, same cache entry will be used for all font sizes.
</description>
</method>
- <method name="font_set_force_autohinter" qualifiers="virtual">
+ <method name="_font_set_force_autohinter" qualifiers="virtual">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="force_autohinter" type="bool" />
<description>
- If set to [code]true[/code] auto-hinting is preferred over font built-in hinting.
</description>
</method>
- <method name="font_set_generate_mipmaps" qualifiers="virtual">
+ <method name="_font_set_generate_mipmaps" qualifiers="virtual">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="generate_mipmaps" type="bool" />
<description>
- If set to [code]true[/code] font texture mipmap generation is enabled.
</description>
</method>
- <method name="font_set_global_oversampling" qualifiers="virtual">
+ <method name="_font_set_global_oversampling" qualifiers="virtual">
<return type="void" />
<param index="0" name="oversampling" type="float" />
<description>
- Sets oversampling factor, shared by all font in the TextServer.
- [b]Note:[/b] This value can be automatically changed by display server.
</description>
</method>
- <method name="font_set_glyph_advance" qualifiers="virtual">
+ <method name="_font_set_glyph_advance" qualifiers="virtual">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="size" type="int" />
<param index="2" name="glyph" type="int" />
<param index="3" name="advance" type="Vector2" />
<description>
- Sets glyph advance (offset of the next glyph).
</description>
</method>
- <method name="font_set_glyph_offset" qualifiers="virtual">
+ <method name="_font_set_glyph_offset" qualifiers="virtual">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="size" type="Vector2i" />
<param index="2" name="glyph" type="int" />
<param index="3" name="offset" type="Vector2" />
<description>
- Sets glyph offset from the baseline.
</description>
</method>
- <method name="font_set_glyph_size" qualifiers="virtual">
+ <method name="_font_set_glyph_size" qualifiers="virtual">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="size" type="Vector2i" />
<param index="2" name="glyph" type="int" />
<param index="3" name="gl_size" type="Vector2" />
<description>
- Sets size of the glyph.
</description>
</method>
- <method name="font_set_glyph_texture_idx" qualifiers="virtual">
+ <method name="_font_set_glyph_texture_idx" qualifiers="virtual">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="size" type="Vector2i" />
<param index="2" name="glyph" type="int" />
<param index="3" name="texture_idx" type="int" />
<description>
- Sets index of the cache texture containing the glyph.
</description>
</method>
- <method name="font_set_glyph_uv_rect" qualifiers="virtual">
+ <method name="_font_set_glyph_uv_rect" qualifiers="virtual">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="size" type="Vector2i" />
<param index="2" name="glyph" type="int" />
<param index="3" name="uv_rect" type="Rect2" />
<description>
- Sets rectangle in the cache texture containing the glyph.
</description>
</method>
- <method name="font_set_hinting" qualifiers="virtual">
+ <method name="_font_set_hinting" qualifiers="virtual">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="hinting" type="int" enum="TextServer.Hinting" />
<description>
- Sets font hinting mode. Used by dynamic fonts only.
</description>
</method>
- <method name="font_set_kerning" qualifiers="virtual">
+ <method name="_font_set_kerning" qualifiers="virtual">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="size" type="int" />
<param index="2" name="glyph_pair" type="Vector2i" />
<param index="3" name="kerning" type="Vector2" />
<description>
- Sets kerning for the pair of glyphs.
</description>
</method>
- <method name="font_set_language_support_override" qualifiers="virtual">
+ <method name="_font_set_language_support_override" qualifiers="virtual">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="language" type="String" />
<param index="2" name="supported" type="bool" />
<description>
- Adds override for [method font_is_language_supported].
</description>
</method>
- <method name="font_set_msdf_pixel_range" qualifiers="virtual">
+ <method name="_font_set_msdf_pixel_range" qualifiers="virtual">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="msdf_pixel_range" type="int" />
<description>
- Sets the width of the range around the shape between the minimum and maximum representable signed distance.
</description>
</method>
- <method name="font_set_msdf_size" qualifiers="virtual">
+ <method name="_font_set_msdf_size" qualifiers="virtual">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="msdf_size" type="int" />
<description>
- Sets source font size used to generate MSDF textures.
</description>
</method>
- <method name="font_set_multichannel_signed_distance_field" qualifiers="virtual">
+ <method name="_font_set_multichannel_signed_distance_field" qualifiers="virtual">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="msdf" type="bool" />
<description>
- If set to [code]true[/code], glyphs of all sizes are rendered using single multichannel signed distance field generated from the dynamic font vector data. MSDF rendering allows displaying the font at any scaling factor without blurriness, and without incurring a CPU cost when the font size changes (since the font no longer needs to be rasterized on the CPU). As a downside, font hinting is not available with MSDF. The lack of font hinting may result in less crisp and less readable fonts at small sizes.
- [b]Note:[/b] MSDF font rendering does not render glyphs with overlapping shapes correctly. Overlapping shapes are not valid per the OpenType standard, but are still commonly found in many font files, especially those converted by Google Fonts. To avoid issues with overlapping glyphs, consider downloading the font file directly from the type foundry instead of relying on Google Fonts.
</description>
</method>
- <method name="font_set_name" qualifiers="virtual">
+ <method name="_font_set_name" qualifiers="virtual">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="name" type="String" />
<description>
- Sets the font family name.
</description>
</method>
- <method name="font_set_opentype_feature_overrides" qualifiers="virtual">
+ <method name="_font_set_opentype_feature_overrides" qualifiers="virtual">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="overrides" type="Dictionary" />
<description>
- Sets font OpenType feature set override.
</description>
</method>
- <method name="font_set_oversampling" qualifiers="virtual">
+ <method name="_font_set_oversampling" qualifiers="virtual">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="oversampling" type="float" />
<description>
- Sets font oversampling factor, if set to [code]0.0[/code] global oversampling factor is used instead. Used by dynamic fonts only.
</description>
</method>
- <method name="font_set_scale" qualifiers="virtual">
+ <method name="_font_set_scale" qualifiers="virtual">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="size" type="int" />
<param index="2" name="scale" type="float" />
<description>
- Sets scaling factor of the color bitmap font.
</description>
</method>
- <method name="font_set_script_support_override" qualifiers="virtual">
+ <method name="_font_set_script_support_override" qualifiers="virtual">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="script" type="String" />
<param index="2" name="supported" type="bool" />
<description>
- Adds override for [method font_is_script_supported].
</description>
</method>
- <method name="font_set_style" qualifiers="virtual">
+ <method name="_font_set_style" qualifiers="virtual">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="style" type="int" enum="TextServer.FontStyle" />
<description>
- Sets the font style flags, see [enum TextServer.FontStyle].
</description>
</method>
- <method name="font_set_style_name" qualifiers="virtual">
+ <method name="_font_set_style_name" qualifiers="virtual">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="name_style" type="String" />
<description>
- Sets the font style name.
</description>
</method>
- <method name="font_set_subpixel_positioning" qualifiers="virtual">
+ <method name="_font_set_subpixel_positioning" qualifiers="virtual">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="subpixel_positioning" type="int" enum="TextServer.SubpixelPositioning" />
<description>
- Sets font sub-pixel glyph positioning mode.
</description>
</method>
- <method name="font_set_texture_image" qualifiers="virtual">
+ <method name="_font_set_texture_image" qualifiers="virtual">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="size" type="Vector2i" />
<param index="2" name="texture_index" type="int" />
<param index="3" name="image" type="Image" />
<description>
- Sets font cache texture image data.
</description>
</method>
- <method name="font_set_texture_offsets" qualifiers="virtual">
+ <method name="_font_set_texture_offsets" qualifiers="virtual">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="size" type="Vector2i" />
<param index="2" name="texture_index" type="int" />
<param index="3" name="offset" type="PackedInt32Array" />
<description>
- Sets array containing the first free pixel in the each column of texture. Should be the same size as texture width or empty.
</description>
</method>
- <method name="font_set_transform" qualifiers="virtual">
+ <method name="_font_set_transform" qualifiers="virtual">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="transform" type="Transform2D" />
<description>
- Sets 2D transform, applied to the font outlines, can be used for slanting, flipping and rotating glyphs.
- For example, to simulate italic typeface by slanting, apply the following transform [code]Transform2D(1.0, slant, 0.0, 1.0, 0.0, 0.0)[/code].
</description>
</method>
- <method name="font_set_underline_position" qualifiers="virtual">
+ <method name="_font_set_underline_position" qualifiers="virtual">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="size" type="int" />
<param index="2" name="underline_position" type="float" />
<description>
- Sets pixel offset of the underline below the baseline.
</description>
</method>
- <method name="font_set_underline_thickness" qualifiers="virtual">
+ <method name="_font_set_underline_thickness" qualifiers="virtual">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="size" type="int" />
<param index="2" name="underline_thickness" type="float" />
<description>
- Sets thickness of the underline in pixels.
</description>
</method>
- <method name="font_set_variation_coordinates" qualifiers="virtual">
+ <method name="_font_set_variation_coordinates" qualifiers="virtual">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="variation_coordinates" type="Dictionary" />
<description>
- Sets variation coordinates for the specified font cache entry. See [method font_supported_variation_list] for more info.
</description>
</method>
- <method name="font_supported_feature_list" qualifiers="virtual const">
+ <method name="_font_supported_feature_list" qualifiers="virtual const">
<return type="Dictionary" />
<param index="0" name="font_rid" type="RID" />
<description>
- Returns the dictionary of the supported OpenType features.
</description>
</method>
- <method name="font_supported_variation_list" qualifiers="virtual const">
+ <method name="_font_supported_variation_list" qualifiers="virtual const">
<return type="Dictionary" />
<param index="0" name="font_rid" type="RID" />
<description>
- Returns the dictionary of the supported OpenType variation coordinates.
</description>
</method>
- <method name="format_number" qualifiers="virtual const">
+ <method name="_format_number" qualifiers="virtual const">
<return type="String" />
<param index="0" name="string" type="String" />
<param index="1" name="language" type="String" />
<description>
- Converts a number from the Western Arabic (0..9) to the numeral systems used in [code]language[/code].
</description>
</method>
- <method name="free_rid" qualifiers="virtual">
+ <method name="_free_rid" qualifiers="virtual">
<return type="void" />
<param index="0" name="rid" type="RID" />
<description>
- Frees an object created by this [TextServer].
</description>
</method>
- <method name="get_features" qualifiers="virtual const">
+ <method name="_get_features" qualifiers="virtual const">
<return type="int" />
<description>
- Returns text server features, see [enum TextServer.Feature].
</description>
</method>
- <method name="get_hex_code_box_size" qualifiers="virtual const">
+ <method name="_get_hex_code_box_size" qualifiers="virtual const">
<return type="Vector2" />
<param index="0" name="size" type="int" />
<param index="1" name="index" type="int" />
<description>
- Returns size of the replacement character (box with character hexadecimal code that is drawn in place of invalid characters).
- [b]Note:[/b] If this method is not implemented in the plugin, the default implementation will be used.
</description>
</method>
- <method name="get_name" qualifiers="virtual const">
+ <method name="_get_name" qualifiers="virtual const">
<return type="String" />
<description>
- Returns the name of the server interface.
</description>
</method>
- <method name="get_support_data_filename" qualifiers="virtual const">
+ <method name="_get_support_data_filename" qualifiers="virtual const">
<return type="String" />
<description>
- Returns default TextServer database (e.g. ICU break iterators and dictionaries) filename.
</description>
</method>
- <method name="get_support_data_info" qualifiers="virtual const">
+ <method name="_get_support_data_info" qualifiers="virtual const">
<return type="String" />
<description>
- Returns TextServer database (e.g. ICU break iterators and dictionaries) description.
</description>
</method>
- <method name="has" qualifiers="virtual">
+ <method name="_has" qualifiers="virtual">
<return type="bool" />
<param index="0" name="rid" type="RID" />
<description>
- Returns [code]true[/code] if [code]rid[/code] is valid resource owned by this text server.
</description>
</method>
- <method name="has_feature" qualifiers="virtual const">
+ <method name="_has_feature" qualifiers="virtual const">
<return type="bool" />
<param index="0" name="feature" type="int" enum="TextServer.Feature" />
<description>
- Returns [code]true[/code] if the server supports a feature.
</description>
</method>
- <method name="is_confusable" qualifiers="virtual const">
+ <method name="_is_confusable" qualifiers="virtual const">
<return type="int" />
<param index="0" name="string" type="String" />
<param index="1" name="dict" type="PackedStringArray" />
<description>
- Returns index of the first string in [code]dict[/dict] which is visually confusable with the [code]string[/string], or [code]-1[/code] if none is found.
</description>
</method>
- <method name="is_locale_right_to_left" qualifiers="virtual const">
+ <method name="_is_locale_right_to_left" qualifiers="virtual const">
<return type="bool" />
<param index="0" name="locale" type="String" />
<description>
- Returns [code]true[/code] if locale is right-to-left.
</description>
</method>
- <method name="is_valid_identifier" qualifiers="virtual const">
+ <method name="_is_valid_identifier" qualifiers="virtual const">
<return type="bool" />
<param index="0" name="string" type="String" />
<description>
- Returns [code]true[/code] is [code]string[/code] is a valid identifier.
</description>
</method>
- <method name="load_support_data" qualifiers="virtual">
+ <method name="_load_support_data" qualifiers="virtual">
<return type="bool" />
<param index="0" name="filename" type="String" />
<description>
- Loads optional TextServer database (e.g. ICU break iterators and dictionaries).
</description>
</method>
- <method name="name_to_tag" qualifiers="virtual const">
+ <method name="_name_to_tag" qualifiers="virtual const">
<return type="int" />
<param index="0" name="name" type="String" />
<description>
- Converts readable feature, variation, script or language name to OpenType tag.
</description>
</method>
- <method name="parse_number" qualifiers="virtual const">
+ <method name="_parse_number" qualifiers="virtual const">
<return type="String" />
<param index="0" name="string" type="String" />
<param index="1" name="language" type="String" />
<description>
- Converts a number from the numeral systems used in [code]language[/code] to Western Arabic (0..9).
</description>
</method>
- <method name="parse_structured_text" qualifiers="virtual const">
- <return type="Array" />
+ <method name="_parse_structured_text" qualifiers="virtual const">
+ <return type="Vector2i[]" />
<param index="0" name="parser_type" type="int" enum="TextServer.StructuredTextParser" />
<param index="1" name="args" type="Array" />
<param index="2" name="text" type="String" />
<description>
</description>
</method>
- <method name="percent_sign" qualifiers="virtual const">
+ <method name="_percent_sign" qualifiers="virtual const">
<return type="String" />
<param index="0" name="language" type="String" />
<description>
- Returns percent sign used in the [code]language[/code].
</description>
</method>
- <method name="save_support_data" qualifiers="virtual const">
+ <method name="_save_support_data" qualifiers="virtual const">
<return type="bool" />
<param index="0" name="filename" type="String" />
<description>
- Saves optional TextServer database (e.g. ICU break iterators and dictionaries) to the file.
- [b]Note:[/b] This function is used by during project export, to include TextServer database.
</description>
</method>
- <method name="shaped_get_span_count" qualifiers="virtual const">
+ <method name="_shaped_get_span_count" qualifiers="virtual const">
<return type="int" />
<param index="0" name="shaped" type="RID" />
<description>
- Returns number of text spans added using [method shaped_text_add_string] or [method shaped_text_add_object].
</description>
</method>
- <method name="shaped_get_span_meta" qualifiers="virtual const">
+ <method name="_shaped_get_span_meta" qualifiers="virtual const">
<return type="Variant" />
<param index="0" name="shaped" type="RID" />
<param index="1" name="index" type="int" />
<description>
- Returns text span metadata.
</description>
</method>
- <method name="shaped_set_span_update_font" qualifiers="virtual">
+ <method name="_shaped_set_span_update_font" qualifiers="virtual">
<return type="void" />
<param index="0" name="shaped" type="RID" />
<param index="1" name="index" type="int" />
- <param index="2" name="fonts" type="Array" />
+ <param index="2" name="fonts" type="RID[]" />
<param index="3" name="size" type="int" />
<param index="4" name="opentype_features" type="Dictionary" />
<description>
- Changes text span font, font size and OpenType features, without changing the text.
</description>
</method>
- <method name="shaped_text_add_object" qualifiers="virtual">
+ <method name="_shaped_text_add_object" qualifiers="virtual">
<return type="bool" />
<param index="0" name="shaped" type="RID" />
<param index="1" name="key" type="Variant" />
@@ -1035,30 +902,27 @@
<param index="3" name="inline_align" type="int" enum="InlineAlignment" />
<param index="4" name="length" type="int" />
<description>
- Adds inline object to the text buffer, [code]key[/code] must be unique. In the text, object is represented as [code]length[/code] object replacement characters.
</description>
</method>
- <method name="shaped_text_add_string" qualifiers="virtual">
+ <method name="_shaped_text_add_string" qualifiers="virtual">
<return type="bool" />
<param index="0" name="shaped" type="RID" />
<param index="1" name="text" type="String" />
- <param index="2" name="fonts" type="Array" />
+ <param index="2" name="fonts" type="RID[]" />
<param index="3" name="size" type="int" />
<param index="4" name="opentype_features" type="Dictionary" />
<param index="5" name="language" type="String" />
<param index="6" name="meta" type="Variant" />
<description>
- Adds text span and font to draw it to the text buffer.
</description>
</method>
- <method name="shaped_text_clear" qualifiers="virtual">
+ <method name="_shaped_text_clear" qualifiers="virtual">
<return type="void" />
<param index="0" name="shaped" type="RID" />
<description>
- Clears text buffer (removes text and inline objects).
</description>
</method>
- <method name="shaped_text_draw" qualifiers="virtual const">
+ <method name="_shaped_text_draw" qualifiers="virtual const">
<return type="void" />
<param index="0" name="shaped" type="RID" />
<param index="1" name="canvas" type="RID" />
@@ -1067,11 +931,9 @@
<param index="4" name="clip_r" type="float" />
<param index="5" name="color" type="Color" />
<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).
- [b]Note:[/b] If this method is not implemented in the plugin, the default implementation will be used.
</description>
</method>
- <method name="shaped_text_draw_outline" qualifiers="virtual const">
+ <method name="_shaped_text_draw_outline" qualifiers="virtual const">
<return type="void" />
<param index="0" name="shaped" type="RID" />
<param index="1" name="canvas" type="RID" />
@@ -1081,130 +943,109 @@
<param index="5" name="outline_size" type="int" />
<param index="6" name="color" type="Color" />
<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).
- [b]Note:[/b] If this method is not implemented in the plugin, the default implementation will be used.
</description>
</method>
- <method name="shaped_text_fit_to_width" qualifiers="virtual">
+ <method name="_shaped_text_fit_to_width" qualifiers="virtual">
<return type="float" />
<param index="0" name="shaped" type="RID" />
<param index="1" name="width" type="float" />
<param index="2" name="jst_flags" type="int" enum="TextServer.JustificationFlag" />
<description>
- Adjusts text with to fit to specified width, returns new text width.
</description>
</method>
- <method name="shaped_text_get_ascent" qualifiers="virtual const">
+ <method name="_shaped_text_get_ascent" qualifiers="virtual const">
<return type="float" />
<param index="0" name="shaped" type="RID" />
<description>
- Returns the text ascent (number of pixels above the baseline for horizontal layout or to the left of baseline for vertical).
</description>
</method>
- <method name="shaped_text_get_carets" qualifiers="virtual const">
+ <method name="_shaped_text_get_carets" qualifiers="virtual const">
<return type="void" />
<param index="0" name="shaped" type="RID" />
<param index="1" name="position" type="int" />
<param index="2" name="caret" type="CaretInfo*" />
<description>
- Returns shapes of the carets corresponding to the character offset [code]position[/code] in the text. Returned caret shape is 1 pixel wide rectangle.
- [b]Note:[/b] If this method is not implemented in the plugin, the default implementation will be used.
</description>
</method>
- <method name="shaped_text_get_custom_punctuation" qualifiers="virtual const">
+ <method name="_shaped_text_get_custom_punctuation" qualifiers="virtual const">
<return type="String" />
<param index="0" name="shaped" type="RID" />
<description>
- Returns custom punctuation character list, used for word breaking. If set to empty string, server defaults are used.
</description>
</method>
- <method name="shaped_text_get_descent" qualifiers="virtual const">
+ <method name="_shaped_text_get_descent" qualifiers="virtual const">
<return type="float" />
<param index="0" name="shaped" type="RID" />
<description>
- Returns the text descent (number of pixels below the baseline for horizontal layout or to the right of baseline for vertical).
</description>
</method>
- <method name="shaped_text_get_direction" qualifiers="virtual const">
+ <method name="_shaped_text_get_direction" qualifiers="virtual const">
<return type="int" enum="TextServer.Direction" />
<param index="0" name="shaped" type="RID" />
<description>
- Returns direction of the text.
</description>
</method>
- <method name="shaped_text_get_dominant_direction_in_range" qualifiers="virtual const">
+ <method name="_shaped_text_get_dominant_direction_in_range" qualifiers="virtual const">
<return type="int" />
<param index="0" name="shaped" type="RID" />
<param index="1" name="start" type="int" />
<param index="2" name="end" type="int" />
<description>
- Returns dominant direction of in the range of text.
- [b]Note:[/b] If this method is not implemented in the plugin, the default implementation will be used.
</description>
</method>
- <method name="shaped_text_get_ellipsis_glyph_count" qualifiers="virtual const">
+ <method name="_shaped_text_get_ellipsis_glyph_count" qualifiers="virtual const">
<return type="int" />
<param index="0" name="shaped" type="RID" />
<description>
- Returns number of glyphs in the ellipsis.
</description>
</method>
- <method name="shaped_text_get_ellipsis_glyphs" qualifiers="virtual const">
+ <method name="_shaped_text_get_ellipsis_glyphs" qualifiers="virtual const">
<return type="const Glyph*" />
<param index="0" name="shaped" type="RID" />
<description>
- Returns array of the glyphs in the ellipsis.
</description>
</method>
- <method name="shaped_text_get_ellipsis_pos" qualifiers="virtual const">
+ <method name="_shaped_text_get_ellipsis_pos" qualifiers="virtual const">
<return type="int" />
<param index="0" name="shaped" type="RID" />
<description>
- Returns position of the ellipsis.
</description>
</method>
- <method name="shaped_text_get_glyph_count" qualifiers="virtual const">
+ <method name="_shaped_text_get_glyph_count" qualifiers="virtual const">
<return type="int" />
<param index="0" name="shaped" type="RID" />
<description>
- Returns number of glyphs in the buffer.
</description>
</method>
- <method name="shaped_text_get_glyphs" qualifiers="virtual const">
+ <method name="_shaped_text_get_glyphs" qualifiers="virtual const">
<return type="const Glyph*" />
<param index="0" name="shaped" type="RID" />
<description>
- Returns an array of glyphs in the visual order.
</description>
</method>
- <method name="shaped_text_get_grapheme_bounds" qualifiers="virtual const">
+ <method name="_shaped_text_get_grapheme_bounds" qualifiers="virtual const">
<return type="Vector2" />
<param index="0" name="shaped" type="RID" />
<param index="1" name="pos" type="int" />
<description>
- Returns composite character's bounds as offsets from the start of the line.
- [b]Note:[/b] If this method is not implemented in the plugin, the default implementation will be used.
</description>
</method>
- <method name="shaped_text_get_inferred_direction" qualifiers="virtual const">
+ <method name="_shaped_text_get_inferred_direction" qualifiers="virtual const">
<return type="int" enum="TextServer.Direction" />
<param index="0" name="shaped" type="RID" />
<description>
- Returns direction of the text, inferred by the BiDi algorithm.
</description>
</method>
- <method name="shaped_text_get_line_breaks" qualifiers="virtual const">
+ <method name="_shaped_text_get_line_breaks" qualifiers="virtual const">
<return type="PackedInt32Array" />
<param index="0" name="shaped" type="RID" />
<param index="1" name="width" type="float" />
<param index="2" name="start" type="int" />
<param index="3" name="break_flags" type="int" enum="TextServer.LineBreakFlag" />
<description>
- Breaks text to the lines and returns character ranges for each line.
- [b]Note:[/b] If this method is not implemented in the plugin, the default implementation will be used.
</description>
</method>
- <method name="shaped_text_get_line_breaks_adv" qualifiers="virtual const">
+ <method name="_shaped_text_get_line_breaks_adv" qualifiers="virtual const">
<return type="PackedInt32Array" />
<param index="0" name="shaped" type="RID" />
<param index="1" name="width" type="PackedFloat32Array" />
@@ -1212,334 +1053,280 @@
<param index="3" name="once" type="bool" />
<param index="4" name="break_flags" type="int" enum="TextServer.LineBreakFlag" />
<description>
- Breaks text to the lines and columns. Returns character ranges for each segment.
- [b]Note:[/b] If this method is not implemented in the plugin, the default implementation will be used.
</description>
</method>
- <method name="shaped_text_get_object_rect" qualifiers="virtual const">
+ <method name="_shaped_text_get_object_rect" qualifiers="virtual const">
<return type="Rect2" />
<param index="0" name="shaped" type="RID" />
<param index="1" name="key" type="Variant" />
<description>
- Returns bounding rectangle of the inline object.
</description>
</method>
- <method name="shaped_text_get_objects" qualifiers="virtual const">
+ <method name="_shaped_text_get_objects" qualifiers="virtual const">
<return type="Array" />
<param index="0" name="shaped" type="RID" />
<description>
- Returns array of inline objects.
</description>
</method>
- <method name="shaped_text_get_orientation" qualifiers="virtual const">
+ <method name="_shaped_text_get_orientation" qualifiers="virtual const">
<return type="int" enum="TextServer.Orientation" />
<param index="0" name="shaped" type="RID" />
<description>
- eturns text orientation.
</description>
</method>
- <method name="shaped_text_get_parent" qualifiers="virtual const">
+ <method name="_shaped_text_get_parent" qualifiers="virtual const">
<return type="RID" />
<param index="0" name="shaped" type="RID" />
<description>
- Returns the parent buffer from which the substring originates.
</description>
</method>
- <method name="shaped_text_get_preserve_control" qualifiers="virtual const">
+ <method name="_shaped_text_get_preserve_control" qualifiers="virtual const">
<return type="bool" />
<param index="0" name="shaped" type="RID" />
<description>
- Returns [code]true[/code] if text buffer is configured to display control characters.
</description>
</method>
- <method name="shaped_text_get_preserve_invalid" qualifiers="virtual const">
+ <method name="_shaped_text_get_preserve_invalid" qualifiers="virtual const">
<return type="bool" />
<param index="0" name="shaped" type="RID" />
<description>
- Returns [code]true[/code] if text buffer is configured to display hexadecimal codes in place of invalid characters.
- [b]Note:[/b] If set to [code]false[/code], nothing is displayed in place of invalid characters.
</description>
</method>
- <method name="shaped_text_get_range" qualifiers="virtual const">
+ <method name="_shaped_text_get_range" qualifiers="virtual const">
<return type="Vector2i" />
<param index="0" name="shaped" type="RID" />
<description>
- Returns substring buffer character range in the parent buffer.
</description>
</method>
- <method name="shaped_text_get_selection" qualifiers="virtual const">
+ <method name="_shaped_text_get_selection" qualifiers="virtual const">
<return type="PackedVector2Array" />
<param index="0" name="shaped" type="RID" />
<param index="1" name="start" type="int" />
<param index="2" name="end" type="int" />
<description>
- Returns selection rectangles for the specified character range.
- [b]Note:[/b] If this method is not implemented in the plugin, the default implementation will be used.
</description>
</method>
- <method name="shaped_text_get_size" qualifiers="virtual const">
+ <method name="_shaped_text_get_size" qualifiers="virtual const">
<return type="Vector2" />
<param index="0" name="shaped" type="RID" />
<description>
- Returns size of the text.
</description>
</method>
- <method name="shaped_text_get_spacing" qualifiers="virtual const">
+ <method name="_shaped_text_get_spacing" qualifiers="virtual const">
<return type="int" />
<param index="0" name="shaped" type="RID" />
<param index="1" name="spacing" type="int" enum="TextServer.SpacingType" />
<description>
- Returns extra spacing added between glyphs or lines in pixels.
</description>
</method>
- <method name="shaped_text_get_trim_pos" qualifiers="virtual const">
+ <method name="_shaped_text_get_trim_pos" qualifiers="virtual const">
<return type="int" />
<param index="0" name="shaped" type="RID" />
<description>
- Returns the position of the overrun trim.
</description>
</method>
- <method name="shaped_text_get_underline_position" qualifiers="virtual const">
+ <method name="_shaped_text_get_underline_position" qualifiers="virtual const">
<return type="float" />
<param index="0" name="shaped" type="RID" />
<description>
- Returns pixel offset of the underline below the baseline.
</description>
</method>
- <method name="shaped_text_get_underline_thickness" qualifiers="virtual const">
+ <method name="_shaped_text_get_underline_thickness" qualifiers="virtual const">
<return type="float" />
<param index="0" name="shaped" type="RID" />
<description>
- Returns thickness of the underline.
</description>
</method>
- <method name="shaped_text_get_width" qualifiers="virtual const">
+ <method name="_shaped_text_get_width" qualifiers="virtual const">
<return type="float" />
<param index="0" name="shaped" type="RID" />
<description>
- Returns width (for horizontal layout) or height (for vertical) of the text.
</description>
</method>
- <method name="shaped_text_get_word_breaks" qualifiers="virtual const">
+ <method name="_shaped_text_get_word_breaks" qualifiers="virtual const">
<return type="PackedInt32Array" />
<param index="0" name="shaped" type="RID" />
<param index="1" name="grapheme_flags" type="int" enum="TextServer.GraphemeFlag" />
<description>
- Breaks text into words and returns array of character ranges.
- [b]Note:[/b] If this method is not implemented in the plugin, the default implementation will be used.
</description>
</method>
- <method name="shaped_text_hit_test_grapheme" qualifiers="virtual const">
+ <method name="_shaped_text_hit_test_grapheme" qualifiers="virtual const">
<return type="int" />
<param index="0" name="shaped" type="RID" />
<param index="1" name="coord" type="float" />
<description>
- Returns grapheme index at the specified pixel offset at the baseline, or [code]-1[/code] if none is found.
- [b]Note:[/b] If this method is not implemented in the plugin, the default implementation will be used.
</description>
</method>
- <method name="shaped_text_hit_test_position" qualifiers="virtual const">
+ <method name="_shaped_text_hit_test_position" qualifiers="virtual const">
<return type="int" />
<param index="0" name="shaped" type="RID" />
<param index="1" name="coord" type="float" />
<description>
- Returns caret character offset at the specified pixel offset at the baseline. This function always returns a valid position.
- [b]Note:[/b] If this method is not implemented in the plugin, the default implementation will be used.
</description>
</method>
- <method name="shaped_text_is_ready" qualifiers="virtual const">
+ <method name="_shaped_text_is_ready" qualifiers="virtual const">
<return type="bool" />
<param index="0" name="shaped" type="RID" />
<description>
- Returns [code]true[/code] if buffer is successfully shaped.
</description>
</method>
- <method name="shaped_text_next_grapheme_pos" qualifiers="virtual const">
+ <method name="_shaped_text_next_grapheme_pos" qualifiers="virtual const">
<return type="int" />
<param index="0" name="shaped" type="RID" />
<param index="1" name="pos" type="int" />
<description>
- Returns composite character end position closest to the [code]pos[/code].
- [b]Note:[/b] If this method is not implemented in the plugin, the default implementation will be used.
</description>
</method>
- <method name="shaped_text_overrun_trim_to_width" qualifiers="virtual">
+ <method name="_shaped_text_overrun_trim_to_width" qualifiers="virtual">
<return type="void" />
<param index="0" name="shaped" type="RID" />
<param index="1" name="width" type="float" />
<param index="2" name="trim_flags" type="int" enum="TextServer.TextOverrunFlag" />
<description>
- Trims text if it exceeds the given width.
</description>
</method>
- <method name="shaped_text_prev_grapheme_pos" qualifiers="virtual const">
+ <method name="_shaped_text_prev_grapheme_pos" qualifiers="virtual const">
<return type="int" />
<param index="0" name="shaped" type="RID" />
<param index="1" name="pos" type="int" />
<description>
- Returns composite character start position closest to the [code]pos[/code].
- [b]Note:[/b] If this method is not implemented in the plugin, the default implementation will be used.
</description>
</method>
- <method name="shaped_text_resize_object" qualifiers="virtual">
+ <method name="_shaped_text_resize_object" qualifiers="virtual">
<return type="bool" />
<param index="0" name="shaped" type="RID" />
<param index="1" name="key" type="Variant" />
<param index="2" name="size" type="Vector2" />
<param index="3" name="inline_align" type="int" enum="InlineAlignment" />
<description>
- Sets new size and alignment of embedded object.
</description>
</method>
- <method name="shaped_text_set_bidi_override" qualifiers="virtual">
+ <method name="_shaped_text_set_bidi_override" qualifiers="virtual">
<return type="void" />
<param index="0" name="shaped" type="RID" />
<param index="1" name="override" type="Array" />
<description>
- Overrides BiDi for the structured text.
- Override ranges should cover full source text without overlaps. BiDi algorithm will be used on each range separately.
</description>
</method>
- <method name="shaped_text_set_custom_punctuation" qualifiers="virtual">
+ <method name="_shaped_text_set_custom_punctuation" qualifiers="virtual">
<return type="void" />
<param index="0" name="shaped" type="RID" />
<param index="1" name="punct" type="String" />
<description>
- Sets custom punctuation character list, used for word breaking. If set to empty string, server defaults are used.
</description>
</method>
- <method name="shaped_text_set_direction" qualifiers="virtual">
+ <method name="_shaped_text_set_direction" qualifiers="virtual">
<return type="void" />
<param index="0" name="shaped" type="RID" />
<param index="1" name="direction" type="int" enum="TextServer.Direction" />
<description>
- Sets desired text direction. If set to [code]TEXT_DIRECTION_AUTO[/code], direction will be detected based on the buffer contents and current locale.
</description>
</method>
- <method name="shaped_text_set_orientation" qualifiers="virtual">
+ <method name="_shaped_text_set_orientation" qualifiers="virtual">
<return type="void" />
<param index="0" name="shaped" type="RID" />
<param index="1" name="orientation" type="int" enum="TextServer.Orientation" />
<description>
- Sets desired text orientation.
</description>
</method>
- <method name="shaped_text_set_preserve_control" qualifiers="virtual">
+ <method name="_shaped_text_set_preserve_control" qualifiers="virtual">
<return type="void" />
<param index="0" name="shaped" type="RID" />
<param index="1" name="enabled" type="bool" />
<description>
- If set to [code]true[/code] text buffer will display control characters.
</description>
</method>
- <method name="shaped_text_set_preserve_invalid" qualifiers="virtual">
+ <method name="_shaped_text_set_preserve_invalid" qualifiers="virtual">
<return type="void" />
<param index="0" name="shaped" type="RID" />
<param index="1" name="enabled" type="bool" />
<description>
- If set to [code]true[/code] text buffer will display invalid characters as hexadecimal codes, otherwise nothing is displayed.
</description>
</method>
- <method name="shaped_text_set_spacing" qualifiers="virtual">
+ <method name="_shaped_text_set_spacing" qualifiers="virtual">
<return type="void" />
<param index="0" name="shaped" type="RID" />
<param index="1" name="spacing" type="int" enum="TextServer.SpacingType" />
<param index="2" name="value" type="int" />
<description>
- Sets extra spacing added between glyphs or lines in pixels.
</description>
</method>
- <method name="shaped_text_shape" qualifiers="virtual">
+ <method name="_shaped_text_shape" qualifiers="virtual">
<return type="bool" />
<param index="0" name="shaped" type="RID" />
<description>
- Shapes buffer if it's not shaped. Returns [code]true[/code] if the string is shaped successfully.
</description>
</method>
- <method name="shaped_text_sort_logical" qualifiers="virtual">
+ <method name="_shaped_text_sort_logical" qualifiers="virtual">
<return type="const Glyph*" />
<param index="0" name="shaped" type="RID" />
<description>
- Returns text glyphs in the logical order.
</description>
</method>
- <method name="shaped_text_substr" qualifiers="virtual const">
+ <method name="_shaped_text_substr" qualifiers="virtual const">
<return type="RID" />
<param index="0" name="shaped" type="RID" />
<param index="1" name="start" type="int" />
<param index="2" name="length" type="int" />
<description>
- Returns text buffer for the substring of the text in the [code]shaped[/code] text buffer (including inline objects).
</description>
</method>
- <method name="shaped_text_tab_align" qualifiers="virtual">
+ <method name="_shaped_text_tab_align" qualifiers="virtual">
<return type="float" />
<param index="0" name="shaped" type="RID" />
<param index="1" name="tab_stops" type="PackedFloat32Array" />
<description>
- Aligns shaped text to the given tab-stops.
</description>
</method>
- <method name="shaped_text_update_breaks" qualifiers="virtual">
+ <method name="_shaped_text_update_breaks" qualifiers="virtual">
<return type="bool" />
<param index="0" name="shaped" type="RID" />
<description>
- Updates line breaking positions in the text buffer.
- [b]Note:[/b] This method is used by default line/word breaking methods, and its implementation might be omitted if custom line breaking in implemented.
</description>
</method>
- <method name="shaped_text_update_justification_ops" qualifiers="virtual">
+ <method name="_shaped_text_update_justification_ops" qualifiers="virtual">
<return type="bool" />
<param index="0" name="shaped" type="RID" />
<description>
- Updates line justification positions (word breaks and elongations) in the text buffer.
- [b]Note:[/b] This method is used by default line/word breaking methods, and its implementation might be omitted if custom line breaking in implemented.
</description>
</method>
- <method name="spoof_check" qualifiers="virtual const">
+ <method name="_spoof_check" qualifiers="virtual const">
<return type="bool" />
<param index="0" name="string" type="String" />
<description>
- Returns [code]true[/code] if [code]string[/code] is likely to be an attempt at confusing the reader.
</description>
</method>
- <method name="string_get_word_breaks" qualifiers="virtual const">
+ <method name="_string_get_word_breaks" qualifiers="virtual const">
<return type="PackedInt32Array" />
<param index="0" name="string" type="String" />
<param index="1" name="language" type="String" />
<description>
- Returns array of the word break character offsets.
</description>
</method>
- <method name="string_to_lower" qualifiers="virtual const">
+ <method name="_string_to_lower" qualifiers="virtual const">
<return type="String" />
<param index="0" name="string" type="String" />
<param index="1" name="language" type="String" />
<description>
- Returns the string converted to lowercase.
</description>
</method>
- <method name="string_to_upper" qualifiers="virtual const">
+ <method name="_string_to_upper" qualifiers="virtual const">
<return type="String" />
<param index="0" name="string" type="String" />
<param index="1" name="language" type="String" />
<description>
- Returns the string converted to uppercase.
</description>
</method>
- <method name="strip_diacritics" qualifiers="virtual const">
+ <method name="_strip_diacritics" qualifiers="virtual const">
<return type="String" />
<param index="0" name="string" type="String" />
<description>
- Strips diacritics from the string.
- [b]Note:[/b] If this method is not implemented in the plugin, the default implementation will be used.
</description>
</method>
- <method name="tag_to_name" qualifiers="virtual const">
+ <method name="_tag_to_name" qualifiers="virtual const">
<return type="String" />
<param index="0" name="tag" type="int" />
<description>
- Converts OpenType tag to readable feature, variation, script or language name.
</description>
</method>
</methods>
diff --git a/doc/classes/TextServerManager.xml b/doc/classes/TextServerManager.xml
index 19b0e9e6f2..9477e5ec54 100644
--- a/doc/classes/TextServerManager.xml
+++ b/doc/classes/TextServerManager.xml
@@ -38,7 +38,7 @@
</description>
</method>
<method name="get_interfaces" qualifiers="const">
- <return type="Array" />
+ <return type="Dictionary[]" />
<description>
Returns a list of available interfaces the index and name of each interface.
</description>
diff --git a/doc/classes/Texture.xml b/doc/classes/Texture.xml
index df6e0433dc..86c9026fd1 100644
--- a/doc/classes/Texture.xml
+++ b/doc/classes/Texture.xml
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="Texture" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
+ Base class for all texture types.
</brief_description>
<description>
+ [Texture] is the base class for all texture types. Common texture types are [Texture2D] and [ImageTexture]. See also [Image].
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/Texture2D.xml b/doc/classes/Texture2D.xml
index a8ec2a7f06..aac197090a 100644
--- a/doc/classes/Texture2D.xml
+++ b/doc/classes/Texture2D.xml
@@ -19,6 +19,8 @@
<param index="2" name="modulate" type="Color" />
<param index="3" name="transpose" type="bool" />
<description>
+ Called when the entire [Texture2D] is requested to be drawn over a [CanvasItem], with the top-left offset specified in [param pos]. [param modulate] specifies a multiplier for the colors being drawn, while [param transpose] specifies whether drawing should be performed in column-major order instead of row-major order (resulting in 90-degree clockwise rotation).
+ [b]Note:[/b] This is only used in 2D rendering, not 3D.
</description>
</method>
<method name="_draw_rect" qualifiers="virtual const">
@@ -29,32 +31,39 @@
<param index="3" name="modulate" type="Color" />
<param index="4" name="transpose" type="bool" />
<description>
+ Called when the [Texture2D] is requested to be drawn onto [CanvasItem]'s specified [param rect]. [param modulate] specifies a multiplier for the colors being drawn, while [param transpose] specifies whether drawing should be performed in column-major order instead of row-major order (resulting in 90-degree clockwise rotation).
+ [b]Note:[/b] This is only used in 2D rendering, not 3D.
</description>
</method>
<method name="_draw_rect_region" qualifiers="virtual const">
<return type="void" />
- <param index="0" name="tp_canvas_item" type="RID" />
+ <param index="0" name="to_canvas_item" type="RID" />
<param index="1" name="rect" type="Rect2" />
<param index="2" name="src_rect" type="Rect2" />
<param index="3" name="modulate" type="Color" />
<param index="4" name="transpose" type="bool" />
<param index="5" name="clip_uv" type="bool" />
<description>
+ Called when a part of the [Texture2D] specified by [param src_rect]'s coordinates is requested to be drawn onto [CanvasItem]'s specified [param rect]. [param modulate] specifies a multiplier for the colors being drawn, while [param transpose] specifies whether drawing should be performed in column-major order instead of row-major order (resulting in 90-degree clockwise rotation).
+ [b]Note:[/b] This is only used in 2D rendering, not 3D.
</description>
</method>
<method name="_get_height" qualifiers="virtual const">
<return type="int" />
<description>
+ Called when the [Texture2D]'s height is queried.
</description>
</method>
<method name="_get_width" qualifiers="virtual const">
<return type="int" />
<description>
+ Called when the [Texture2D]'s width is queried.
</description>
</method>
<method name="_has_alpha" qualifiers="virtual const">
<return type="bool" />
<description>
+ Called when the presence of an alpha channel in the [Texture2D] is queried.
</description>
</method>
<method name="_is_pixel_opaque" qualifiers="virtual const">
@@ -62,6 +71,7 @@
<param index="0" name="x" type="int" />
<param index="1" name="y" type="int" />
<description>
+ Called when a pixel's opaque state in the [Texture2D] is queried at the specified [code](x, y)[/code] position.
</description>
</method>
<method name="draw" qualifiers="const">
@@ -71,7 +81,7 @@
<param index="2" name="modulate" type="Color" default="Color(1, 1, 1, 1)" />
<param index="3" name="transpose" type="bool" default="false" />
<description>
- Draws the texture using a [CanvasItem] with the [RenderingServer] API at the specified [code]position[/code].
+ Draws the texture using a [CanvasItem] with the [RenderingServer] API at the specified [param position].
</description>
</method>
<method name="draw_rect" qualifiers="const">
@@ -100,7 +110,7 @@
<method name="get_height" qualifiers="const">
<return type="int" />
<description>
- Returns the texture height.
+ Returns the texture height in pixels.
</description>
</method>
<method name="get_image" qualifiers="const">
@@ -113,13 +123,13 @@
<method name="get_size" qualifiers="const">
<return type="Vector2" />
<description>
- Returns the texture size.
+ Returns the texture size in pixels.
</description>
</method>
<method name="get_width" qualifiers="const">
<return type="int" />
<description>
- Returns the texture width.
+ Returns the texture width in pixels.
</description>
</method>
<method name="has_alpha" qualifiers="const">
diff --git a/doc/classes/Texture2DArray.xml b/doc/classes/Texture2DArray.xml
index 6f059b5fbf..ec00198db1 100644
--- a/doc/classes/Texture2DArray.xml
+++ b/doc/classes/Texture2DArray.xml
@@ -1,8 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="Texture2DArray" inherits="ImageTextureLayered" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
+ A single texture resource which consists of multiple, separate images. Each image has the same dimensions and number of mipmap levels.
</brief_description>
<description>
+ A Texture2DArray is different from a Texture3D: The Texture2DArray does not support trilinear interpolation between the [Image]s, i.e. no blending. See also [Cubemap] and [CubemapArray], which are texture arrays with specialized cubemap functions.
+ A Texture2DArray is also different from an [AtlasTexture]: In a Texture2DArray, all images are treated separately. In an atlas, the regions (i.e. the single images) can be of different sizes. Furthermore, you usually need to add a padding around the regions, to prevent accidental UV mapping to more than one region. The same goes for mipmapping: Mipmap chains are handled separately for each layer. In an atlas, the slicing has to be done manually in the fragment shader.
+ To create such a texture file yourself, reimport your image files using the Godot Editor import presets.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/Texture3D.xml b/doc/classes/Texture3D.xml
index 4968f46fe8..1a66932d62 100644
--- a/doc/classes/Texture3D.xml
+++ b/doc/classes/Texture3D.xml
@@ -1,8 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="Texture3D" inherits="Texture" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
+ Base class for 3-dimensionnal textures.
</brief_description>
<description>
+ Base class for [ImageTexture3D] and [CompressedTexture3D]. Cannot be used directly, but contains all the functions necessary for accessing the derived resource types. [Texture3D] is the base class for all 3-dimensional texture types. See also [TextureLayered].
+ All images need to have the same width, height and number of mipmap levels.
+ To create such a texture file yourself, reimport your image files using the Godot Editor import presets.
</description>
<tutorials>
</tutorials>
@@ -10,61 +14,73 @@
<method name="_get_data" qualifiers="virtual const">
<return type="Image[]" />
<description>
+ Called when the [Texture3D]'s data is queried.
</description>
</method>
<method name="_get_depth" qualifiers="virtual const">
<return type="int" />
<description>
+ Called when the [Texture3D]'s depth is queried.
</description>
</method>
<method name="_get_format" qualifiers="virtual const">
<return type="int" enum="Image.Format" />
<description>
+ Called when the [Texture3D]'s format is queried.
</description>
</method>
<method name="_get_height" qualifiers="virtual const">
<return type="int" />
<description>
+ Called when the [Texture3D]'s height is queried.
</description>
</method>
<method name="_get_width" qualifiers="virtual const">
<return type="int" />
<description>
+ Called when the [Texture3D]'s width is queried.
</description>
</method>
<method name="_has_mipmaps" qualifiers="virtual const">
<return type="bool" />
<description>
+ Called when the presence of mipmaps in the [Texture3D] is queried.
</description>
</method>
<method name="get_data" qualifiers="const">
<return type="Image[]" />
<description>
+ Returns the [Texture3D]'s data as an array of [Image]s. Each [Image] represents a [i]slice[/i] of the [Texture3D], with different slices mapping to different depth (Z axis) levels.
</description>
</method>
<method name="get_depth" qualifiers="const">
<return type="int" />
<description>
+ Returns the [Texture3D]'s depth in pixels. Depth is typically represented by the Z axis (a dimension not present in [Texture2D]).
</description>
</method>
<method name="get_format" qualifiers="const">
<return type="int" enum="Image.Format" />
<description>
+ Returns the current format being used by this texture. See [enum Image.Format] for details.
</description>
</method>
<method name="get_height" qualifiers="const">
<return type="int" />
<description>
+ Returns the [Texture3D]'s height in pixels. Width is typically represented by the Y axis.
</description>
</method>
<method name="get_width" qualifiers="const">
<return type="int" />
<description>
+ Returns the [Texture3D]'s width in pixels. Width is typically represented by the X axis.
</description>
</method>
<method name="has_mipmaps" qualifiers="const">
<return type="bool" />
<description>
+ Returns [code]true[/code] if the [Texture3D] has generated mipmaps.
</description>
</method>
</methods>
diff --git a/doc/classes/TextureButton.xml b/doc/classes/TextureButton.xml
index 043eeb9a80..b185828577 100644
--- a/doc/classes/TextureButton.xml
+++ b/doc/classes/TextureButton.xml
@@ -27,19 +27,19 @@
<member name="texture_click_mask" type="BitMap" setter="set_click_mask" getter="get_click_mask">
Pure black and white [BitMap] image to use for click detection. On the mask, white pixels represent the button's clickable area. Use it to create buttons with curved shapes.
</member>
- <member name="texture_disabled" type="Texture2D" setter="set_disabled_texture" getter="get_disabled_texture">
+ <member name="texture_disabled" type="Texture2D" setter="set_texture_disabled" getter="get_texture_disabled">
Texture to display when the node is disabled. See [member BaseButton.disabled].
</member>
- <member name="texture_focused" type="Texture2D" setter="set_focused_texture" getter="get_focused_texture">
+ <member name="texture_focused" type="Texture2D" setter="set_texture_focused" getter="get_texture_focused">
Texture to display when the node has mouse or keyboard focus. [member texture_focused] is displayed [i]over[/i] the base texture, so a partially transparent texture should be used to ensure the base texture remains visible. A texture that represents an outline or an underline works well for this purpose. To disable the focus visual effect, assign a fully transparent texture of any size. Note that disabling the focus visual effect will harm keyboard/controller navigation usability, so this is not recommended for accessibility reasons.
</member>
- <member name="texture_hover" type="Texture2D" setter="set_hover_texture" getter="get_hover_texture">
+ <member name="texture_hover" type="Texture2D" setter="set_texture_hover" getter="get_texture_hover">
Texture to display when the mouse hovers the node.
</member>
- <member name="texture_normal" type="Texture2D" setter="set_normal_texture" getter="get_normal_texture">
+ <member name="texture_normal" type="Texture2D" setter="set_texture_normal" getter="get_texture_normal">
Texture to display by default, when the node is [b]not[/b] in the disabled, focused, hover or pressed state.
</member>
- <member name="texture_pressed" type="Texture2D" setter="set_pressed_texture" getter="get_pressed_texture">
+ <member name="texture_pressed" type="Texture2D" setter="set_texture_pressed" getter="get_texture_pressed">
Texture to display on mouse down over the node, if the node has keyboard focus and the player presses the Enter key or if the player presses the [member BaseButton.shortcut] key.
</member>
</members>
diff --git a/doc/classes/TextureLayered.xml b/doc/classes/TextureLayered.xml
index 8d54521095..8f6dff7acf 100644
--- a/doc/classes/TextureLayered.xml
+++ b/doc/classes/TextureLayered.xml
@@ -1,10 +1,14 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="TextureLayered" inherits="Texture" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
- Base class for 3D texture types.
+ Base class for texture types which contain the data of multiple [Image]s. Each image is of the same size and format.
</brief_description>
<description>
- Base class for [Texture2DArray], [Cubemap] and [CubemapArray]. Cannot be used directly, but contains all the functions necessary for accessing the derived resource types. Data is set on a per-layer basis. For [Texture2DArray]s, the layer specifies the array layer.
+ Base class for [ImageTextureLayered]. Cannot be used directly, but contains all the functions necessary for accessing the derived resource types. See also [Texture3D].
+ Data is set on a per-layer basis. For [Texture2DArray]s, the layer specifies the array layer.
+ All images need to have the same width, height and number of mipmap levels.
+ A [TextureLayered] can be loaded with [method ResourceLoader.load].
+ Internally, Godot maps these files to their respective counterparts in the target rendering driver (Vulkan, GLES3).
</description>
<tutorials>
</tutorials>
@@ -12,37 +16,44 @@
<method name="_get_format" qualifiers="virtual const">
<return type="int" enum="Image.Format" />
<description>
+ Called when the [TextureLayered]'s format is queried.
</description>
</method>
<method name="_get_height" qualifiers="virtual const">
<return type="int" />
<description>
+ Called when the the [TextureLayered]'s height is queried.
</description>
</method>
<method name="_get_layer_data" qualifiers="virtual const">
<return type="Image" />
<param index="0" name="layer_index" type="int" />
<description>
+ Called when the data for a layer in the [TextureLayered] is queried.
</description>
</method>
<method name="_get_layered_type" qualifiers="virtual const">
<return type="int" />
<description>
+ Called when the layers' type in the [TextureLayered] is queried.
</description>
</method>
<method name="_get_layers" qualifiers="virtual const">
<return type="int" />
<description>
+ Called when the number of layers in the [TextureLayered] is queried.
</description>
</method>
<method name="_get_width" qualifiers="virtual const">
<return type="int" />
<description>
+ Called when the [TextureLayered]'s width queried.
</description>
</method>
<method name="_has_mipmaps" qualifiers="virtual const">
<return type="bool" />
<description>
+ Called when the presence of mipmaps in the [TextureLayered] is queried.
</description>
</method>
<method name="get_format" qualifiers="const">
@@ -54,44 +65,50 @@
<method name="get_height" qualifiers="const">
<return type="int" />
<description>
- Returns the height of the texture. Height is typically represented by the Y-axis.
+ Returns the height of the texture in pixels. Height is typically represented by the Y axis.
</description>
</method>
<method name="get_layer_data" qualifiers="const">
<return type="Image" />
<param index="0" name="layer" type="int" />
<description>
- Returns an [Image] resource with the data from specified [code]layer[/code].
+ Returns an [Image] resource with the data from specified [param layer].
</description>
</method>
<method name="get_layered_type" qualifiers="const">
<return type="int" enum="TextureLayered.LayeredType" />
<description>
+ Returns the [TextureLayered]'s type. The type determines how the data is accessed, with cubemaps having special types.
</description>
</method>
<method name="get_layers" qualifiers="const">
<return type="int" />
<description>
+ Returns the number of referenced [Image]s.
</description>
</method>
<method name="get_width" qualifiers="const">
<return type="int" />
<description>
- Returns the width of the texture. Width is typically represented by the X-axis.
+ Returns the width of the texture in pixels. Width is typically represented by the X axis.
</description>
</method>
<method name="has_mipmaps" qualifiers="const">
<return type="bool" />
<description>
+ Returns [code]true[/code] if the layers have generated mipmaps.
</description>
</method>
</methods>
<constants>
<constant name="LAYERED_TYPE_2D_ARRAY" value="0" enum="LayeredType">
+ Texture is a generic [Texture2DArray].
</constant>
<constant name="LAYERED_TYPE_CUBEMAP" value="1" enum="LayeredType">
+ Texture is a [Cubemap], with each side in its own layer (6 in total).
</constant>
<constant name="LAYERED_TYPE_CUBEMAP_ARRAY" value="2" enum="LayeredType">
+ Texture is a [CubemapArray], with each cubemap being made of 6 layers.
</constant>
</constants>
</class>
diff --git a/doc/classes/TextureProgressBar.xml b/doc/classes/TextureProgressBar.xml
index fcdb18e10d..54b77bf5eb 100644
--- a/doc/classes/TextureProgressBar.xml
+++ b/doc/classes/TextureProgressBar.xml
@@ -27,6 +27,7 @@
<member name="fill_mode" type="int" setter="set_fill_mode" getter="get_fill_mode" default="0">
The fill direction. See [enum FillMode] for possible values.
</member>
+ <member name="mouse_filter" type="int" setter="set_mouse_filter" getter="get_mouse_filter" overrides="Control" enum="Control.MouseFilter" default="1" />
<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>
@@ -40,6 +41,8 @@
<member name="radial_initial_angle" type="float" setter="set_radial_initial_angle" getter="get_radial_initial_angle" default="0.0">
Starting angle for the fill of [member texture_progress] if [member fill_mode] is [constant FILL_CLOCKWISE] or [constant FILL_COUNTER_CLOCKWISE]. When the node's [code]value[/code] is equal to its [code]min_value[/code], the texture doesn't show up at all. When the [code]value[/code] increases, the texture fills and tends towards [member radial_fill_degrees].
</member>
+ <member name="size_flags_vertical" type="int" setter="set_v_size_flags" getter="get_v_size_flags" overrides="Control" default="1" />
+ <member name="step" type="float" setter="set_step" getter="get_step" overrides="Range" default="1.0" />
<member name="stretch_margin_bottom" type="int" setter="set_stretch_margin" getter="get_stretch_margin" default="0">
The height of the 9-patch's bottom row. A margin of 16 means the 9-slice's bottom corners and side will have a height of 16 pixels. You can set all 4 margin values individually to create panels with non-uniform borders.
</member>
diff --git a/doc/classes/Theme.xml b/doc/classes/Theme.xml
index b310233780..7fc01ea353 100644
--- a/doc/classes/Theme.xml
+++ b/doc/classes/Theme.xml
@@ -32,7 +32,7 @@
<param index="0" name="name" type="StringName" />
<param index="1" name="theme_type" type="StringName" />
<description>
- Removes the [Color] property defined by [code]name[/code] and [code]theme_type[/code], if it exists.
+ Removes the [Color] property defined by [param name] and [param theme_type], if it exists.
Fails if it doesn't exist. Use [method has_color] to check for existence.
</description>
</method>
@@ -41,7 +41,7 @@
<param index="0" name="name" type="StringName" />
<param index="1" name="theme_type" type="StringName" />
<description>
- Removes the constant property defined by [code]name[/code] and [code]theme_type[/code], if it exists.
+ Removes the constant property defined by [param name] and [param theme_type], if it exists.
Fails if it doesn't exist. Use [method has_constant] to check for existence.
</description>
</method>
@@ -50,7 +50,7 @@
<param index="0" name="name" type="StringName" />
<param index="1" name="theme_type" type="StringName" />
<description>
- Removes the [Font] property defined by [code]name[/code] and [code]theme_type[/code], if it exists.
+ Removes the [Font] property defined by [param name] and [param theme_type], if it exists.
Fails if it doesn't exist. Use [method has_font] to check for existence.
</description>
</method>
@@ -59,7 +59,7 @@
<param index="0" name="name" type="StringName" />
<param index="1" name="theme_type" type="StringName" />
<description>
- Removes the font size property defined by [code]name[/code] and [code]theme_type[/code], if it exists.
+ Removes the font size property defined by [param name] and [param theme_type], if it exists.
Fails if it doesn't exist. Use [method has_font_size] to check for existence.
</description>
</method>
@@ -68,7 +68,7 @@
<param index="0" name="name" type="StringName" />
<param index="1" name="theme_type" type="StringName" />
<description>
- Removes the icon property defined by [code]name[/code] and [code]theme_type[/code], if it exists.
+ Removes the icon property defined by [param name] and [param theme_type], if it exists.
Fails if it doesn't exist. Use [method has_icon] to check for existence.
</description>
</method>
@@ -77,7 +77,7 @@
<param index="0" name="name" type="StringName" />
<param index="1" name="theme_type" type="StringName" />
<description>
- Removes the [StyleBox] property defined by [code]name[/code] and [code]theme_type[/code], if it exists.
+ Removes the [StyleBox] property defined by [param name] and [param theme_type], if it exists.
Fails if it doesn't exist. Use [method has_stylebox] to check for existence.
</description>
</method>
@@ -87,7 +87,7 @@
<param index="1" name="name" type="StringName" />
<param index="2" name="theme_type" type="StringName" />
<description>
- Removes the theme property of [code]data_type[/code] defined by [code]name[/code] and [code]theme_type[/code], if it exists.
+ Removes the theme property of [param data_type] defined by [param name] and [param theme_type], if it exists.
Fails if it doesn't exist. Use [method has_theme_item] to check for existence.
[b]Note:[/b] This method is analogous to calling the corresponding data type specific method, but can be used for more generalized logic.
</description>
@@ -96,7 +96,7 @@
<return type="void" />
<param index="0" name="theme_type" type="StringName" />
<description>
- Unmarks [code]theme_type[/code] as being a variation of another theme type. See [method set_type_variation].
+ Unmarks [param theme_type] as being a variation of another theme type. See [method set_type_variation].
</description>
</method>
<method name="get_color" qualifiers="const">
@@ -104,7 +104,7 @@
<param index="0" name="name" type="StringName" />
<param index="1" name="theme_type" type="StringName" />
<description>
- Returns the [Color] property defined by [code]name[/code] and [code]theme_type[/code], if it exists.
+ Returns the [Color] property defined by [param name] and [param theme_type], if it exists.
Returns the default color value if the property doesn't exist. Use [method has_color] to check for existence.
</description>
</method>
@@ -112,7 +112,7 @@
<return type="PackedStringArray" />
<param index="0" name="theme_type" type="String" />
<description>
- Returns a list of names for [Color] properties defined with [code]theme_type[/code]. Use [method get_color_type_list] to get a list of possible theme type names.
+ Returns a list of names for [Color] properties defined with [param theme_type]. Use [method get_color_type_list] to get a list of possible theme type names.
</description>
</method>
<method name="get_color_type_list" qualifiers="const">
@@ -126,7 +126,7 @@
<param index="0" name="name" type="StringName" />
<param index="1" name="theme_type" type="StringName" />
<description>
- Returns the constant property defined by [code]name[/code] and [code]theme_type[/code], if it exists.
+ Returns the constant property defined by [param name] and [param theme_type], if it exists.
Returns [code]0[/code] if the property doesn't exist. Use [method has_constant] to check for existence.
</description>
</method>
@@ -134,7 +134,7 @@
<return type="PackedStringArray" />
<param index="0" name="theme_type" type="String" />
<description>
- Returns a list of names for constant properties defined with [code]theme_type[/code]. Use [method get_constant_type_list] to get a list of possible theme type names.
+ Returns a list of names for constant properties defined with [param theme_type]. Use [method get_constant_type_list] to get a list of possible theme type names.
</description>
</method>
<method name="get_constant_type_list" qualifiers="const">
@@ -148,16 +148,16 @@
<param index="0" name="name" type="StringName" />
<param index="1" name="theme_type" type="StringName" />
<description>
- Returns the [Font] property defined by [code]name[/code] and [code]theme_type[/code], if it exists.
+ Returns the [Font] property defined by [param name] and [param theme_type], if it exists.
Returns the default theme font if the property doesn't exist and the default theme font is set up (see [member default_font]). Use [method has_font] to check for existence of the property and [method has_default_font] to check for existence of the default theme font.
- Returns the engine fallback font value, if neither exist.
+ Returns the engine fallback font value, if neither exist (see [member ThemeDB.fallback_font]).
</description>
</method>
<method name="get_font_list" qualifiers="const">
<return type="PackedStringArray" />
<param index="0" name="theme_type" type="String" />
<description>
- Returns a list of names for [Font] properties defined with [code]theme_type[/code]. Use [method get_font_type_list] to get a list of possible theme type names.
+ Returns a list of names for [Font] properties defined with [param theme_type]. Use [method get_font_type_list] to get a list of possible theme type names.
</description>
</method>
<method name="get_font_size" qualifiers="const">
@@ -165,16 +165,16 @@
<param index="0" name="name" type="StringName" />
<param index="1" name="theme_type" type="StringName" />
<description>
- Returns the font size property defined by [code]name[/code] and [code]theme_type[/code], if it exists.
+ Returns the font size property defined by [param name] and [param theme_type], if it exists.
Returns the default theme font size if the property doesn't exist and the default theme font size is set up (see [member default_font_size]). Use [method has_font_size] to check for existence of the property and [method has_default_font_size] to check for existence of the default theme font.
- Returns the engine fallback font size value, if neither exist.
+ Returns the engine fallback font size value, if neither exist (see [member ThemeDB.fallback_font_size]).
</description>
</method>
<method name="get_font_size_list" qualifiers="const">
<return type="PackedStringArray" />
<param index="0" name="theme_type" type="String" />
<description>
- Returns a list of names for font size properties defined with [code]theme_type[/code]. Use [method get_font_size_type_list] to get a list of possible theme type names.
+ Returns a list of names for font size properties defined with [param theme_type]. Use [method get_font_size_type_list] to get a list of possible theme type names.
</description>
</method>
<method name="get_font_size_type_list" qualifiers="const">
@@ -194,15 +194,15 @@
<param index="0" name="name" type="StringName" />
<param index="1" name="theme_type" type="StringName" />
<description>
- Returns the icon property defined by [code]name[/code] and [code]theme_type[/code], if it exists.
- Returns the engine fallback icon value if the property doesn't exist. Use [method has_icon] to check for existence.
+ Returns the icon property defined by [param name] and [param theme_type], if it exists.
+ Returns the engine fallback icon value if the property doesn't exist (see [member ThemeDB.fallback_icon]). Use [method has_icon] to check for existence.
</description>
</method>
<method name="get_icon_list" qualifiers="const">
<return type="PackedStringArray" />
<param index="0" name="theme_type" type="String" />
<description>
- Returns a list of names for icon properties defined with [code]theme_type[/code]. Use [method get_icon_type_list] to get a list of possible theme type names.
+ Returns a list of names for icon properties defined with [param theme_type]. Use [method get_icon_type_list] to get a list of possible theme type names.
</description>
</method>
<method name="get_icon_type_list" qualifiers="const">
@@ -216,15 +216,15 @@
<param index="0" name="name" type="StringName" />
<param index="1" name="theme_type" type="StringName" />
<description>
- Returns the [StyleBox] property defined by [code]name[/code] and [code]theme_type[/code], if it exists.
- Returns the engine fallback stylebox value if the property doesn't exist. Use [method has_stylebox] to check for existence.
+ Returns the [StyleBox] property defined by [param name] and [param theme_type], if it exists.
+ Returns the engine fallback stylebox value if the property doesn't exist (see [member ThemeDB.fallback_stylebox]). Use [method has_stylebox] to check for existence.
</description>
</method>
<method name="get_stylebox_list" qualifiers="const">
<return type="PackedStringArray" />
<param index="0" name="theme_type" type="String" />
<description>
- Returns a list of names for [StyleBox] properties defined with [code]theme_type[/code]. Use [method get_stylebox_type_list] to get a list of possible theme type names.
+ Returns a list of names for [StyleBox] properties defined with [param theme_type]. Use [method get_stylebox_type_list] to get a list of possible theme type names.
</description>
</method>
<method name="get_stylebox_type_list" qualifiers="const">
@@ -239,8 +239,8 @@
<param index="1" name="name" type="StringName" />
<param index="2" name="theme_type" type="StringName" />
<description>
- Returns the theme property of [code]data_type[/code] defined by [code]name[/code] and [code]theme_type[/code], if it exists.
- Returns the engine fallback icon value if the property doesn't exist. Use [method has_theme_item] to check for existence.
+ Returns the theme property of [param data_type] defined by [param name] and [param theme_type], if it exists.
+ Returns the engine fallback icon value if the property doesn't exist (see [ThemeDB]). Use [method has_theme_item] to check for existence.
[b]Note:[/b] This method is analogous to calling the corresponding data type specific method, but can be used for more generalized logic.
</description>
</method>
@@ -249,7 +249,7 @@
<param index="0" name="data_type" type="int" enum="Theme.DataType" />
<param index="1" name="theme_type" type="String" />
<description>
- Returns a list of names for properties of [code]data_type[/code] defined with [code]theme_type[/code]. Use [method get_theme_item_type_list] to get a list of possible theme type names.
+ Returns a list of names for properties of [param data_type] defined with [param theme_type]. Use [method get_theme_item_type_list] to get a list of possible theme type names.
[b]Note:[/b] This method is analogous to calling the corresponding data type specific method, but can be used for more generalized logic.
</description>
</method>
@@ -257,7 +257,7 @@
<return type="PackedStringArray" />
<param index="0" name="data_type" type="int" enum="Theme.DataType" />
<description>
- Returns a list of all unique theme type names for [code]data_type[/code] properties. Use [method get_type_list] to get a list of all unique theme types.
+ Returns a list of all unique theme type names for [param data_type] properties. Use [method get_type_list] to get a list of all unique theme types.
[b]Note:[/b] This method is analogous to calling the corresponding data type specific method, but can be used for more generalized logic.
</description>
</method>
@@ -271,14 +271,14 @@
<return type="StringName" />
<param index="0" name="theme_type" type="StringName" />
<description>
- Returns the name of the base theme type if [code]theme_type[/code] is a valid variation type. Returns an empty string otherwise.
+ Returns the name of the base theme type if [param theme_type] is a valid variation type. Returns an empty string otherwise.
</description>
</method>
<method name="get_type_variation_list" qualifiers="const">
<return type="PackedStringArray" />
<param index="0" name="base_type" type="StringName" />
<description>
- Returns a list of all type variations for the given [code]base_type[/code].
+ Returns a list of all type variations for the given [param base_type].
</description>
</method>
<method name="has_color" qualifiers="const">
@@ -286,7 +286,7 @@
<param index="0" name="name" type="StringName" />
<param index="1" name="theme_type" type="StringName" />
<description>
- Returns [code]true[/code] if the [Color] property defined by [code]name[/code] and [code]theme_type[/code] exists.
+ Returns [code]true[/code] if the [Color] property defined by [param name] and [param theme_type] exists.
Returns [code]false[/code] if it doesn't exist. Use [method set_color] to define it.
</description>
</method>
@@ -295,7 +295,7 @@
<param index="0" name="name" type="StringName" />
<param index="1" name="theme_type" type="StringName" />
<description>
- Returns [code]true[/code] if the constant property defined by [code]name[/code] and [code]theme_type[/code] exists.
+ Returns [code]true[/code] if the constant property defined by [param name] and [param theme_type] exists.
Returns [code]false[/code] if it doesn't exist. Use [method set_constant] to define it.
</description>
</method>
@@ -325,7 +325,7 @@
<param index="0" name="name" type="StringName" />
<param index="1" name="theme_type" type="StringName" />
<description>
- Returns [code]true[/code] if the [Font] property defined by [code]name[/code] and [code]theme_type[/code] exists, or if the default theme font is set up (see [method has_default_font]).
+ Returns [code]true[/code] if the [Font] property defined by [param name] and [param theme_type] exists, or if the default theme font is set up (see [method has_default_font]).
Returns [code]false[/code] if neither exist. Use [method set_font] to define the property.
</description>
</method>
@@ -334,8 +334,8 @@
<param index="0" name="name" type="StringName" />
<param index="1" name="theme_type" type="StringName" />
<description>
- Returns [code]true[/code] if [member default_font_size] has a valid value.
- Returns [code]false[/code] if it doesn't. The value must be greater than [code]0[/code] to be considered valid.
+ Returns [code]true[/code] if the font size property defined by [param name] and [param theme_type] exists, or if the default theme font size is set up (see [method has_default_font_size]).
+ Returns [code]false[/code] if neither exist. Use [method set_font_size] to define the property.
</description>
</method>
<method name="has_icon" qualifiers="const">
@@ -343,7 +343,7 @@
<param index="0" name="name" type="StringName" />
<param index="1" name="theme_type" type="StringName" />
<description>
- Returns [code]true[/code] if the icon property defined by [code]name[/code] and [code]theme_type[/code] exists.
+ Returns [code]true[/code] if the icon property defined by [param name] and [param theme_type] exists.
Returns [code]false[/code] if it doesn't exist. Use [method set_icon] to define it.
</description>
</method>
@@ -352,7 +352,7 @@
<param index="0" name="name" type="StringName" />
<param index="1" name="theme_type" type="StringName" />
<description>
- Returns [code]true[/code] if the [StyleBox] property defined by [code]name[/code] and [code]theme_type[/code] exists.
+ Returns [code]true[/code] if the [StyleBox] property defined by [param name] and [param theme_type] exists.
Returns [code]false[/code] if it doesn't exist. Use [method set_stylebox] to define it.
</description>
</method>
@@ -362,7 +362,7 @@
<param index="1" name="name" type="StringName" />
<param index="2" name="theme_type" type="StringName" />
<description>
- Returns [code]true[/code] if the theme property of [code]data_type[/code] defined by [code]name[/code] and [code]theme_type[/code] exists.
+ Returns [code]true[/code] if the theme property of [param data_type] defined by [param name] and [param theme_type] exists.
Returns [code]false[/code] if it doesn't exist. Use [method set_theme_item] to define it.
[b]Note:[/b] This method is analogous to calling the corresponding data type specific method, but can be used for more generalized logic.
</description>
@@ -372,14 +372,14 @@
<param index="0" name="theme_type" type="StringName" />
<param index="1" name="base_type" type="StringName" />
<description>
- Returns [code]true[/code] if [code]theme_type[/code] is marked as a variation of [code]base_type[/code].
+ Returns [code]true[/code] if [param theme_type] is marked as a variation of [param base_type].
</description>
</method>
<method name="merge_with">
<return type="void" />
<param index="0" name="other" type="Theme" />
<description>
- Adds missing and overrides existing definitions with values from the [code]other[/code] theme resource.
+ Adds missing and overrides existing definitions with values from the [param other] theme resource.
[b]Note:[/b] This modifies the current theme. If you want to merge two themes together without modifying either one, create a new empty theme and merge the other two into it one after another.
</description>
</method>
@@ -396,7 +396,7 @@
<param index="1" name="name" type="StringName" />
<param index="2" name="theme_type" type="StringName" />
<description>
- Renames the [Color] property defined by [code]old_name[/code] and [code]theme_type[/code] to [code]name[/code], if it exists.
+ Renames the [Color] property defined by [param old_name] and [param theme_type] to [param name], if it exists.
Fails if it doesn't exist, or if a similar property with the new name already exists. Use [method has_color] to check for existence, and [method clear_color] to remove the existing property.
</description>
</method>
@@ -406,7 +406,7 @@
<param index="1" name="name" type="StringName" />
<param index="2" name="theme_type" type="StringName" />
<description>
- Renames the constant property defined by [code]old_name[/code] and [code]theme_type[/code] to [code]name[/code], if it exists.
+ Renames the constant property defined by [param old_name] and [param theme_type] to [param name], if it exists.
Fails if it doesn't exist, or if a similar property with the new name already exists. Use [method has_constant] to check for existence, and [method clear_constant] to remove the existing property.
</description>
</method>
@@ -416,7 +416,7 @@
<param index="1" name="name" type="StringName" />
<param index="2" name="theme_type" type="StringName" />
<description>
- Renames the [Font] property defined by [code]old_name[/code] and [code]theme_type[/code] to [code]name[/code], if it exists.
+ Renames the [Font] property defined by [param old_name] and [param theme_type] to [param name], if it exists.
Fails if it doesn't exist, or if a similar property with the new name already exists. Use [method has_font] to check for existence, and [method clear_font] to remove the existing property.
</description>
</method>
@@ -426,8 +426,8 @@
<param index="1" name="name" type="StringName" />
<param index="2" name="theme_type" type="StringName" />
<description>
- Returns [code]true[/code] if the font size property defined by [code]name[/code] and [code]theme_type[/code] exists, or if the default theme font size is set up (see [method has_default_font_size]).
- Returns [code]false[/code] if neither exist. Use [method set_font_size] to define the property.
+ Renames the font size property defined by [param old_name] and [param theme_type] to [param name], if it exists.
+ Fails if it doesn't exist, or if a similar property with the new name already exists. Use [method has_font_size] to check for existence, and [method clear_font_size] to remove the existing property.
</description>
</method>
<method name="rename_icon">
@@ -436,7 +436,7 @@
<param index="1" name="name" type="StringName" />
<param index="2" name="theme_type" type="StringName" />
<description>
- Renames the icon property defined by [code]old_name[/code] and [code]theme_type[/code] to [code]name[/code], if it exists.
+ Renames the icon property defined by [param old_name] and [param theme_type] to [param name], if it exists.
Fails if it doesn't exist, or if a similar property with the new name already exists. Use [method has_icon] to check for existence, and [method clear_icon] to remove the existing property.
</description>
</method>
@@ -446,7 +446,7 @@
<param index="1" name="name" type="StringName" />
<param index="2" name="theme_type" type="StringName" />
<description>
- Renames the [StyleBox] property defined by [code]old_name[/code] and [code]theme_type[/code] to [code]name[/code], if it exists.
+ Renames the [StyleBox] property defined by [param old_name] and [param theme_type] to [param name], if it exists.
Fails if it doesn't exist, or if a similar property with the new name already exists. Use [method has_stylebox] to check for existence, and [method clear_stylebox] to remove the existing property.
</description>
</method>
@@ -457,7 +457,7 @@
<param index="2" name="name" type="StringName" />
<param index="3" name="theme_type" type="StringName" />
<description>
- Renames the theme property of [code]data_type[/code] defined by [code]old_name[/code] and [code]theme_type[/code] to [code]name[/code], if it exists.
+ Renames the theme property of [param data_type] defined by [param old_name] and [param theme_type] to [param name], if it exists.
Fails if it doesn't exist, or if a similar property with the new name already exists. Use [method has_theme_item] to check for existence, and [method clear_theme_item] to remove the existing property.
[b]Note:[/b] This method is analogous to calling the corresponding data type specific method, but can be used for more generalized logic.
</description>
@@ -468,7 +468,7 @@
<param index="1" name="theme_type" type="StringName" />
<param index="2" name="color" type="Color" />
<description>
- Creates or changes the value of the [Color] property defined by [code]name[/code] and [code]theme_type[/code]. Use [method clear_color] to remove the property.
+ Creates or changes the value of the [Color] property defined by [param name] and [param theme_type]. Use [method clear_color] to remove the property.
</description>
</method>
<method name="set_constant">
@@ -477,7 +477,7 @@
<param index="1" name="theme_type" type="StringName" />
<param index="2" name="constant" type="int" />
<description>
- Creates or changes the value of the constant property defined by [code]name[/code] and [code]theme_type[/code]. Use [method clear_constant] to remove the property.
+ Creates or changes the value of the constant property defined by [param name] and [param theme_type]. Use [method clear_constant] to remove the property.
</description>
</method>
<method name="set_font">
@@ -486,7 +486,7 @@
<param index="1" name="theme_type" type="StringName" />
<param index="2" name="font" type="Font" />
<description>
- Creates or changes the value of the [Font] property defined by [code]name[/code] and [code]theme_type[/code]. Use [method clear_font] to remove the property.
+ Creates or changes the value of the [Font] property defined by [param name] and [param theme_type]. Use [method clear_font] to remove the property.
</description>
</method>
<method name="set_font_size">
@@ -495,8 +495,7 @@
<param index="1" name="theme_type" type="StringName" />
<param index="2" name="font_size" type="int" />
<description>
- Renames the font size property defined by [code]old_name[/code] and [code]theme_type[/code] to [code]name[/code], if it exists.
- Fails if it doesn't exist, or if a similar property with the new name already exists. Use [method has_font_size] to check for existence, and [method clear_font_size] to remove the existing property.
+ Creates or changes the value of the font size property defined by [param name] and [param theme_type]. Use [method clear_font_size] to remove the property.
</description>
</method>
<method name="set_icon">
@@ -505,7 +504,7 @@
<param index="1" name="theme_type" type="StringName" />
<param index="2" name="texture" type="Texture2D" />
<description>
- Creates or changes the value of the icon property defined by [code]name[/code] and [code]theme_type[/code]. Use [method clear_icon] to remove the property.
+ Creates or changes the value of the icon property defined by [param name] and [param theme_type]. Use [method clear_icon] to remove the property.
</description>
</method>
<method name="set_stylebox">
@@ -514,7 +513,7 @@
<param index="1" name="theme_type" type="StringName" />
<param index="2" name="texture" type="StyleBox" />
<description>
- Creates or changes the value of the [StyleBox] property defined by [code]name[/code] and [code]theme_type[/code]. Use [method clear_stylebox] to remove the property.
+ Creates or changes the value of the [StyleBox] property defined by [param name] and [param theme_type]. Use [method clear_stylebox] to remove the property.
</description>
</method>
<method name="set_theme_item">
@@ -524,8 +523,8 @@
<param index="2" name="theme_type" type="StringName" />
<param index="3" name="value" type="Variant" />
<description>
- Creates or changes the value of the theme property of [code]data_type[/code] defined by [code]name[/code] and [code]theme_type[/code]. Use [method clear_theme_item] to remove the property.
- Fails if the [code]value[/code] type is not accepted by [code]data_type[/code].
+ Creates or changes the value of the theme property of [param data_type] defined by [param name] and [param theme_type]. Use [method clear_theme_item] to remove the property.
+ Fails if the [param value] type is not accepted by [param data_type].
[b]Note:[/b] This method is analogous to calling the corresponding data type specific method, but can be used for more generalized logic.
</description>
</method>
@@ -534,24 +533,24 @@
<param index="0" name="theme_type" type="StringName" />
<param index="1" name="base_type" type="StringName" />
<description>
- Marks [code]theme_type[/code] as a variation of [code]base_type[/code].
- This adds [code]theme_type[/code] as a suggested option for [member Control.theme_type_variation] on a [Control] that is of the [code]base_type[/code] class.
- Variations can also be nested, i.e. [code]base_type[/code] can be another variation. If a chain of variations ends with a [code]base_type[/code] matching the class of the [Control], the whole chain is going to be suggested as options.
+ Marks [param theme_type] as a variation of [param base_type].
+ This adds [param theme_type] as a suggested option for [member Control.theme_type_variation] on a [Control] that is of the [param base_type] class.
+ Variations can also be nested, i.e. [param base_type] can be another variation. If a chain of variations ends with a [param base_type] matching the class of the [Control], the whole chain is going to be suggested as options.
[b]Note:[/b] Suggestions only show up if this theme resource is set as the project default theme. See [member ProjectSettings.gui/theme/custom].
</description>
</method>
</methods>
<members>
<member name="default_base_scale" type="float" setter="set_default_base_scale" getter="get_default_base_scale" default="0.0">
- The default base scale factor of this theme resource. Used by some controls to scale their visual properties based on the global scale factor. If this value is set to [code]0.0[/code], the global scale factor is used.
+ The default base scale factor of this theme resource. Used by some controls to scale their visual properties based on the global scale factor. If this value is set to [code]0.0[/code], the global scale factor is used (see [member ThemeDB.fallback_base_scale]).
Use [method has_default_base_scale] to check if this value is valid.
</member>
<member name="default_font" type="Font" setter="set_default_font" getter="get_default_font">
- The default font of this theme resource. Used as the default value when trying to fetch a font resource that doesn't exist in this theme or is in invalid state. If the default font is also missing or invalid, the engine fallback value is used.
+ The default font of this theme resource. Used as the default value when trying to fetch a font resource that doesn't exist in this theme or is in invalid state. If the default font is also missing or invalid, the engine fallback value is used (see [member ThemeDB.fallback_font]).
Use [method has_default_font] to check if this value is valid.
</member>
<member name="default_font_size" type="int" setter="set_default_font_size" getter="get_default_font_size" default="-1">
- The default font size of this theme resource. Used as the default value when trying to fetch a font size value that doesn't exist in this theme or is in invalid state. If the default font size is also missing or invalid, the engine fallback value is used.
+ The default font size of this theme resource. Used as the default value when trying to fetch a font size value that doesn't exist in this theme or is in invalid state. If the default font size is also missing or invalid, the engine fallback value is used (see [member ThemeDB.fallback_font_size]).
Values below [code]0[/code] are invalid and can be used to unset the property. Use [method has_default_font_size] to check if this value is valid.
</member>
</members>
diff --git a/doc/classes/ThemeDB.xml b/doc/classes/ThemeDB.xml
new file mode 100644
index 0000000000..6003ffb28e
--- /dev/null
+++ b/doc/classes/ThemeDB.xml
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="ThemeDB" inherits="Object" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ An engine singleton providing access to static [Theme] information, such as default and project theme, and fallback values.
+ </brief_description>
+ <description>
+ This engine singleton provides access to static information about [Theme] resources used by the engine and by your projects. You can fetch the default engine theme, as well as your project configured theme.
+ [ThemeDB] also contains fallback values for theme properties.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="get_default_theme">
+ <return type="Theme" />
+ <description>
+ Returns a reference to the default engine [Theme]. This theme resource is responsible for the out-of-the-box look of [Control] nodes and cannot be overridden.
+ </description>
+ </method>
+ <method name="get_project_theme">
+ <return type="Theme" />
+ <description>
+ Returns a reference to the custom project [Theme]. This theme resources allows to override the default engine theme for every control node in the project.
+ To set the project theme, see [member ProjectSettings.gui/theme/custom].
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="fallback_base_scale" type="float" setter="set_fallback_base_scale" getter="get_fallback_base_scale" default="1.0">
+ The fallback base scale factor of every [Control] node and [Theme] resource. Used when no other value is available to the control.
+ See also [member Theme.default_base_scale].
+ </member>
+ <member name="fallback_font" type="Font" setter="set_fallback_font" getter="get_fallback_font">
+ The fallback font of every [Control] node and [Theme] resource. Used when no other value is available to the control.
+ See also [member Theme.default_font].
+ </member>
+ <member name="fallback_font_size" type="int" setter="set_fallback_font_size" getter="get_fallback_font_size" default="16">
+ The fallback font size of every [Control] node and [Theme] resource. Used when no other value is available to the control.
+ See also [member Theme.default_font_size].
+ </member>
+ <member name="fallback_icon" type="Texture2D" setter="set_fallback_icon" getter="get_fallback_icon">
+ The fallback icon of every [Control] node and [Theme] resource. Used when no other value is available to the control.
+ </member>
+ <member name="fallback_stylebox" type="StyleBox" setter="set_fallback_stylebox" getter="get_fallback_stylebox">
+ The fallback stylebox of every [Control] node and [Theme] resource. Used when no other value is available to the control.
+ </member>
+ </members>
+ <signals>
+ <signal name="fallback_changed">
+ <description>
+ Emitted when one of the fallback values had been changed. Use it to refresh the look of controls that may rely on the fallback theme items.
+ </description>
+ </signal>
+ </signals>
+</class>
diff --git a/doc/classes/Thread.xml b/doc/classes/Thread.xml
index 6bc34ed8dd..846dae0bae 100644
--- a/doc/classes/Thread.xml
+++ b/doc/classes/Thread.xml
@@ -37,9 +37,9 @@
<param index="0" name="callable" type="Callable" />
<param index="1" name="priority" type="int" enum="Thread.Priority" default="1" />
<description>
- Starts a new [Thread] that calls [code]callable[/code].
+ Starts a new [Thread] that calls [param callable].
If the method takes some arguments, you can pass them using [method Callable.bind].
- The [code]priority[/code] of the [Thread] can be changed by passing a value from the [enum Priority] enum.
+ The [param priority] of the [Thread] can be changed by passing a value from the [enum Priority] enum.
Returns [constant OK] on success, or [constant ERR_CANT_CREATE] on failure.
</description>
</method>
diff --git a/doc/classes/TileData.xml b/doc/classes/TileData.xml
index b61ed1ea28..798a536a88 100644
--- a/doc/classes/TileData.xml
+++ b/doc/classes/TileData.xml
@@ -19,7 +19,7 @@
<param index="0" name="layer_id" type="int" />
<param index="1" name="polygon_index" type="int" />
<description>
- Returns the one-way margin (for one-way platforms) of the polygon at index [code]polygon_index[/code] for TileSet physics layer with index [code]layer_id[/code].
+ Returns the one-way margin (for one-way platforms) of the polygon at index [param polygon_index] for TileSet physics layer with index [param layer_id].
</description>
</method>
<method name="get_collision_polygon_points" qualifiers="const">
@@ -27,14 +27,14 @@
<param index="0" name="layer_id" type="int" />
<param index="1" name="polygon_index" type="int" />
<description>
- Returns the points of the polygon at index [code]polygon_index[/code] for TileSet physics layer with index [code]layer_id[/code].
+ Returns the points of the polygon at index [param polygon_index] for TileSet physics layer with index [param layer_id].
</description>
</method>
<method name="get_collision_polygons_count" qualifiers="const">
<return type="int" />
<param index="0" name="layer_id" type="int" />
<description>
- Returns how many polygons the tile has for TileSet physics layer with index [code]layer_id[/code].
+ Returns how many polygons the tile has for TileSet physics layer with index [param layer_id].
</description>
</method>
<method name="get_constant_angular_velocity" qualifiers="const">
@@ -55,35 +55,35 @@
<return type="Variant" />
<param index="0" name="layer_name" type="String" />
<description>
- Returns the custom data value for custom data layer named [code]layer_name[/code].
+ Returns the custom data value for custom data layer named [param layer_name].
</description>
</method>
<method name="get_custom_data_by_layer_id" qualifiers="const">
<return type="Variant" />
<param index="0" name="layer_id" type="int" />
<description>
- Returns the custom data value for custom data layer with index [code]layer_id[/code].
+ Returns the custom data value for custom data layer with index [param layer_id].
</description>
</method>
<method name="get_navigation_polygon" qualifiers="const">
<return type="NavigationPolygon" />
<param index="0" name="layer_id" type="int" />
<description>
- Returns the navigation polygon of the tile for the TileSet navigation layer with index [code]layer_id[/code].
+ Returns the navigation polygon of the tile for the TileSet navigation layer with index [param layer_id].
</description>
</method>
<method name="get_occluder" qualifiers="const">
<return type="OccluderPolygon2D" />
<param index="0" name="layer_id" type="int" />
<description>
- Returns the occluder polygon of the tile for the TileSet occlusion layer with index [code]layer_id[/code].
+ Returns the occluder polygon of the tile for the TileSet occlusion layer with index [param layer_id].
</description>
</method>
<method name="get_terrain_peering_bit" qualifiers="const">
<return type="int" />
<param index="0" name="peering_bit" type="int" enum="TileSet.CellNeighbor" />
<description>
- Returns the tile's terrain bit for the given [code]peering_bit[/code] direction.
+ Returns the tile's terrain bit for the given [param peering_bit] direction.
</description>
</method>
<method name="is_collision_polygon_one_way" qualifiers="const">
@@ -91,7 +91,7 @@
<param index="0" name="layer_id" type="int" />
<param index="1" name="polygon_index" type="int" />
<description>
- Returns whether one-way collisions are enabled for the polygon at index [code]polygon_index[/code] for TileSet physics layer with index [code]layer_id[/code].
+ Returns whether one-way collisions are enabled for the polygon at index [param polygon_index] for TileSet physics layer with index [param layer_id].
</description>
</method>
<method name="remove_collision_polygon">
@@ -99,7 +99,7 @@
<param index="0" name="layer_id" type="int" />
<param index="1" name="polygon_index" type="int" />
<description>
- Removes the polygon at index [code]polygon_index[/code] for TileSet physics layer with index [code]layer_id[/code].
+ Removes the polygon at index [param polygon_index] for TileSet physics layer with index [param layer_id].
</description>
</method>
<method name="set_collision_polygon_one_way">
@@ -108,7 +108,7 @@
<param index="1" name="polygon_index" type="int" />
<param index="2" name="one_way" type="bool" />
<description>
- Enables/disables one-way collisions on the polygon at index [code]polygon_index[/code] for TileSet physics layer with index [code]layer_id[/code].
+ Enables/disables one-way collisions on the polygon at index [param polygon_index] for TileSet physics layer with index [param layer_id].
</description>
</method>
<method name="set_collision_polygon_one_way_margin">
@@ -117,7 +117,7 @@
<param index="1" name="polygon_index" type="int" />
<param index="2" name="one_way_margin" type="float" />
<description>
- Enables/disables one-way collisions on the polygon at index [code]polygon_index[/code] for TileSet physics layer with index [code]layer_id[/code].
+ Enables/disables one-way collisions on the polygon at index [param polygon_index] for TileSet physics layer with index [param layer_id].
</description>
</method>
<method name="set_collision_polygon_points">
@@ -126,7 +126,7 @@
<param index="1" name="polygon_index" type="int" />
<param index="2" name="polygon" type="PackedVector2Array" />
<description>
- Sets the points of the polygon at index [code]polygon_index[/code] for TileSet physics layer with index [code]layer_id[/code].
+ Sets the points of the polygon at index [param polygon_index] for TileSet physics layer with index [param layer_id].
</description>
</method>
<method name="set_collision_polygons_count">
@@ -134,7 +134,7 @@
<param index="0" name="layer_id" type="int" />
<param index="1" name="polygons_count" type="int" />
<description>
- Sets the polygons count for TileSet physics layer with index [code]layer_id[/code].
+ Sets the polygons count for TileSet physics layer with index [param layer_id].
</description>
</method>
<method name="set_constant_angular_velocity">
@@ -158,7 +158,7 @@
<param index="0" name="layer_name" type="String" />
<param index="1" name="value" type="Variant" />
<description>
- Sets the tile's custom data value for the TileSet custom data layer with name [code]layer_name[/code].
+ Sets the tile's custom data value for the TileSet custom data layer with name [param layer_name].
</description>
</method>
<method name="set_custom_data_by_layer_id">
@@ -166,7 +166,7 @@
<param index="0" name="layer_id" type="int" />
<param index="1" name="value" type="Variant" />
<description>
- Sets the tile's custom data value for the TileSet custom data layer with index [code]layer_id[/code].
+ Sets the tile's custom data value for the TileSet custom data layer with index [param layer_id].
</description>
</method>
<method name="set_navigation_polygon">
@@ -174,7 +174,7 @@
<param index="0" name="layer_id" type="int" />
<param index="1" name="navigation_polygon" type="NavigationPolygon" />
<description>
- Sets the navigation polygon for the TileSet navigation layer with index [code]layer_id[/code].
+ Sets the navigation polygon for the TileSet navigation layer with index [param layer_id].
</description>
</method>
<method name="set_occluder">
@@ -182,7 +182,7 @@
<param index="0" name="layer_id" type="int" />
<param index="1" name="occluder_polygon" type="OccluderPolygon2D" />
<description>
- Sets the occluder for the TileSet occlusion layer with index [code]layer_id[/code].
+ Sets the occluder for the TileSet occlusion layer with index [param layer_id].
</description>
</method>
<method name="set_terrain_peering_bit">
@@ -190,7 +190,7 @@
<param index="0" name="peering_bit" type="int" enum="TileSet.CellNeighbor" />
<param index="1" name="terrain" type="int" />
<description>
- Sets the tile's terrain bit for the given [code]peering_bit[/code] direction.
+ Sets the tile's terrain bit for the given [param peering_bit] direction.
</description>
</method>
</methods>
diff --git a/doc/classes/TileMap.xml b/doc/classes/TileMap.xml
index d13276ad54..01246f0c2e 100644
--- a/doc/classes/TileMap.xml
+++ b/doc/classes/TileMap.xml
@@ -23,9 +23,9 @@
<param index="2" name="tile_data" type="TileData" />
<description>
Called with a TileData object about to be used internally by the TileMap, allowing its modification at runtime.
- This method is only called if [method _use_tile_data_runtime_update] is implemented and returns [code]true[/code] for the given tile [code]coords[/coords] and [code]layer[/code].
- [b]Warning:[/b] The [code]tile_data[/code] object's sub-resources are the same as the one in the TileSet. Modifying them might impact the whole TileSet. Instead, make sure to duplicate those resources.
- [b]Note:[/b] If the properties of [code]tile_data[/code] object should change over time, use [method force_update] to trigger a TileMap update.
+ This method is only called if [method _use_tile_data_runtime_update] is implemented and returns [code]true[/code] for the given tile [param coords] and [param layer].
+ [b]Warning:[/b] The [param tile_data] object's sub-resources are the same as the one in the TileSet. Modifying them might impact the whole TileSet. Instead, make sure to duplicate those resources.
+ [b]Note:[/b] If the properties of [param tile_data] object should change over time, use [method force_update] to trigger a TileMap update.
</description>
</method>
<method name="_use_tile_data_runtime_update" qualifiers="virtual">
@@ -33,7 +33,7 @@
<param index="0" name="layer" type="int" />
<param index="1" name="coords" type="Vector2i" />
<description>
- Should return [code]true[/code] if the tile at coordinates [code]coords[/coords] on layer [code]layer[/code] requires a runtime update.
+ Should return [code]true[/code] if the tile at coordinates [param coords] on layer [param layer] requires a runtime update.
[b]Warning:[/b] Make sure this function only return [code]true[/code] when needed. Any tile processed at runtime without a need for it will imply a significant performance penalty.
</description>
</method>
@@ -41,7 +41,7 @@
<return type="void" />
<param index="0" name="to_position" type="int" />
<description>
- Adds a layer at the given position [code]to_position[/code] in the array. If [code]to_position[/code] is -1, adds it at the end of the array.
+ Adds a layer at the given position [param to_position] in the array. If [param to_position] is negative, the position is counted from the end, with [code]-1[/code] adding the layer at the end of the array.
</description>
</method>
<method name="clear">
@@ -62,7 +62,7 @@
<param index="0" name="layer" type="int" />
<param index="1" name="coords" type="Vector2i" />
<description>
- Erases the cell on layer [code]layer[/code] at coordinates [code]coords[/code].
+ Erases the cell on layer [param layer] at coordinates [param coords].
</description>
</method>
<method name="fix_invalid_tiles">
@@ -75,36 +75,46 @@
<return type="void" />
<param index="0" name="layer" type="int" default="-1" />
<description>
- Triggers an update of the TileMap. If [code]layer[/code] is provided, only updates the given layer.
+ Triggers an update of the TileMap. If [param layer] is provided, only updates the given layer.
[b]Note:[/b] The TileMap node updates automatically when one of its properties is modified. A manual update is only needed if runtime modifications (implemented in [method _tile_data_runtime_update]) need to be applied.
- [b]Warning:[/b] Updating the TileMap is a performance demanding task. Limit occurrences of those updates to the minimum and limit the amount tiles they impact (by segregating tiles updated often to a dedicated layer for example).
+ [b]Warning:[/b] Updating the TileMap is computationally expensive and may impact performance. Try to limit the number of updates and the tiles they impact (by placing frequently updated tiles in a dedicated layer for example).
</description>
</method>
<method name="get_cell_alternative_tile" qualifiers="const">
<return type="int" />
<param index="0" name="layer" type="int" />
<param index="1" name="coords" type="Vector2i" />
- <param index="2" name="use_proxies" type="bool" />
+ <param index="2" name="use_proxies" type="bool" default="false" />
<description>
- Returns the tile alternative ID of the cell on layer [code]layer[/code] at [code]coords[/code]. If [code]use_proxies[/code] is [code]false[/code], ignores the [TileSet]'s tile proxies, returning the raw alternative identifier. See [method TileSet.map_tile_proxy].
+ Returns the tile alternative ID of the cell on layer [param layer] at [param coords]. If [param use_proxies] is [code]false[/code], ignores the [TileSet]'s tile proxies, returning the raw alternative identifier. See [method TileSet.map_tile_proxy].
</description>
</method>
<method name="get_cell_atlas_coords" qualifiers="const">
<return type="Vector2i" />
<param index="0" name="layer" type="int" />
<param index="1" name="coords" type="Vector2i" />
- <param index="2" name="use_proxies" type="bool" />
+ <param index="2" name="use_proxies" type="bool" default="false" />
<description>
- Returns the tile atlas coordinates ID of the cell on layer [code]layer[/code] at coordinates [code]coords[/code]. If [code]use_proxies[/code] is [code]false[/code], ignores the [TileSet]'s tile proxies, returning the raw alternative identifier. See [method TileSet.map_tile_proxy].
+ Returns the tile atlas coordinates ID of the cell on layer [param layer] at coordinates [param coords]. If [param use_proxies] is [code]false[/code], ignores the [TileSet]'s tile proxies, returning the raw alternative identifier. See [method TileSet.map_tile_proxy].
</description>
</method>
<method name="get_cell_source_id" qualifiers="const">
<return type="int" />
<param index="0" name="layer" type="int" />
<param index="1" name="coords" type="Vector2i" />
- <param index="2" name="use_proxies" type="bool" />
+ <param index="2" name="use_proxies" type="bool" default="false" />
<description>
- Returns the tile source ID of the cell on layer [code]layer[/code] at coordinates [code]coords[/code]. If [code]use_proxies[/code] is [code]false[/code], ignores the [TileSet]'s tile proxies, returning the raw alternative identifier. See [method TileSet.map_tile_proxy].
+ Returns the tile source ID of the cell on layer [param layer] at coordinates [param coords]. If [param use_proxies] is [code]false[/code], ignores the [TileSet]'s tile proxies, returning the raw alternative identifier. See [method TileSet.map_tile_proxy].
+ </description>
+ </method>
+ <method name="get_cell_tile_data" qualifiers="const">
+ <return type="TileData" />
+ <param index="0" name="layer" type="int" />
+ <param index="1" name="coords" type="Vector2i" />
+ <param index="2" name="use_proxies" type="bool" default="false" />
+ <description>
+ Returns the [TileData] object associated with the given cell, or [code]null[/code] if the cell is not a [TileSetAtlasSource].
+ If [param use_proxies] is [code]false[/code], ignores the [TileSet]'s tile proxies, returning the raw alternative identifier. See [method TileSet.map_tile_proxy].
</description>
</method>
<method name="get_coords_for_body_rid">
@@ -145,6 +155,7 @@
<method name="get_layers_count" qualifiers="const">
<return type="int" />
<description>
+ Returns the number of layers in the TileMap.
</description>
</method>
<method name="get_neighbor_cell" qualifiers="const">
@@ -152,7 +163,7 @@
<param index="0" name="coords" type="Vector2i" />
<param index="1" name="neighbor" type="int" enum="TileSet.CellNeighbor" />
<description>
- Returns the neighboring cell to the one at coordinates [code]coords[/code], identified by the [code]neighbor[/code] direction. This method takes into account the different layouts a TileMap can take.
+ Returns the neighboring cell to the one at coordinates [param coords], identified by the [param neighbor] direction. This method takes into account the different layouts a TileMap can take.
</description>
</method>
<method name="get_pattern">
@@ -167,7 +178,7 @@
<return type="Vector2i[]" />
<param index="0" name="coords" type="Vector2i" />
<description>
- Returns the list of all neighbourings cells to the one at [code]coords[/code]
+ Returns the list of all neighbourings cells to the one at [param coords]
</description>
</method>
<method name="get_used_cells" qualifiers="const">
@@ -178,7 +189,7 @@
</description>
</method>
<method name="get_used_rect">
- <return type="Rect2" />
+ <return type="Rect2i" />
<description>
Returns a rectangle enclosing the used (non-empty) tiles of the map, including all layers.
</description>
@@ -197,21 +208,28 @@
Returns if a layer Y-sorts its tiles.
</description>
</method>
+ <method name="local_to_map" qualifiers="const">
+ <return type="Vector2i" />
+ <param index="0" name="local_position" type="Vector2" />
+ <description>
+ Returns the map coordinates of the cell containing the given [param local_position]. If [param local_position] is in global coordinates, consider using [method Node2D.to_local] before passing it to this method. See also [method map_to_local].
+ </description>
+ </method>
<method name="map_pattern">
<return type="Vector2i" />
<param index="0" name="position_in_tilemap" type="Vector2i" />
<param index="1" name="coords_in_pattern" type="Vector2i" />
<param index="2" name="pattern" type="TileMapPattern" />
<description>
- Returns for the given coordinate [code]coords_in_pattern[/code] in a [TileMapPattern] the corresponding cell coordinates if the pattern was pasted at the [code]position_in_tilemap[/code] coordinates (see [method set_pattern]). This mapping is required as in half-offset tile shapes, the mapping might not work by calculating [code]position_in_tile_map + coords_in_pattern[/code]
+ Returns for the given coordinate [param coords_in_pattern] in a [TileMapPattern] the corresponding cell coordinates if the pattern was pasted at the [param position_in_tilemap] coordinates (see [method set_pattern]). This mapping is required as in half-offset tile shapes, the mapping might not work by calculating [code]position_in_tile_map + coords_in_pattern[/code]
</description>
</method>
- <method name="map_to_world" qualifiers="const">
+ <method name="map_to_local" qualifiers="const">
<return type="Vector2" />
<param index="0" name="map_position" type="Vector2i" />
<description>
- Returns a local position of the center of the cell at the given tilemap (grid-based) coordinates.
- [b]Note:[/b] This doesn't correspond to the visual position of the tile, i.e. it ignores the [member TileData.texture_offset] property of individual tiles.
+ Returns the centered position of a cell in the TileMap's local coordinate space. To convert the returned value into global coordinates, use [method Node2D.to_global]. See also [method local_to_map].
+ [b]Note:[/b] This may not correspond to the visual position of the tile, i.e. it ignores the [member TileData.texture_offset] property of individual tiles.
</description>
</method>
<method name="move_layer">
@@ -219,14 +237,14 @@
<param index="0" name="layer" type="int" />
<param index="1" name="to_position" type="int" />
<description>
- Moves the layer at index [code]layer_index[/code] to the given position [code]to_position[/code] in the array.
+ Moves the layer at index [param layer] to the given position [param to_position] in the array.
</description>
</method>
<method name="remove_layer">
<return type="void" />
<param index="0" name="layer" type="int" />
<description>
- Removes the layer at index [code]layer[/code].
+ Removes the layer at index [param layer].
</description>
</method>
<method name="set_cell">
@@ -237,10 +255,10 @@
<param index="3" name="atlas_coords" type="Vector2i" default="Vector2i(-1, -1)" />
<param index="4" name="alternative_tile" type="int" default="0" />
<description>
- Sets the tile indentifiers for the cell on layer [code]layer[/code] at coordinates [code]coords[/code]. Each tile of the [TileSet] is identified using three parts:
- - The source identifier [code]source_id[/code] identifies a [TileSetSource] identifier. See [method TileSet.set_source_id],
- - The atlas coordinates identifier [code]atlas_coords[/code] identifies a tile coordinates in the atlas (if the source is a [TileSetAtlasSource]. For [TileSetScenesCollectionSource] it should be 0),
- - The alternative tile identifier [code]alternative_tile[/code] identifies a tile alternative the source is a [TileSetAtlasSource], and the scene for a [TileSetScenesCollectionSource].
+ Sets the tile indentifiers for the cell on layer [param layer] at coordinates [param coords]. Each tile of the [TileSet] is identified using three parts:
+ - The source identifier [param source_id] identifies a [TileSetSource] identifier. See [method TileSet.set_source_id],
+ - The atlas coordinates identifier [param atlas_coords] identifies a tile coordinates in the atlas (if the source is a [TileSetAtlasSource]. For [TileSetScenesCollectionSource] it should be 0),
+ - The alternative tile identifier [param alternative_tile] identifies a tile alternative the source is a [TileSetAtlasSource], and the scene for a [TileSetScenesCollectionSource].
</description>
</method>
<method name="set_cells_terrain_connect">
@@ -251,8 +269,8 @@
<param index="3" name="terrain" type="int" />
<param index="4" name="ignore_empty_terrains" type="bool" default="true" />
<description>
- Update all the cells in the [code]cells[/code] coordinates array so that they use the given [code]terrain[/code] for the given [code]terrain_set[/code]. If an updated cell has the same terrain as one of its neighboring cells, this function tries to join the two. This function might update neighboring tiles if needed to create correct terrain transitions. If [code]ignore_empty_terrains[/code] is true, empty terrains will be ignored when trying to find the best fitting tile for the given terrain constraints.
- If [code]ignore_empty_terrains[/code] is true, empty terrains will be ignored when trying to find the best fitting tile for the given terrain constraints.
+ Update all the cells in the [param cells] coordinates array so that they use the given [param terrain] for the given [param terrain_set]. If an updated cell has the same terrain as one of its neighboring cells, this function tries to join the two. This function might update neighboring tiles if needed to create correct terrain transitions.
+ If [param ignore_empty_terrains] is true, empty terrains will be ignored when trying to find the best fitting tile for the given terrain constraints.
[b]Note:[/b] To work correctly, [code]set_cells_terrain_connect[/code] requires the TileMap's TileSet to have terrains set up with all required terrain combinations. Otherwise, it may produce unexpected results.
</description>
</method>
@@ -264,8 +282,8 @@
<param index="3" name="terrain" type="int" />
<param index="4" name="ignore_empty_terrains" type="bool" default="true" />
<description>
- Update all the cells in the [code]cells[/code] coordinates array so that they use the given [code]terrain[/code] for the given [code]terrain_set[/code]. The function will also connect two successive cell in the path with the same terrain. This function might update neighboring tiles if needed to create correct terrain transitions.
- If [code]ignore_empty_terrains[/code] is true, empty terrains will be ignored when trying to find the best fitting tile for the given terrain constraints.
+ Update all the cells in the [param path] coordinates array so that they use the given [param terrain] for the given [param terrain_set]. The function will also connect two successive cell in the path with the same terrain. This function might update neighboring tiles if needed to create correct terrain transitions.
+ If [param ignore_empty_terrains] is true, empty terrains will be ignored when trying to find the best fitting tile for the given terrain constraints.
[b]Note:[/b] To work correctly, [code]set_cells_terrain_path[/code] requires the TileMap's TileSet to have terrains set up with all required terrain combinations. Otherwise, it may produce unexpected results.
</description>
</method>
@@ -274,15 +292,17 @@
<param index="0" name="layer" type="int" />
<param index="1" name="enabled" type="bool" />
<description>
- Enables or disables the layer [code]layer[/code]. A disabled layer is not processed at all (no rendering, no physics, etc...).
+ Enables or disables the layer [param layer]. A disabled layer is not processed at all (no rendering, no physics, etc...).
+ If [param layer] is negative, the layers are accessed from the last one.
</description>
</method>
<method name="set_layer_modulate">
<return type="void" />
<param index="0" name="layer" type="int" />
- <param index="1" name="enabled" type="Color" />
+ <param index="1" name="modulate" type="Color" />
<description>
Sets a layer's color. It will be multiplied by tile's color and TileMap's modulate.
+ If [code]layer[/code] is negative, the layers are accessed from the last one.
</description>
</method>
<method name="set_layer_name">
@@ -291,6 +311,7 @@
<param index="1" name="name" type="String" />
<description>
Sets a layer's name. This is mostly useful in the editor.
+ If [code]layer[/code] is negative, the layers are accessed from the last one.
</description>
</method>
<method name="set_layer_y_sort_enabled">
@@ -300,6 +321,7 @@
<description>
Enables or disables a layer's Y-sorting. If a layer is Y-sorted, the layer will behave as a CanvasItem node where each of its tile gets Y-sorted.
Y-sorted layers should usually be on different Z-index values than not Y-sorted layers, otherwise, each of those layer will be Y-sorted as whole with the Y-sorted one. This is usually an undesired behvaior.
+ If [code]layer[/code] is negative, the layers are accessed from the last one.
</description>
</method>
<method name="set_layer_y_sort_origin">
@@ -309,6 +331,7 @@
<description>
Sets a layer's Y-sort origin value. This Y-sort origin value is added to each tile's Y-sort origin value.
This allows, for example, to fake a different height level on each layer. This can be useful for top-down view games.
+ If [code]layer[/code] is negative, the layers are accessed from the last one.
</description>
</method>
<method name="set_layer_z_index">
@@ -317,6 +340,7 @@
<param index="1" name="z_index" type="int" />
<description>
Sets a layers Z-index value. This Z-index is added to each tile's Z-index value.
+ If [code]layer[/code] is negative, the layers are accessed from the last one.
</description>
</method>
<method name="set_pattern">
@@ -325,14 +349,7 @@
<param index="1" name="position" type="Vector2i" />
<param index="2" name="pattern" type="TileMapPattern" />
<description>
- Paste the given [TileMapPattern] at the given [code]position[/code] and [code]layer[/code] in the tile map.
- </description>
- </method>
- <method name="world_to_map" qualifiers="const">
- <return type="Vector2i" />
- <param index="0" name="world_position" type="Vector2" />
- <description>
- Returns the tilemap (grid-based) coordinates corresponding to the given local position.
+ Paste the given [TileMapPattern] at the given [param position] and [param layer] in the tile map.
</description>
</method>
</methods>
@@ -348,7 +365,7 @@
Show or hide the TileMap's collision shapes. If set to [constant VISIBILITY_MODE_DEFAULT], this depends on the show collision debug settings.
</member>
<member name="navigation_visibility_mode" type="int" setter="set_navigation_visibility_mode" getter="get_navigation_visibility_mode" enum="TileMap.VisibilityMode" default="0">
- Show or hide the TileMap's collision shapes. If set to [constant VISIBILITY_MODE_DEFAULT], this depends on the show navigation debug settings.
+ Show or hide the TileMap's navigation meshes. If set to [constant VISIBILITY_MODE_DEFAULT], this depends on the show navigation debug settings.
</member>
<member name="tile_set" type="TileSet" setter="set_tileset" getter="get_tileset">
The assigned [TileSet].
diff --git a/doc/classes/TileMapPattern.xml b/doc/classes/TileMapPattern.xml
index a499b31503..30bb174313 100644
--- a/doc/classes/TileMapPattern.xml
+++ b/doc/classes/TileMapPattern.xml
@@ -14,21 +14,21 @@
<return type="int" />
<param index="0" name="coords" type="Vector2i" />
<description>
- Returns the tile alternative ID of the cell at [code]coords[/code].
+ Returns the tile alternative ID of the cell at [param coords].
</description>
</method>
<method name="get_cell_atlas_coords" qualifiers="const">
<return type="Vector2i" />
<param index="0" name="coords" type="Vector2i" />
<description>
- Returns the tile atlas coordinates ID of the cell at [code]coords[/code].
+ Returns the tile atlas coordinates ID of the cell at [param coords].
</description>
</method>
<method name="get_cell_source_id" qualifiers="const">
<return type="int" />
<param index="0" name="coords" type="Vector2i" />
<description>
- Returns the tile source ID of the cell at [code]coords[/code].
+ Returns the tile source ID of the cell at [param coords].
</description>
</method>
<method name="get_size" qualifiers="const">
@@ -71,7 +71,7 @@
<param index="2" name="atlas_coords" type="Vector2i" default="Vector2i(-1, -1)" />
<param index="3" name="alternative_tile" type="int" default="-1" />
<description>
- Sets the tile indentifiers for the cell at coordinates [code]coords[/code]. See [method TileMap.set_cell].
+ Sets the tile indentifiers for the cell at coordinates [param coords]. See [method TileMap.set_cell].
</description>
</method>
<method name="set_size">
diff --git a/doc/classes/TileSet.xml b/doc/classes/TileSet.xml
index 5e2b4b64fb..5a24483774 100644
--- a/doc/classes/TileSet.xml
+++ b/doc/classes/TileSet.xml
@@ -7,7 +7,6 @@
A TileSet is a library of tiles for a [TileMap]. A TileSet handles a list of [TileSetSource], each of them storing a set of tiles.
Tiles can either be from a [TileSetAtlasSource], that render tiles out of a texture with support for physics, navigation, etc... or from a [TileSetScenesCollectionSource] which exposes scene-based tiles.
Tiles are referenced by using three IDs: their source ID, their atlas coordinates ID and their alternative tile ID.
-
A TileSet can be configured so that its tiles expose more or less properties. To do so, the TileSet resources uses property layers, that you can add or remove depending on your needs.
For example, adding a physics layer allows giving collision shapes to your tiles. Each layer having dedicated properties (physics layer an mask), you may add several TileSet physics layers for each type of collision you need.
See the functions to add new layers for more information.
@@ -26,7 +25,7 @@
<return type="void" />
<param index="0" name="to_position" type="int" default="-1" />
<description>
- Adds a custom data layer to the TileSet at the given position [code]to_position[/code] in the array. If [code]to_position[/code] is -1, adds it at the end of the array.
+ Adds a custom data layer to the TileSet at the given position [param to_position] in the array. If [param to_position] is -1, adds it at the end of the array.
Custom data layers allow assigning custom properties to atlas tiles.
</description>
</method>
@@ -34,7 +33,7 @@
<return type="void" />
<param index="0" name="to_position" type="int" default="-1" />
<description>
- Adds a navigation layer to the TileSet at the given position [code]to_position[/code] in the array. If [code]to_position[/code] is -1, adds it at the end of the array.
+ Adds a navigation layer to the TileSet at the given position [param to_position] in the array. If [param to_position] is -1, adds it at the end of the array.
Navigation layers allow assigning a navigable area to atlas tiles.
</description>
</method>
@@ -42,7 +41,7 @@
<return type="void" />
<param index="0" name="to_position" type="int" default="-1" />
<description>
- Adds an occlusion layer to the TileSet at the given position [code]to_position[/code] in the array. If [code]to_position[/code] is -1, adds it at the end of the array.
+ Adds an occlusion layer to the TileSet at the given position [param to_position] in the array. If [param to_position] is -1, adds it at the end of the array.
Occlusion layers allow assigning occlusion polygons to atlas tiles.
</description>
</method>
@@ -51,14 +50,14 @@
<param index="0" name="pattern" type="TileMapPattern" />
<param index="1" name="index" type="int" default="-1" />
<description>
- Adds a [TileMapPattern] to be stored in the TileSet resource. If provided, insert it at the given [code]index[/code].
+ Adds a [TileMapPattern] to be stored in the TileSet resource. If provided, insert it at the given [param index].
</description>
</method>
<method name="add_physics_layer">
<return type="void" />
<param index="0" name="to_position" type="int" default="-1" />
<description>
- Adds a physics layer to the TileSet at the given position [code]to_position[/code] in the array. If [code]to_position[/code] is -1, adds it at the end of the array.
+ Adds a physics layer to the TileSet at the given position [param to_position] in the array. If [param to_position] is -1, adds it at the end of the array.
Physics layers allow assigning collision polygons to atlas tiles.
</description>
</method>
@@ -67,7 +66,7 @@
<param index="0" name="source" type="TileSetSource" />
<param index="1" name="atlas_source_id_override" type="int" default="-1" />
<description>
- Adds a [TileSetSource] to the TileSet. If [code]atlas_source_id_override[/code] is not -1, also set its source ID. Otherwise, a unique identifier is automatically generated.
+ Adds a [TileSetSource] to the TileSet. If [param atlas_source_id_override] is not -1, also set its source ID. Otherwise, a unique identifier is automatically generated.
The function returns the added source source ID or -1 if the source could not be added.
</description>
</method>
@@ -76,14 +75,14 @@
<param index="0" name="terrain_set" type="int" />
<param index="1" name="to_position" type="int" default="-1" />
<description>
- Adds a new terrain to the given terrain set [code]terrain_set[/code] at the given position [code]to_position[/code] in the array. If [code]to_position[/code] is -1, adds it at the end of the array.
+ Adds a new terrain to the given terrain set [param terrain_set] at the given position [param to_position] in the array. If [param to_position] is -1, adds it at the end of the array.
</description>
</method>
<method name="add_terrain_set">
<return type="void" />
<param index="0" name="to_position" type="int" default="-1" />
<description>
- Adds a new terrain set at the given position [code]to_position[/code] in the array. If [code]to_position[/code] is -1, adds it at the end of the array.
+ Adds a new terrain set at the given position [param to_position] in the array. If [param to_position] is -1, adds it at the end of the array.
</description>
</method>
<method name="cleanup_invalid_tile_proxies">
@@ -187,7 +186,7 @@
<return type="TileMapPattern" />
<param index="0" name="index" type="int" default="-1" />
<description>
- Returns the [TileMapPattern] at the given [code]index[/code].
+ Returns the [TileMapPattern] at the given [param index].
</description>
</method>
<method name="get_patterns_count">
@@ -227,7 +226,7 @@
<return type="TileSetSource" />
<param index="0" name="source_id" type="int" />
<description>
- Returns the [TileSetSource] with ID [code]source_id[/code].
+ Returns the [TileSetSource] with ID [param source_id].
</description>
</method>
<method name="get_source_count" qualifiers="const">
@@ -240,7 +239,7 @@
<return type="int" />
<param index="0" name="index" type="int" />
<description>
- Returns the source ID for source with index [code]index[/code].
+ Returns the source ID for source with index [param index].
</description>
</method>
<method name="get_source_level_tile_proxy">
@@ -334,7 +333,7 @@
<param index="0" name="layer_index" type="int" />
<param index="1" name="to_position" type="int" />
<description>
- Moves the custom data layer at index [code]layer_index[/code] to the given position [code]to_position[/code] in the array. Also updates the atlas tiles accordingly.
+ Moves the custom data layer at index [param layer_index] to the given position [param to_position] in the array. Also updates the atlas tiles accordingly.
</description>
</method>
<method name="move_navigation_layer">
@@ -342,7 +341,7 @@
<param index="0" name="layer_index" type="int" />
<param index="1" name="to_position" type="int" />
<description>
- Moves the navigation layer at index [code]layer_index[/code] to the given position [code]to_position[/code] in the array. Also updates the atlas tiles accordingly.
+ Moves the navigation layer at index [param layer_index] to the given position [param to_position] in the array. Also updates the atlas tiles accordingly.
</description>
</method>
<method name="move_occlusion_layer">
@@ -350,7 +349,7 @@
<param index="0" name="layer_index" type="int" />
<param index="1" name="to_position" type="int" />
<description>
- Moves the occlusion layer at index [code]layer_index[/code] to the given position [code]to_position[/code] in the array. Also updates the atlas tiles accordingly.
+ Moves the occlusion layer at index [param layer_index] to the given position [param to_position] in the array. Also updates the atlas tiles accordingly.
</description>
</method>
<method name="move_physics_layer">
@@ -358,7 +357,7 @@
<param index="0" name="layer_index" type="int" />
<param index="1" name="to_position" type="int" />
<description>
- Moves the physics layer at index [code]layer_index[/code] to the given position [code]to_position[/code] in the array. Also updates the atlas tiles accordingly.
+ Moves the physics layer at index [param layer_index] to the given position [param to_position] in the array. Also updates the atlas tiles accordingly.
</description>
</method>
<method name="move_terrain">
@@ -367,7 +366,7 @@
<param index="1" name="terrain_index" type="int" />
<param index="2" name="to_position" type="int" />
<description>
- Moves the terrain at index [code]terrain_index[/code] for terrain set [code]terrain_set[/code] to the given position [code]to_position[/code] in the array. Also updates the atlas tiles accordingly.
+ Moves the terrain at index [param terrain_index] for terrain set [param terrain_set] to the given position [param to_position] in the array. Also updates the atlas tiles accordingly.
</description>
</method>
<method name="move_terrain_set">
@@ -375,7 +374,7 @@
<param index="0" name="terrain_set" type="int" />
<param index="1" name="to_position" type="int" />
<description>
- Moves the terrain set at index [code]terrain_set[/code] to the given position [code]to_position[/code] in the array. Also updates the atlas tiles accordingly.
+ Moves the terrain set at index [param terrain_set] to the given position [param to_position] in the array. Also updates the atlas tiles accordingly.
</description>
</method>
<method name="remove_alternative_level_tile_proxy">
@@ -399,21 +398,21 @@
<return type="void" />
<param index="0" name="layer_index" type="int" />
<description>
- Removes the custom data layer at index [code]layer_index[/code]. Also updates the atlas tiles accordingly.
+ Removes the custom data layer at index [param layer_index]. Also updates the atlas tiles accordingly.
</description>
</method>
<method name="remove_navigation_layer">
<return type="void" />
<param index="0" name="layer_index" type="int" />
<description>
- Removes the navigation layer at index [code]layer_index[/code]. Also updates the atlas tiles accordingly.
+ Removes the navigation layer at index [param layer_index]. Also updates the atlas tiles accordingly.
</description>
</method>
<method name="remove_occlusion_layer">
<return type="void" />
<param index="0" name="layer_index" type="int" />
<description>
- Removes the occlusion layer at index [code]layer_index[/code]. Also updates the atlas tiles accordingly.
+ Removes the occlusion layer at index [param layer_index]. Also updates the atlas tiles accordingly.
</description>
</method>
<method name="remove_pattern">
@@ -427,7 +426,7 @@
<return type="void" />
<param index="0" name="layer_index" type="int" />
<description>
- Removes the physics layer at index [code]layer_index[/code]. Also updates the atlas tiles accordingly.
+ Removes the physics layer at index [param layer_index]. Also updates the atlas tiles accordingly.
</description>
</method>
<method name="remove_source">
@@ -449,14 +448,14 @@
<param index="0" name="terrain_set" type="int" />
<param index="1" name="terrain_index" type="int" />
<description>
- Removes the terrain at index [code]terrain_index[/code] in the given terrain set [code]terrain_set[/code]. Also updates the atlas tiles accordingly.
+ Removes the terrain at index [param terrain_index] in the given terrain set [param terrain_set]. Also updates the atlas tiles accordingly.
</description>
</method>
<method name="remove_terrain_set">
<return type="void" />
<param index="0" name="terrain_set" type="int" />
<description>
- Removes the terrain set at index [code]terrain_set[/code]. Also updates the atlas tiles accordingly.
+ Removes the terrain set at index [param terrain_set]. Also updates the atlas tiles accordingly.
</description>
</method>
<method name="set_alternative_level_tile_proxy">
diff --git a/doc/classes/TileSetAtlasSource.xml b/doc/classes/TileSetAtlasSource.xml
index 9053a81628..5efc1da6f9 100644
--- a/doc/classes/TileSetAtlasSource.xml
+++ b/doc/classes/TileSetAtlasSource.xml
@@ -6,9 +6,7 @@
<description>
An atlas is a grid of tiles laid out on a texture. Each tile in the grid must be exposed using [method create_tile]. Those tiles are then indexed using their coordinates in the grid.
Each tile can also have a size in the grid coordinates, making it more or less cells in the atlas.
-
Alternatives version of a tile can be created using [method create_alternative_tile], which are then indexed using an alternative ID. The main tile (the one in the grid), is accessed with an alternative ID equal to 0.
-
Each tile alternate has a set of properties that is defined by the source's [TileSet] layers. Those properties are stored in a TileData object that can be accessed and modified using [method get_tile_data].
As TileData properties are stored directly in the TileSetAtlasSource resource, their properties might also be set using [code]TileSetAtlasSource.set("&lt;coords_x&gt;:&lt;coords_y&gt;/&lt;alternative_id&gt;/&lt;tile_data_property&gt;")[/code].
</description>
@@ -20,8 +18,8 @@
<param index="0" name="atlas_coords" type="Vector2i" />
<param index="1" name="alternative_id_override" type="int" default="-1" />
<description>
- Creates an alternative tile for the tile at coords [code]atlas_coords[/code]. If [code]alternative_id_override[/code] is -1, give it an automatically generated unique ID, or assigns it the given ID otherwise.
- Returns the new alternative identifier, or -1 if the alternative could not be created with a provided [code]alternative_id_override[/code].
+ Creates an alternative tile for the tile at coordinates [param atlas_coords]. If [param alternative_id_override] is -1, give it an automatically generated unique ID, or assigns it the given ID otherwise.
+ Returns the new alternative identifier, or -1 if the alternative could not be created with a provided [param alternative_id_override].
</description>
</method>
<method name="create_tile">
@@ -29,7 +27,7 @@
<param index="0" name="atlas_coords" type="Vector2i" />
<param index="1" name="size" type="Vector2i" default="Vector2i(1, 1)" />
<description>
- Creates a new tile at coords [code]atlas_coords[/code] with size [code]size[/code].
+ Creates a new tile at coordinates [param atlas_coords] with the given [param size].
</description>
</method>
<method name="get_atlas_grid_size" qualifiers="const">
@@ -56,7 +54,7 @@
<param index="0" name="atlas_coords" type="Vector2i" />
<param index="1" name="frame" type="int" />
<description>
- Returns the region of the tile at coordinates [code]atlas_coords[/code] for frame [code]frame[/code] inside the texture returned by [method get_runtime_texture].
+ Returns the region of the tile at coordinates [param atlas_coords] for the given [param frame] inside the texture returned by [method get_runtime_texture].
[b]Note:[/b] If [member use_texture_padding] is [code]false[/code], returns the same as [method get_tile_texture_region].
</description>
</method>
@@ -64,7 +62,7 @@
<return type="int" />
<param index="0" name="atlas_coords" type="Vector2i" />
<description>
- Returns how many columns the tile at [code]atlas_coords[/code] has in its animation layout.
+ Returns how many columns the tile at [param atlas_coords] has in its animation layout.
</description>
</method>
<method name="get_tile_animation_frame_duration" qualifiers="const">
@@ -72,42 +70,42 @@
<param index="0" name="atlas_coords" type="Vector2i" />
<param index="1" name="frame_index" type="int" />
<description>
- Returns the animation frame duration of frame [code]frame_index[/code] for the tile at coordinates [code]atlas_coords[/code].
+ Returns the animation frame duration of frame [param frame_index] for the tile at coordinates [param atlas_coords].
</description>
</method>
<method name="get_tile_animation_frames_count" qualifiers="const">
<return type="int" />
<param index="0" name="atlas_coords" type="Vector2i" />
<description>
- Returns how many animation frames has the tile at coordinates [code]atlas_coords[/code].
+ Returns how many animation frames has the tile at coordinates [param atlas_coords].
</description>
</method>
<method name="get_tile_animation_separation" qualifiers="const">
<return type="Vector2i" />
<param index="0" name="atlas_coords" type="Vector2i" />
<description>
- Returns the separation (as in the atlas grid) between each frame of an animated tile at coordinates [code]atlas_coords[/code].
+ Returns the separation (as in the atlas grid) between each frame of an animated tile at coordinates [param atlas_coords].
</description>
</method>
<method name="get_tile_animation_speed" qualifiers="const">
<return type="float" />
<param index="0" name="atlas_coords" type="Vector2i" />
<description>
- Returns the animation speed of the tile at coordinates [code]atlas_coords[/code].
+ Returns the animation speed of the tile at coordinates [param atlas_coords].
</description>
</method>
<method name="get_tile_animation_total_duration" qualifiers="const">
<return type="float" />
<param index="0" name="atlas_coords" type="Vector2i" />
<description>
- Returns the sum of the sum of the frame durations of the tile at coordinates [code]atlas_coords[/code]. This value needs to be divided by the animation speed to get the actual animation loop duration.
+ Returns the sum of the sum of the frame durations of the tile at coordinates [param atlas_coords]. This value needs to be divided by the animation speed to get the actual animation loop duration.
</description>
</method>
<method name="get_tile_at_coords" qualifiers="const">
<return type="Vector2i" />
<param index="0" name="atlas_coords" type="Vector2i" />
<description>
- If there is a tile covering the [code]atlas_coords[/code] coordinates, returns the top-left coordinates of the tile (thus its coordinate ID). Returns [code]Vector2i(-1, -1)[/code] otherwise.
+ If there is a tile covering the [param atlas_coords] coordinates, returns the top-left coordinates of the tile (thus its coordinate ID). Returns [code]Vector2i(-1, -1)[/code] otherwise.
</description>
</method>
<method name="get_tile_data" qualifiers="const">
@@ -122,7 +120,7 @@
<return type="Vector2i" />
<param index="0" name="atlas_coords" type="Vector2i" />
<description>
- Returns the size of the tile (in the grid coordinates system) at coordinates [code]atlas_coords[/code].
+ Returns the size of the tile (in the grid coordinates system) at coordinates [param atlas_coords].
</description>
</method>
<method name="get_tile_texture_region" qualifiers="const">
@@ -130,7 +128,7 @@
<param index="0" name="atlas_coords" type="Vector2i" />
<param index="1" name="frame" type="int" default="0" />
<description>
- Returns a tile's texture region in the atlas texture. For animated tiles, a [code]frame[/code] argument might be provided for the different frames of the animation.
+ Returns a tile's texture region in the atlas texture. For animated tiles, a [param frame] argument might be provided for the different frames of the animation.
</description>
</method>
<method name="get_tiles_to_be_removed_on_change">
@@ -140,7 +138,7 @@
<param index="2" name="separation" type="Vector2i" />
<param index="3" name="texture_region_size" type="Vector2i" />
<description>
- Returns an array of tiles coordinates ID that will be automatically removed when modifying one or several of those properties: [code]texture[/code], [code]margins[/code], [code]separation[/code] or [code]texture_region_size[/code]. This can be used to undo changes that would have caused tiles data loss.
+ Returns an array of tiles coordinates ID that will be automatically removed when modifying one or several of those properties: [param texture], [param margins], [param separation] or [param texture_region_size]. This can be used to undo changes that would have caused tiles data loss.
</description>
</method>
<method name="has_room_for_tile" qualifiers="const">
@@ -152,7 +150,7 @@
<param index="4" name="frames_count" type="int" />
<param index="5" name="ignored_tile" type="Vector2i" default="Vector2i(-1, -1)" />
<description>
- Returns whether there is enough room in an atlas to create/modify a tile with the given properties. If [code]ignored_tile[/code] is provided, act as is the given tile was not present in the atlas. This may be used when you want to modify a tile's properties.
+ Returns whether there is enough room in an atlas to create/modify a tile with the given properties. If [param ignored_tile] is provided, act as is the given tile was not present in the atlas. This may be used when you want to modify a tile's properties.
</description>
</method>
<method name="move_tile_in_atlas">
@@ -161,8 +159,8 @@
<param index="1" name="new_atlas_coords" type="Vector2i" default="Vector2i(-1, -1)" />
<param index="2" name="new_size" type="Vector2i" default="Vector2i(-1, -1)" />
<description>
- Move the tile and its alternatives at the [code]atlas_coords[/code] coordinates to the [code]new_atlas_coords[/code] coordinates with the [code]new_size[/code] size. This functions will fail if a tile is already present in the given area.
- If [code]new_atlas_coords[/code] is [code]Vector2i(-1, -1)[/code], keeps the tile's coordinates. If [code]new_size[/code] is [code]Vector2i(-1, -1)[/code], keeps the tile's size.
+ Move the tile and its alternatives at the [param atlas_coords] coordinates to the [param new_atlas_coords] coordinates with the [param new_size] size. This functions will fail if a tile is already present in the given area.
+ If [param new_atlas_coords] is [code]Vector2i(-1, -1)[/code], keeps the tile's coordinates. If [param new_size] is [code]Vector2i(-1, -1)[/code], keeps the tile's size.
To avoid an error, first check if a move is possible using [method has_room_for_tile].
</description>
</method>
@@ -171,15 +169,15 @@
<param index="0" name="atlas_coords" type="Vector2i" />
<param index="1" name="alternative_tile" type="int" />
<description>
- Remove a tile's alternative with alternative ID [code]alternative_tile[/code].
- Calling this function with [code]alternative_tile[/code] equals to 0 will fail, as the base tile alternative cannot be removed.
+ Remove a tile's alternative with alternative ID [param alternative_tile].
+ Calling this function with [param alternative_tile] equals to 0 will fail, as the base tile alternative cannot be removed.
</description>
</method>
<method name="remove_tile">
<return type="void" />
<param index="0" name="atlas_coords" type="Vector2i" />
<description>
- Remove a tile and its alternative at coordinates [code]atlas_coords[/code].
+ Remove a tile and its alternative at coordinates [param atlas_coords].
</description>
</method>
<method name="set_alternative_tile_id">
@@ -188,8 +186,8 @@
<param index="1" name="alternative_tile" type="int" />
<param index="2" name="new_id" type="int" />
<description>
- Change a tile's alternative ID from [code]alternative_tile[/code] to [code]new_id[/code].
- Calling this function with [code]alternative_id[/code] equals to 0 will fail, as the base tile alternative cannot be moved.
+ Change a tile's alternative ID from [param alternative_tile] to [param new_id].
+ Calling this function with [param new_id] of 0 will fail, as the base tile alternative cannot be moved.
</description>
</method>
<method name="set_tile_animation_columns">
@@ -197,7 +195,7 @@
<param index="0" name="atlas_coords" type="Vector2i" />
<param index="1" name="frame_columns" type="int" />
<description>
- Sets the number of columns in the animation layout of the tile at coordinates [code]atlas_coords[/code]. If set to 0, then the different frames of the animation are laid out as a single horizontal line in the atlas.
+ Sets the number of columns in the animation layout of the tile at coordinates [param atlas_coords]. If set to 0, then the different frames of the animation are laid out as a single horizontal line in the atlas.
</description>
</method>
<method name="set_tile_animation_frame_duration">
@@ -206,7 +204,7 @@
<param index="1" name="frame_index" type="int" />
<param index="2" name="duration" type="float" />
<description>
- Sets the animation frame duration of frame [code]frame_index[/code] for the tile at coordinates [code]atlas_coords[/code].
+ Sets the animation frame [param duration] of frame [param frame_index] for the tile at coordinates [param atlas_coords].
</description>
</method>
<method name="set_tile_animation_frames_count">
@@ -214,7 +212,7 @@
<param index="0" name="atlas_coords" type="Vector2i" />
<param index="1" name="frames_count" type="int" />
<description>
- Sets how many animation frames the tile at coordinates [code]atlas_coords[/code] has.
+ Sets how many animation frames the tile at coordinates [param atlas_coords] has.
</description>
</method>
<method name="set_tile_animation_separation">
@@ -222,7 +220,7 @@
<param index="0" name="atlas_coords" type="Vector2i" />
<param index="1" name="separation" type="Vector2i" />
<description>
- Sets the margin (in grid tiles) between each tile in the animation layout of the tile at coordinates [code]atlas_coords[/code] has.
+ Sets the margin (in grid tiles) between each tile in the animation layout of the tile at coordinates [param atlas_coords] has.
</description>
</method>
<method name="set_tile_animation_speed">
@@ -230,7 +228,7 @@
<param index="0" name="atlas_coords" type="Vector2i" />
<param index="1" name="speed" type="float" />
<description>
- Sets the animation speed of the tile at coordinates [code]atlas_coords[/code] has.
+ Sets the animation speed of the tile at coordinates [param atlas_coords] has.
</description>
</method>
</methods>
diff --git a/doc/classes/TileSetScenesCollectionSource.xml b/doc/classes/TileSetScenesCollectionSource.xml
index f6e13de060..ec8fe2ad54 100644
--- a/doc/classes/TileSetScenesCollectionSource.xml
+++ b/doc/classes/TileSetScenesCollectionSource.xml
@@ -29,21 +29,21 @@
<return type="bool" />
<param index="0" name="id" type="int" />
<description>
- Returns whether the scene tile with id [code]id[/code] displays a placeholder in the editor.
+ Returns whether the scene tile with [param id] displays a placeholder in the editor.
</description>
</method>
<method name="get_scene_tile_id">
<return type="int" />
<param index="0" name="index" type="int" />
<description>
- Returns the scene tile ID of the scene tile at index [code]index[/code].
+ Returns the scene tile ID of the scene tile at [param index].
</description>
</method>
<method name="get_scene_tile_scene" qualifiers="const">
<return type="PackedScene" />
<param index="0" name="id" type="int" />
<description>
- Returns the [PackedScene] resource of scene tile with id [code]id[/code].
+ Returns the [PackedScene] resource of scene tile with [param id].
</description>
</method>
<method name="get_scene_tiles_count">
@@ -56,14 +56,14 @@
<return type="bool" />
<param index="0" name="id" type="int" />
<description>
- Returns whether this TileSet source has a scene tile with id [code]id[/code].
+ Returns whether this TileSet source has a scene tile with [param id].
</description>
</method>
<method name="remove_scene_tile">
<return type="void" />
<param index="0" name="id" type="int" />
<description>
- Remove the scene tile with id [code]id[/code].
+ Remove the scene tile with [param id].
</description>
</method>
<method name="set_scene_tile_display_placeholder">
@@ -71,7 +71,7 @@
<param index="0" name="id" type="int" />
<param index="1" name="display_placeholder" type="bool" />
<description>
- Sets whether or not the scene tile with id [code]id[/code] should display a placeholder in the editor. This might be useful for scenes that are not visible.
+ Sets whether or not the scene tile with [param id] should display a placeholder in the editor. This might be useful for scenes that are not visible.
</description>
</method>
<method name="set_scene_tile_id">
@@ -79,7 +79,7 @@
<param index="0" name="id" type="int" />
<param index="1" name="new_id" type="int" />
<description>
- Changes a scene tile's ID from [code]id[/code] to [code]new_id[/code]. This will fail if there is already a tile with a ID equal to [code]new_id[/code].
+ Changes a scene tile's ID from [param id] to [param new_id]. This will fail if there is already a tile with a ID equal to [param new_id].
</description>
</method>
<method name="set_scene_tile_scene">
@@ -87,7 +87,7 @@
<param index="0" name="id" type="int" />
<param index="1" name="packed_scene" type="PackedScene" />
<description>
- Assigns a [PackedScene] resource to the scene tile with id [code]id[/code]. This will fail if the scene does not extend CanvasItem, as positioning properties are needed to place the scene on the TileMap.
+ Assigns a [PackedScene] resource to the scene tile with [param id]. This will fail if the scene does not extend CanvasItem, as positioning properties are needed to place the scene on the TileMap.
</description>
</method>
</methods>
diff --git a/doc/classes/TileSetSource.xml b/doc/classes/TileSetSource.xml
index ae5c3717f2..4ebd7735b0 100644
--- a/doc/classes/TileSetSource.xml
+++ b/doc/classes/TileSetSource.xml
@@ -7,7 +7,6 @@
Exposes a set of tiles for a [TileSet] resource.
Tiles in a source are indexed with two IDs, coordinates ID (of type Vector2i) and an alternative ID (of type int), named according to their use in the [TileSetAtlasSource] class.
Depending on the TileSet source type, those IDs might have restrictions on their values, this is why the base [TileSetSource] class only exposes getters for them.
-
You can iterate over all tiles exposed by a TileSetSource by first iterating over coordinates IDs using [method get_tiles_count] and [method get_tile_id], then over alternative IDs using [method get_alternative_tiles_count] and [method get_alternative_tile_id].
</description>
<tutorials>
@@ -18,14 +17,14 @@
<param index="0" name="atlas_coords" type="Vector2i" />
<param index="1" name="index" type="int" />
<description>
- Returns the alternative ID for the tile with coordinates ID [code]atlas_coords[/code] at index [code]index[/code].
+ Returns the alternative ID for the tile with coordinates ID [param atlas_coords] at index [param index].
</description>
</method>
<method name="get_alternative_tiles_count" qualifiers="const">
<return type="int" />
<param index="0" name="atlas_coords" type="Vector2i" />
<description>
- Returns the number of alternatives tiles for the coordinates ID [code]atlas_coords[/code].
+ Returns the number of alternatives tiles for the coordinates ID [param atlas_coords].
For [TileSetAtlasSource], this always return at least 1, as the base tile with ID 0 is always part of the alternatives list.
Returns -1 if there is not tile at the given coords.
</description>
@@ -34,7 +33,7 @@
<return type="Vector2i" />
<param index="0" name="index" type="int" />
<description>
- Returns the tile coordinates ID of the tile with index [code]index[/code].
+ Returns the tile coordinates ID of the tile with index [param index].
</description>
</method>
<method name="get_tiles_count" qualifiers="const">
@@ -48,14 +47,14 @@
<param index="0" name="atlas_coords" type="Vector2i" />
<param index="1" name="alternative_tile" type="int" />
<description>
- Returns if the base tile at coordinates [code]atlas_coords[/code] has an alternative with ID [code]alternative_tile[/code].
+ Returns if the base tile at coordinates [param atlas_coords] has an alternative with ID [param alternative_tile].
</description>
</method>
<method name="has_tile" qualifiers="const">
<return type="bool" />
<param index="0" name="atlas_coords" type="Vector2i" />
<description>
- Returns if this atlas has a tile with coordinates ID [code]atlas_coordinates[/code].
+ Returns if this atlas has a tile with coordinates ID [param atlas_coords].
</description>
</method>
</methods>
diff --git a/doc/classes/Time.xml b/doc/classes/Time.xml
index e213be2e12..1abe017a4d 100644
--- a/doc/classes/Time.xml
+++ b/doc/classes/Time.xml
@@ -17,8 +17,8 @@
<return type="Dictionary" />
<param index="0" name="utc" type="bool" default="false" />
<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.
+ Returns the current date as a dictionary of keys: [code]year[/code], [code]month[/code], [code]day[/code], and [code]weekday[/code].
+ The returned values are in the system's local time when [param utc] is [code]false[/code], otherwise they are in UTC.
</description>
</method>
<method name="get_date_dict_from_unix_time" qualifiers="const">
@@ -33,7 +33,7 @@
<param index="0" name="utc" type="bool" default="false" />
<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.
+ The returned values are in the system's local time when [param utc] is [code]false[/code], otherwise they are in UTC.
</description>
</method>
<method name="get_date_string_from_unix_time" qualifiers="const">
@@ -49,7 +49,7 @@
<param index="1" name="weekday" type="bool" />
<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).
+ If [param weekday] is [code]false[/code], then the [code]weekday[/code] entry is excluded (the calculation is relatively expensive).
[b]Note:[/b] Any decimal fraction in the time string will be ignored silently.
</description>
</method>
@@ -57,7 +57,7 @@
<return type="Dictionary" />
<param index="0" name="utc" type="bool" default="false" />
<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].
+ 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], [code]second[/code], and [code]dst[/code] (Daylight Savings Time).
</description>
</method>
<method name="get_datetime_dict_from_unix_time" qualifiers="const">
@@ -76,7 +76,7 @@
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.
+ If [param use_space] is [code]true[/code], the date and time bits are separated by an empty space character instead of the letter T.
</description>
</method>
<method name="get_datetime_string_from_system" qualifiers="const">
@@ -85,8 +85,8 @@
<param index="1" name="use_space" type="bool" default="false" />
<description>
Returns the current date and time as an ISO 8601 date and time string (YYYY-MM-DDTHH:MM:SS).
- 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.
+ The returned values are in the system's local time when [param utc] is [code]false[/code], otherwise they are in UTC.
+ If [param use_space] is [code]true[/code], the date and time bits are separated by an empty space character instead of the letter T.
</description>
</method>
<method name="get_datetime_string_from_unix_time" qualifiers="const">
@@ -95,7 +95,7 @@
<param index="1" name="use_space" type="bool" default="false" />
<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.
+ If [param use_space] is [code]true[/code], the date and time bits are separated by an empty space character instead of the letter T.
</description>
</method>
<method name="get_offset_string_from_offset_minutes" qualifiers="const">
@@ -124,7 +124,7 @@
<param index="0" name="utc" type="bool" default="false" />
<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.
+ The returned values are in the system's local time when [param utc] is [code]false[/code], otherwise they are in UTC.
</description>
</method>
<method name="get_time_dict_from_unix_time" qualifiers="const">
@@ -139,7 +139,7 @@
<param index="0" name="utc" type="bool" default="false" />
<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.
+ The returned values are in the system's local time when [param utc] is [code]false[/code], otherwise they are in UTC.
</description>
</method>
<method name="get_time_string_from_unix_time" qualifiers="const">
diff --git a/doc/classes/Timer.xml b/doc/classes/Timer.xml
index 70325c0227..d171797e80 100644
--- a/doc/classes/Timer.xml
+++ b/doc/classes/Timer.xml
@@ -21,7 +21,7 @@
<return type="void" />
<param index="0" name="time_sec" type="float" default="-1" />
<description>
- Starts the timer. Sets [member wait_time] to [code]time_sec[/code] if [code]time_sec &gt; 0[/code]. This also resets the remaining time to [member wait_time].
+ Starts the timer. Sets [member wait_time] to [param time_sec] if [code]time_sec &gt; 0[/code]. This also resets the remaining time to [member wait_time].
[b]Note:[/b] This method will not resume a paused timer. See [member paused].
</description>
</method>
diff --git a/doc/classes/Transform2D.xml b/doc/classes/Transform2D.xml
index 3b76348c09..23d20a5a75 100644
--- a/doc/classes/Transform2D.xml
+++ b/doc/classes/Transform2D.xml
@@ -107,7 +107,7 @@
<param index="0" name="xform" type="Transform2D" />
<param index="1" name="weight" type="float" />
<description>
- Returns a transform interpolated between this transform and another by a given [code]weight[/code] (on the range of 0.0 to 1.0).
+ Returns a transform interpolated between this transform and another by a given [param weight] (on the range of 0.0 to 1.0).
</description>
</method>
<method name="inverse" qualifiers="const">
@@ -123,11 +123,17 @@
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="is_finite" qualifiers="const">
+ <return type="bool" />
+ <description>
+ Returns [code]true[/code] if this transform is finite, by calling [method @GlobalScope.is_finite] on each component.
+ </description>
+ </method>
<method name="looking_at" qualifiers="const">
<return type="Transform2D" />
<param index="0" name="target" type="Vector2" default="Vector2(0, 0)" />
<description>
- Returns a copy of the transform rotated such that it's rotation on the X-axis points towards the [code]target[/code] position.
+ Returns a copy of the transform rotated such that it's rotation on the X-axis points towards the [param target] position.
Operations take place in global space.
</description>
</method>
@@ -141,7 +147,7 @@
<return type="Transform2D" />
<param index="0" name="angle" type="float" />
<description>
- Returns a copy of the transform rotated by the given [code]angle[/code] (in radians).
+ Returns a copy of the transform rotated by the given [param angle] (in radians).
This method is an optimized version of multiplying the given transform [code]X[/code]
with a corresponding rotation transform [code]R[/code] from the left, i.e., [code]R * X[/code].
This can be seen as transforming with respect to the global/parent frame.
@@ -151,7 +157,7 @@
<return type="Transform2D" />
<param index="0" name="angle" type="float" />
<description>
- Returns a copy of the transform rotated by the given [code]angle[/code] (in radians).
+ Returns a copy of the transform rotated by the given [param angle] (in radians).
This method is an optimized version of multiplying the given transform [code]X[/code]
with a corresponding rotation transform [code]R[/code] from the right, i.e., [code]X * R[/code].
This can be seen as transforming with respect to the local frame.
@@ -161,7 +167,7 @@
<return type="Transform2D" />
<param index="0" name="scale" type="Vector2" />
<description>
- Returns a copy of the transform scaled by the given [code]scale[/code] factor.
+ Returns a copy of the transform scaled by the given [param scale] factor.
This method is an optimized version of multiplying the given transform [code]X[/code]
with a corresponding scaling transform [code]S[/code] from the left, i.e., [code]S * X[/code].
This can be seen as transforming with respect to the global/parent frame.
@@ -171,7 +177,7 @@
<return type="Transform2D" />
<param index="0" name="scale" type="Vector2" />
<description>
- Returns a copy of the transform scaled by the given [code]scale[/code] factor.
+ Returns a copy of the transform scaled by the given [param scale] factor.
This method is an optimized version of multiplying the given transform [code]X[/code]
with a corresponding scaling transform [code]S[/code] from the right, i.e., [code]X * S[/code].
This can be seen as transforming with respect to the local frame.
@@ -203,7 +209,7 @@
<return type="Transform2D" />
<param index="0" name="offset" type="Vector2" />
<description>
- Returns a copy of the transform translated by the given [code]offset[/code].
+ Returns a copy of the transform translated by the given [param offset].
This method is an optimized version of multiplying the given transform [code]X[/code]
with a corresponding translation transform [code]T[/code] from the left, i.e., [code]T * X[/code].
This can be seen as transforming with respect to the global/parent frame.
@@ -213,7 +219,7 @@
<return type="Transform2D" />
<param index="0" name="offset" type="Vector2" />
<description>
- Returns a copy of the transform translated by the given [code]offset[/code].
+ Returns a copy of the transform translated by the given [param offset].
This method is an optimized version of multiplying the given transform [code]X[/code]
with a corresponding translation transform [code]T[/code] from the right, i.e., [code]X * T[/code].
This can be seen as transforming with respect to the local frame.
diff --git a/doc/classes/Transform3D.xml b/doc/classes/Transform3D.xml
index b7fd5213aa..b3145ea022 100644
--- a/doc/classes/Transform3D.xml
+++ b/doc/classes/Transform3D.xml
@@ -66,7 +66,7 @@
<param index="0" name="xform" type="Transform3D" />
<param index="1" name="weight" type="float" />
<description>
- Returns a transform interpolated between this transform and another by a given [code]weight[/code] (on the range of 0.0 to 1.0).
+ Returns a transform interpolated between this transform and another by a given [param weight] (on the range of 0.0 to 1.0).
</description>
</method>
<method name="inverse" qualifiers="const">
@@ -82,13 +82,19 @@
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="is_finite" qualifiers="const">
+ <return type="bool" />
+ <description>
+ Returns [code]true[/code] if this transform is finite, by calling [method @GlobalScope.is_finite] on each component.
+ </description>
+ </method>
<method name="looking_at" qualifiers="const">
<return type="Transform3D" />
<param index="0" name="target" type="Vector3" />
<param index="1" name="up" type="Vector3" default="Vector3(0, 1, 0)" />
<description>
- Returns a copy of the transform rotated such that the forward axis (-Z) points towards the [code]target[/code] position.
- The up axis (+Y) points as close to the [code]up[/code] vector as possible while staying perpendicular to the forward axis. The resulting transform is orthonormalized. The existing rotation, scale, and skew information from the original transform is discarded. The [code]target[/code] and [code]up[/code] vectors cannot be zero, cannot be parallel to each other, and are defined in global/parent space.
+ Returns a copy of the transform rotated such that the forward axis (-Z) points towards the [param target] position.
+ The up axis (+Y) points as close to the [param up] vector as possible while staying perpendicular to the forward axis. The resulting transform is orthonormalized. The existing rotation, scale, and skew information from the original transform is discarded. The [param target] and [param up] vectors cannot be zero, cannot be parallel to each other, and are defined in global/parent space.
</description>
</method>
<method name="orthonormalized" qualifiers="const">
@@ -102,8 +108,8 @@
<param index="0" name="axis" type="Vector3" />
<param index="1" name="angle" type="float" />
<description>
- Returns a copy of the transform rotated around the given [code]axis[/code] by the given [code]angle[/code] (in radians).
- The [code]axis[/code] must be a normalized vector.
+ Returns a copy of the transform rotated around the given [param axis] by the given [param angle] (in radians).
+ The [param axis] must be a normalized vector.
This method is an optimized version of multiplying the given transform [code]X[/code]
with a corresponding rotation transform [code]R[/code] from the left, i.e., [code]R * X[/code].
This can be seen as transforming with respect to the global/parent frame.
@@ -114,8 +120,8 @@
<param index="0" name="axis" type="Vector3" />
<param index="1" name="angle" type="float" />
<description>
- Returns a copy of the transform rotated around the given [code]axis[/code] by the given [code]angle[/code] (in radians).
- The [code]axis[/code] must be a normalized vector.
+ Returns a copy of the transform rotated around the given [param axis] by the given [param angle] (in radians).
+ The [param axis] must be a normalized vector.
This method is an optimized version of multiplying the given transform [code]X[/code]
with a corresponding rotation transform [code]R[/code] from the right, i.e., [code]X * R[/code].
This can be seen as transforming with respect to the local frame.
@@ -125,7 +131,7 @@
<return type="Transform3D" />
<param index="0" name="scale" type="Vector3" />
<description>
- Returns a copy of the transform scaled by the given [code]scale[/code] factor.
+ Returns a copy of the transform scaled by the given [param scale] factor.
This method is an optimized version of multiplying the given transform [code]X[/code]
with a corresponding scaling transform [code]S[/code] from the left, i.e., [code]S * X[/code].
This can be seen as transforming with respect to the global/parent frame.
@@ -135,25 +141,17 @@
<return type="Transform3D" />
<param index="0" name="scale" type="Vector3" />
<description>
- Returns a copy of the transform scaled by the given [code]scale[/code] factor.
+ Returns a copy of the transform scaled by the given [param scale] factor.
This method is an optimized version of multiplying the given transform [code]X[/code]
with a corresponding scaling transform [code]S[/code] from the right, i.e., [code]X * S[/code].
This can be seen as transforming with respect to the local frame.
</description>
</method>
- <method name="spherical_interpolate_with" qualifiers="const">
- <return type="Transform3D" />
- <param index="0" name="xform" type="Transform3D" />
- <param index="1" name="weight" type="float" />
- <description>
- Returns a transform spherically interpolated between this transform and another by a given [code]weight[/code] (on the range of 0.0 to 1.0).
- </description>
- </method>
<method name="translated" qualifiers="const">
<return type="Transform3D" />
<param index="0" name="offset" type="Vector3" />
<description>
- Returns a copy of the transform translated by the given [code]offset[/code].
+ Returns a copy of the transform translated by the given [param offset].
This method is an optimized version of multiplying the given transform [code]X[/code]
with a corresponding translation transform [code]T[/code] from the left, i.e., [code]T * X[/code].
This can be seen as transforming with respect to the global/parent frame.
@@ -163,7 +161,7 @@
<return type="Transform3D" />
<param index="0" name="offset" type="Vector3" />
<description>
- Returns a copy of the transform translated by the given [code]offset[/code].
+ Returns a copy of the transform translated by the given [param offset].
This method is an optimized version of multiplying the given transform [code]X[/code]
with a corresponding translation transform [code]T[/code] from the right, i.e., [code]X * T[/code].
This can be seen as transforming with respect to the local frame.
diff --git a/doc/classes/Translation.xml b/doc/classes/Translation.xml
index 3da778335d..ae2f8d8dff 100644
--- a/doc/classes/Translation.xml
+++ b/doc/classes/Translation.xml
@@ -85,7 +85,13 @@
<param index="3" name="context" type="StringName" default="&quot;&quot;" />
<description>
Returns a message's translation involving plurals.
- The number [code]n[/code] is the number or quantity of the plural object. It will be used to guide the translation system to fetch the correct plural form for the selected language.
+ The number [param n] is the number or quantity of the plural object. It will be used to guide the translation system to fetch the correct plural form for the selected language.
+ </description>
+ </method>
+ <method name="get_translated_message_list" qualifiers="const">
+ <return type="PackedStringArray" />
+ <description>
+ Returns all the messages (translated text).
</description>
</method>
</methods>
diff --git a/doc/classes/TranslationServer.xml b/doc/classes/TranslationServer.xml
index 53ce5894eb..7b18d8ddb6 100644
--- a/doc/classes/TranslationServer.xml
+++ b/doc/classes/TranslationServer.xml
@@ -54,18 +54,18 @@
<return type="String" />
<param index="0" name="country" type="String" />
<description>
- Returns readable country name for the [code]country[/code] code.
+ Returns readable country name for the [param country] code.
</description>
</method>
<method name="get_language_name" qualifiers="const">
<return type="String" />
<param index="0" name="language" type="String" />
<description>
- Returns readable language name for the [code]language[/code] code.
+ Returns readable language name for the [param language] code.
</description>
</method>
<method name="get_loaded_locales" qualifiers="const">
- <return type="Array" />
+ <return type="PackedStringArray" />
<description>
Returns an array of all loaded locales of the project.
</description>
@@ -88,7 +88,7 @@
<return type="String" />
<param index="0" name="script" type="String" />
<description>
- Returns readable script name for the [code]script[/code] code.
+ Returns readable script name for the [param script] code.
</description>
</method>
<method name="get_tool_locale">
@@ -102,15 +102,15 @@
<return type="Translation" />
<param index="0" name="locale" type="String" />
<description>
- Returns the [Translation] instance based on the [code]locale[/code] passed in.
- It will return [code]null[/code] if there is no [Translation] instance that matches the [code]locale[/code].
+ Returns the [Translation] instance based on the [param locale] passed in.
+ It will return [code]null[/code] if there is no [Translation] instance that matches the [param locale].
</description>
</method>
<method name="pseudolocalize" qualifiers="const">
<return type="StringName" />
<param index="0" name="message" type="StringName" />
<description>
- Returns the pseudolocalized string based on the [code]p_message[/code] passed in.
+ Returns the pseudolocalized string based on the [param message] passed in.
</description>
</method>
<method name="reload_pseudolocalization">
@@ -130,7 +130,7 @@
<return type="void" />
<param index="0" name="locale" type="String" />
<description>
- Sets the locale of the project. The [code]locale[/code] string will be standardized to match known locales (e.g. [code]en-US[/code] would be matched to [code]en_US[/code]).
+ Sets the locale of the project. The [param locale] string will be standardized to match known locales (e.g. [code]en-US[/code] would be matched to [code]en_US[/code]).
If translations have been loaded beforehand for the new locale, they will be applied.
</description>
</method>
@@ -138,7 +138,7 @@
<return type="String" />
<param index="0" name="locale" type="String" />
<description>
- Returns [code]locale[/code] string standardized to match known locales (e.g. [code]en-US[/code] would be matched to [code]en_US[/code]).
+ Returns [param locale] string standardized to match known locales (e.g. [code]en-US[/code] would be matched to [code]en_US[/code]).
</description>
</method>
<method name="translate" qualifiers="const">
@@ -157,7 +157,7 @@
<param index="3" name="context" type="StringName" default="&quot;&quot;" />
<description>
Returns the current locale's translation for the given message (key), plural_message and context.
- The number [code]n[/code] is the number or quantity of the plural object. It will be used to guide the translation system to fetch the correct plural form for the selected language.
+ The number [param n] is the number or quantity of the plural object. It will be used to guide the translation system to fetch the correct plural form for the selected language.
</description>
</method>
</methods>
diff --git a/doc/classes/Tree.xml b/doc/classes/Tree.xml
index 7825f2210f..bf79821e2d 100644
--- a/doc/classes/Tree.xml
+++ b/doc/classes/Tree.xml
@@ -47,9 +47,9 @@
<param index="0" name="parent" type="TreeItem" default="null" />
<param index="1" name="idx" type="int" default="-1" />
<description>
- Creates an item in the tree and adds it as a child of [code]parent[/code], which can be either a valid [TreeItem] or [code]null[/code].
- If [code]parent[/code] is [code]null[/code], the root item will be the parent, or the new item will be the root itself if the tree is empty.
- The new item will be the [code]idx[/code]th child of parent, or it will be the last child if there are not enough siblings.
+ Creates an item in the tree and adds it as a child of [param parent], which can be either a valid [TreeItem] or [code]null[/code].
+ If [param parent] is [code]null[/code], the root item will be the parent, or the new item will be the root itself if the tree is empty.
+ The new item will be the [param idx]th child of parent, or it will be the last child if there are not enough siblings.
</description>
</method>
<method name="edit_selected">
@@ -70,14 +70,14 @@
<return type="int" />
<param index="0" name="position" type="Vector2" />
<description>
- Returns the button id at [code]position[/code], or -1 if no button is there.
+ Returns the button id at [param position], or -1 if no button is there.
</description>
</method>
<method name="get_column_at_position" qualifiers="const">
<return type="int" />
<param index="0" name="position" type="Vector2" />
<description>
- Returns the column index at [code]position[/code], or -1 if no item is there.
+ Returns the column index at [param position], or -1 if no item is there.
</description>
</method>
<method name="get_column_expand_ratio" qualifiers="const">
@@ -124,7 +124,7 @@
<return type="int" />
<param index="0" name="position" type="Vector2" />
<description>
- Returns the drop section at [code]position[/code], or -100 if no item is there.
+ Returns the drop section at [param position], or -100 if no item is there.
Values -1, 0, or 1 will be returned for the "above item", "on item", and "below item" drop sections, respectively. See [enum DropModeFlags] for a description of each drop section.
To get the item which the returned drop section is relative to, use [method get_item_at_position].
</description>
@@ -167,7 +167,7 @@
<param index="1" name="column" type="int" default="-1" />
<param index="2" name="button_index" type="int" default="-1" />
<description>
- Returns the rectangle area for the specified [TreeItem]. If [code]column[/code] is specified, only get the position and size of that column, otherwise get the rectangle containing all columns. If a button index is specified, the rectangle of that button will be returned.
+ Returns the rectangle area for the specified [TreeItem]. If [param column] is specified, only get the position and size of that column, otherwise get the rectangle containing all columns. If a button index is specified, the rectangle of that button will be returned.
</description>
</method>
<method name="get_item_at_position" qualifiers="const">
@@ -182,7 +182,7 @@
<param index="0" name="from" type="TreeItem" />
<description>
Returns the next selected [TreeItem] after the given one, or [code]null[/code] if the end is reached.
- If [code]from[/code] is [code]null[/code], this returns the first selected item.
+ If [param from] is [code]null[/code], this returns the first selected item.
</description>
</method>
<method name="get_pressed_button" qualifiers="const">
@@ -251,7 +251,7 @@
<param index="0" name="column" type="int" />
<param index="1" name="min_width" type="int" />
<description>
- Overrides the calculated minimum width of a column. It can be set to `0` to restore the default behavior. Columns that have the "Expand" flag will use their "min_width" in a similar fashion to [member Control.size_flags_stretch_ratio].
+ Overrides the calculated minimum width of a column. It can be set to [code]0[/code] to restore the default behavior. Columns that have the "Expand" flag will use their "min_width" in a similar fashion to [member Control.size_flags_stretch_ratio].
</description>
</method>
<method name="set_column_expand">
@@ -293,6 +293,14 @@
Sets language code of column title used for line-breaking and text shaping algorithms, if left empty current locale is used instead.
</description>
</method>
+ <method name="set_selected">
+ <return type="void" />
+ <param index="0" name="item" type="TreeItem" />
+ <param index="1" name="column" type="int" />
+ <description>
+ Selects the specified [TreeItem] and column.
+ </description>
+ </method>
</methods>
<members>
<member name="allow_reselect" type="bool" setter="set_allow_reselect" getter="get_allow_reselect" default="false">
@@ -312,6 +320,9 @@
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="enable_recursive_folding" type="bool" setter="set_enable_recursive_folding" getter="is_recursive_folding_enabled" default="true">
+ If [code]true[/code], recursive folding is enabled for this [Tree]. Holding down Shift while clicking the fold arrow collapses or uncollapses the [TreeItem] and all its descendants.
+ </member>
<member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" overrides="Control" enum="Control.FocusMode" default="2" />
<member name="hide_folding" type="bool" setter="set_hide_folding" getter="is_folding_hidden" default="false">
If [code]true[/code], the folding arrow is hidden.
@@ -351,10 +362,11 @@
Emitted when [method TreeItem.propagate_check] is called. Connect to this signal to process the items that are affected when [method TreeItem.propagate_check] is invoked. The order that the items affected will be processed is as follows: the item that invoked the method, children of that item, and finally parents of that item.
</description>
</signal>
- <signal name="column_title_pressed">
+ <signal name="column_title_clicked">
<param index="0" name="column" type="int" />
+ <param index="1" name="mouse_button_index" type="int" />
<description>
- Emitted when a column's title is pressed.
+ Emitted when a column's title is clicked with either [constant MOUSE_BUTTON_LEFT] or [constant MOUSE_BUTTON_RIGHT].
</description>
</signal>
<signal name="custom_item_clicked">
@@ -557,12 +569,6 @@
<theme_item name="updown" data_type="icon" type="Texture2D">
The updown arrow icon to display for the [constant TreeItem.CELL_MODE_RANGE] mode cell.
</theme_item>
- <theme_item name="bg" data_type="style" type="StyleBox">
- Default [StyleBox] for the [Tree], i.e. used when the control is not being focused.
- </theme_item>
- <theme_item name="bg_focus" data_type="style" type="StyleBox">
- [StyleBox] used when the [Tree] is being focused.
- </theme_item>
<theme_item name="button_pressed" data_type="style" type="StyleBox">
[StyleBox] used when a button in the tree is pressed.
</theme_item>
@@ -581,6 +587,12 @@
<theme_item name="custom_button_pressed" data_type="style" type="StyleBox">
[StyleBox] for a [constant TreeItem.CELL_MODE_CUSTOM] mode cell when it's pressed.
</theme_item>
+ <theme_item name="focus" data_type="style" type="StyleBox">
+ The focused style for the [Tree], drawn on top of everything.
+ </theme_item>
+ <theme_item name="panel" data_type="style" type="StyleBox">
+ The background style for the [Tree].
+ </theme_item>
<theme_item name="selected" data_type="style" type="StyleBox">
[StyleBox] for the selected items, used when the [Tree] is not being focused.
</theme_item>
diff --git a/doc/classes/TreeItem.xml b/doc/classes/TreeItem.xml
index 519c3afadb..a8ffef427f 100644
--- a/doc/classes/TreeItem.xml
+++ b/doc/classes/TreeItem.xml
@@ -16,16 +16,16 @@
<param index="1" name="button" type="Texture2D" />
<param index="2" name="id" type="int" default="-1" />
<param index="3" name="disabled" type="bool" default="false" />
- <param index="4" name="tooltip" type="String" default="&quot;&quot;" />
+ <param index="4" name="tooltip_text" type="String" default="&quot;&quot;" />
<description>
- Adds a button with [Texture2D] [code]button[/code] at column [code]column[/code]. The [code]id[/code] is used to identify the button. If not specified, the next available index is used, which may be retrieved by calling [method get_button_count] immediately before this method. Optionally, the button can be [code]disabled[/code] and have a [code]tooltip[/code].
+ Adds a button with [Texture2D] [param button] at column [param column]. The [param id] is used to identify the button. If not specified, the next available index is used, which may be retrieved by calling [method get_button_count] immediately before this method. Optionally, the button can be [param disabled] and have a [param tooltip_text].
</description>
</method>
<method name="call_recursive" qualifiers="vararg">
<return type="void" />
<param index="0" name="method" type="StringName" />
<description>
- Calls the [code]method[/code] on the actual TreeItem and its children recursively. Pass parameters as a comma separated list.
+ Calls the [param method] on the actual TreeItem and its children recursively. Pass parameters as a comma separated list.
</description>
</method>
<method name="clear_custom_bg_color">
@@ -47,7 +47,7 @@
<param index="0" name="idx" type="int" default="-1" />
<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.
+ The new item will be inserted as position [param idx] (the default value [code]-1[/code] means the last position), or it will be the last child if [param idx] is higher than the child count.
</description>
</method>
<method name="deselect">
@@ -62,7 +62,7 @@
<param index="0" name="column" type="int" />
<param index="1" name="button_idx" type="int" />
<description>
- Removes the button at index [code]button_idx[/code] in column [code]column[/code].
+ Removes the button at index [param button_idx] in column [param column].
</description>
</method>
<method name="get_button" qualifiers="const">
@@ -70,7 +70,7 @@
<param index="0" name="column" type="int" />
<param index="1" name="button_idx" type="int" />
<description>
- Returns the [Texture2D] of the button at index [code]button_idx[/code] in column [code]column[/code].
+ Returns the [Texture2D] of the button at index [param button_idx] in column [param column].
</description>
</method>
<method name="get_button_by_id" qualifiers="const">
@@ -78,14 +78,14 @@
<param index="0" name="column" type="int" />
<param index="1" name="id" type="int" />
<description>
- Returns the button index if there is a button with id [code]id[/code] in column [code]column[/code], otherwise returns -1.
+ Returns the button index if there is a button with id [param id] in column [param column], otherwise returns -1.
</description>
</method>
<method name="get_button_count" qualifiers="const">
<return type="int" />
<param index="0" name="column" type="int" />
<description>
- Returns the number of buttons in column [code]column[/code].
+ Returns the number of buttons in column [param column].
</description>
</method>
<method name="get_button_id" qualifiers="const">
@@ -93,15 +93,15 @@
<param index="0" name="column" type="int" />
<param index="1" name="button_idx" type="int" />
<description>
- Returns the id for the button at index [code]button_idx[/code] in column [code]column[/code].
+ Returns the id for the button at index [param button_idx] in column [param column].
</description>
</method>
- <method name="get_button_tooltip" qualifiers="const">
+ <method name="get_button_tooltip_text" qualifiers="const">
<return type="String" />
<param index="0" name="column" type="int" />
<param index="1" name="button_idx" type="int" />
<description>
- Returns the tooltip string for the button at index [code]button_idx[/code] in column [code]column[/code].
+ Returns the tooltip text for the button at index [param button_idx] in column [param column].
</description>
</method>
<method name="get_cell_mode" qualifiers="const">
@@ -126,7 +126,7 @@
</description>
</method>
<method name="get_children">
- <return type="Array" />
+ <return type="TreeItem[]" />
<description>
Returns an array of references to the item's children.
</description>
@@ -135,28 +135,28 @@
<return type="Color" />
<param index="0" name="column" type="int" />
<description>
- Returns the custom background color of column [code]column[/code].
+ Returns the custom background color of column [param column].
</description>
</method>
<method name="get_custom_color" qualifiers="const">
<return type="Color" />
<param index="0" name="column" type="int" />
<description>
- Returns the custom color of column [code]column[/code].
+ Returns the custom color of column [param column].
</description>
</method>
<method name="get_custom_font" qualifiers="const">
<return type="Font" />
<param index="0" name="column" type="int" />
<description>
- Returns custom font used to draw text in the column [code]column[/code].
+ Returns custom font used to draw text in the column [param column].
</description>
</method>
<method name="get_custom_font_size" qualifiers="const">
<return type="int" />
<param index="0" name="column" type="int" />
<description>
- Returns custom font size used to draw text in the column [code]column[/code].
+ Returns custom font size used to draw text in the column [param column].
</description>
</method>
<method name="get_expand_right" qualifiers="const">
@@ -231,7 +231,7 @@
<param index="0" name="wrap" type="bool" default="false" />
<description>
Returns the next visible sibling TreeItem in the tree or a null object if there is none.
- If [code]wrap[/code] is enabled, the method will wrap around to the first visible element in the tree when called on the last visible element, otherwise it returns [code]null[/code].
+ If [param wrap] is enabled, the method will wrap around to the first visible element in the tree when called on the last visible element, otherwise it returns [code]null[/code].
</description>
</method>
<method name="get_parent" qualifiers="const">
@@ -251,7 +251,7 @@
<param index="0" name="wrap" type="bool" default="false" />
<description>
Returns the previous visible sibling TreeItem in the tree or a null object if there is none.
- If [code]wrap[/code] is enabled, the method will wrap around to the last visible element in the tree when called on the first visible element, otherwise it returns [code]null[/code].
+ If [param wrap] is enabled, the method will wrap around to the last visible element in the tree when called on the first visible element, otherwise it returns [code]null[/code].
</description>
</method>
<method name="get_range" qualifiers="const">
@@ -308,11 +308,11 @@
Returns item's text base writing direction.
</description>
</method>
- <method name="get_tooltip" qualifiers="const">
+ <method name="get_tooltip_text" qualifiers="const">
<return type="String" />
<param index="0" name="column" type="int" />
<description>
- Returns the given column's tooltip.
+ Returns the given column's tooltip text.
</description>
</method>
<method name="get_tree" qualifiers="const">
@@ -321,19 +321,27 @@
Returns the [Tree] that owns this TreeItem.
</description>
</method>
+ <method name="is_any_collapsed">
+ <return type="bool" />
+ <param index="0" name="only_visible" type="bool" default="false" />
+ <description>
+ Returns [code]true[/code] if this [TreeItem], or any of its descendants, is collapsed.
+ If [param only_visible] is [code]true[/code] it ignores non-visible [TreeItem]s.
+ </description>
+ </method>
<method name="is_button_disabled" qualifiers="const">
<return type="bool" />
<param index="0" name="column" type="int" />
<param index="1" name="button_idx" type="int" />
<description>
- Returns [code]true[/code] if the button at index [code]button_idx[/code] for the given column is disabled.
+ Returns [code]true[/code] if the button at index [param button_idx] for the given [param column] is disabled.
</description>
</method>
<method name="is_checked" qualifiers="const">
<return type="bool" />
<param index="0" name="column" type="int" />
<description>
- Returns [code]true[/code] if the given column is checked.
+ Returns [code]true[/code] if the given [param column] is checked.
</description>
</method>
<method name="is_custom_set_as_button" qualifiers="const">
@@ -346,35 +354,35 @@
<return type="bool" />
<param index="0" name="column" type="int" />
<description>
- Returns [code]true[/code] if column [code]column[/code] is editable.
+ Returns [code]true[/code] if the given [param column] is editable.
</description>
</method>
<method name="is_indeterminate" qualifiers="const">
<return type="bool" />
<param index="0" name="column" type="int" />
<description>
- Returns [code]true[/code] if the given column is indeterminate.
+ Returns [code]true[/code] if the given [param column] is indeterminate.
</description>
</method>
<method name="is_selectable" qualifiers="const">
<return type="bool" />
<param index="0" name="column" type="int" />
<description>
- Returns [code]true[/code] if column [code]column[/code] is selectable.
+ Returns [code]true[/code] if the given [param column] is selectable.
</description>
</method>
<method name="is_selected">
<return type="bool" />
<param index="0" name="column" type="int" />
<description>
- Returns [code]true[/code] if column [code]column[/code] is selected.
+ Returns [code]true[/code] if the given [param column] is selected.
</description>
</method>
<method name="move_after">
<return type="void" />
<param index="0" name="item" type="TreeItem" />
<description>
- Moves this TreeItem right after the given [code]item[/code].
+ Moves this TreeItem right after the given [param item].
[b]Note:[/b] You can't move to the root or move the root.
</description>
</method>
@@ -382,7 +390,7 @@
<return type="void" />
<param index="0" name="item" type="TreeItem" />
<description>
- Moves this TreeItem right before the given [code]item[/code].
+ Moves this TreeItem right before the given [param item].
[b]Note:[/b] You can't move to the root or move the root.
</description>
</method>
@@ -391,7 +399,7 @@
<param index="0" name="column" type="int" />
<param index="1" name="emit_signal" type="bool" default="true" />
<description>
- Propagates this item's checked status to its children and parents for the given [code]column[/code]. It is possible to process the items affected by this method call by connecting to [signal Tree.check_propagated_to_item]. The order that the items affected will be processed is as follows: the item invoking this method, children of that item, and finally parents of that item. If [code]emit_signal[/code] is [code]false[/code], then [signal Tree.check_propagated_to_item] will not be emitted.
+ Propagates this item's checked status to its children and parents for the given [param column]. It is possible to process the items affected by this method call by connecting to [signal Tree.check_propagated_to_item]. The order that the items affected will be processed is as follows: the item invoking this method, children of that item, and finally parents of that item. If [param emit_signal] is [code]false[/code], then [signal Tree.check_propagated_to_item] will not be emitted.
</description>
</method>
<method name="remove_child">
@@ -405,7 +413,7 @@
<return type="void" />
<param index="0" name="column" type="int" />
<description>
- Selects the column [code]column[/code].
+ Selects the given [param column].
</description>
</method>
<method name="set_button">
@@ -414,7 +422,16 @@
<param index="1" name="button_idx" type="int" />
<param index="2" name="button" type="Texture2D" />
<description>
- Sets the given column's button [Texture2D] at index [code]button_idx[/code] to [code]button[/code].
+ Sets the given column's button [Texture2D] at index [param button_idx] to [param button].
+ </description>
+ </method>
+ <method name="set_button_color">
+ <return type="void" />
+ <param index="0" name="column" type="int" />
+ <param index="1" name="button_idx" type="int" />
+ <param index="2" name="color" type="Color" />
+ <description>
+ Sets the given column's button color at index [param button_idx] to [param color].
</description>
</method>
<method name="set_button_disabled">
@@ -423,7 +440,7 @@
<param index="1" name="button_idx" type="int" />
<param index="2" name="disabled" type="bool" />
<description>
- If [code]true[/code], disables the button at index [code]button_idx[/code] in column [code]column[/code].
+ If [code]true[/code], disables the button at index [param button_idx] in the given [param column].
</description>
</method>
<method name="set_cell_mode">
@@ -431,7 +448,7 @@
<param index="0" name="column" type="int" />
<param index="1" name="mode" type="int" enum="TreeItem.TreeCellMode" />
<description>
- Sets the given column's cell mode to [code]mode[/code]. See [enum TreeCellMode] constants.
+ Sets the given column's cell mode to [param mode]. See [enum TreeCellMode] constants.
</description>
</method>
<method name="set_checked">
@@ -439,7 +456,14 @@
<param index="0" name="column" type="int" />
<param index="1" name="checked" type="bool" />
<description>
- If [code]true[/code], the column [code]column[/code] is checked. Clears column's indeterminate status.
+ If [code]true[/code], the given [param column] is checked. Clears column's indeterminate status.
+ </description>
+ </method>
+ <method name="set_collapsed_recursive">
+ <return type="void" />
+ <param index="0" name="enable" type="bool" />
+ <description>
+ Collapses or uncollapses this [TreeItem] and all the descendants of this item.
</description>
</method>
<method name="set_custom_as_button">
@@ -472,8 +496,8 @@
<param index="1" name="object" type="Object" />
<param index="2" name="callback" type="StringName" />
<description>
- Sets the given column's custom draw callback to [code]callback[/code] method on [code]object[/code].
- The [code]callback[/code] should accept two arguments: the [TreeItem] that is drawn and its position and size as a [Rect2].
+ Sets the given column's custom draw callback to [param callback] method on [param object].
+ The [param callback] should accept two arguments: the [TreeItem] that is drawn and its position and size as a [Rect2].
</description>
</method>
<method name="set_custom_font">
@@ -481,7 +505,7 @@
<param index="0" name="column" type="int" />
<param index="1" name="font" type="Font" />
<description>
- Sets custom font used to draw text in the column [code]column[/code].
+ Sets custom font used to draw text in the given [param column].
</description>
</method>
<method name="set_custom_font_size">
@@ -489,7 +513,7 @@
<param index="0" name="column" type="int" />
<param index="1" name="font_size" type="int" />
<description>
- Sets custom font size used to draw text in the column [code]column[/code].
+ Sets custom font size used to draw text in the given [param column].
</description>
</method>
<method name="set_editable">
@@ -497,7 +521,7 @@
<param index="0" name="column" type="int" />
<param index="1" name="enabled" type="bool" />
<description>
- If [code]true[/code], column [code]column[/code] is editable.
+ If [code]true[/code], the given [param column] is editable.
</description>
</method>
<method name="set_expand_right">
@@ -505,7 +529,7 @@
<param index="0" name="column" type="int" />
<param index="1" name="enable" type="bool" />
<description>
- If [code]true[/code], column [code]column[/code] is expanded to the right.
+ If [code]true[/code], the given [param column] is expanded to the right.
</description>
</method>
<method name="set_icon">
@@ -529,7 +553,7 @@
<param index="0" name="column" type="int" />
<param index="1" name="modulate" type="Color" />
<description>
- Modulates the given column's icon with [code]modulate[/code].
+ Modulates the given column's icon with [param modulate].
</description>
</method>
<method name="set_icon_region">
@@ -545,7 +569,7 @@
<param index="0" name="column" type="int" />
<param index="1" name="indeterminate" type="bool" />
<description>
- If [code]true[/code], the column [code]column[/code] is marked indeterminate.
+ If [code]true[/code], the given [param column] is marked [param indeterminate].
[b]Note:[/b] If set [code]true[/code] from [code]false[/code], then column is cleared of checked status.
</description>
</method>
@@ -582,7 +606,7 @@
<param index="4" name="expr" type="bool" default="false" />
<description>
Sets the range of accepted values for a column. The column must be in the [constant CELL_MODE_RANGE] mode.
- If [code]expr[/code] is [code]true[/code], the edit mode slider will use an exponential scale as with [member Range.exp_edit].
+ If [param expr] is [code]true[/code], the edit mode slider will use an exponential scale as with [member Range.exp_edit].
</description>
</method>
<method name="set_selectable">
@@ -639,7 +663,7 @@
Sets item's text base writing direction.
</description>
</method>
- <method name="set_tooltip">
+ <method name="set_tooltip_text">
<return type="void" />
<param index="0" name="column" type="int" />
<param index="1" name="tooltip" type="String" />
diff --git a/doc/classes/Tween.xml b/doc/classes/Tween.xml
index c7fc78c1d3..eef35049e5 100644
--- a/doc/classes/Tween.xml
+++ b/doc/classes/Tween.xml
@@ -8,37 +8,89 @@
[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 and can't be used for tweening values.
A tween animation is created by adding [Tweener]s to the [Tween] object, using [method tween_property], [method tween_interval], [method tween_callback] or [method tween_method]:
- [codeblock]
+ [codeblocks]
+ [gdscript]
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]
+ [/gdscript]
+ [csharp]
+ Tween tween = GetTree().CreateTween();
+ tween.TweenProperty(GetNode("Sprite"), "modulate", Colors.Red, 1.0f);
+ tween.TweenProperty(GetNode("Sprite"), "scale", Vector2.Zero, 1.0f);
+ tween.TweenCallback(new Callable(GetNode("Sprite").QueueFree));
+ [/csharp]
+ [/codeblocks]
This sequence will make the [code]$Sprite[/code] node turn red, then shrink, before finally calling [method Node.queue_free] to free the sprite. [Tweener]s are executed one after another by default. This behavior can be changed using [method parallel] and [method set_parallel].
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 a different transition type in the above example, you can use [method set_trans]:
- [codeblock]
+ [codeblocks]
+ [gdscript]
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]
+ [/gdscript]
+ [csharp]
+ Tween tween = GetTree().CreateTween();
+ tween.TweenProperty(GetNode("Sprite"), "modulate", Colors.Red, 1.0f).SetTrans(Tween.TransitionType.Sine);
+ tween.TweenProperty(GetNode("Sprite"), "scale", Vector2.Zero, 1.0f).SetTrans(Tween.TransitionType.Bounce);
+ tween.TweenCallback(new Callable(GetNode("Sprite").QueueFree));
+ [/csharp]
+ [/codeblocks]
Most of the [Tween] methods can be chained this way too. In the following example the [Tween] is bound to the running script's node and a default transition is set for its [Tweener]s:
- [codeblock]
+ [codeblocks]
+ [gdscript]
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]
+ [/gdscript]
+ [csharp]
+ var tween = GetTree().CreateTween().BindNode(this).SetTrans(Tween.TransitionType.Elastic);
+ tween.TweenProperty(GetNode("Sprite"), "modulate", Colors.Red, 1.0f);
+ tween.TweenProperty(GetNode("Sprite"), "scale", Vector2.Zero, 1.0f);
+ tween.TweenCallback(new Callable(GetNode("Sprite").QueueFree));
+ [/csharp]
+ [/codeblocks]
Another interesting use for [Tween]s is animating arbitrary sets of objects:
- [codeblock]
+ [codeblocks]
+ [gdscript]
var tween = create_tween()
for sprite in get_children():
tween.tween_property(sprite, "position", Vector2(0, 0), 1)
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ Tween tween = CreateTween();
+ foreach (Node sprite in GetChildren())
+ tween.TweenProperty(sprite, "position", Vector2.Zero, 1.0f);
+ [/csharp]
+ [/codeblocks]
In the example above, all children of a node are moved one after another to position (0, 0).
+ You should avoid using more than one [Tween] per object's property. If two or more tweens animate one property at the same time, the last one created will take priority and assign the final value. If you want to interrupt and restart an animation, consider assigning the [Tween] to a variable:
+ [codeblocks]
+ [gdscript]
+ var tween
+ func animate():
+ if tween:
+ tween.kill() # Abort the previous animation.
+ tween = create_tween()
+ [/gdscript]
+ [csharp]
+ private Tween tween;
+
+ public void Animate()
+ {
+ if (tween != null)
+ tween.Kill(); // Abort the previous animation
+ tween = CreateTween();
+ }
+ [/csharp]
+ [/codeblocks]
Some [Tweener]s use transitions and eases. The first accepts a [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 is created.
+ [b]Note:[/b] [Tween]s are processing after all of nodes in the current frame, i.e. after [method Node._process] or [method Node._physics_process] (depending on [enum TweenProcessMode]).
</description>
<tutorials>
</tutorials>
@@ -55,12 +107,20 @@
<return type="Tween" />
<description>
Used to chain two [Tweener]s after [method set_parallel] is called with [code]true[/code].
- [codeblock]
+ [codeblocks]
+ [gdscript]
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]
+ [/gdscript]
+ [csharp]
+ Tween tween = CreateTween().SetParallel(true);
+ tween.TweenProperty(...);
+ tween.TweenProperty(...); // Will run parallelly with above.
+ tween.Chain().TweenProperty(...); // Will run after two above are finished.
+ [/csharp]
+ [/codeblocks]
</description>
</method>
<method name="custom_step">
@@ -117,13 +177,22 @@
<method name="parallel">
<return type="Tween" />
<description>
- Makes the next [Tweener] run parallelly to the previous one. Example:
- [codeblock]
+ Makes the next [Tweener] run parallelly to the previous one.
+ [b]Example:[/b]
+ [codeblocks]
+ [gdscript]
var tween = create_tween()
tween.tween_property(...)
tween.parallel().tween_property(...)
tween.parallel().tween_property(...)
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ Tween tween = CreateTween();
+ tween.TweenProperty(...);
+ tween.Parallel().TweenProperty(...);
+ tween.Parallel().TweenProperty(...);
+ [/csharp]
+ [/codeblocks]
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>
@@ -204,17 +273,31 @@
<param index="0" name="callback" type="Callable" />
<description>
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]
+ [b]Example:[/b] Object that keeps shooting every 1 second:
+ [codeblocks]
+ [gdscript]
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]
+ [/gdscript]
+ [csharp]
+ Tween tween = GetTree().CreateTween().SetLoops();
+ tween.TweenCallback(new Callable(Shoot)).SetDelay(1.0f);
+ [/csharp]
+ [/codeblocks]
+ [b]Example:[/b] Turning a sprite red and then blue, with 2 second delay:
+ [codeblocks]
+ [gdscript]
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]
+ [/gdscript]
+ [csharp]
+ Tween tween = GetTree().CreateTween();
+ Sprite2D sprite = GetNode&lt;Sprite2D&gt;("Sprite");
+ tween.TweenCallback(new Callable(() =&gt; sprite.Modulate = Colors.Red)).SetDelay(2.0f);
+ tween.TweenCallback(new Callable(() =&gt; sprite.Modulate = Colors.Blue)).SetDelay(2.0f);
+ [/csharp]
+ [/codeblocks]
</description>
</method>
<method name="tween_interval">
@@ -222,14 +305,22 @@
<param index="0" name="time" type="float" />
<description>
Creates and appends an [IntervalTweener]. This method can be used to create delays in the tween animation, as an alternative to using the delay in other [Tweener]s, or when there's no animation (in which case the [Tween] acts as a timer). [param time] is the length of the interval, in seconds.
- Example: creating an interval in code execution.
- [codeblock]
+ [b]Example:[/b] Creating an interval in code execution:
+ [codeblocks]
+ [gdscript]
# ... some code
await create_tween().tween_interval(2).finished
# ... more code
- [/codeblock]
- Example: creating an object that moves back and forth and jumps every few seconds.
- [codeblock]
+ [/gdscript]
+ [csharp]
+ // ... some code
+ await ToSignal(CreateTween().TweenInterval(2.0f), Tween.SignalName.Finished);
+ // ... more code
+ [/csharp]
+ [/codeblocks]
+ [b]Example:[/b] Creating an object that moves back and forth and jumps every few seconds:
+ [codeblocks]
+ [gdscript]
var tween = create_tween().set_loops()
tween.tween_property($Sprite, "position:x", 200.0, 1).as_relative()
tween.tween_callback(jump)
@@ -237,7 +328,17 @@
tween.tween_property($Sprite, "position:x", -200.0, 1).as_relative()
tween.tween_callback(jump)
tween.tween_interval(2)
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ Tween tween = CreateTween().SetLoops();
+ tween.TweenProperty(GetNode("Sprite"), "position:x", 200.0f, 1.0f).AsRelative();
+ tween.TweenCallback(new Callable(Jump));
+ tween.TweenInterval(2.0f);
+ tween.TweenProperty(GetNode("Sprite"), "position:x", -200.0f, 1.0f).AsRelative();
+ tween.TweenCallback(new Callable(Jump));
+ tween.TweenInterval(2.0f);
+ [/csharp]
+ [/codeblocks]
</description>
</method>
<method name="tween_method">
@@ -248,20 +349,42 @@
<param index="3" name="duration" type="float" />
<description>
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 [param from] and [param to] over the time specified by [param duration], 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]
+ [b]Example:[/b] Making a 3D object look from one point to another point:
+ [codeblocks]
+ [gdscript]
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]
+ [/gdscript]
+ [csharp]
+ Tween tween = CreateTween();
+ tween.TweenMethod(new Callable(() =&gt; LookAt(Vector3.Up)), new Vector3(-1.0f, 0.0f, -1.0f), new Vector3(1.0f, 0.0f, -1.0f), 1.0f); // The LookAt() method takes up vector as second argument.
+ [/csharp]
+ [/codeblocks]
+ [b]Example:[/b] Setting the text of a [Label], using an intermediate method and after a delay:
+ [codeblocks]
+ [gdscript]
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]
+ [/gdscript]
+ [csharp]
+ public override void _Ready()
+ {
+ base._Ready();
+
+ Tween tween = CreateTween();
+ tween.TweenMethod(new Callable(SetLabelText), 0.0f, 10.0f, 1.0f).SetDelay(1.0f);
+ }
+
+ private void SetLabelText(int value)
+ {
+ GetNode&lt;Label&gt;("Label").Text = $"Counting {value}";
+ }
+ [/csharp]
+ [/codeblocks]
</description>
</method>
<method name="tween_property">
@@ -271,20 +394,35 @@
<param index="2" name="final_val" type="Variant" />
<param index="3" name="duration" type="float" />
<description>
- Creates and appends a [PropertyTweener]. This method tweens a [param property] of an [param object] between an initial value and [param final_val] in a span of time equal to [param duration], in seconds. The initial value by default is the property's value at the time the tweening of the [PropertyTweener] starts. For example:
- [codeblock]
+ Creates and appends a [PropertyTweener]. This method tweens a [param property] of an [param object] between an initial value and [param final_val] in a span of time equal to [param duration], in seconds. The initial value by default is the property's value at the time the tweening of the [PropertyTweener] starts.
+ [b]Example:[/b]
+ [codeblocks]
+ [gdscript]
var tween = create_tween()
tween.tween_property($Sprite, "position", Vector2(100, 200), 1)
tween.tween_property($Sprite, "position", Vector2(200, 300), 1)
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ Tween tween = CreateTween();
+ tween.TweenProperty(GetNode("Sprite"), "position", new Vector2(100.0f, 200.0f), 1.0f);
+ tween.TweenProperty(GetNode("Sprite"), "position", new Vector2(200.0f, 300.0f), 1.0f);
+ [/csharp]
+ [/codeblocks]
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]
+ [b]Example:[/b] Moving an object twice from the same position, with different transition types:
+ [codeblocks]
+ [gdscript]
var tween = create_tween()
tween.tween_property($Sprite, "position", Vector2.RIGHT * 300, 1).as_relative().set_trans(Tween.TRANS_SINE)
tween.tween_property($Sprite, "position", Vector2.RIGHT * 300, 1).as_relative().from_current().set_trans(Tween.TRANS_EXPO)
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ Tween tween = CreateTween();
+ tween.TweenProperty(GetNode("Sprite"), "position", Vector2.Right * 300.0f, 1.0f).AsRelative().SetTrans(Tween.TransitionType.Sine);
+ tween.TweenProperty(GetNode("Sprite"), "position", Vector2.Right * 300.0f, 1.0f).AsRelative().FromCurrent().SetTrans(Tween.TransitionType.Expo);
+ [/csharp]
+ [/codeblocks]
</description>
</method>
</methods>
diff --git a/doc/classes/UndoRedo.xml b/doc/classes/UndoRedo.xml
index 3ef59b1c39..7258efbdda 100644
--- a/doc/classes/UndoRedo.xml
+++ b/doc/classes/UndoRedo.xml
@@ -62,12 +62,11 @@
<tutorials>
</tutorials>
<methods>
- <method name="add_do_method" qualifiers="vararg">
+ <method name="add_do_method">
<return type="void" />
- <param index="0" name="object" type="Object" />
- <param index="1" name="method" type="StringName" />
+ <param index="0" name="callable" type="Callable" />
<description>
- Register a [param method] that will be called when the action is committed.
+ Register a [Callable] that will be called when the action is committed.
</description>
</method>
<method name="add_do_property">
@@ -86,12 +85,11 @@
Register a reference for "do" that will be erased if the "do" history is lost. This is useful mostly for new nodes created for the "do" call. Do not use for resources.
</description>
</method>
- <method name="add_undo_method" qualifiers="vararg">
+ <method name="add_undo_method">
<return type="void" />
- <param index="0" name="object" type="Object" />
- <param index="1" name="method" type="StringName" />
+ <param index="0" name="callable" type="Callable" />
<description>
- Register a [param method] that will be called when the action is undone.
+ Register a [Callable] that will be called when the action is undone.
</description>
</method>
<method name="add_undo_property">
diff --git a/doc/classes/VSlider.xml b/doc/classes/VSlider.xml
index 36954a6912..488154106f 100644
--- a/doc/classes/VSlider.xml
+++ b/doc/classes/VSlider.xml
@@ -14,6 +14,9 @@
<member name="size_flags_vertical" type="int" setter="set_v_size_flags" getter="get_v_size_flags" overrides="Control" default="1" />
</members>
<theme_items>
+ <theme_item name="grabber_offset" data_type="constant" type="int" default="0">
+ Horizontal offset of the grabber.
+ </theme_item>
<theme_item name="grabber" data_type="icon" type="Texture2D">
The texture for the grabber (the draggable element).
</theme_item>
@@ -30,6 +33,7 @@
The background of the area below the grabber.
</theme_item>
<theme_item name="grabber_area_highlight" data_type="style" type="StyleBox">
+ The background of the area below the grabber, to the left of the grabber.
</theme_item>
<theme_item name="slider" data_type="style" type="StyleBox">
The background for the whole slider. Determines the width of the [code]grabber_area[/code].
diff --git a/doc/classes/VSplitContainer.xml b/doc/classes/VSplitContainer.xml
index b933fb2805..c60d15d9c9 100644
--- a/doc/classes/VSplitContainer.xml
+++ b/doc/classes/VSplitContainer.xml
@@ -13,6 +13,9 @@
<theme_item name="autohide" data_type="constant" type="int" default="1">
Boolean value. If 1 ([code]true[/code]), the grabber will hide automatically when it isn't under the cursor. If 0 ([code]false[/code]), it's always visible.
</theme_item>
+ <theme_item name="minimum_grab_thickness" data_type="constant" type="int" default="6">
+ The minimum thickness of the area users can click on to grab the splitting line. If [theme_item separation] or [theme_item grabber]'s thickness are too small, this ensure that the splitting line can still be dragged.
+ </theme_item>
<theme_item name="separation" data_type="constant" type="int" default="12">
The space between sides of the container.
</theme_item>
diff --git a/doc/classes/Variant.xml b/doc/classes/Variant.xml
index 0d6fcd0ef5..6b384d6a77 100644
--- a/doc/classes/Variant.xml
+++ b/doc/classes/Variant.xml
@@ -23,7 +23,6 @@
[/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 global [method @GlobalScope.typeof] function returns the enumerated value of the Variant type stored in the current variable (see [enum Variant.Type]).
[codeblocks]
diff --git a/doc/classes/Vector2.xml b/doc/classes/Vector2.xml
index 904fc6d9e9..eb83eb9aa6 100644
--- a/doc/classes/Vector2.xml
+++ b/doc/classes/Vector2.xml
@@ -5,7 +5,8 @@
</brief_description>
<description>
2-element structure that can be used to represent positions in 2D space or any other pair of numeric values.
- It uses floating-point coordinates. See [Vector2i] for its integer counterpart.
+ It uses floating-point coordinates. By default, these floating-point values use 32-bit precision, unlike [float] which is always 64-bit. If double precision is needed, compile the engine with the option [code]float=64[/code].
+ See [Vector2i] for its integer counterpart.
[b]Note:[/b] In a boolean context, a Vector2 will evaluate to [code]false[/code] if it's equal to [code]Vector2(0, 0)[/code]. Otherwise, a Vector2 will always evaluate to [code]true[/code].
</description>
<tutorials>
@@ -135,6 +136,20 @@
Cubically interpolates between this vector and [param b] using [param pre_a] and [param post_b] as handles, and returns the result at position [param weight]. [param weight] is on the range of 0.0 to 1.0, representing the amount of interpolation.
</description>
</method>
+ <method name="cubic_interpolate_in_time" qualifiers="const">
+ <return type="Vector2" />
+ <param index="0" name="b" type="Vector2" />
+ <param index="1" name="pre_a" type="Vector2" />
+ <param index="2" name="post_b" type="Vector2" />
+ <param index="3" name="weight" type="float" />
+ <param index="4" name="b_t" type="float" />
+ <param index="5" name="pre_a_t" type="float" />
+ <param index="6" name="post_b_t" type="float" />
+ <description>
+ Cubically interpolates between this vector and [param b] using [param pre_a] and [param post_b] as handles, and returns the result at position [param weight]. [param weight] is on the range of 0.0 to 1.0, representing the amount of interpolation.
+ It can perform smoother interpolation than [code]cubic_interpolate()[/code] by the time values.
+ </description>
+ </method>
<method name="direction_to" qualifiers="const">
<return type="Vector2" />
<param index="0" name="to" type="Vector2" />
@@ -192,12 +207,25 @@
Returns [code]true[/code] if this vector and [code]v[/code] are approximately equal, by running [method @GlobalScope.is_equal_approx] on each component.
</description>
</method>
+ <method name="is_finite" qualifiers="const">
+ <return type="bool" />
+ <description>
+ Returns [code]true[/code] if this vector is finite, by calling [method @GlobalScope.is_finite] on each component.
+ </description>
+ </method>
<method name="is_normalized" qualifiers="const">
<return type="bool" />
<description>
Returns [code]true[/code] if the vector is normalized, [code]false[/code] otherwise.
</description>
</method>
+ <method name="is_zero_approx" qualifiers="const">
+ <return type="bool" />
+ <description>
+ Returns [code]true[/code] if this vector's values are approximately zero, by running [method @GlobalScope.is_zero_approx] on each component.
+ This method is faster than using [method is_equal_approx] with one value as a zero vector.
+ </description>
+ </method>
<method name="length" qualifiers="const">
<return type="float" />
<description>
@@ -290,7 +318,7 @@
<return type="Vector2" />
<param index="0" name="angle" type="float" />
<description>
- Returns the vector rotated by [param angle] (in radians). See also [method @GlobalScope.deg2rad].
+ Returns the vector rotated by [param angle] (in radians). See also [method @GlobalScope.deg_to_rad].
</description>
</method>
<method name="round" qualifiers="const">
diff --git a/doc/classes/Vector2i.xml b/doc/classes/Vector2i.xml
index eab880e57f..fd02e3c530 100644
--- a/doc/classes/Vector2i.xml
+++ b/doc/classes/Vector2i.xml
@@ -5,7 +5,7 @@
</brief_description>
<description>
2-element structure that can be used to represent positions in 2D space or any other pair of numeric values.
- It uses integer coordinates and is therefore preferable to [Vector2] when exact precision is required.
+ It uses integer coordinates and is therefore preferable to [Vector2] when exact precision is required. Note that the values are limited to 32 bits, and unlike [Vector2] this cannot be configured with an engine build option. Use [int] or [PackedInt64Array] if 64-bit values are needed.
[b]Note:[/b] In a boolean context, a Vector2i will evaluate to [code]false[/code] if it's equal to [code]Vector2i(0, 0)[/code]. Otherwise, a Vector2i will always evaluate to [code]true[/code].
</description>
<tutorials>
diff --git a/doc/classes/Vector3.xml b/doc/classes/Vector3.xml
index 208e9935e3..9005dd3f0c 100644
--- a/doc/classes/Vector3.xml
+++ b/doc/classes/Vector3.xml
@@ -5,7 +5,8 @@
</brief_description>
<description>
3-element structure that can be used to represent positions in 3D space or any other triplet of numeric values.
- It uses floating-point coordinates. See [Vector3i] for its integer counterpart.
+ It uses floating-point coordinates. By default, these floating-point values use 32-bit precision, unlike [float] which is always 64-bit. If double precision is needed, compile the engine with the option [code]float=64[/code].
+ See [Vector3i] for its integer counterpart.
[b]Note:[/b] In a boolean context, a Vector3 will evaluate to [code]false[/code] if it's equal to [code]Vector3(0, 0, 0)[/code]. Otherwise, a Vector3 will always evaluate to [code]true[/code].
</description>
<tutorials>
@@ -109,6 +110,20 @@
Performs a cubic interpolation between this vector and [param b] using [param pre_a] and [param post_b] as handles, and returns the result at position [param weight]. [param weight] is on the range of 0.0 to 1.0, representing the amount of interpolation.
</description>
</method>
+ <method name="cubic_interpolate_in_time" qualifiers="const">
+ <return type="Vector3" />
+ <param index="0" name="b" type="Vector3" />
+ <param index="1" name="pre_a" type="Vector3" />
+ <param index="2" name="post_b" type="Vector3" />
+ <param index="3" name="weight" type="float" />
+ <param index="4" name="b_t" type="float" />
+ <param index="5" name="pre_a_t" type="float" />
+ <param index="6" name="post_b_t" type="float" />
+ <description>
+ Performs a cubic interpolation between this vector and [param b] using [param pre_a] and [param post_b] as handles, and returns the result at position [param weight]. [param weight] is on the range of 0.0 to 1.0, representing the amount of interpolation.
+ It can perform smoother interpolation than [code]cubic_interpolate()[/code] by the time values.
+ </description>
+ </method>
<method name="direction_to" qualifiers="const">
<return type="Vector3" />
<param index="0" name="to" type="Vector3" />
@@ -160,10 +175,23 @@
Returns [code]true[/code] if this vector and [param to] are approximately equal, by running [method @GlobalScope.is_equal_approx] on each component.
</description>
</method>
+ <method name="is_finite" qualifiers="const">
+ <return type="bool" />
+ <description>
+ Returns [code]true[/code] if this vector is finite, by calling [method @GlobalScope.is_finite] on each component.
+ </description>
+ </method>
<method name="is_normalized" qualifiers="const">
<return type="bool" />
<description>
- Returns [code]true[/code] if the vector is normalized, [code]false[/code] otherwise.
+ Returns [code]true[/code] if the vector is [method normalized], [code]false[/code] otherwise.
+ </description>
+ </method>
+ <method name="is_zero_approx" qualifiers="const">
+ <return type="bool" />
+ <description>
+ Returns [code]true[/code] if this vector's values are approximately zero, by running [method @GlobalScope.is_zero_approx] on each component.
+ This method is faster than using [method is_equal_approx] with one value as a zero vector.
</description>
</method>
<method name="length" qualifiers="const">
@@ -217,18 +245,22 @@
<method name="normalized" qualifiers="const">
<return type="Vector3" />
<description>
- Returns the vector scaled to unit length. Equivalent to [code]v / v.length()[/code].
+ Returns the vector scaled to unit length. Equivalent to [code]v / v.length()[/code]. See also [method is_normalized].
</description>
</method>
<method name="octahedron_decode" qualifiers="static">
<return type="Vector3" />
<param index="0" name="uv" type="Vector2" />
<description>
+ Returns the [Vector3] from an octahedral-compressed form created using [method octahedron_encode] (stored as a [Vector2]).
</description>
</method>
<method name="octahedron_encode" qualifiers="const">
<return type="Vector2" />
<description>
+ Returns the octahedral-encoded (oct32) form of this [Vector3] as a [Vector2]. Since a [Vector2] occupies 1/3 less memory compared to [Vector3], this form of compression can be used to pass greater amounts of [method normalized] [Vector3]s without increasing storage or memory requirements. See also [method octahedron_decode].
+ [b]Note:[/b] [method octahedron_encode] can only be used for [method normalized] vectors. [method octahedron_encode] does [i]not[/i] check whether this [Vector3] is normalized, and will return a value that does not decompress to the original value if the [Vector3] is not normalized.
+ [b]Note:[/b] Octahedral compression is [i]lossy[/i], although visual differences are rarely perceptible in real world scenarios.
</description>
</method>
<method name="outer" qualifiers="const">
diff --git a/doc/classes/Vector3i.xml b/doc/classes/Vector3i.xml
index 1c2a033f7a..eb64e098ce 100644
--- a/doc/classes/Vector3i.xml
+++ b/doc/classes/Vector3i.xml
@@ -5,7 +5,7 @@
</brief_description>
<description>
3-element structure that can be used to represent positions in 3D space or any other triplet of numeric values.
- It uses integer coordinates and is therefore preferable to [Vector3] when exact precision is required.
+ It uses integer coordinates and is therefore preferable to [Vector3] when exact precision is required. Note that the values are limited to 32 bits, and unlike [Vector3] this cannot be configured with an engine build option. Use [int] or [PackedInt64Array] if 64-bit values are needed.
[b]Note:[/b] In a boolean context, a Vector3i will evaluate to [code]false[/code] if it's equal to [code]Vector3i(0, 0, 0)[/code]. Otherwise, a Vector3i will always evaluate to [code]true[/code].
</description>
<tutorials>
diff --git a/doc/classes/Vector4.xml b/doc/classes/Vector4.xml
index 46005f8373..a2759937c1 100644
--- a/doc/classes/Vector4.xml
+++ b/doc/classes/Vector4.xml
@@ -5,7 +5,8 @@
</brief_description>
<description>
4-element structure that can be used to represent any quadruplet of numeric values.
- It uses floating-point coordinates. See [Vector4i] for its integer counterpart.
+ It uses floating-point coordinates. By default, these floating-point values use 32-bit precision, unlike [float] which is always 64-bit. If double precision is needed, compile the engine with the option [code]float=64[/code].
+ See [Vector4i] for its integer counterpart.
[b]Note:[/b] In a boolean context, a Vector4 will evaluate to [code]false[/code] if it's equal to [code]Vector4(0, 0, 0, 0)[/code]. Otherwise, a Vector4 will always evaluate to [code]true[/code].
</description>
<tutorials>
@@ -28,7 +29,7 @@
<return type="Vector4" />
<param index="0" name="from" type="Vector4i" />
<description>
- Constructs a new [Vector4] from [Vector4i].
+ Constructs a new [Vector4] from the given [Vector4i].
</description>
</constructor>
<constructor name="Vector4">
@@ -73,6 +74,20 @@
Performs a cubic interpolation between this vector and [param b] using [param pre_a] and [param post_b] as handles, and returns the result at position [param weight]. [param weight] is on the range of 0.0 to 1.0, representing the amount of interpolation.
</description>
</method>
+ <method name="cubic_interpolate_in_time" qualifiers="const">
+ <return type="Vector4" />
+ <param index="0" name="b" type="Vector4" />
+ <param index="1" name="pre_a" type="Vector4" />
+ <param index="2" name="post_b" type="Vector4" />
+ <param index="3" name="weight" type="float" />
+ <param index="4" name="b_t" type="float" />
+ <param index="5" name="pre_a_t" type="float" />
+ <param index="6" name="post_b_t" type="float" />
+ <description>
+ Performs a cubic interpolation between this vector and [param b] using [param pre_a] and [param post_b] as handles, and returns the result at position [param weight]. [param weight] is on the range of 0.0 to 1.0, representing the amount of interpolation.
+ It can perform smoother interpolation than [code]cubic_interpolate()[/code] by the time values.
+ </description>
+ </method>
<method name="direction_to" qualifiers="const">
<return type="Vector4" />
<param index="0" name="to" type="Vector4" />
@@ -84,7 +99,7 @@
<return type="float" />
<param index="0" name="to" type="Vector4" />
<description>
- Returns the squared distance between this vector and [code]to[/code].
+ Returns the squared distance between this vector and [param to].
This method runs faster than [method distance_to], so prefer it if you need to compare vectors or need the squared distance for some formula.
</description>
</method>
@@ -121,12 +136,25 @@
Returns [code]true[/code] if this vector and [param with] are approximately equal, by running [method @GlobalScope.is_equal_approx] on each component.
</description>
</method>
+ <method name="is_finite" qualifiers="const">
+ <return type="bool" />
+ <description>
+ Returns [code]true[/code] if this vector is finite, by calling [method @GlobalScope.is_finite] on each component.
+ </description>
+ </method>
<method name="is_normalized" qualifiers="const">
<return type="bool" />
<description>
Returns [code]true[/code] if the vector is normalized, i.e. its length is equal to 1.
</description>
</method>
+ <method name="is_zero_approx" qualifiers="const">
+ <return type="bool" />
+ <description>
+ Returns [code]true[/code] if this vector's values are approximately zero, by running [method @GlobalScope.is_zero_approx] on each component.
+ This method is faster than using [method is_equal_approx] with one value as a zero vector.
+ </description>
+ </method>
<method name="length" qualifiers="const">
<return type="float" />
<description>
diff --git a/doc/classes/Vector4i.xml b/doc/classes/Vector4i.xml
index 9a36c3c4fa..2dc10234ee 100644
--- a/doc/classes/Vector4i.xml
+++ b/doc/classes/Vector4i.xml
@@ -1,8 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="Vector4i" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
+ Vector used for 4D math using integer coordinates.
</brief_description>
<description>
+ 4-element structure that can be used to represent 4D grid coordinates or sets of integers.
+ It uses integer coordinates and is therefore preferable to [Vector4] when exact precision is required. Note that the values are limited to 32 bits, and unlike [Vector4] this cannot be configured with an engine build option. Use [int] or [PackedInt64Array] if 64-bit values are needed.
</description>
<tutorials>
</tutorials>
@@ -10,18 +13,21 @@
<constructor name="Vector4i">
<return type="Vector4i" />
<description>
+ Constructs a default-initialized [Vector4i] with all components set to [code]0[/code].
</description>
</constructor>
<constructor name="Vector4i">
<return type="Vector4i" />
<param index="0" name="from" type="Vector4i" />
<description>
+ Constructs a [Vector4i] as a copy of the given [Vector4i].
</description>
</constructor>
<constructor name="Vector4i">
<return type="Vector4i" />
<param index="0" name="from" type="Vector4" />
<description>
+ Constructs a new [Vector4i] from the given [Vector4].
</description>
</constructor>
<constructor name="Vector4i">
@@ -31,6 +37,7 @@
<param index="2" name="z" type="int" />
<param index="3" name="w" type="int" />
<description>
+ Returns a [Vector4i] with the given components.
</description>
</constructor>
</constructors>
@@ -38,6 +45,7 @@
<method name="abs" qualifiers="const">
<return type="Vector4i" />
<description>
+ Returns a new vector with all components in absolute values (i.e. positive).
</description>
</method>
<method name="clamp" qualifiers="const">
@@ -45,56 +53,72 @@
<param index="0" name="min" type="Vector4i" />
<param index="1" name="max" type="Vector4i" />
<description>
+ Returns a new vector with all components clamped between the components of [param min] and [param max], by running [method @GlobalScope.clamp] on each component.
</description>
</method>
<method name="length" qualifiers="const">
<return type="float" />
<description>
+ Returns the length (magnitude) of this vector.
</description>
</method>
<method name="length_squared" qualifiers="const">
<return type="int" />
<description>
+ Returns the squared length (squared magnitude) of this vector. This method runs faster than [method length].
</description>
</method>
<method name="max_axis_index" qualifiers="const">
<return type="int" />
<description>
+ Returns the axis of the vector's highest value. See [code]AXIS_*[/code] constants. If all components are equal, this method returns [constant AXIS_X].
</description>
</method>
<method name="min_axis_index" qualifiers="const">
<return type="int" />
<description>
+ Returns the axis of the vector's lowest value. See [code]AXIS_*[/code] constants. If all components are equal, this method returns [constant AXIS_W].
</description>
</method>
<method name="sign" qualifiers="const">
<return type="Vector4i" />
<description>
+ Returns a new vector with each component set to one or negative one, depending on the signs of the components, or zero if the component is zero, by calling [method @GlobalScope.sign] on each component.
</description>
</method>
</methods>
<members>
<member name="w" type="int" setter="" getter="" default="0">
+ The vector's W component. Also accessible by using the index position [code][3][/code].
</member>
<member name="x" type="int" setter="" getter="" default="0">
+ The vector's X component. Also accessible by using the index position [code][0][/code].
</member>
<member name="y" type="int" setter="" getter="" default="0">
+ The vector's Y component. Also accessible by using the index position [code][1][/code].
</member>
<member name="z" type="int" setter="" getter="" default="0">
+ The vector's Z component. Also accessible by using the index position [code][2][/code].
</member>
</members>
<constants>
<constant name="AXIS_X" value="0">
+ Enumerated value for the X axis. Returned by [method max_axis_index] and [method min_axis_index].
</constant>
<constant name="AXIS_Y" value="1">
+ Enumerated value for the Y axis. Returned by [method max_axis_index] and [method min_axis_index].
</constant>
<constant name="AXIS_Z" value="2">
+ Enumerated value for the Z axis. Returned by [method max_axis_index] and [method min_axis_index].
</constant>
<constant name="AXIS_W" value="3">
+ Enumerated value for the W axis. Returned by [method max_axis_index] and [method min_axis_index].
</constant>
<constant name="ZERO" value="Vector4i(0, 0, 0, 0)">
+ Zero vector, a vector with all components set to [code]0[/code].
</constant>
<constant name="ONE" value="Vector4i(1, 1, 1, 1)">
+ One vector, a vector with all components set to [code]1[/code].
</constant>
</constants>
<operators>
@@ -102,112 +126,157 @@
<return type="bool" />
<param index="0" name="right" type="Vector4i" />
<description>
+ Returns [code]true[/code] if the vectors are not equal.
</description>
</operator>
<operator name="operator %">
<return type="Vector4i" />
<param index="0" name="right" type="Vector4i" />
<description>
+ Gets the remainder of each component of the [Vector4i] with the components of the given [Vector4i]. This operation uses truncated division, which is often not desired as it does not work well with negative numbers. Consider using [method @GlobalScope.posmod] instead if you want to handle negative numbers.
+ [codeblock]
+ print(Vector4i(10, -20, 30, -40) % Vector4i(7, 8, 9, 10)) # Prints "(3, -4, 3, 0)"
+ [/codeblock]
</description>
</operator>
<operator name="operator %">
<return type="Vector4i" />
<param index="0" name="right" type="int" />
<description>
+ Gets the remainder of each component of the [Vector4i] with the the given [int]. This operation uses truncated division, which is often not desired as it does not work well with negative numbers. Consider using [method @GlobalScope.posmod] instead if you want to handle negative numbers.
+ [codeblock]
+ print(Vector4i(10, -20, 30, -40) % 7) # Prints "(3, -6, 2, -5)"
+ [/codeblock]
</description>
</operator>
<operator name="operator *">
<return type="Vector4i" />
<param index="0" name="right" type="Vector4i" />
<description>
+ Multiplies each component of the [Vector4i] by the components of the given [Vector4i].
+ [codeblock]
+ print(Vector4i(10, 20, 30, 40) * Vector4i(3, 4, 5, 6)) # Prints "(30, 80, 150, 240)"
+ [/codeblock]
</description>
</operator>
<operator name="operator *">
<return type="Vector4" />
<param index="0" name="right" type="float" />
<description>
+ Multiplies each component of the [Vector4i] by the given [float].
+ Returns a Vector4 value due to floating-point operations.
+ [codeblock]
+ print(Vector4i(10, 20, 30, 40) * 2) # Prints "(20, 40, 60, 80)"
+ [/codeblock]
</description>
</operator>
<operator name="operator *">
<return type="Vector4i" />
<param index="0" name="right" type="int" />
<description>
+ Multiplies each component of the [Vector4i] by the given [int].
</description>
</operator>
<operator name="operator +">
<return type="Vector4i" />
<param index="0" name="right" type="Vector4i" />
<description>
+ Adds each component of the [Vector4i] by the components of the given [Vector4i].
+ [codeblock]
+ print(Vector4i(10, 20, 30, 40) + Vector4i(3, 4, 5, 6)) # Prints "(13, 24, 35, 46)"
+ [/codeblock]
</description>
</operator>
<operator name="operator -">
<return type="Vector4i" />
<param index="0" name="right" type="Vector4i" />
<description>
+ Subtracts each component of the [Vector4i] by the components of the given [Vector4i].
+ [codeblock]
+ print(Vector4i(10, 20, 30, 40) - Vector4i(3, 4, 5, 6)) # Prints "(7, 16, 25, 34)"
+ [/codeblock]
</description>
</operator>
<operator name="operator /">
<return type="Vector4i" />
<param index="0" name="right" type="Vector4i" />
<description>
+ Divides each component of the [Vector4i] by the components of the given [Vector4i].
+ [codeblock]
+ print(Vector4i(10, 20, 30, 40) / Vector4i(2, 5, 3, 4)) # Prints "(5, 4, 10, 10)"
+ [/codeblock]
</description>
</operator>
<operator name="operator /">
<return type="Vector4" />
<param index="0" name="right" type="float" />
<description>
+ Divides each component of the [Vector4i] by the given [float].
+ Returns a Vector4 value due to floating-point operations.
+ [codeblock]
+ print(Vector4i(10, 20, 30, 40) / 2 # Prints "(5, 10, 15, 20)"
+ [/codeblock]
</description>
</operator>
<operator name="operator /">
<return type="Vector4i" />
<param index="0" name="right" type="int" />
<description>
+ Divides each component of the [Vector4i] by the given [int].
</description>
</operator>
<operator name="operator &lt;">
<return type="bool" />
<param index="0" name="right" type="Vector4i" />
<description>
+ Compares two [Vector4i] vectors by first checking if the X value of the left vector is less than the X value of the [param right] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors, Z values of the two vectors, and then with the W values. This operator is useful for sorting vectors.
</description>
</operator>
<operator name="operator &lt;=">
<return type="bool" />
<param index="0" name="right" type="Vector4i" />
<description>
+ Compares two [Vector4i] vectors by first checking if the X value of the left vector is less than or equal to the X value of the [param right] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors, Z values of the two vectors, and then with the W values. This operator is useful for sorting vectors.
</description>
</operator>
<operator name="operator ==">
<return type="bool" />
<param index="0" name="right" type="Vector4i" />
<description>
+ Returns [code]true[/code] if the vectors are exactly equal.
</description>
</operator>
<operator name="operator &gt;">
<return type="bool" />
<param index="0" name="right" type="Vector4i" />
<description>
+ Compares two [Vector4i] vectors by first checking if the X value of the left vector is greater than the X value of the [param right] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors, Z values of the two vectors, and then with the W values. This operator is useful for sorting vectors.
</description>
</operator>
<operator name="operator &gt;=">
<return type="bool" />
<param index="0" name="right" type="Vector4i" />
<description>
+ Compares two [Vector4i] vectors by first checking if the X value of the left vector is greater than or equal to the X value of the [param right] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors, Z values of the two vectors, and then with the W values. This operator is useful for sorting vectors.
</description>
</operator>
<operator name="operator []">
<return type="int" />
<param index="0" name="index" type="int" />
<description>
+ Access vector components using their [param index]. [code]v[0][/code] is equivalent to [code]v.x[/code], [code]v[1][/code] is equivalent to [code]v.y[/code], [code]v[2][/code] is equivalent to [code]v.z[/code], and [code]v[3][/code] is equivalent to [code]v.w[/code].
</description>
</operator>
<operator name="operator unary+">
<return type="Vector4i" />
<description>
+ Returns the same value as if the [code]+[/code] was not there. Unary [code]+[/code] does nothing, but sometimes it can make your code more readable.
</description>
</operator>
<operator name="operator unary-">
<return type="Vector4i" />
<description>
+ Returns the negative value of the [Vector4i]. This is the same as writing [code]Vector4i(-v.x, -v.y, -v.z, -v.w)[/code]. This operation flips the direction of the vector while keeping the same magnitude.
</description>
</operator>
</operators>
diff --git a/doc/classes/VehicleBody3D.xml b/doc/classes/VehicleBody3D.xml
index 08309a8ecc..e1689133de 100644
--- a/doc/classes/VehicleBody3D.xml
+++ b/doc/classes/VehicleBody3D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VehicleBody3D" inherits="RigidDynamicBody3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+<class name="VehicleBody3D" inherits="RigidBody3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Physics body that simulates the behavior of a car.
</brief_description>
@@ -13,14 +13,14 @@
</tutorials>
<members>
<member name="brake" type="float" setter="set_brake" getter="get_brake" default="0.0">
- Slows down the vehicle by applying a braking force. The vehicle is only slowed down if the wheels are in contact with a surface. The force you need to apply to adequately slow down your vehicle depends on the [member RigidDynamicBody3D.mass] of the vehicle. For a vehicle with a mass set to 1000, try a value in the 25 - 30 range for hard braking.
+ Slows down the vehicle by applying a braking force. The vehicle is only slowed down if the wheels are in contact with a surface. The force you need to apply to adequately slow down your vehicle depends on the [member RigidBody3D.mass] of the vehicle. For a vehicle with a mass set to 1000, try a value in the 25 - 30 range for hard braking.
</member>
<member name="engine_force" type="float" setter="set_engine_force" getter="get_engine_force" default="0.0">
- Accelerates the vehicle by applying an engine force. The vehicle is only sped up if the wheels that have [member VehicleWheel3D.use_as_traction] set to [code]true[/code] and are in contact with a surface. The [member RigidDynamicBody3D.mass] of the vehicle has an effect on the acceleration of the vehicle. For a vehicle with a mass set to 1000, try a value in the 25 - 50 range for acceleration.
+ Accelerates the vehicle by applying an engine force. The vehicle is only sped up if the wheels that have [member VehicleWheel3D.use_as_traction] set to [code]true[/code] and are in contact with a surface. The [member RigidBody3D.mass] of the vehicle has an effect on the acceleration of the vehicle. For a vehicle with a mass set to 1000, try a value in the 25 - 50 range for acceleration.
[b]Note:[/b] The simulation does not take the effect of gears into account, you will need to add logic for this if you wish to simulate gears.
A negative value will result in the vehicle reversing.
</member>
- <member name="mass" type="float" setter="set_mass" getter="get_mass" overrides="RigidDynamicBody3D" default="40.0" />
+ <member name="mass" type="float" setter="set_mass" getter="get_mass" overrides="RigidBody3D" default="40.0" />
<member name="steering" type="float" setter="set_steering" getter="get_steering" default="0.0">
The steering angle for the vehicle, in radians. Setting this to a non-zero value will result in the vehicle turning when it's moving. Wheels that have [member VehicleWheel3D.use_as_steering] set to [code]true[/code] will automatically be rotated.
</member>
diff --git a/doc/classes/VehicleWheel3D.xml b/doc/classes/VehicleWheel3D.xml
index ac126f824e..827c7e8f57 100644
--- a/doc/classes/VehicleWheel3D.xml
+++ b/doc/classes/VehicleWheel3D.xml
@@ -39,7 +39,7 @@
</methods>
<members>
<member name="brake" type="float" setter="set_brake" getter="get_brake" default="0.0">
- Slows down the wheel by applying a braking force. The wheel is only slowed down if it is in contact with a surface. The force you need to apply to adequately slow down your vehicle depends on the [member RigidDynamicBody3D.mass] of the vehicle. For a vehicle with a mass set to 1000, try a value in the 25 - 30 range for hard braking.
+ Slows down the wheel by applying a braking force. The wheel is only slowed down if it is in contact with a surface. The force you need to apply to adequately slow down your vehicle depends on the [member RigidBody3D.mass] of the vehicle. For a vehicle with a mass set to 1000, try a value in the 25 - 30 range for hard braking.
</member>
<member name="damping_compression" type="float" setter="set_damping_compression" getter="get_damping_compression" default="0.83">
The damping applied to the spring when the spring is being compressed. This value should be between 0.0 (no damping) and 1.0. A value of 0.0 means the car will keep bouncing as the spring keeps its energy. A good value for this is around 0.3 for a normal car, 0.5 for a race car.
@@ -48,7 +48,7 @@
The damping applied to the spring when relaxing. This value should be between 0.0 (no damping) and 1.0. This value should always be slightly higher than the [member damping_compression] property. For a [member damping_compression] value of 0.3, try a relaxation value of 0.5.
</member>
<member name="engine_force" type="float" setter="set_engine_force" getter="get_engine_force" default="0.0">
- Accelerates the wheel by applying an engine force. The wheel is only sped up if it is in contact with a surface. The [member RigidDynamicBody3D.mass] of the vehicle has an effect on the acceleration of the vehicle. For a vehicle with a mass set to 1000, try a value in the 25 - 50 range for acceleration.
+ Accelerates the wheel by applying an engine force. The wheel is only sped up if it is in contact with a surface. The [member RigidBody3D.mass] of the vehicle has an effect on the acceleration of the vehicle. For a vehicle with a mass set to 1000, try a value in the 25 - 50 range for acceleration.
[b]Note:[/b] The simulation does not take the effect of gears into account, you will need to add logic for this if you wish to simulate gears.
A negative value will result in the wheel reversing.
</member>
@@ -56,7 +56,7 @@
The steering angle for the wheel, in radians. Setting this to a non-zero value will result in the vehicle turning when it's moving.
</member>
<member name="suspension_max_force" type="float" setter="set_suspension_max_force" getter="get_suspension_max_force" default="6000.0">
- The maximum force the spring can resist. This value should be higher than a quarter of the [member RigidDynamicBody3D.mass] of the [VehicleBody3D] or the spring will not carry the weight of the vehicle. Good results are often obtained by a value that is about 3× to 4× this number.
+ The maximum force the spring can resist. This value should be higher than a quarter of the [member RigidBody3D.mass] of the [VehicleBody3D] or the spring will not carry the weight of the vehicle. Good results are often obtained by a value that is about 3× to 4× this number.
</member>
<member name="suspension_stiffness" type="float" setter="set_suspension_stiffness" getter="get_suspension_stiffness" default="5.88">
This value defines the stiffness of the suspension. Use a value lower than 50 for an off-road car, a value between 50 and 100 for a race car and try something around 200 for something like a Formula 1 car.
diff --git a/doc/classes/VelocityTracker3D.xml b/doc/classes/VelocityTracker3D.xml
deleted file mode 100644
index 56b60ba13c..0000000000
--- a/doc/classes/VelocityTracker3D.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VelocityTracker3D" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <tutorials>
- </tutorials>
- <methods>
- <method name="get_tracked_linear_velocity" qualifiers="const">
- <return type="Vector3" />
- <description>
- </description>
- </method>
- <method name="reset">
- <return type="void" />
- <param index="0" name="position" type="Vector3" />
- <description>
- </description>
- </method>
- <method name="update_position">
- <return type="void" />
- <param index="0" name="position" type="Vector3" />
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="track_physics_step" type="bool" setter="set_track_physics_step" getter="is_tracking_physics_step" default="false">
- </member>
- </members>
-</class>
diff --git a/doc/classes/VideoStreamPlayer.xml b/doc/classes/VideoStreamPlayer.xml
index f6594ff9e7..2774f1fb42 100644
--- a/doc/classes/VideoStreamPlayer.xml
+++ b/doc/classes/VideoStreamPlayer.xml
@@ -7,7 +7,7 @@
Control node for playing video streams using [VideoStream] resources.
Supported video formats are [url=https://www.theora.org/]Ogg Theora[/url] ([code].ogv[/code], [VideoStreamTheora]) and any format exposed via a GDExtension plugin.
[b]Note:[/b] Due to a bug, VideoStreamPlayer does not support localization remapping yet.
- [b]Warning:[/b] On HTML5, video playback [i]will[/i] perform poorly due to missing architecture-specific assembly optimizations.
+ [b]Warning:[/b] On Web, video playback [i]will[/i] perform poorly due to missing architecture-specific assembly optimizations.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/Viewport.xml b/doc/classes/Viewport.xml
index 2e43d2d96f..78013a8f4b 100644
--- a/doc/classes/Viewport.xml
+++ b/doc/classes/Viewport.xml
@@ -45,6 +45,13 @@
Returns the currently active 3D camera.
</description>
</method>
+ <method name="get_canvas_cull_mask_bit" qualifiers="const">
+ <return type="bool" />
+ <param index="0" name="layer" type="int" />
+ <description>
+ Returns an individual bit on the rendering layer mask.
+ </description>
+ </method>
<method name="get_final_transform" qualifiers="const">
<return type="Transform2D" />
<description>
@@ -71,6 +78,12 @@
<description>
</description>
</method>
+ <method name="get_screen_transform" qualifiers="const">
+ <return type="Transform2D" />
+ <description>
+ Returns the transform from the Viewport's coordinates to the screen coordinates of the containing window manager window.
+ </description>
+ </method>
<method name="get_texture" qualifiers="const">
<return type="ViewportTexture" />
<description>
@@ -129,6 +142,9 @@
<method name="is_input_handled" qualifiers="const">
<return type="bool" />
<description>
+ Returns whether the current [InputEvent] has been handled. Input events are not handled until [method set_input_as_handled] has been called during the lifetime of an [InputEvent].
+ This is usually done as part of input handling methods like [method Node._input], [method Control._gui_input] or others, as well as in corresponding signal handlers.
+ If [member handle_input_locally] is set to [code]false[/code], this method will try finding the first parent viewport that is set to handle input locally, and return its value for [method is_input_handled] instead.
</description>
</method>
<method name="push_input">
@@ -136,6 +152,13 @@
<param index="0" name="event" type="InputEvent" />
<param index="1" name="in_local_coords" type="bool" default="false" />
<description>
+ Triggers the given [param event] in this [Viewport]. This can be used to pass an [InputEvent] between viewports, or to locally apply inputs that were sent over the network or saved to a file.
+ If [param in_local_coords] is [code]false[/code], the event's position is in the embedder's coordinates and will be converted to viewport coordinates. If [param in_local_coords] is [code]true[/code], the event's position is in viewport coordinates.
+ While this method serves a similar purpose as [method Input.parse_input_event], it does not remap the specified [param event] based on project settings like [member ProjectSettings.input_devices/pointing/emulate_touch_from_mouse].
+ Calling this method will propagate calls to child nodes for following methods in the given order:
+ - [method Node._input]
+ - [method Control._gui_input] for [Control] nodes
+ If an earlier method marks the input as handled via [method set_input_as_handled], any later method in this list will not be called.
</description>
</method>
<method name="push_text_input">
@@ -149,6 +172,23 @@
<param index="0" name="event" type="InputEvent" />
<param index="1" name="in_local_coords" type="bool" default="false" />
<description>
+ Triggers the given [InputEvent] in this [Viewport]. This can be used to pass input events between viewports, or to locally apply inputs that were sent over the network or saved to a file.
+ If [param in_local_coords] is [code]false[/code], the event's position is in the embedder's coordinates and will be converted to viewport coordinates. If [param in_local_coords] is [code]true[/code], the event's position is in viewport coordinates.
+ While this method serves a similar purpose as [method Input.parse_input_event], it does not remap the specified [param event] based on project settings like [member ProjectSettings.input_devices/pointing/emulate_touch_from_mouse].
+ Calling this method will propagate calls to child nodes for following methods in the given order:
+ - [method Node._shortcut_input]
+ - [method Node._unhandled_input]
+ - [method Node._unhandled_key_input]
+ If an earlier method marks the input as handled via [method set_input_as_handled], any later method in this list will not be called.
+ If none of the methods handle the event and [member physics_object_picking] is [code]true[/code], the event is used for physics object picking.
+ </description>
+ </method>
+ <method name="set_canvas_cull_mask_bit">
+ <return type="void" />
+ <param index="0" name="layer" type="int" />
+ <param index="1" name="enable" type="bool" />
+ <description>
+ Set/clear individual bits on the rendering layer mask. This simplifies editing this [Viewport]'s layers.
</description>
</method>
<method name="set_input_as_handled">
@@ -180,6 +220,9 @@
<member name="audio_listener_enable_3d" type="bool" setter="set_as_audio_listener_3d" getter="is_audio_listener_3d" default="false">
If [code]true[/code], the viewport will process 3D audio streams.
</member>
+ <member name="canvas_cull_mask" type="int" setter="set_canvas_cull_mask" getter="get_canvas_cull_mask" default="4294967295">
+ The rendering layers in which this [Viewport] renders [CanvasItem] nodes.
+ </member>
<member name="canvas_item_default_texture_filter" type="int" setter="set_default_canvas_item_texture_filter" getter="get_default_canvas_item_texture_filter" enum="Viewport.DefaultCanvasItemTextureFilter" default="1">
Sets the default filter mode used by [CanvasItem]s in this Viewport. See [enum DefaultCanvasItemTextureFilter] for options.
</member>
@@ -212,14 +255,20 @@
If [code]true[/code], the GUI controls on the viewport will lay pixel perfectly.
</member>
<member name="handle_input_locally" type="bool" setter="set_handle_input_locally" getter="is_handling_input_locally" default="true">
+ If [code]true[/code], this viewport will mark incoming input events as handled by itself. If [code]false[/code], this is instead done by the the first parent viewport that is set to handle input locally.
+ A [SubViewportContainer] will automatically set this property to [code]false[/code] for the [Viewport] contained inside of it.
+ See also [method set_input_as_handled] and [method is_input_handled].
</member>
<member name="mesh_lod_threshold" type="float" setter="set_mesh_lod_threshold" getter="get_mesh_lod_threshold" default="1.0">
The automatic LOD bias to use for meshes rendered within the [Viewport] (this is analogous to [member ReflectionProbe.mesh_lod_threshold]). Higher values will use less detailed versions of meshes that have LOD variations generated. If set to [code]0.0[/code], automatic LOD is disabled. Increase [member mesh_lod_threshold] to improve performance at the cost of geometry detail.
To control this property on the root viewport, set the [member ProjectSettings.rendering/mesh_lod/lod_change/threshold_pixels] project setting.
[b]Note:[/b] [member mesh_lod_threshold] does not affect [GeometryInstance3D] visibility ranges (also known as "manual" LOD or hierarchical LOD).
</member>
- <member name="msaa" type="int" setter="set_msaa" getter="get_msaa" enum="Viewport.MSAA" default="0">
- The multisample anti-aliasing mode. A higher number results in smoother edges at the cost of significantly worse performance. A value of 2 or 4 is best unless targeting very high-end systems. See also bilinear scaling 3d [member scaling_3d_mode] for supersampling, which provides higher quality but is much more expensive.
+ <member name="msaa_2d" type="int" setter="set_msaa_2d" getter="get_msaa_2d" enum="Viewport.MSAA" default="0">
+ The multisample anti-aliasing mode for 2D/Canvas rendering. A higher number results in smoother edges at the cost of significantly worse performance. A value of 2 or 4 is best unless targeting very high-end systems. This has no effect on shader-induced aliasing or texture aliasing.
+ </member>
+ <member name="msaa_3d" type="int" setter="set_msaa_3d" getter="get_msaa_3d" enum="Viewport.MSAA" default="0">
+ The multisample anti-aliasing mode for 3D rendering. A higher number results in smoother edges at the cost of significantly worse performance. A value of 2 or 4 is best unless targeting very high-end systems. See also bilinear scaling 3d [member scaling_3d_mode] for supersampling, which provides higher quality but is much more expensive. This has no effect on shader-induced aliasing or texture aliasing.
</member>
<member name="own_world_3d" type="bool" setter="set_use_own_world_3d" getter="is_using_own_world_3d" default="false">
If [code]true[/code], the viewport will use a unique copy of the [World3D] defined in [member world_3d].
@@ -250,7 +299,7 @@
To control this property on the root viewport, set the [member ProjectSettings.rendering/scaling_3d/mode] project setting.
</member>
<member name="scaling_3d_scale" type="float" setter="set_scaling_3d_scale" getter="get_scaling_3d_scale" default="1.0">
- Scales the 3D render buffer based on the viewport size uses an image filter specified in [member ProjectSettings.rendering/scaling_3d/mode] to scale the output image to the full viewport size. Values lower than [code]1.0[/code] can be used to speed up 3D rendering at the cost of quality (undersampling). Values greater than [code]1.0[/code] are only valid for bilinear mode and can be used to improve 3D rendering quality at a high performance cost (supersampling). See also [member ProjectSettings.rendering/anti_aliasing/quality/msaa] for multi-sample antialiasing, which is significantly cheaper but only smoothens the edges of polygons.
+ Scales the 3D render buffer based on the viewport size uses an image filter specified in [member ProjectSettings.rendering/scaling_3d/mode] to scale the output image to the full viewport size. Values lower than [code]1.0[/code] can be used to speed up 3D rendering at the cost of quality (undersampling). Values greater than [code]1.0[/code] are only valid for bilinear mode and can be used to improve 3D rendering quality at a high performance cost (supersampling). See also [member ProjectSettings.rendering/anti_aliasing/quality/msaa_3d] for multi-sample antialiasing, which is significantly cheaper but only smooths the edges of polygons.
When using FSR upscaling, AMD recommends exposing the following values as preset options to users "Ultra Quality: 0.77", "Quality: 0.67", "Balanced: 0.59", "Performance: 0.5" instead of exposing the entire scale.
To control this property on the root viewport, set the [member ProjectSettings.rendering/scaling_3d/scale] project setting.
</member>
@@ -266,14 +315,17 @@
<member name="snap_2d_vertices_to_pixel" type="bool" setter="set_snap_2d_vertices_to_pixel" getter="is_snap_2d_vertices_to_pixel_enabled" default="false">
</member>
<member name="texture_mipmap_bias" type="float" setter="set_texture_mipmap_bias" getter="get_texture_mipmap_bias" default="0.0">
- Affects the final texture sharpness by reading from a lower or higher mipmap (also called "texture LOD bias"). Negative values make mipmapped textures sharper but grainier when viewed at a distance, while positive values make mipmapped textures blurrier (even when up close). To get sharper textures at a distance without introducing too much graininess, set this between [code]-0.75[/code] and [code]0.0[/code]. Enabling temporal antialiasing ([member ProjectSettings.rendering/anti_aliasing/quality/use_taa]) can help reduce the graininess visible when using negative mipmap bias.
- [b]Note:[/b] When the 3D scaling mode is set to FSR 1.0, this value is used to adjust the automatic mipmap bias which is calculated internally based on the scale factor. The formula for this is [code]-log2(1.0 / scale) + mipmap_bias[/code].
+ Affects the final texture sharpness by reading from a lower or higher mipmap (also called "texture LOD bias"). Negative values make mipmapped textures sharper but grainier when viewed at a distance, while positive values make mipmapped textures blurrier (even when up close).
+ Enabling temporal antialiasing ([member use_taa]) will automatically apply a [code]-0.5[/code] offset to this value, while enabling FXAA ([member screen_space_aa]) will automatically apply a [code]-0.25[/code] offset to this value. If both TAA and FXAA are enbled at the same time, an offset of [code]-0.75[/code] is applied to this value.
+ [b]Note:[/b] If [member scaling_3d_scale] is lower than [code]1.0[/code] (exclusive), [member texture_mipmap_bias] is used to adjust the automatic mipmap bias which is calculated internally based on the scale factor. The formula for this is [code]log2(scaling_3d_scale) + mipmap_bias[/code].
To control this property on the root viewport, set the [member ProjectSettings.rendering/textures/default_filters/texture_mipmap_bias] project setting.
</member>
<member name="transparent_bg" type="bool" setter="set_transparent_background" getter="has_transparent_background" default="false">
If [code]true[/code], the viewport should render its background as transparent.
</member>
<member name="use_debanding" type="bool" setter="set_use_debanding" getter="is_using_debanding" default="false">
+ If [code]true[/code], uses a fast post-processing filter to make banding significantly less visible in 3D. 2D rendering is [i]not[/i] affected by debanding unless the [member Environment.background_mode] is [constant Environment.BG_CANVAS]. See also [member ProjectSettings.rendering/anti_aliasing/quality/use_debanding].
+ In some cases, debanding may introduce a slightly noticeable dithering pattern. It's recommended to enable debanding only when actually needed since the dithering pattern will make lossless-compressed screenshots larger.
</member>
<member name="use_occlusion_culling" type="bool" setter="set_use_occlusion_culling" getter="is_using_occlusion_culling" default="false">
If [code]true[/code], [OccluderInstance3D] nodes will be usable for occlusion culling in 3D for this viewport. For the root viewport, [member ProjectSettings.rendering/occlusion_culling/use_occlusion_culling] must be set to [code]true[/code] instead.
diff --git a/doc/classes/ViewportTexture.xml b/doc/classes/ViewportTexture.xml
index 87de664aad..6bd64a50bb 100644
--- a/doc/classes/ViewportTexture.xml
+++ b/doc/classes/ViewportTexture.xml
@@ -6,6 +6,7 @@
<description>
Displays the content of a [Viewport] node as a dynamic [Texture2D]. This can be used to mix controls, 2D, and 3D elements in the same scene.
To create a ViewportTexture in code, use the [method Viewport.get_texture] method on the target viewport.
+ [b]Note:[/b] When local to scene, this texture uses [method Resource.setup_local_to_scene] to set the proxy texture and flags in the local viewport.
</description>
<tutorials>
<link title="GUI in 3D Demo">https://godotengine.org/asset-library/asset/127</link>
diff --git a/doc/classes/VisibleOnScreenEnabler2D.xml b/doc/classes/VisibleOnScreenEnabler2D.xml
index 50d0c00017..8590e9cc9f 100644
--- a/doc/classes/VisibleOnScreenEnabler2D.xml
+++ b/doc/classes/VisibleOnScreenEnabler2D.xml
@@ -1,23 +1,30 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="VisibleOnScreenEnabler2D" inherits="VisibleOnScreenNotifier2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
+ Automatically disables another node if not visible on screen.
</brief_description>
<description>
+ VisibleOnScreenEnabler2D detects when it is visible on screen (just like [VisibleOnScreenNotifier2D]) and automatically enables or disables the target node. The target node is disabled when [VisibleOnScreenEnabler2D] is not visible on screen (including when [member CanvasItem.visible] is [code]false[/code]), and enabled when the enabler is visible. The disabling is achieved by changing [member Node.process_mode].
</description>
<tutorials>
</tutorials>
<members>
<member name="enable_mode" type="int" setter="set_enable_mode" getter="get_enable_mode" enum="VisibleOnScreenEnabler2D.EnableMode" default="0">
+ Determines how the node is enabled. Corresponds to [enum Node.ProcessMode]. Disabled node uses [constant Node.PROCESS_MODE_DISABLED].
</member>
<member name="enable_node_path" type="NodePath" setter="set_enable_node_path" getter="get_enable_node_path" default="NodePath(&quot;..&quot;)">
+ The path to the target node, relative to the [VisibleOnScreenEnabler2D]. The target node is cached; it's only assigned when setting this property (if the [VisibleOnScreenEnabler2D] is inside scene tree) and every time the [VisibleOnScreenEnabler2D] enters the scene tree. If the path is invalid, nothing will happen.
</member>
</members>
<constants>
<constant name="ENABLE_MODE_INHERIT" value="0" enum="EnableMode">
+ Corresponds to [constant Node.PROCESS_MODE_INHERIT].
</constant>
<constant name="ENABLE_MODE_ALWAYS" value="1" enum="EnableMode">
+ Corresponds to [constant Node.PROCESS_MODE_ALWAYS].
</constant>
<constant name="ENABLE_MODE_WHEN_PAUSED" value="2" enum="EnableMode">
+ Corresponds to [constant Node.PROCESS_MODE_WHEN_PAUSED.
</constant>
</constants>
</class>
diff --git a/doc/classes/VisibleOnScreenEnabler3D.xml b/doc/classes/VisibleOnScreenEnabler3D.xml
index 5e03870005..a3f925ed3a 100644
--- a/doc/classes/VisibleOnScreenEnabler3D.xml
+++ b/doc/classes/VisibleOnScreenEnabler3D.xml
@@ -4,7 +4,7 @@
Enables certain nodes only when approximately visible.
</brief_description>
<description>
- The VisibleOnScreenEnabler3D will disable [RigidDynamicBody3D] and [AnimationPlayer] nodes when they are not visible. It will only affect other nodes within the same scene as the VisibleOnScreenEnabler3D itself.
+ 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.
diff --git a/doc/classes/VisualInstance3D.xml b/doc/classes/VisualInstance3D.xml
index 9574686506..31811f817b 100644
--- a/doc/classes/VisualInstance3D.xml
+++ b/doc/classes/VisualInstance3D.xml
@@ -17,7 +17,7 @@
<method name="get_aabb" qualifiers="const">
<return type="AABB" />
<description>
- Returns the [AABB] (also known as the bounding box) for this [VisualInstance3D]. See also [method get_transformed_aabb].
+ Returns the [AABB] (also known as the bounding box) for this [VisualInstance3D].
</description>
</method>
<method name="get_base" qualifiers="const">
@@ -39,13 +39,6 @@
Returns whether or not the specified layer of the [member layers] is enabled, given a [code]layer_number[/code] between 1 and 20.
</description>
</method>
- <method name="get_transformed_aabb" qualifiers="const">
- <return type="AABB" />
- <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 [Transform3D]. See also [method get_aabb].
- </description>
- </method>
<method name="set_base">
<return type="void" />
<param index="0" name="base" type="RID" />
@@ -63,7 +56,7 @@
</method>
</methods>
<members>
- <member name="layers" type="int" setter="set_layer_mask" getter="get_layer_mask">
+ <member name="layers" type="int" setter="set_layer_mask" getter="get_layer_mask" default="1">
The render layer(s) this [VisualInstance3D] is drawn on.
This object will only be visible for [Camera3D]s whose cull mask includes the render object this [VisualInstance3D] is set to.
For [Light3D]s, this can be used to control which [VisualInstance3D]s are affected by a specific light. For [GPUParticles3D], this can be used to control which particles are effected by a specific attractor. For [Decal]s, this can be used to control which [VisualInstance3D]s are affected by a specific decal.
diff --git a/doc/classes/VisualShader.xml b/doc/classes/VisualShader.xml
index 558b1086b7..a2089ae2b8 100644
--- a/doc/classes/VisualShader.xml
+++ b/doc/classes/VisualShader.xml
@@ -81,7 +81,7 @@
</description>
</method>
<method name="get_node_connections" qualifiers="const">
- <return type="Array" />
+ <return type="Dictionary[]" />
<param index="0" name="type" type="int" enum="VisualShader.Type" />
<description>
Returns the list of connected nodes with the specified type.
@@ -206,17 +206,19 @@
</constant>
<constant name="VARYING_TYPE_FLOAT" value="0" enum="VaryingType">
</constant>
- <constant name="VARYING_TYPE_VECTOR_2D" value="1" enum="VaryingType">
+ <constant name="VARYING_TYPE_INT" value="1" enum="VaryingType">
</constant>
- <constant name="VARYING_TYPE_VECTOR_3D" value="2" enum="VaryingType">
+ <constant name="VARYING_TYPE_VECTOR_2D" value="2" enum="VaryingType">
</constant>
- <constant name="VARYING_TYPE_VECTOR_4D" value="3" enum="VaryingType">
+ <constant name="VARYING_TYPE_VECTOR_3D" value="3" enum="VaryingType">
</constant>
- <constant name="VARYING_TYPE_COLOR" value="4" enum="VaryingType">
+ <constant name="VARYING_TYPE_VECTOR_4D" value="4" enum="VaryingType">
</constant>
- <constant name="VARYING_TYPE_TRANSFORM" value="5" enum="VaryingType">
+ <constant name="VARYING_TYPE_BOOLEAN" value="5" enum="VaryingType">
</constant>
- <constant name="VARYING_TYPE_MAX" value="6" enum="VaryingType">
+ <constant name="VARYING_TYPE_TRANSFORM" value="6" enum="VaryingType">
+ </constant>
+ <constant name="VARYING_TYPE_MAX" value="7" enum="VaryingType">
</constant>
<constant name="NODE_ID_INVALID" value="-1">
</constant>
diff --git a/doc/classes/VisualShaderNodeBooleanUniform.xml b/doc/classes/VisualShaderNodeBooleanParameter.xml
index 59b331aed2..47dae17dba 100644
--- a/doc/classes/VisualShaderNodeBooleanUniform.xml
+++ b/doc/classes/VisualShaderNodeBooleanParameter.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeBooleanUniform" inherits="VisualShaderNodeUniform" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+<class name="VisualShaderNodeBooleanParameter" inherits="VisualShaderNodeParameter" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
- A boolean uniform to be used within the visual shader graph.
+ A boolean parameter to be used within the visual shader graph.
</brief_description>
<description>
Translated to [code]uniform bool[/code] in the shader language.
diff --git a/doc/classes/VisualShaderNodeColorUniform.xml b/doc/classes/VisualShaderNodeColorParameter.xml
index 5ca96dc285..0cc2285ed4 100644
--- a/doc/classes/VisualShaderNodeColorUniform.xml
+++ b/doc/classes/VisualShaderNodeColorParameter.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeColorUniform" inherits="VisualShaderNodeUniform" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+<class name="VisualShaderNodeColorParameter" inherits="VisualShaderNodeParameter" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
- A [Color] uniform to be used within the visual shader graph.
+ A [Color] parameter to be used within the visual shader graph.
</brief_description>
<description>
Translated to [code]uniform vec4[/code] in the shader language.
diff --git a/doc/classes/VisualShaderNodeCubemapUniform.xml b/doc/classes/VisualShaderNodeCubemapParameter.xml
index 3f6addd16a..d0d3c79d03 100644
--- a/doc/classes/VisualShaderNodeCubemapUniform.xml
+++ b/doc/classes/VisualShaderNodeCubemapParameter.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeCubemapUniform" inherits="VisualShaderNodeTextureUniform" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+<class name="VisualShaderNodeCubemapParameter" inherits="VisualShaderNodeTextureParameter" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
- A [Cubemap] uniform node to be used within the visual shader graph.
+ A [Cubemap] parameter node to be used within the visual shader graph.
</brief_description>
<description>
Translated to [code]uniform samplerCube[/code] in the shader language. The output value can be used as port for [VisualShaderNodeCubemap].
diff --git a/doc/classes/VisualShaderNodeCustom.xml b/doc/classes/VisualShaderNodeCustom.xml
index 9813b4778d..d96969b383 100644
--- a/doc/classes/VisualShaderNodeCustom.xml
+++ b/doc/classes/VisualShaderNodeCustom.xml
@@ -68,7 +68,7 @@
<method name="_get_input_port_count" qualifiers="virtual const">
<return type="int" />
<description>
- Override this method to define the amount of input ports of the associated custom node.
+ Override this method to define the number of input ports of the associated custom node.
Defining this method is [b]required[/b]. If not overridden, the node has no input ports.
</description>
</method>
@@ -98,7 +98,7 @@
<method name="_get_output_port_count" qualifiers="virtual const">
<return type="int" />
<description>
- Override this method to define the amount of output ports of the associated custom node.
+ Override this method to define the number of output ports of the associated custom node.
Defining this method is [b]required[/b]. If not overridden, the node has no output ports.
</description>
</method>
diff --git a/doc/classes/VisualShaderNodeDistanceFade.xml b/doc/classes/VisualShaderNodeDistanceFade.xml
new file mode 100644
index 0000000000..8ea0857776
--- /dev/null
+++ b/doc/classes/VisualShaderNodeDistanceFade.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualShaderNodeDistanceFade" inherits="VisualShaderNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+</class>
diff --git a/doc/classes/VisualShaderNodeExpression.xml b/doc/classes/VisualShaderNodeExpression.xml
index c4f010f3c0..6b2dc2f2cb 100644
--- a/doc/classes/VisualShaderNodeExpression.xml
+++ b/doc/classes/VisualShaderNodeExpression.xml
@@ -4,7 +4,7 @@
A custom visual shader graph expression written in Godot Shading Language.
</brief_description>
<description>
- Custom Godot Shading Language expression, with a custom amount of input and output ports.
+ Custom Godot Shading Language expression, with a custom number of input and output ports.
The provided code is directly injected into the graph's matching shader function ([code]vertex[/code], [code]fragment[/code], or [code]light[/code]), so it cannot be used to declare functions, varyings, uniforms, or global constants. See [VisualShaderNodeGlobalExpression] for such global definitions.
</description>
<tutorials>
diff --git a/doc/classes/VisualShaderNodeFloatUniform.xml b/doc/classes/VisualShaderNodeFloatParameter.xml
index 1616964edb..3b5bf57b4d 100644
--- a/doc/classes/VisualShaderNodeFloatUniform.xml
+++ b/doc/classes/VisualShaderNodeFloatParameter.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeFloatUniform" inherits="VisualShaderNodeUniform" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+<class name="VisualShaderNodeFloatParameter" inherits="VisualShaderNodeParameter" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
- A scalar float uniform to be used within the visual shader graph.
+ A scalar float parameter to be used within the visual shader graph.
</brief_description>
<description>
Translated to [code]uniform float[/code] in the shader language.
@@ -15,8 +15,8 @@
<member name="default_value_enabled" type="bool" setter="set_default_value_enabled" getter="is_default_value_enabled" default="false">
Enables usage of the [member default_value].
</member>
- <member name="hint" type="int" setter="set_hint" getter="get_hint" enum="VisualShaderNodeFloatUniform.Hint" default="0">
- A hint applied to the uniform, which controls the values it can take when set through the inspector.
+ <member name="hint" type="int" setter="set_hint" getter="get_hint" enum="VisualShaderNodeFloatParameter.Hint" default="0">
+ A hint applied to the uniform, which controls the values it can take when set through the Inspector.
</member>
<member name="max" type="float" setter="set_max" getter="get_max" default="1.0">
Minimum value for range hints. Used if [member hint] is set to [constant HINT_RANGE] or [constant HINT_RANGE_STEP].
diff --git a/doc/classes/VisualShaderNodeGroupBase.xml b/doc/classes/VisualShaderNodeGroupBase.xml
index 450629a73f..dcc94f0b24 100644
--- a/doc/classes/VisualShaderNodeGroupBase.xml
+++ b/doc/classes/VisualShaderNodeGroupBase.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="VisualShaderNodeGroupBase" inherits="VisualShaderNodeResizableBase" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
- Base class for a family of nodes with variable amount of input and output ports within the visual shader graph.
+ Base class for a family of nodes with variable number of input and output ports within the visual shader graph.
</brief_description>
<description>
Currently, has no direct usage, use the derived classes instead.
diff --git a/doc/classes/VisualShaderNodeInput.xml b/doc/classes/VisualShaderNodeInput.xml
index 6268a3fe09..2ebffcfe76 100644
--- a/doc/classes/VisualShaderNodeInput.xml
+++ b/doc/classes/VisualShaderNodeInput.xml
@@ -19,7 +19,7 @@
</methods>
<members>
<member name="input_name" type="String" setter="set_input_name" getter="get_input_name" default="&quot;[None]&quot;">
- One of the several input constants in lower-case style like: "vertex"([code]VERTEX[/code]) or "point_size"([code]POINT_SIZE[/code]).
+ One of the several input constants in lower-case style like: "vertex" ([code]VERTEX[/code]) or "point_size" ([code]POINT_SIZE[/code]).
</member>
</members>
<signals>
diff --git a/doc/classes/VisualShaderNodeIntParameter.xml b/doc/classes/VisualShaderNodeIntParameter.xml
new file mode 100644
index 0000000000..70335b0c77
--- /dev/null
+++ b/doc/classes/VisualShaderNodeIntParameter.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualShaderNodeIntParameter" inherits="VisualShaderNodeParameter" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <members>
+ <member name="default_value" type="int" setter="set_default_value" getter="get_default_value" default="0">
+ </member>
+ <member name="default_value_enabled" type="bool" setter="set_default_value_enabled" getter="is_default_value_enabled" default="false">
+ </member>
+ <member name="hint" type="int" setter="set_hint" getter="get_hint" enum="VisualShaderNodeIntParameter.Hint" default="0">
+ </member>
+ <member name="max" type="int" setter="set_max" getter="get_max" default="100">
+ </member>
+ <member name="min" type="int" setter="set_min" getter="get_min" default="0">
+ </member>
+ <member name="step" type="int" setter="set_step" getter="get_step" default="1">
+ </member>
+ </members>
+ <constants>
+ <constant name="HINT_NONE" value="0" enum="Hint">
+ </constant>
+ <constant name="HINT_RANGE" value="1" enum="Hint">
+ </constant>
+ <constant name="HINT_RANGE_STEP" value="2" enum="Hint">
+ </constant>
+ <constant name="HINT_MAX" value="3" enum="Hint">
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/VisualShaderNodeIntUniform.xml b/doc/classes/VisualShaderNodeIntUniform.xml
deleted file mode 100644
index c83bdb5ad6..0000000000
--- a/doc/classes/VisualShaderNodeIntUniform.xml
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeIntUniform" inherits="VisualShaderNodeUniform" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
- <brief_description>
- A scalar integer uniform to be used within the visual shader graph.
- </brief_description>
- <description>
- Translated to [code]uniform int[/code] in the shader language.
- </description>
- <tutorials>
- </tutorials>
- <members>
- <member name="default_value" type="int" setter="set_default_value" getter="get_default_value" default="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">
- Enables usage of the [member default_value].
- </member>
- <member name="hint" type="int" setter="set_hint" getter="get_hint" enum="VisualShaderNodeIntUniform.Hint" default="0">
- A hint applied to the uniform, which controls the values it can take when set through the inspector.
- </member>
- <member name="max" type="int" setter="set_max" getter="get_max" default="100">
- Minimum value for range hints. Used if [member hint] is set to [constant HINT_RANGE] or [constant HINT_RANGE_STEP].
- </member>
- <member name="min" type="int" setter="set_min" getter="get_min" default="0">
- Maximum value for range hints. Used if [member hint] is set to [constant HINT_RANGE] or [constant HINT_RANGE_STEP].
- </member>
- <member name="step" type="int" setter="set_step" getter="get_step" default="1">
- Step (increment) value for the range hint with step. Used if [member hint] is set to [constant HINT_RANGE_STEP].
- </member>
- </members>
- <constants>
- <constant name="HINT_NONE" value="0" enum="Hint">
- No hint used.
- </constant>
- <constant name="HINT_RANGE" value="1" enum="Hint">
- A range hint for scalar value, which limits possible input values between [member min] and [member max]. Translated to [code]hint_range(min, max)[/code] in shader code.
- </constant>
- <constant name="HINT_RANGE_STEP" value="2" enum="Hint">
- A range hint for scalar value with step, which limits possible input values between [member min] and [member max], with a step (increment) of [member step]). Translated to [code]hint_range(min, max, step)[/code] in shader code.
- </constant>
- <constant name="HINT_MAX" value="3" enum="Hint">
- Represents the size of the [enum Hint] enum.
- </constant>
- </constants>
-</class>
diff --git a/doc/classes/VisualShaderNodeLinearSceneDepth.xml b/doc/classes/VisualShaderNodeLinearSceneDepth.xml
new file mode 100644
index 0000000000..fa8c01ac0a
--- /dev/null
+++ b/doc/classes/VisualShaderNodeLinearSceneDepth.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualShaderNodeLinearSceneDepth" inherits="VisualShaderNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+</class>
diff --git a/doc/classes/VisualShaderNodeParameter.xml b/doc/classes/VisualShaderNodeParameter.xml
new file mode 100644
index 0000000000..55b10ac810
--- /dev/null
+++ b/doc/classes/VisualShaderNodeParameter.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualShaderNodeParameter" inherits="VisualShaderNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ A base type for the parameters within the visual shader graph.
+ </brief_description>
+ <description>
+ A parameter represents a variable in the shader which is set externally, i.e. from the [ShaderMaterial]. Parameters are exposed as properties in the [ShaderMaterial] and can be assigned from the Inspector or from a script.
+ </description>
+ <tutorials>
+ </tutorials>
+ <members>
+ <member name="parameter_name" type="String" setter="set_parameter_name" getter="get_parameter_name" default="&quot;&quot;">
+ Name of the parameter, by which it can be accessed through the [ShaderMaterial] properties.
+ </member>
+ <member name="qualifier" type="int" setter="set_qualifier" getter="get_qualifier" enum="VisualShaderNodeParameter.Qualifier" default="0">
+ </member>
+ </members>
+ <constants>
+ <constant name="QUAL_NONE" value="0" enum="Qualifier">
+ </constant>
+ <constant name="QUAL_GLOBAL" value="1" enum="Qualifier">
+ </constant>
+ <constant name="QUAL_INSTANCE" value="2" enum="Qualifier">
+ </constant>
+ <constant name="QUAL_MAX" value="3" enum="Qualifier">
+ Represents the size of the [enum Qualifier] enum.
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/VisualShaderNodeParameterRef.xml b/doc/classes/VisualShaderNodeParameterRef.xml
new file mode 100644
index 0000000000..b2801183ed
--- /dev/null
+++ b/doc/classes/VisualShaderNodeParameterRef.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualShaderNodeParameterRef" inherits="VisualShaderNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ A reference to an existing [VisualShaderNodeParameter].
+ </brief_description>
+ <description>
+ Creating a reference to a [VisualShaderNodeParameter] allows you to reuse this parameter in different shaders or shader stages easily.
+ </description>
+ <tutorials>
+ </tutorials>
+ <members>
+ <member name="parameter_name" type="String" setter="set_parameter_name" getter="get_parameter_name" default="&quot;[None]&quot;">
+ The name of the parameter which this reference points to.
+ </member>
+ </members>
+</class>
diff --git a/doc/classes/VisualShaderNodeProximityFade.xml b/doc/classes/VisualShaderNodeProximityFade.xml
new file mode 100644
index 0000000000..25051eed71
--- /dev/null
+++ b/doc/classes/VisualShaderNodeProximityFade.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualShaderNodeProximityFade" inherits="VisualShaderNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+</class>
diff --git a/doc/classes/VisualShaderNodeRandomRange.xml b/doc/classes/VisualShaderNodeRandomRange.xml
new file mode 100644
index 0000000000..adc83d808c
--- /dev/null
+++ b/doc/classes/VisualShaderNodeRandomRange.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualShaderNodeRandomRange" inherits="VisualShaderNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+</class>
diff --git a/doc/classes/VisualShaderNodeRemap.xml b/doc/classes/VisualShaderNodeRemap.xml
new file mode 100644
index 0000000000..5a73a76e7f
--- /dev/null
+++ b/doc/classes/VisualShaderNodeRemap.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualShaderNodeRemap" inherits="VisualShaderNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+</class>
diff --git a/doc/classes/VisualShaderNodeTexture2DArrayParameter.xml b/doc/classes/VisualShaderNodeTexture2DArrayParameter.xml
new file mode 100644
index 0000000000..2afaa8e219
--- /dev/null
+++ b/doc/classes/VisualShaderNodeTexture2DArrayParameter.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualShaderNodeTexture2DArrayParameter" inherits="VisualShaderNodeTextureParameter" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+</class>
diff --git a/doc/classes/VisualShaderNodeTexture2DArrayUniform.xml b/doc/classes/VisualShaderNodeTexture2DArrayUniform.xml
deleted file mode 100644
index f8ba796c2e..0000000000
--- a/doc/classes/VisualShaderNodeTexture2DArrayUniform.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeTexture2DArrayUniform" inherits="VisualShaderNodeTextureUniform" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <tutorials>
- </tutorials>
-</class>
diff --git a/doc/classes/VisualShaderNodeTexture2DParameter.xml b/doc/classes/VisualShaderNodeTexture2DParameter.xml
new file mode 100644
index 0000000000..5049a63a0e
--- /dev/null
+++ b/doc/classes/VisualShaderNodeTexture2DParameter.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualShaderNodeTexture2DParameter" inherits="VisualShaderNodeTextureParameter" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ Provides a 2D texture parameter within the visual shader graph.
+ </brief_description>
+ <description>
+ Translated to [code]uniform sampler2D[/code] in the shader language.
+ </description>
+ <tutorials>
+ </tutorials>
+</class>
diff --git a/doc/classes/VisualShaderNodeTexture3DParameter.xml b/doc/classes/VisualShaderNodeTexture3DParameter.xml
new file mode 100644
index 0000000000..8ad4de9a22
--- /dev/null
+++ b/doc/classes/VisualShaderNodeTexture3DParameter.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualShaderNodeTexture3DParameter" inherits="VisualShaderNodeTextureParameter" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ Provides a 3D texture parameter within the visual shader graph.
+ </brief_description>
+ <description>
+ Translated to [code]uniform sampler3D[/code] in the shader language.
+ </description>
+ <tutorials>
+ </tutorials>
+</class>
diff --git a/doc/classes/VisualShaderNodeTexture3DUniform.xml b/doc/classes/VisualShaderNodeTexture3DUniform.xml
deleted file mode 100644
index 365c7db02e..0000000000
--- a/doc/classes/VisualShaderNodeTexture3DUniform.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeTexture3DUniform" inherits="VisualShaderNodeTextureUniform" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
- <brief_description>
- Provides a 3D texture uniform within the visual shader graph.
- </brief_description>
- <description>
- Translated to [code]uniform sampler3D[/code] in the shader language.
- </description>
- <tutorials>
- </tutorials>
-</class>
diff --git a/doc/classes/VisualShaderNodeTextureUniform.xml b/doc/classes/VisualShaderNodeTextureParameter.xml
index 9014f79f54..ad21c4e990 100644
--- a/doc/classes/VisualShaderNodeTextureUniform.xml
+++ b/doc/classes/VisualShaderNodeTextureParameter.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeTextureUniform" inherits="VisualShaderNodeUniform" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+<class name="VisualShaderNodeTextureParameter" inherits="VisualShaderNodeParameter" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Performs a uniform texture lookup within the visual shader graph.
</brief_description>
@@ -9,16 +9,16 @@
<tutorials>
</tutorials>
<members>
- <member name="color_default" type="int" setter="set_color_default" getter="get_color_default" enum="VisualShaderNodeTextureUniform.ColorDefault" default="0">
+ <member name="color_default" type="int" setter="set_color_default" getter="get_color_default" enum="VisualShaderNodeTextureParameter.ColorDefault" default="0">
Sets the default color if no texture is assigned to the uniform.
</member>
- <member name="texture_filter" type="int" setter="set_texture_filter" getter="get_texture_filter" enum="VisualShaderNodeTextureUniform.TextureFilter" default="0">
+ <member name="texture_filter" type="int" setter="set_texture_filter" getter="get_texture_filter" enum="VisualShaderNodeTextureParameter.TextureFilter" default="0">
Sets the texture filtering mode. See [enum TextureFilter] for options.
</member>
- <member name="texture_repeat" type="int" setter="set_texture_repeat" getter="get_texture_repeat" enum="VisualShaderNodeTextureUniform.TextureRepeat" default="0">
+ <member name="texture_repeat" type="int" setter="set_texture_repeat" getter="get_texture_repeat" enum="VisualShaderNodeTextureParameter.TextureRepeat" default="0">
Sets the texture repeating mode. See [enum TextureRepeat] for options.
</member>
- <member name="texture_type" type="int" setter="set_texture_type" getter="get_texture_type" enum="VisualShaderNodeTextureUniform.TextureType" default="0">
+ <member name="texture_type" type="int" setter="set_texture_type" getter="get_texture_type" enum="VisualShaderNodeTextureParameter.TextureType" default="0">
Defines the type of data provided by the source texture. See [enum TextureType] for options.
</member>
</members>
diff --git a/doc/classes/VisualShaderNodeTextureUniformTriplanar.xml b/doc/classes/VisualShaderNodeTextureParameterTriplanar.xml
index 72082ef04d..2b019e08d5 100644
--- a/doc/classes/VisualShaderNodeTextureUniformTriplanar.xml
+++ b/doc/classes/VisualShaderNodeTextureParameterTriplanar.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeTextureUniformTriplanar" inherits="VisualShaderNodeTextureUniform" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+<class name="VisualShaderNodeTextureParameterTriplanar" inherits="VisualShaderNodeTextureParameter" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Performs a uniform texture lookup with triplanar within the visual shader graph.
</brief_description>
diff --git a/doc/classes/VisualShaderNodeTransformUniform.xml b/doc/classes/VisualShaderNodeTransformParameter.xml
index 60678c09e5..92aadc4d7c 100644
--- a/doc/classes/VisualShaderNodeTransformUniform.xml
+++ b/doc/classes/VisualShaderNodeTransformParameter.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeTransformUniform" inherits="VisualShaderNodeUniform" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+<class name="VisualShaderNodeTransformParameter" inherits="VisualShaderNodeParameter" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
- A [Transform3D] uniform for use within the visual shader graph.
+ A [Transform3D] parameter for use within the visual shader graph.
</brief_description>
<description>
Translated to [code]uniform mat4[/code] in the shader language.
diff --git a/doc/classes/VisualShaderNodeUVFunc.xml b/doc/classes/VisualShaderNodeUVFunc.xml
index 37a9769a10..541991b790 100644
--- a/doc/classes/VisualShaderNodeUVFunc.xml
+++ b/doc/classes/VisualShaderNodeUVFunc.xml
@@ -17,7 +17,7 @@
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.
+ Scales [code]uv[/code] 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.
diff --git a/doc/classes/VisualShaderNodeUVPolarCoord.xml b/doc/classes/VisualShaderNodeUVPolarCoord.xml
new file mode 100644
index 0000000000..8582939db3
--- /dev/null
+++ b/doc/classes/VisualShaderNodeUVPolarCoord.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualShaderNodeUVPolarCoord" inherits="VisualShaderNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+</class>
diff --git a/doc/classes/VisualShaderNodeUniform.xml b/doc/classes/VisualShaderNodeUniform.xml
deleted file mode 100644
index 58d194e9d4..0000000000
--- a/doc/classes/VisualShaderNodeUniform.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeUniform" inherits="VisualShaderNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
- <brief_description>
- A base type for the uniforms within the visual shader graph.
- </brief_description>
- <description>
- A uniform represents a variable in the shader which is set externally, i.e. from the [ShaderMaterial]. Uniforms are exposed as properties in the [ShaderMaterial] and can be assigned from the inspector or from a script.
- </description>
- <tutorials>
- </tutorials>
- <members>
- <member name="qualifier" type="int" setter="set_qualifier" getter="get_qualifier" enum="VisualShaderNodeUniform.Qualifier" default="0">
- </member>
- <member name="uniform_name" type="String" setter="set_uniform_name" getter="get_uniform_name" default="&quot;&quot;">
- Name of the uniform, by which it can be accessed through the [ShaderMaterial] properties.
- </member>
- </members>
- <constants>
- <constant name="QUAL_NONE" value="0" enum="Qualifier">
- </constant>
- <constant name="QUAL_GLOBAL" value="1" enum="Qualifier">
- </constant>
- <constant name="QUAL_INSTANCE" value="2" enum="Qualifier">
- </constant>
- <constant name="QUAL_MAX" value="3" enum="Qualifier">
- Represents the size of the [enum Qualifier] enum.
- </constant>
- </constants>
-</class>
diff --git a/doc/classes/VisualShaderNodeUniformRef.xml b/doc/classes/VisualShaderNodeUniformRef.xml
deleted file mode 100644
index 4b12c6e649..0000000000
--- a/doc/classes/VisualShaderNodeUniformRef.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeUniformRef" inherits="VisualShaderNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
- <brief_description>
- A reference to an existing [VisualShaderNodeUniform].
- </brief_description>
- <description>
- Creating a reference to a [VisualShaderNodeUniform] allows you to reuse this uniform in different shaders or shader stages easily.
- </description>
- <tutorials>
- </tutorials>
- <members>
- <member name="uniform_name" type="String" setter="set_uniform_name" getter="get_uniform_name" default="&quot;[None]&quot;">
- The name of the uniform which this reference points to.
- </member>
- </members>
-</class>
diff --git a/doc/classes/VisualShaderNodeVec2Uniform.xml b/doc/classes/VisualShaderNodeVec2Parameter.xml
index 4ad6279475..19cf1baa86 100644
--- a/doc/classes/VisualShaderNodeVec2Uniform.xml
+++ b/doc/classes/VisualShaderNodeVec2Parameter.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeVec2Uniform" inherits="VisualShaderNodeUniform" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+<class name="VisualShaderNodeVec2Parameter" inherits="VisualShaderNodeParameter" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
- A [Vector2] uniform to be used within the visual shader graph.
+ A [Vector2] parameter to be used within the visual shader graph.
</brief_description>
<description>
Translated to [code]uniform vec2[/code] in the shader language.
diff --git a/doc/classes/VisualShaderNodeVec3Uniform.xml b/doc/classes/VisualShaderNodeVec3Parameter.xml
index f712c89463..17d4b31d1a 100644
--- a/doc/classes/VisualShaderNodeVec3Uniform.xml
+++ b/doc/classes/VisualShaderNodeVec3Parameter.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeVec3Uniform" inherits="VisualShaderNodeUniform" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+<class name="VisualShaderNodeVec3Parameter" inherits="VisualShaderNodeParameter" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
- A [Vector3] uniform to be used within the visual shader graph.
+ A [Vector3] parameter to be used within the visual shader graph.
</brief_description>
<description>
Translated to [code]uniform vec3[/code] in the shader language.
diff --git a/doc/classes/VisualShaderNodeVec4Constant.xml b/doc/classes/VisualShaderNodeVec4Constant.xml
index ed3d8a673d..ddd2f38fb9 100644
--- a/doc/classes/VisualShaderNodeVec4Constant.xml
+++ b/doc/classes/VisualShaderNodeVec4Constant.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="VisualShaderNodeVec4Constant" inherits="VisualShaderNodeConstant" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
- A 4D vector (represented as a [Quaternion]) constant to be used within the visual shader graph.
+ A 4D vector constant to be used within the visual shader graph.
</brief_description>
<description>
- A constant 4D vector (represented as a [Quaternion]), which can be used as an input node.
+ A constant 4D vector, which can be used as an input node.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/VisualShaderNodeVec4Uniform.xml b/doc/classes/VisualShaderNodeVec4Parameter.xml
index 5bd13a440b..0e9e7c6b6f 100644
--- a/doc/classes/VisualShaderNodeVec4Uniform.xml
+++ b/doc/classes/VisualShaderNodeVec4Parameter.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeVec4Uniform" inherits="VisualShaderNodeUniform" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+<class name="VisualShaderNodeVec4Parameter" inherits="VisualShaderNodeParameter" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
- A 4D vector (represented as a [Quaternion]) uniform to be used within the visual shader graph.
+ A 4D vector parameter to be used within the visual shader graph.
</brief_description>
<description>
Translated to [code]uniform vec4[/code] in the shader language.
@@ -9,7 +9,7 @@
<tutorials>
</tutorials>
<members>
- <member name="default_value" type="Quaternion" setter="set_default_value" getter="get_default_value" default="Quaternion(0, 0, 0, 1)">
+ <member name="default_value" type="Vector4" setter="set_default_value" getter="get_default_value" default="Vector4(0, 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/VoxelGI.xml b/doc/classes/VoxelGI.xml
index ba4995a5fb..394611b78f 100644
--- a/doc/classes/VoxelGI.xml
+++ b/doc/classes/VoxelGI.xml
@@ -32,6 +32,9 @@
</method>
</methods>
<members>
+ <member name="camera_attributes" type="CameraAttributes" setter="set_camera_attributes" getter="get_camera_attributes">
+ The [CameraAttributes] resource that specifies exposure levels to bake at. Auto-exposure and non exposure properties will be ignored. Exposure settings should be used to reduce the dynamic range present when baking. If exposure is too high, the [VoxelGI] will have banding artifacts or may have over-exposure artifacts.
+ </member>
<member name="data" type="VoxelGIData" setter="set_probe_data" getter="get_probe_data">
The [VoxelGIData] resource that holds the data for this [VoxelGI].
</member>
diff --git a/doc/classes/VoxelGIData.xml b/doc/classes/VoxelGIData.xml
index 92b2e66e5a..bd9df18394 100644
--- a/doc/classes/VoxelGIData.xml
+++ b/doc/classes/VoxelGIData.xml
@@ -5,7 +5,7 @@
</brief_description>
<description>
[VoxelGIData] contains baked voxel global illumination for use in a [VoxelGI] node. [VoxelGIData] also offers several properties to adjust the final appearance of the global illumination. These properties can be adjusted at run-time without having to bake the [VoxelGI] node again.
- [b]Note:[/b] To prevent text-based scene files ([code].tscn[/code]) from growing too much and becoming slow to load and save, always save [VoxelGIData] to an external binary resource file ([code].res[/code]) instead of embedding it within the scene. This can be done by clicking the dropdown arrow next to the [VoxelGIData] resource, choosing [b]Edit[/b], clicking the floppy disk icon at the top of the inspector then choosing [b]Save As...[/b].
+ [b]Note:[/b] To prevent text-based scene files ([code].tscn[/code]) from growing too much and becoming slow to load and save, always save [VoxelGIData] to an external binary resource file ([code].res[/code]) instead of embedding it within the scene. This can be done by clicking the dropdown arrow next to the [VoxelGIData] resource, choosing [b]Edit[/b], clicking the floppy disk icon at the top of the Inspector then choosing [b]Save As...[/b].
</description>
<tutorials>
<link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
diff --git a/doc/classes/Window.xml b/doc/classes/Window.xml
index ce7ad1e64e..8707ef003a 100644
--- a/doc/classes/Window.xml
+++ b/doc/classes/Window.xml
@@ -342,6 +342,9 @@
If [code]true[/code], the [Window] will be in exclusive mode. Exclusive windows are always on top of their parent and will block all input going to the parent [Window].
Needs [member transient] enabled to work.
</member>
+ <member name="extend_to_title" type="bool" setter="set_flag" getter="get_flag" default="false">
+ If [code]true[/code], the [Window] contents is expanded to the full size of the window, window title bar is transparent.
+ </member>
<member name="max_size" type="Vector2i" setter="set_max_size" getter="get_max_size" default="Vector2i(0, 0)">
If non-zero, the [Window] can't be resized to be bigger than this size.
[b]Note:[/b] This property will be ignored if the value is lower than [member min_size].
@@ -352,7 +355,7 @@
</member>
<member name="mode" type="int" setter="set_mode" getter="get_mode" enum="Window.Mode" default="0">
Set's the window's current mode.
- [b]Note:[/b] Fullscreen mode is not exclusive fullscreen on Windows and Linux.
+ [b]Note:[/b] Fullscreen mode is not exclusive full screen on Windows and Linux.
</member>
<member name="popup_window" type="bool" setter="set_flag" getter="get_flag" default="false">
If [code]true[/code], the [Window] will be considered a popup. Popups are sub-windows that don't show as separate windows in system's window manager's window list and will send close request when anything is clicked outside of them (unless [member exclusive] is enabled).
@@ -374,11 +377,13 @@
The window's title. If the [Window] is non-embedded, title styles set in [Theme] will have no effect.
</member>
<member name="transient" type="bool" setter="set_transient" getter="is_transient" default="false">
- If [code]true[/code], the [Window] is transient, i.e. it's considered a child of another [Window]. Transient windows can't be in fullscreen mode and will return focus to their parent when closed.
+ If [code]true[/code], the [Window] is transient, i.e. it's considered a child of another [Window]. Transient window is will be destroyed with its transient parent and will return focus to their parent when closed. The transient window is displayed on top of a non-exclusive full-screen parent window. Transient windows can't enter full-screen mode.
Note that behavior might be different depending on the platform.
</member>
<member name="transparent" type="bool" setter="set_flag" getter="get_flag" default="false">
- If [code]true[/code], the [Window]'s background can be transparent. This is best used with embedded windows. Currently non-embedded [Window] transparency is implemented only for MacOS.
+ If [code]true[/code], the [Window]'s background can be transparent. This is best used with embedded windows.
+ [b]Note:[/b] For native windows, this flag has no effect if [member ProjectSettings.display/window/per_pixel_transparency/allowed] is set to [code]false[/code].
+ [b]Note:[/b] Transparency support is implemented on Linux, macOS and Windows, but availability might vary depending on GPU driver, display manager, and compositor capabilities.
</member>
<member name="unfocusable" type="bool" setter="set_flag" getter="get_flag" default="false">
If [code]true[/code], the [Window] can't be focused nor interacted with. It can still be visible.
@@ -448,7 +453,12 @@
</signal>
<signal name="theme_changed">
<description>
- Emitted when the [member theme] is modified or changed to another [Theme].
+ Emitted when the [constant NOTIFICATION_THEME_CHANGED] notification is sent.
+ </description>
+ </signal>
+ <signal name="titlebar_changed">
+ <description>
+ Emitted when window title bar decorations are changed, e.g. macOS window enter/exit full screen mode, or extend-to-title flag is changed.
</description>
</signal>
<signal name="visibility_changed">
@@ -459,7 +469,7 @@
<signal name="window_input">
<param index="0" name="event" type="InputEvent" />
<description>
- Emitted when the [Window] is currently focused and receives any input, passing the received event as an argument.
+ Emitted when the [Window] is currently focused and receives any input, passing the received event as an argument. The event's position, if present, is in the embedder's coordinate system.
</description>
</signal>
</signals>
@@ -467,43 +477,55 @@
<constant name="NOTIFICATION_VISIBILITY_CHANGED" value="30">
Emitted when [Window]'s visibility changes, right before [signal visibility_changed].
</constant>
+ <constant name="NOTIFICATION_THEME_CHANGED" value="32">
+ Sent when the node needs to refresh its theme items. This happens in one of the following cases:
+ - The [member theme] property is changed on this node or any of its ancestors.
+ - The [member theme_type_variation] property is changed on this node.
+ - The node enters the scene tree.
+ [b]Note:[/b] As an optimization, this notification won't be sent from changes that occur while this node is outside of the scene tree. Instead, all of the theme item updates can be applied at once when the node enters the scene tree.
+ </constant>
<constant name="MODE_WINDOWED" value="0" enum="Mode">
- Windowed mode, i.e. [Window] doesn't occupy whole screen (unless set to the size of the screen).
+ Windowed mode, i.e. [Window] doesn't occupy the whole screen (unless set to the size of the screen).
</constant>
<constant name="MODE_MINIMIZED" value="1" enum="Mode">
- Minimized window mode, i.e. [Window] is not visible and available on window manager's window list. Normally happens when the minimize button is presesd.
+ Minimized window mode, i.e. [Window] is not visible and available on window manager's window list. Normally happens when the minimize button is pressed.
</constant>
<constant name="MODE_MAXIMIZED" value="2" enum="Mode">
- Maximized window mode, i.e. [Window] will occupy whole screen area except task bar and still display its borders. Normally happens when the minimize button is presesd.
+ Maximized window mode, i.e. [Window] will occupy whole screen area except task bar and still display its borders. Normally happens when the maximize button is pressed.
</constant>
<constant name="MODE_FULLSCREEN" value="3" enum="Mode">
- Fullscreen window mode. Note that this is not [i]exclusive[/i] fullscreen. On Windows and Linux, a borderless window is used to emulate fullscreen. On macOS, a new desktop is used to display the running project.
- Regardless of the platform, enabling fullscreen will change the window size to match the monitor's size. Therefore, make sure your project supports [url=$DOCS_URL/tutorials/rendering/multiple_resolutions.html]multiple resolutions[/url] when enabling fullscreen mode.
+ Full screen window mode. Note that this is not [i]exclusive[/i] full screen. On Windows and Linux, a borderless window is used to emulate full screen. On macOS, a new desktop is used to display the running project.
+ Regardless of the platform, enabling full screen will change the window size to match the monitor's size. Therefore, make sure your project supports [url=$DOCS_URL/tutorials/rendering/multiple_resolutions.html]multiple resolutions[/url] when enabling full screen mode.
</constant>
<constant name="MODE_EXCLUSIVE_FULLSCREEN" value="4" enum="Mode">
- Exclusive fullscreen window mode. This mode is implemented on Windows only. On other platforms, it is equivalent to [constant MODE_FULLSCREEN].
- Only one window in exclusive fullscreen mode can be visible on a given screen at a time. If multiple windows are in exclusive fullscreen mode for the same screen, the last one being set to this mode takes precedence.
- Regardless of the platform, enabling fullscreen will change the window size to match the monitor's size. Therefore, make sure your project supports [url=$DOCS_URL/tutorials/rendering/multiple_resolutions.html]multiple resolutions[/url] when enabling fullscreen mode.
+ Exclusive full screen window mode. This mode is implemented on Windows only. On other platforms, it is equivalent to [constant MODE_FULLSCREEN].
+ Only one window in exclusive full screen mode can be visible on a given screen at a time. If multiple windows are in exclusive full screen mode for the same screen, the last one being set to this mode takes precedence.
+ Regardless of the platform, enabling full screen will change the window size to match the monitor's size. Therefore, make sure your project supports [url=$DOCS_URL/tutorials/rendering/multiple_resolutions.html]multiple resolutions[/url] when enabling full screen mode.
</constant>
<constant name="FLAG_RESIZE_DISABLED" value="0" enum="Flags">
- The window's ability to be resized. Set with [member unresizable].
+ The window can't be resizing by dragging its resize grip. It's still possible to resize the window using [member size]. This flag is ignored for full screen windows. Set with [member unresizable].
</constant>
<constant name="FLAG_BORDERLESS" value="1" enum="Flags">
- Borderless window. Set with [member borderless].
+ The window do not have native title bar and other decorations. This flag is ignored for full-screen windows. Set with [member borderless].
</constant>
<constant name="FLAG_ALWAYS_ON_TOP" value="2" enum="Flags">
- Flag for making the window always on top of all other windows. Set with [member always_on_top].
+ The window is floating on top of all other windows. This flag is ignored for full-screen windows. Set with [member always_on_top].
</constant>
<constant name="FLAG_TRANSPARENT" value="3" enum="Flags">
- Flag for per-pixel transparency. Set with [member transparent].
+ The window background can be transparent.
+ [b]Note:[/b] This flag has no effect if [member ProjectSettings.display/window/per_pixel_transparency/allowed] is set to [code]false[/code]. Set with [member transparent].
</constant>
<constant name="FLAG_NO_FOCUS" value="4" enum="Flags">
- The window's ability to gain focus. Set with [member unfocusable].
+ The window can't be focused. No-focus window will ignore all input, except mouse clicks. Set with [member unfocusable].
</constant>
<constant name="FLAG_POPUP" value="5" enum="Flags">
- Whether the window is popup or a regular window. Set with [member popup_window].
+ Window is part of menu or [OptionButton] dropdown. This flag can't be changed when the window is visible. An active popup window will exclusively receive all input, without stealing focus from its parent. Popup windows are automatically closed when uses click outside it, or when an application is switched. Popup window must have [code]transient parent[/code] set (see [member transient]).
+ </constant>
+ <constant name="FLAG_EXTEND_TO_TITLE" value="6" enum="Flags">
+ Window content is expanded to the full size of the window. Unlike borderless window, the frame is left intact and can be used to resize the window, title bar is transparent, but have minimize/maximize/close buttons. Set with [member extend_to_title].
+ [b]Note:[/b] This flag is implemented on macOS.
</constant>
- <constant name="FLAG_MAX" value="6" enum="Flags">
+ <constant name="FLAG_MAX" value="7" enum="Flags">
Max value of the [enum Flags].
</constant>
<constant name="CONTENT_SCALE_MODE_DISABLED" value="0" enum="ContentScaleMode">
diff --git a/doc/classes/World2D.xml b/doc/classes/World2D.xml
index b0cf126d7b..4a13389708 100644
--- a/doc/classes/World2D.xml
+++ b/doc/classes/World2D.xml
@@ -14,7 +14,7 @@
The [RID] of this world's canvas resource. Used by the [RenderingServer] for 2D drawing.
</member>
<member name="direct_space_state" type="PhysicsDirectSpaceState2D" setter="" getter="get_direct_space_state">
- Direct access to the world's physics 2D space state. Used for querying current and potential collisions. When using multi-threaded physics, access is limited to [code]_physics_process(delta)[/code] in the main thread.
+ Direct access to the world's physics 2D space state. Used for querying current and potential collisions. When using multi-threaded physics, access is limited to [method Node._physics_process] in the main thread.
</member>
<member name="navigation_map" type="RID" setter="" getter="get_navigation_map">
The [RID] of this world's navigation map. Used by the [NavigationServer2D].
diff --git a/doc/classes/World3D.xml b/doc/classes/World3D.xml
index 56a662d062..5e58bb0360 100644
--- a/doc/classes/World3D.xml
+++ b/doc/classes/World3D.xml
@@ -10,10 +10,11 @@
<link title="Ray-casting">$DOCS_URL/tutorials/physics/ray-casting.html</link>
</tutorials>
<members>
- <member name="camera_effects" type="CameraEffects" setter="set_camera_effects" getter="get_camera_effects">
+ <member name="camera_attributes" type="CameraAttributes" setter="set_camera_attributes" getter="get_camera_attributes">
+ The default [CameraAttributes] resource to use if none set on the [Camera3D].
</member>
<member name="direct_space_state" type="PhysicsDirectSpaceState3D" setter="" getter="get_direct_space_state">
- Direct access to the world's physics 3D space state. Used for querying current and potential collisions.
+ Direct access to the world's physics 3D space state. Used for querying current and potential collisions. When using multi-threaded physics, access is limited to [method Node._physics_process] in the main thread.
</member>
<member name="environment" type="Environment" setter="set_environment" getter="get_environment">
The World3D's [Environment].
diff --git a/doc/classes/WorldEnvironment.xml b/doc/classes/WorldEnvironment.xml
index ed8f0b9a04..5255179bb8 100644
--- a/doc/classes/WorldEnvironment.xml
+++ b/doc/classes/WorldEnvironment.xml
@@ -15,8 +15,8 @@
<link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
</tutorials>
<members>
- <member name="camera_effects" type="CameraEffects" setter="set_camera_effects" getter="get_camera_effects">
- The [CameraEffects] resource used by this [WorldEnvironment], defining the default properties. This [CameraEffects] resource will be used by all [Camera3D]s that do not define their own [CameraEffects].
+ <member name="camera_attributes" type="CameraAttributes" setter="set_camera_attributes" getter="get_camera_attributes">
+ The default [CameraAttributes] resource to use if none set on the [Camera3D].
</member>
<member name="environment" type="Environment" setter="set_environment" getter="get_environment">
The [Environment] resource used by this [WorldEnvironment], defining the default properties.
diff --git a/doc/classes/X509Certificate.xml b/doc/classes/X509Certificate.xml
index d8f54d0ec5..37b202a513 100644
--- a/doc/classes/X509Certificate.xml
+++ b/doc/classes/X509Certificate.xml
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="X509Certificate" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
- An X509 certificate (e.g. for SSL).
+ An X509 certificate (e.g. for TLS).
</brief_description>
<description>
The X509Certificate class represents an X509 certificate. Certificates can be loaded and saved like any other [Resource].
- They can be used as the server certificate in [method StreamPeerSSL.accept_stream] (along with the proper [CryptoKey]), and to specify the only certificate that should be accepted when connecting to an SSL server via [method StreamPeerSSL.connect_to_stream].
+ They can be used as the server certificate in [method StreamPeerTLS.accept_stream] (along with the proper [CryptoKey]), and to specify the only certificate that should be accepted when connecting to an TLS server via [method StreamPeerTLS.connect_to_stream].
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/XMLParser.xml b/doc/classes/XMLParser.xml
index 69544f4895..26480f0c18 100644
--- a/doc/classes/XMLParser.xml
+++ b/doc/classes/XMLParser.xml
@@ -12,7 +12,7 @@
<method name="get_attribute_count" qualifiers="const">
<return type="int" />
<description>
- Gets the amount of attributes in the current element.
+ Gets the number of attributes in the current element.
</description>
</method>
<method name="get_attribute_name" qualifiers="const">
diff --git a/doc/classes/XRInterface.xml b/doc/classes/XRInterface.xml
index 6296b95e6c..05d5eb6673 100644
--- a/doc/classes/XRInterface.xml
+++ b/doc/classes/XRInterface.xml
@@ -32,7 +32,17 @@
<method name="get_play_area" qualifiers="const">
<return type="PackedVector3Array" />
<description>
- Returns an array of vectors that denotes the physical play area mapped to the virtual space around the [XROrigin3D] point. The points form a convex polygon that can be used to react to or visualise the play area. This returns an empty array if this feature is not supported or if the information is not yet available.
+ Returns an array of vectors that denotes the physical play area mapped to the virtual space around the [XROrigin3D] point. The points form a convex polygon that can be used to react to or visualize the play area. This returns an empty array if this feature is not supported or if the information is not yet available.
+ </description>
+ </method>
+ <method name="get_projection_for_view">
+ <return type="Projection" />
+ <param index="0" name="view" type="int" />
+ <param index="1" name="aspect" type="float" />
+ <param index="2" name="near" type="float" />
+ <param index="3" name="far" type="float" />
+ <description>
+ Returns the projection matrix for a view/eye.
</description>
</method>
<method name="get_render_target_size">
@@ -47,6 +57,16 @@
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_transform_for_view">
+ <return type="Transform3D" />
+ <param index="0" name="view" type="int" />
+ <param index="1" name="cam_transform" type="Transform3D" />
+ <description>
+ Returns the transform for a view/eye.
+ [param view] is the view/eye index.
+ [param cam_transform] is the transform that maps device coordinates to scene coordinates, typically the global_transform of the current XROrigin3D.
+ </description>
+ </method>
<method name="get_view_count">
<return type="int" />
<description>
@@ -66,7 +86,19 @@
<method name="is_initialized" qualifiers="const">
<return type="bool" />
<description>
- Is [code]true[/code] if this interface has been initialised.
+ Is [code]true[/code] if this interface has been initialized.
+ </description>
+ </method>
+ <method name="is_passthrough_enabled">
+ <return type="bool" />
+ <description>
+ Is [code]true[/code] if passthrough is enabled.
+ </description>
+ </method>
+ <method name="is_passthrough_supported">
+ <return type="bool" />
+ <description>
+ Is [code]true[/code] if this interface supports passthrough.
</description>
</method>
<method name="set_play_area_mode">
@@ -76,6 +108,19 @@
Sets the active play area mode, will return [code]false[/code] if the mode can't be used with this interface.
</description>
</method>
+ <method name="start_passthrough">
+ <return type="bool" />
+ <description>
+ Starts passthrough, will return [code]false[/code] if passthrough couldn't be started.
+ [b]Note:[/b] The viewport used for XR must have a transparent background, otherwise passthrough may not properly render.
+ </description>
+ </method>
+ <method name="stop_passthrough">
+ <return type="void" />
+ <description>
+ Stops passthrough.
+ </description>
+ </method>
<method name="supports_play_area_mode">
<return type="bool" />
<param index="0" name="mode" type="int" enum="XRInterface.PlayAreaMode" />
diff --git a/doc/classes/XRInterfaceExtension.xml b/doc/classes/XRInterfaceExtension.xml
index 06ef18b534..0fe54e947f 100644
--- a/doc/classes/XRInterfaceExtension.xml
+++ b/doc/classes/XRInterfaceExtension.xml
@@ -39,6 +39,18 @@
Returns the capabilities of this interface.
</description>
</method>
+ <method name="_get_color_texture" qualifiers="virtual">
+ <return type="RID" />
+ <description>
+ Return color texture into which to render (if applicable).
+ </description>
+ </method>
+ <method name="_get_depth_texture" qualifiers="virtual">
+ <return type="RID" />
+ <description>
+ Return depth texture into which to render (if applicable).
+ </description>
+ </method>
<method name="_get_name" qualifiers="virtual const">
<return type="StringName" />
<description>
@@ -100,6 +112,12 @@
Returns a [Transform3D] for a given view.
</description>
</method>
+ <method name="_get_velocity_texture" qualifiers="virtual">
+ <return type="RID" />
+ <description>
+ Return velocity texture into which to render (if applicable).
+ </description>
+ </method>
<method name="_get_view_count" qualifiers="virtual">
<return type="int" />
<description>
@@ -120,14 +138,7 @@
<method name="_is_initialized" qualifiers="virtual const">
<return type="bool" />
<description>
- Returns [code]true[/code] if this interface has been initialised.
- </description>
- </method>
- <method name="_notification" qualifiers="virtual">
- <return type="void" />
- <param index="0" name="what" type="int" />
- <description>
- Informs the interface of an applicable system notification.
+ Returns [code]true[/code] if this interface has been initialized.
</description>
</method>
<method name="_post_draw_viewport" qualifiers="virtual">
@@ -213,6 +224,16 @@
Blits our render results to screen optionally applying lens distortion. This can only be called while processing [code]_commit_views[/code].
</description>
</method>
+ <method name="get_color_texture">
+ <return type="RID" />
+ <description>
+ </description>
+ </method>
+ <method name="get_depth_texture">
+ <return type="RID" />
+ <description>
+ </description>
+ </method>
<method name="get_render_target_texture">
<return type="RID" />
<param index="0" name="render_target" type="RID" />
@@ -220,5 +241,10 @@
Returns a valid [RID] for a texture to which we should render the current frame if supported by the interface.
</description>
</method>
+ <method name="get_velocity_texture">
+ <return type="RID" />
+ <description>
+ </description>
+ </method>
</methods>
</class>
diff --git a/doc/classes/XROrigin3D.xml b/doc/classes/XROrigin3D.xml
index 7acee097e7..506d0fce41 100644
--- a/doc/classes/XROrigin3D.xml
+++ b/doc/classes/XROrigin3D.xml
@@ -13,6 +13,9 @@
<link title="XR documentation index">$DOCS_URL/tutorials/xr/index.html</link>
</tutorials>
<members>
+ <member name="current" type="bool" setter="set_current" getter="is_current" default="false">
+ Is this XROrigin3D node the current origin used by the [XRServer]?
+ </member>
<member name="world_scale" type="float" setter="set_world_scale" getter="get_world_scale" default="1.0">
Allows you to adjust the scale to your game's units. Most AR/VR platforms assume a scale of 1 game world unit = 1 real world meter.
[b]Note:[/b] This method is a passthrough to the [XRServer] itself.
diff --git a/doc/classes/XRPose.xml b/doc/classes/XRPose.xml
index 0e58fab9b3..31a484ea40 100644
--- a/doc/classes/XRPose.xml
+++ b/doc/classes/XRPose.xml
@@ -30,7 +30,7 @@
<member name="name" type="StringName" setter="set_name" getter="get_name" default="&amp;&quot;&quot;">
The name of this pose. Pose names are often driven by an action map setup by the user. Godot does suggest a number of pose names that it expects [XRInterface]s to implement:
- [code]root[/code] defines a root location, often used for tracked objects that do not have further nodes.
- - [code]aim[/code] defines the tip of a controller with the orientation pointing outwards, for instance: add your raycasts to this.
+ - [code]aim[/code] defines the tip of a controller with the orientation pointing outwards, for example: add your raycasts to this.
- [code]grip[/code] defines the location where the user grips the controller
- [code]skeleton[/code] defines the root location a hand mesh should be placed when using hand tracking and the animated skeleton supplied by the XR runtime.
</member>
@@ -46,7 +46,7 @@
No tracking information is available for this pose.
</constant>
<constant name="XR_TRACKING_CONFIDENCE_LOW" value="1" enum="TrackingConfidence">
- Tracking information may be inaccurate or estimated. For instance with inside out tracking this would indicate a controller may be (partially) obscured.
+ Tracking information may be inaccurate or estimated. For example, with inside out tracking this would indicate a controller may be (partially) obscured.
</constant>
<constant name="XR_TRACKING_CONFIDENCE_HIGH" value="2" enum="TrackingConfidence">
Tracking information is deemed accurate and up to date.
diff --git a/doc/classes/XRServer.xml b/doc/classes/XRServer.xml
index 7e96b33edd..d940ea41ac 100644
--- a/doc/classes/XRServer.xml
+++ b/doc/classes/XRServer.xml
@@ -30,18 +30,18 @@
<param index="1" name="keep_height" type="bool" />
<description>
This is an important function to understand correctly. AR and VR platforms all handle positioning slightly differently.
- For platforms that do not offer spatial tracking, our origin point (0,0,0) is the location of our HMD, but you have little control over the direction the player is facing in the real world.
+ For platforms that do not offer spatial tracking, our origin point (0, 0, 0) is the location of our HMD, but you have little control over the direction the player is facing in the real world.
For platforms that do offer spatial tracking, our origin point depends very much on the system. For OpenVR, our origin point is usually the center of the tracking space, on the ground. For other platforms, it's often the location of the tracking camera.
This method allows you to center your tracker on the location of the HMD. It will take the current location of the HMD and use that to adjust all your tracking data; in essence, realigning the real world to your player's current position in the game world.
For this method to produce usable results, tracking information must be available. This often takes a few frames after starting your game.
- You should call this method after a few seconds have passed. For instance, when the user requests a realignment of the display holding a designated button on a controller for a short period of time, or when implementing a teleport mechanism.
+ You should call this method after a few seconds have passed. For example, when the user requests a realignment of the display holding a designated button on a controller for a short period of time, or when implementing a teleport mechanism.
</description>
</method>
<method name="find_interface" qualifiers="const">
<return type="XRInterface" />
<param index="0" name="name" type="String" />
<description>
- Finds an interface by its [param name]. For instance, if your project uses capabilities of an AR/VR platform, you can find the interface for that platform by name and initialize it.
+ Finds an interface by its [param name]. For example, if your project uses capabilities of an AR/VR platform, you can find the interface for that platform by name and initialize it.
</description>
</method>
<method name="get_hmd_transform">
@@ -64,7 +64,7 @@
</description>
</method>
<method name="get_interfaces" qualifiers="const">
- <return type="Array" />
+ <return type="Dictionary[]" />
<description>
Returns a list of available interfaces the ID and name of each interface.
</description>
diff --git a/doc/classes/float.xml b/doc/classes/float.xml
index 9d685b9cd0..a196021249 100644
--- a/doc/classes/float.xml
+++ b/doc/classes/float.xml
@@ -28,6 +28,13 @@
</constructor>
<constructor name="float">
<return type="float" />
+ <param index="0" name="from" type="String" />
+ <description>
+ Converts a [String] to a [float], following the same rules as [method String.to_float].
+ </description>
+ </constructor>
+ <constructor name="float">
+ <return type="float" />
<param index="0" name="from" type="bool" />
<description>
Cast a [bool] value to a floating-point value, [code]float(true)[/code] will be equal to 1.0 and [code]float(false)[/code] will be equal to 0.0.
@@ -114,12 +121,17 @@
<return type="Vector4" />
<param index="0" name="right" type="Vector4" />
<description>
+ Multiplies each component of the [Vector4] by the given [float].
</description>
</operator>
<operator name="operator *">
<return type="Vector4" />
<param index="0" name="right" type="Vector4i" />
<description>
+ Multiplies each component of the [Vector4i] by the given [float]. Returns a [Vector4].
+ [codeblock]
+ print(0.9 * Vector4i(10, 15, 20, -10)) # Prints "(9, 13.5, 18, -9)"
+ [/codeblock]
</description>
</operator>
<operator name="operator *">
@@ -140,12 +152,20 @@
<return type="float" />
<param index="0" name="right" type="float" />
<description>
+ Raises a [float] to a power of a [float].
+ [codeblock]
+ print(39.0625**0.25) # 2.5
+ [/codeblock]
</description>
</operator>
<operator name="operator **">
<return type="float" />
<param index="0" name="right" type="int" />
<description>
+ Raises a [float] to a power of an [int]. The result is a [float].
+ [codeblock]
+ print(0.9**3) # 0.729
+ [/codeblock]
</description>
</operator>
<operator name="operator +">
@@ -194,7 +214,7 @@
<return type="bool" />
<param index="0" name="right" type="float" />
<description>
- Returns [code]true[/code] the left float is less than the right one.
+ Returns [code]true[/code] if the left float is less than the right one.
</description>
</operator>
<operator name="operator &lt;">
@@ -208,7 +228,7 @@
<return type="bool" />
<param index="0" name="right" type="float" />
<description>
- Returns [code]true[/code] the left integer is less than or equal to the right one.
+ Returns [code]true[/code] if the left float is less than or equal to the right one.
</description>
</operator>
<operator name="operator &lt;=">
@@ -237,7 +257,7 @@
<return type="bool" />
<param index="0" name="right" type="float" />
<description>
- Returns [code]true[/code] the left float is greater than the right one.
+ Returns [code]true[/code] if the left float is greater than the right one.
</description>
</operator>
<operator name="operator &gt;">
@@ -251,7 +271,7 @@
<return type="bool" />
<param index="0" name="right" type="float" />
<description>
- Returns [code]true[/code] the left float is greater than or equal to the right one.
+ Returns [code]true[/code] if the left float is greater than or equal to the right one.
</description>
</operator>
<operator name="operator &gt;=">
diff --git a/doc/classes/int.xml b/doc/classes/int.xml
index 98c200c114..93fc8386c6 100644
--- a/doc/classes/int.xml
+++ b/doc/classes/int.xml
@@ -54,6 +54,13 @@
</constructor>
<constructor name="int">
<return type="int" />
+ <param index="0" name="from" type="String" />
+ <description>
+ Converts a [String] to an [int], following the same rules as [method String.to_int].
+ </description>
+ </constructor>
+ <constructor name="int">
+ <return type="int" />
<param index="0" name="from" type="bool" />
<description>
Cast a [bool] value to an integer value, [code]int(true)[/code] will be equals to 1 and [code]int(false)[/code] will be equals to 0.
@@ -63,7 +70,7 @@
<return type="int" />
<param index="0" name="from" type="float" />
<description>
- Cast a float value to an integer value, this method simply removes the number fractions (i.e. rounds [code]from[/code] towards zero), so for example [code]int(2.7)[/code] will be equals to 2, [code]int(0.1)[/code] will be equals to 0 and [code]int(-2.7)[/code] will be equals to -2. This operation is also called truncation.
+ Cast a float value to an integer value, this method simply removes the number fractions (i.e. rounds [param from] towards zero), so for example [code]int(2.7)[/code] will be equals to 2, [code]int(0.1)[/code] will be equals to 0 and [code]int(-2.7)[/code] will be equals to -2. This operation is also called truncation.
</description>
</constructor>
</constructors>
@@ -72,14 +79,14 @@
<return type="bool" />
<param index="0" name="right" type="float" />
<description>
- Returns [code]true[/code] if operands are different from each other.
+ Returns [code]true[/code] if this [int] is not equivalent to the given [float].
</description>
</operator>
<operator name="operator !=">
<return type="bool" />
<param index="0" name="right" type="int" />
<description>
- Returns [code]true[/code] if operands are different from each other.
+ Returns [code]true[/code] if the integers are not equal.
</description>
</operator>
<operator name="operator %">
@@ -161,12 +168,14 @@
<return type="Vector4" />
<param index="0" name="right" type="Vector4" />
<description>
+ Multiplies each component of the [Vector4] by the given [int].
</description>
</operator>
<operator name="operator *">
<return type="Vector4i" />
<param index="0" name="right" type="Vector4i" />
<description>
+ Multiplies each component of the [Vector4i] by the given [int].
</description>
</operator>
<operator name="operator *">
@@ -187,19 +196,20 @@
<return type="float" />
<param index="0" name="right" type="float" />
<description>
+ Raises an [int] to a power of a [float]. The result is a [float].
+ [codeblock]
+ print(8**0.25) # 1.68179283050743
+ [/codeblock]
</description>
</operator>
<operator name="operator **">
<return type="int" />
<param index="0" name="right" type="int" />
<description>
- </description>
- </operator>
- <operator name="operator +">
- <return type="String" />
- <param index="0" name="right" type="String" />
- <description>
- Adds Unicode character with code [int] to the [String].
+ Raises an [int] to a power of a [int].
+ [codeblock]
+ print(5**5) # 3125
+ [/codeblock]
</description>
</operator>
<operator name="operator +">
@@ -262,7 +272,7 @@
<return type="bool" />
<param index="0" name="right" type="int" />
<description>
- Returns [code]true[/code] the left integer is less than the right one.
+ Returns [code]true[/code] if the left integer is less than the right one.
</description>
</operator>
<operator name="operator &lt;&lt;">
@@ -287,7 +297,7 @@
<return type="bool" />
<param index="0" name="right" type="int" />
<description>
- Returns [code]true[/code] the left integer is less than or equal to the right one.
+ Returns [code]true[/code] if the left integer is less than or equal to the right one.
</description>
</operator>
<operator name="operator ==">
@@ -315,7 +325,7 @@
<return type="bool" />
<param index="0" name="right" type="int" />
<description>
- Returns [code]true[/code] the left integer is greater than the right one.
+ Returns [code]true[/code] if the left integer is greater than the right one.
</description>
</operator>
<operator name="operator &gt;=">
@@ -329,7 +339,7 @@
<return type="bool" />
<param index="0" name="right" type="int" />
<description>
- Returns [code]true[/code] the left integer is greater than or equal to the right one.
+ Returns [code]true[/code] if the left integer is greater than or equal to the right one.
</description>
</operator>
<operator name="operator &gt;&gt;">