summaryrefslogtreecommitdiff
path: root/doc/classes
diff options
context:
space:
mode:
Diffstat (limited to 'doc/classes')
-rw-r--r--doc/classes/@GlobalScope.xml893
-rw-r--r--doc/classes/AABB.xml50
-rw-r--r--doc/classes/AESContext.xml14
-rw-r--r--doc/classes/AStar2D.xml108
-rw-r--r--doc/classes/AStar3D.xml110
-rw-r--r--doc/classes/AcceptDialog.xml26
-rw-r--r--doc/classes/AnimatedSprite2D.xml14
-rw-r--r--doc/classes/AnimatedSprite3D.xml4
-rw-r--r--doc/classes/AnimatedTexture.xml12
-rw-r--r--doc/classes/Animation.xml368
-rw-r--r--doc/classes/AnimationLibrary.xml34
-rw-r--r--doc/classes/AnimationNode.xml86
-rw-r--r--doc/classes/AnimationNodeAdd2.xml7
-rw-r--r--doc/classes/AnimationNodeAdd3.xml7
-rw-r--r--doc/classes/AnimationNodeBlend2.xml7
-rw-r--r--doc/classes/AnimationNodeBlend3.xml7
-rw-r--r--doc/classes/AnimationNodeBlendSpace1D.xml36
-rw-r--r--doc/classes/AnimationNodeBlendSpace2D.xml56
-rw-r--r--doc/classes/AnimationNodeBlendTree.xml42
-rw-r--r--doc/classes/AnimationNodeOneShot.xml8
-rw-r--r--doc/classes/AnimationNodeStateMachine.xml80
-rw-r--r--doc/classes/AnimationNodeStateMachinePlayback.xml4
-rw-r--r--doc/classes/AnimationNodeStateMachineTransition.xml11
-rw-r--r--doc/classes/AnimationNodeSync.xml15
-rw-r--r--doc/classes/AnimationNodeTransition.xml21
-rw-r--r--doc/classes/AnimationPlayer.xml136
-rw-r--r--doc/classes/AnimationTree.xml9
-rw-r--r--doc/classes/Area2D.xml90
-rw-r--r--doc/classes/Area3D.xml88
-rw-r--r--doc/classes/Array.xml189
-rw-r--r--doc/classes/ArrayMesh.xml60
-rw-r--r--doc/classes/ArrayOccluder3D.xml4
-rw-r--r--doc/classes/AudioEffectAmplify.xml2
-rw-r--r--doc/classes/AudioEffectBandLimitFilter.xml1
-rw-r--r--doc/classes/AudioEffectBandPassFilter.xml1
-rw-r--r--doc/classes/AudioEffectCapture.xml13
-rw-r--r--doc/classes/AudioEffectChorus.xml39
-rw-r--r--doc/classes/AudioEffectCompressor.xml1
-rw-r--r--doc/classes/AudioEffectDelay.xml25
-rw-r--r--doc/classes/AudioEffectEQ.xml7
-rw-r--r--doc/classes/AudioEffectEQ10.xml1
-rw-r--r--doc/classes/AudioEffectEQ21.xml1
-rw-r--r--doc/classes/AudioEffectEQ6.xml3
-rw-r--r--doc/classes/AudioEffectHighPassFilter.xml3
-rw-r--r--doc/classes/AudioEffectHighShelfFilter.xml3
-rw-r--r--doc/classes/AudioEffectInstance.xml6
-rw-r--r--doc/classes/AudioEffectLimiter.xml1
-rw-r--r--doc/classes/AudioEffectLowPassFilter.xml3
-rw-r--r--doc/classes/AudioEffectLowShelfFilter.xml3
-rw-r--r--doc/classes/AudioEffectNotchFilter.xml1
-rw-r--r--doc/classes/AudioEffectPanner.xml3
-rw-r--r--doc/classes/AudioEffectPhaser.xml3
-rw-r--r--doc/classes/AudioEffectPitchShift.xml3
-rw-r--r--doc/classes/AudioEffectRecord.xml8
-rw-r--r--doc/classes/AudioEffectReverb.xml4
-rw-r--r--doc/classes/AudioEffectSpectrumAnalyzerInstance.xml6
-rw-r--r--doc/classes/AudioEffectStereoEnhance.xml4
-rw-r--r--doc/classes/AudioServer.xml158
-rw-r--r--doc/classes/AudioStream.xml18
-rw-r--r--doc/classes/AudioStreamGeneratorPlayback.xml8
-rw-r--r--doc/classes/AudioStreamPlayback.xml17
-rw-r--r--doc/classes/AudioStreamPlaybackResampled.xml4
-rw-r--r--doc/classes/AudioStreamPlayer.xml7
-rw-r--r--doc/classes/AudioStreamPlayer2D.xml13
-rw-r--r--doc/classes/AudioStreamPlayer3D.xml12
-rw-r--r--doc/classes/AudioStreamRandomizer.xml20
-rw-r--r--doc/classes/AudioStreamWAV.xml (renamed from doc/classes/AudioStreamSample.xml)14
-rw-r--r--doc/classes/BaseButton.xml8
-rw-r--r--doc/classes/BaseMaterial3D.xml92
-rw-r--r--doc/classes/Basis.xml74
-rw-r--r--doc/classes/BitMap.xml38
-rw-r--r--doc/classes/Bone2D.xml8
-rw-r--r--doc/classes/BoneAttachment3D.xml10
-rw-r--r--doc/classes/BoneMap.xml56
-rw-r--r--doc/classes/BoxContainer.xml4
-rw-r--r--doc/classes/Button.xml28
-rw-r--r--doc/classes/ButtonGroup.xml4
-rw-r--r--doc/classes/CPUParticles2D.xml30
-rw-r--r--doc/classes/CPUParticles3D.xml30
-rw-r--r--doc/classes/Callable.xml16
-rw-r--r--doc/classes/CallbackTweener.xml2
-rw-r--r--doc/classes/Camera2D.xml12
-rw-r--r--doc/classes/Camera3D.xml78
-rw-r--r--doc/classes/CameraServer.xml18
-rw-r--r--doc/classes/CanvasItem.xml356
-rw-r--r--doc/classes/CanvasLayer.xml4
-rw-r--r--doc/classes/CharacterBody2D.xml34
-rw-r--r--doc/classes/CharacterBody3D.xml36
-rw-r--r--doc/classes/CheckBox.xml2
-rw-r--r--doc/classes/CheckButton.xml2
-rw-r--r--doc/classes/ClassDB.xml136
-rw-r--r--doc/classes/CodeEdit.xml175
-rw-r--r--doc/classes/CodeHighlighter.xml32
-rw-r--r--doc/classes/CollisionObject2D.xml110
-rw-r--r--doc/classes/CollisionObject3D.xml96
-rw-r--r--doc/classes/CollisionPolygon2D.xml1
-rw-r--r--doc/classes/CollisionShape2D.xml4
-rw-r--r--doc/classes/CollisionShape3D.xml5
-rw-r--r--doc/classes/Color.xml136
-rw-r--r--doc/classes/ColorPicker.xml38
-rw-r--r--doc/classes/ColorPickerButton.xml4
-rw-r--r--doc/classes/CompressedTexture2D.xml2
-rw-r--r--doc/classes/CompressedTexture3D.xml2
-rw-r--r--doc/classes/CompressedTextureLayered.xml2
-rw-r--r--doc/classes/ConcavePolygonShape2D.xml1
-rw-r--r--doc/classes/ConcavePolygonShape3D.xml3
-rw-r--r--doc/classes/ConeTwistJoint3D.xml10
-rw-r--r--doc/classes/ConfigFile.xml58
-rw-r--r--doc/classes/ConfirmationDialog.xml3
-rw-r--r--doc/classes/Container.xml4
-rw-r--r--doc/classes/Control.xml334
-rw-r--r--doc/classes/ConvexPolygonShape2D.xml2
-rw-r--r--doc/classes/Crypto.xml59
-rw-r--r--doc/classes/CryptoKey.xml27
-rw-r--r--doc/classes/Curve.xml86
-rw-r--r--doc/classes/Curve2D.xml95
-rw-r--r--doc/classes/Curve3D.xml113
-rw-r--r--doc/classes/CurveTexture.xml8
-rw-r--r--doc/classes/CurveXYZTexture.xml7
-rw-r--r--doc/classes/CylinderMesh.xml12
-rw-r--r--doc/classes/DTLSServer.xml12
-rw-r--r--doc/classes/Decal.xml34
-rw-r--r--doc/classes/Dictionary.xml32
-rw-r--r--doc/classes/DirectionalLight3D.xml1
-rw-r--r--doc/classes/Directory.xml30
-rw-r--r--doc/classes/DisplayServer.xml739
-rw-r--r--doc/classes/EditorCommandPalette.xml20
-rw-r--r--doc/classes/EditorDebuggerPlugin.xml18
-rw-r--r--doc/classes/EditorExportPlugin.xml58
-rw-r--r--doc/classes/EditorFeatureProfile.xml54
-rw-r--r--doc/classes/EditorFileDialog.xml14
-rw-r--r--doc/classes/EditorFileSystem.xml28
-rw-r--r--doc/classes/EditorFileSystemDirectory.xml36
-rw-r--r--doc/classes/EditorFileSystemImportFormatSupportQuery.xml2
-rw-r--r--doc/classes/EditorImportPlugin.xml26
-rw-r--r--doc/classes/EditorInspector.xml22
-rw-r--r--doc/classes/EditorInspectorPlugin.xml55
-rw-r--r--doc/classes/EditorInterface.xml63
-rw-r--r--doc/classes/EditorNode3DGizmo.xml128
-rw-r--r--doc/classes/EditorNode3DGizmoPlugin.xml136
-rw-r--r--doc/classes/EditorPaths.xml6
-rw-r--r--doc/classes/EditorPlugin.xml205
-rw-r--r--doc/classes/EditorProperty.xml61
-rw-r--r--doc/classes/EditorResourceConversionPlugin.xml4
-rw-r--r--doc/classes/EditorResourcePicker.xml16
-rw-r--r--doc/classes/EditorResourcePreview.xml34
-rw-r--r--doc/classes/EditorResourcePreviewGenerator.xml12
-rw-r--r--doc/classes/EditorSceneFormatImporter.xml16
-rw-r--r--doc/classes/EditorScenePostImport.xml2
-rw-r--r--doc/classes/EditorScenePostImportPlugin.xml54
-rw-r--r--doc/classes/EditorScript.xml4
-rw-r--r--doc/classes/EditorSelection.xml6
-rw-r--r--doc/classes/EditorSettings.xml809
-rw-r--r--doc/classes/EditorSpinSlider.xml3
-rw-r--r--doc/classes/EditorSyntaxHighlighter.xml2
-rw-r--r--doc/classes/EditorTranslationParserPlugin.xml6
-rw-r--r--doc/classes/EditorUndoRedoManager.xml118
-rw-r--r--doc/classes/EditorVCSInterface.xml12
-rw-r--r--doc/classes/Engine.xml40
-rw-r--r--doc/classes/EngineDebugger.xml46
-rw-r--r--doc/classes/EngineProfiler.xml18
-rw-r--r--doc/classes/Environment.xml70
-rw-r--r--doc/classes/Expression.xml13
-rw-r--r--doc/classes/File.xml99
-rw-r--r--doc/classes/FileDialog.xml20
-rw-r--r--doc/classes/FileSystemDock.xml18
-rw-r--r--doc/classes/FogVolume.xml7
-rw-r--r--doc/classes/Font.xml345
-rw-r--r--doc/classes/FontFile.xml (renamed from doc/classes/FontData.xml)502
-rw-r--r--doc/classes/FontVariation.xml76
-rw-r--r--doc/classes/GPUParticles2D.xml16
-rw-r--r--doc/classes/GPUParticles3D.xml26
-rw-r--r--doc/classes/GPUParticlesAttractor3D.xml12
-rw-r--r--doc/classes/GPUParticlesAttractorBox3D.xml4
-rw-r--r--doc/classes/GPUParticlesAttractorSphere3D.xml5
-rw-r--r--doc/classes/GPUParticlesAttractorVectorField3D.xml7
-rw-r--r--doc/classes/GPUParticlesCollision3D.xml10
-rw-r--r--doc/classes/GPUParticlesCollisionBox3D.xml5
-rw-r--r--doc/classes/GPUParticlesCollisionHeightField3D.xml24
-rw-r--r--doc/classes/GPUParticlesCollisionSDF3D.xml38
-rw-r--r--doc/classes/GPUParticlesCollisionSphere3D.xml5
-rw-r--r--doc/classes/Generic6DOFJoint3D.xml48
-rw-r--r--doc/classes/Geometry2D.xml178
-rw-r--r--doc/classes/Geometry3D.xml116
-rw-r--r--doc/classes/GeometryInstance3D.xml12
-rw-r--r--doc/classes/Gradient.xml33
-rw-r--r--doc/classes/GradientTexture1D.xml2
-rw-r--r--doc/classes/GradientTexture2D.xml2
-rw-r--r--doc/classes/GraphEdit.xml185
-rw-r--r--doc/classes/GraphNode.xml183
-rw-r--r--doc/classes/HMACContext.xml9
-rw-r--r--doc/classes/HTTPClient.xml47
-rw-r--r--doc/classes/HTTPRequest.xml78
-rw-r--r--doc/classes/HashingContext.xml9
-rw-r--r--doc/classes/HingeJoint3D.xml16
-rw-r--r--doc/classes/IP.xml42
-rw-r--r--doc/classes/Image.xml245
-rw-r--r--doc/classes/ImageTexture.xml34
-rw-r--r--doc/classes/ImageTexture3D.xml14
-rw-r--r--doc/classes/ImageTextureLayered.xml6
-rw-r--r--doc/classes/ImmediateMesh.xml18
-rw-r--r--doc/classes/ImporterMesh.xml76
-rw-r--r--doc/classes/Input.xml165
-rw-r--r--doc/classes/InputEvent.xml44
-rw-r--r--doc/classes/InputEventMouseMotion.xml6
-rw-r--r--doc/classes/InputMap.xml45
-rw-r--r--doc/classes/InstancePlaceholder.xml11
-rw-r--r--doc/classes/ItemList.xml198
-rw-r--r--doc/classes/JSON.xml33
-rw-r--r--doc/classes/JSONRPC.xml52
-rw-r--r--doc/classes/JavaClassWrapper.xml2
-rw-r--r--doc/classes/JavaScript.xml28
-rw-r--r--doc/classes/Joint3D.xml8
-rw-r--r--doc/classes/KinematicCollision2D.xml10
-rw-r--r--doc/classes/KinematicCollision3D.xml30
-rw-r--r--doc/classes/Label.xml99
-rw-r--r--doc/classes/Label3D.xml74
-rw-r--r--doc/classes/LabelSettings.xml29
-rw-r--r--doc/classes/Light2D.xml2
-rw-r--r--doc/classes/Light3D.xml27
-rw-r--r--doc/classes/LightmapGI.xml44
-rw-r--r--doc/classes/LightmapGIData.xml22
-rw-r--r--doc/classes/LightmapProbe.xml3
-rw-r--r--doc/classes/Lightmapper.xml3
-rw-r--r--doc/classes/LightmapperRD.xml3
-rw-r--r--doc/classes/Line2D.xml24
-rw-r--r--doc/classes/LineEdit.xml81
-rw-r--r--doc/classes/LinkButton.xml23
-rw-r--r--doc/classes/MainLoop.xml10
-rw-r--r--doc/classes/Marker2D.xml (renamed from doc/classes/Position2D.xml)2
-rw-r--r--doc/classes/Marker3D.xml (renamed from doc/classes/Position3D.xml)2
-rw-r--r--doc/classes/Marshalls.xml26
-rw-r--r--doc/classes/MenuBar.xml172
-rw-r--r--doc/classes/MenuButton.xml4
-rw-r--r--doc/classes/Mesh.xml81
-rw-r--r--doc/classes/MeshDataTool.xml94
-rw-r--r--doc/classes/MeshInstance2D.xml2
-rw-r--r--doc/classes/MeshInstance3D.xml26
-rw-r--r--doc/classes/MeshLibrary.xml48
-rw-r--r--doc/classes/MethodTweener.xml6
-rw-r--r--doc/classes/MissingNode.xml17
-rw-r--r--doc/classes/MissingResource.xml17
-rw-r--r--doc/classes/MovieWriter.xml76
-rw-r--r--doc/classes/MultiMesh.xml29
-rw-r--r--doc/classes/MultiMeshInstance3D.xml2
-rw-r--r--doc/classes/MultiplayerAPI.xml104
-rw-r--r--doc/classes/MultiplayerAPIExtension.xml141
-rw-r--r--doc/classes/MultiplayerPeer.xml19
-rw-r--r--doc/classes/MultiplayerPeerExtension.xml33
-rw-r--r--doc/classes/MultiplayerSpawner.xml47
-rw-r--r--doc/classes/MultiplayerSynchronizer.xml17
-rw-r--r--doc/classes/NativeExtension.xml10
-rw-r--r--doc/classes/NativeExtensionManager.xml10
-rw-r--r--doc/classes/NavigationAgent2D.xml57
-rw-r--r--doc/classes/NavigationAgent3D.xml59
-rw-r--r--doc/classes/NavigationMesh.xml89
-rw-r--r--doc/classes/NavigationMeshGenerator.xml14
-rw-r--r--doc/classes/NavigationObstacle2D.xml9
-rw-r--r--doc/classes/NavigationObstacle3D.xml9
-rw-r--r--doc/classes/NavigationPolygon.xml26
-rw-r--r--doc/classes/NavigationRegion2D.xml36
-rw-r--r--doc/classes/NavigationRegion3D.xml38
-rw-r--r--doc/classes/NavigationServer2D.xml227
-rw-r--r--doc/classes/NavigationServer3D.xml258
-rw-r--r--doc/classes/NinePatchRect.xml8
-rw-r--r--doc/classes/Node.xml236
-rw-r--r--doc/classes/Node2D.xml44
-rw-r--r--doc/classes/Node3D.xml96
-rw-r--r--doc/classes/NodePath.xml28
-rw-r--r--doc/classes/ORMMaterial3D.xml3
-rw-r--r--doc/classes/OS.xml191
-rw-r--r--doc/classes/Object.xml194
-rw-r--r--doc/classes/OccluderInstance3D.xml12
-rw-r--r--doc/classes/OmniLight3D.xml1
-rw-r--r--doc/classes/OptimizedTranslation.xml2
-rw-r--r--doc/classes/OptionButton.xml104
-rw-r--r--doc/classes/PCKPacker.xml22
-rw-r--r--doc/classes/PackedByteArray.xml221
-rw-r--r--doc/classes/PackedColorArray.xml86
-rw-r--r--doc/classes/PackedDataContainer.xml2
-rw-r--r--doc/classes/PackedFloat32Array.xml88
-rw-r--r--doc/classes/PackedFloat64Array.xml87
-rw-r--r--doc/classes/PackedInt32Array.xml86
-rw-r--r--doc/classes/PackedInt64Array.xml85
-rw-r--r--doc/classes/PackedScene.xml4
-rw-r--r--doc/classes/PackedStringArray.xml92
-rw-r--r--doc/classes/PackedVector2Array.xml89
-rw-r--r--doc/classes/PackedVector3Array.xml89
-rw-r--r--doc/classes/PacketPeer.xml12
-rw-r--r--doc/classes/PacketPeerDTLS.xml10
-rw-r--r--doc/classes/PacketPeerExtension.xml8
-rw-r--r--doc/classes/PacketPeerUDP.xml38
-rw-r--r--doc/classes/ParticlesMaterial.xml142
-rw-r--r--doc/classes/PathFollow2D.xml12
-rw-r--r--doc/classes/PathFollow3D.xml12
-rw-r--r--doc/classes/Performance.xml86
-rw-r--r--doc/classes/PhysicalBone3D.xml8
-rw-r--r--doc/classes/PhysicalSkyMaterial.xml6
-rw-r--r--doc/classes/PhysicsBody2D.xml32
-rw-r--r--doc/classes/PhysicsBody3D.xml50
-rw-r--r--doc/classes/PhysicsDirectBodyState2D.xml54
-rw-r--r--doc/classes/PhysicsDirectBodyState3D.xml56
-rw-r--r--doc/classes/PhysicsDirectBodyState3DExtension.xml58
-rw-r--r--doc/classes/PhysicsDirectSpaceState2D.xml30
-rw-r--r--doc/classes/PhysicsDirectSpaceState3D.xml30
-rw-r--r--doc/classes/PhysicsDirectSpaceState3DExtension.xml106
-rw-r--r--doc/classes/PhysicsRayQueryParameters2D.xml16
-rw-r--r--doc/classes/PhysicsRayQueryParameters3D.xml16
-rw-r--r--doc/classes/PhysicsServer2D.xml417
-rw-r--r--doc/classes/PhysicsServer3D.xml511
-rw-r--r--doc/classes/PhysicsServer3DExtension.xml505
-rw-r--r--doc/classes/PhysicsServer3DRenderingServerHandler.xml10
-rw-r--r--doc/classes/PhysicsTestMotionParameters2D.xml4
-rw-r--r--doc/classes/PhysicsTestMotionParameters3D.xml4
-rw-r--r--doc/classes/PhysicsTestMotionResult3D.xml18
-rw-r--r--doc/classes/PinJoint3D.xml6
-rw-r--r--doc/classes/PlaceholderCubemap.xml9
-rw-r--r--doc/classes/PlaceholderCubemapArray.xml9
-rw-r--r--doc/classes/PlaceholderMaterial.xml9
-rw-r--r--doc/classes/PlaceholderMesh.xml13
-rw-r--r--doc/classes/PlaceholderTexture2D.xml13
-rw-r--r--doc/classes/PlaceholderTexture2DArray.xml9
-rw-r--r--doc/classes/PlaceholderTexture3D.xml13
-rw-r--r--doc/classes/PlaceholderTextureLayered.xml15
-rw-r--r--doc/classes/Plane.xml79
-rw-r--r--doc/classes/PlaneMesh.xml16
-rw-r--r--doc/classes/Polygon2D.xml26
-rw-r--r--doc/classes/PolygonPathFinder.xml22
-rw-r--r--doc/classes/PopupMenu.xml399
-rw-r--r--doc/classes/PopupPanel.xml1
-rw-r--r--doc/classes/PortableCompressedTexture2D.xml10
-rw-r--r--doc/classes/PrimitiveMesh.xml2
-rw-r--r--doc/classes/PrismMesh.xml2
-rw-r--r--doc/classes/ProceduralSkyMaterial.xml3
-rw-r--r--doc/classes/ProgressBar.xml17
-rw-r--r--doc/classes/ProjectSettings.xml457
-rw-r--r--doc/classes/Projection.xml283
-rw-r--r--doc/classes/PropertyTweener.xml8
-rw-r--r--doc/classes/QuadMesh.xml21
-rw-r--r--doc/classes/Quaternion.xml102
-rw-r--r--doc/classes/RDShaderFile.xml6
-rw-r--r--doc/classes/RDShaderSPIRV.xml12
-rw-r--r--doc/classes/RDShaderSource.xml6
-rw-r--r--doc/classes/RDTextureFormat.xml4
-rw-r--r--doc/classes/RDUniform.xml4
-rw-r--r--doc/classes/RID.xml14
-rw-r--r--doc/classes/RandomNumberGenerator.xml18
-rw-r--r--doc/classes/Range.xml10
-rw-r--r--doc/classes/RayCast2D.xml24
-rw-r--r--doc/classes/RayCast3D.xml24
-rw-r--r--doc/classes/Rect2.xml64
-rw-r--r--doc/classes/Rect2i.xml52
-rw-r--r--doc/classes/ReflectionProbe.xml2
-rw-r--r--doc/classes/RenderingDevice.xml400
-rw-r--r--doc/classes/RenderingServer.xml2220
-rw-r--r--doc/classes/Resource.xml8
-rw-r--r--doc/classes/ResourceFormatLoader.xml38
-rw-r--r--doc/classes/ResourceFormatSaver.xml12
-rw-r--r--doc/classes/ResourceLoader.xml71
-rw-r--r--doc/classes/ResourcePreloader.xml24
-rw-r--r--doc/classes/ResourceSaver.xml44
-rw-r--r--doc/classes/ResourceUID.xml37
-rw-r--r--doc/classes/RichTextEffect.xml4
-rw-r--r--doc/classes/RichTextLabel.xml213
-rw-r--r--doc/classes/RigidDynamicBody2D.xml102
-rw-r--r--doc/classes/RigidDynamicBody3D.xml104
-rw-r--r--doc/classes/RootMotionView.xml12
-rw-r--r--doc/classes/SceneReplicationConfig.xml61
-rw-r--r--doc/classes/SceneState.xml84
-rw-r--r--doc/classes/SceneTree.xml141
-rw-r--r--doc/classes/SceneTreeTimer.xml2
-rw-r--r--doc/classes/Script.xml16
-rw-r--r--doc/classes/ScriptCreateDialog.xml11
-rw-r--r--doc/classes/ScriptEditor.xml20
-rw-r--r--doc/classes/ScriptEditorBase.xml14
-rw-r--r--doc/classes/ScriptExtension.xml34
-rw-r--r--doc/classes/ScriptLanguageExtension.xml141
-rw-r--r--doc/classes/ScrollContainer.xml6
-rw-r--r--doc/classes/Shader.xml24
-rw-r--r--doc/classes/ShaderInclude.xml (renamed from doc/classes/ProxyTexture.xml)4
-rw-r--r--doc/classes/ShaderMaterial.xml26
-rw-r--r--doc/classes/Shape2D.xml58
-rw-r--r--doc/classes/ShapeCast2D.xml44
-rw-r--r--doc/classes/ShapeCast3D.xml168
-rw-r--r--doc/classes/Shortcut.xml4
-rw-r--r--doc/classes/Signal.xml20
-rw-r--r--doc/classes/Skeleton2D.xml28
-rw-r--r--doc/classes/Skeleton3D.xml191
-rw-r--r--doc/classes/SkeletonIK3D.xml2
-rw-r--r--doc/classes/SkeletonModification2D.xml18
-rw-r--r--doc/classes/SkeletonModification2DCCDIK.xml72
-rw-r--r--doc/classes/SkeletonModification2DFABRIK.xml40
-rw-r--r--doc/classes/SkeletonModification2DJiggle.xml84
-rw-r--r--doc/classes/SkeletonModification2DLookAt.xml10
-rw-r--r--doc/classes/SkeletonModification2DPhysicalBones.xml16
-rw-r--r--doc/classes/SkeletonModification2DStackHolder.xml2
-rw-r--r--doc/classes/SkeletonModification2DTwoBoneIK.xml8
-rw-r--r--doc/classes/SkeletonModification3D.xml16
-rw-r--r--doc/classes/SkeletonModification3DCCDIK.xml72
-rw-r--r--doc/classes/SkeletonModification3DFABRIK.xml82
-rw-r--r--doc/classes/SkeletonModification3DJiggle.xml90
-rw-r--r--doc/classes/SkeletonModification3DLookAt.xml6
-rw-r--r--doc/classes/SkeletonModification3DStackHolder.xml2
-rw-r--r--doc/classes/SkeletonModification3DTwoBoneIK.xml34
-rw-r--r--doc/classes/SkeletonModificationStack2D.xml24
-rw-r--r--doc/classes/SkeletonModificationStack3D.xml26
-rw-r--r--doc/classes/SkeletonProfile.xml193
-rw-r--r--doc/classes/SkeletonProfileHumanoid.xml16
-rw-r--r--doc/classes/Skin.xml28
-rw-r--r--doc/classes/Slider.xml4
-rw-r--r--doc/classes/SliderJoint3D.xml10
-rw-r--r--doc/classes/SoftDynamicBody3D.xml38
-rw-r--r--doc/classes/SphereMesh.xml4
-rw-r--r--doc/classes/SphereShape3D.xml2
-rw-r--r--doc/classes/SpinBox.xml3
-rw-r--r--doc/classes/SplitContainer.xml2
-rw-r--r--doc/classes/SpringArm3D.xml4
-rw-r--r--doc/classes/Sprite2D.xml2
-rw-r--r--doc/classes/Sprite3D.xml2
-rw-r--r--doc/classes/SpriteBase3D.xml11
-rw-r--r--doc/classes/SpriteFrames.xml53
-rw-r--r--doc/classes/StandardMaterial3D.xml4
-rw-r--r--doc/classes/StreamPeer.xml56
-rw-r--r--doc/classes/StreamPeerBuffer.xml6
-rw-r--r--doc/classes/StreamPeerExtension.xml24
-rw-r--r--doc/classes/StreamPeerSSL.xml28
-rw-r--r--doc/classes/StreamPeerTCP.xml14
-rw-r--r--doc/classes/String.xml282
-rw-r--r--doc/classes/StringName.xml28
-rw-r--r--doc/classes/StyleBox.xml34
-rw-r--r--doc/classes/StyleBoxFlat.xml58
-rw-r--r--doc/classes/StyleBoxTexture.xml30
-rw-r--r--doc/classes/SurfaceTool.xml121
-rw-r--r--doc/classes/SyntaxHighlighter.xml4
-rw-r--r--doc/classes/SystemFont.xml47
-rw-r--r--doc/classes/TCPServer.xml12
-rw-r--r--doc/classes/TabBar.xml124
-rw-r--r--doc/classes/TabContainer.xml70
-rw-r--r--doc/classes/TextEdit.xml353
-rw-r--r--doc/classes/TextLine.xml78
-rw-r--r--doc/classes/TextMesh.xml54
-rw-r--r--doc/classes/TextParagraph.xml168
-rw-r--r--doc/classes/TextServer.xml1007
-rw-r--r--doc/classes/TextServerExtension.xml878
-rw-r--r--doc/classes/TextServerManager.xml16
-rw-r--r--doc/classes/Texture2D.xml69
-rw-r--r--doc/classes/TextureLayered.xml6
-rw-r--r--doc/classes/TextureProgressBar.xml6
-rw-r--r--doc/classes/Theme.xml320
-rw-r--r--doc/classes/Thread.xml9
-rw-r--r--doc/classes/TileData.xml131
-rw-r--r--doc/classes/TileMap.xml203
-rw-r--r--doc/classes/TileMapPattern.xml30
-rw-r--r--doc/classes/TileSet.xml295
-rw-r--r--doc/classes/TileSetAtlasSource.xml154
-rw-r--r--doc/classes/TileSetScenesCollectionSource.xml42
-rw-r--r--doc/classes/TileSetSource.xml24
-rw-r--r--doc/classes/Time.xml64
-rw-r--r--doc/classes/Timer.xml4
-rw-r--r--doc/classes/TorusMesh.xml25
-rw-r--r--doc/classes/Transform2D.xml113
-rw-r--r--doc/classes/Transform3D.xml124
-rw-r--r--doc/classes/Translation.xml42
-rw-r--r--doc/classes/TranslationServer.xml56
-rw-r--r--doc/classes/Tree.xml168
-rw-r--r--doc/classes/TreeItem.xml362
-rw-r--r--doc/classes/TubeTrailMesh.xml2
-rw-r--r--doc/classes/Tween.xml110
-rw-r--r--doc/classes/UDPServer.xml6
-rw-r--r--doc/classes/UndoRedo.xml48
-rw-r--r--doc/classes/Variant.xml1
-rw-r--r--doc/classes/Vector2.xml170
-rw-r--r--doc/classes/Vector2i.xml60
-rw-r--r--doc/classes/Vector3.xml184
-rw-r--r--doc/classes/Vector3i.xml60
-rw-r--r--doc/classes/Vector4.xml399
-rw-r--r--doc/classes/Vector4i.xml214
-rw-r--r--doc/classes/VehicleBody3D.xml4
-rw-r--r--doc/classes/VehicleWheel3D.xml4
-rw-r--r--doc/classes/VelocityTracker3D.xml32
-rw-r--r--doc/classes/VideoStreamPlayer.xml2
-rw-r--r--doc/classes/Viewport.xml147
-rw-r--r--doc/classes/VisualInstance3D.xml11
-rw-r--r--doc/classes/VisualShader.xml124
-rw-r--r--doc/classes/VisualShaderNode.xml18
-rw-r--r--doc/classes/VisualShaderNodeColorFunc.xml10
-rw-r--r--doc/classes/VisualShaderNodeCustom.xml40
-rw-r--r--doc/classes/VisualShaderNodeExpression.xml2
-rw-r--r--doc/classes/VisualShaderNodeFloatFunc.xml2
-rw-r--r--doc/classes/VisualShaderNodeGroupBase.xml48
-rw-r--r--doc/classes/VisualShaderNodeTextureUniform.xml11
-rw-r--r--doc/classes/VisualShaderNodeUVFunc.xml2
-rw-r--r--doc/classes/VisualShaderNodeVectorFunc.xml66
-rw-r--r--doc/classes/VisualShaderNodeVectorRefract.xml4
-rw-r--r--doc/classes/VoxelGI.xml5
-rw-r--r--doc/classes/VoxelGIData.xml20
-rw-r--r--doc/classes/WeakRef.xml2
-rw-r--r--doc/classes/Window.xml210
-rw-r--r--doc/classes/WorkerThreadPool.xml59
-rw-r--r--doc/classes/World3D.xml2
-rw-r--r--doc/classes/WorldEnvironment.xml1
-rw-r--r--doc/classes/X509Certificate.xml9
-rw-r--r--doc/classes/XMLParser.xml32
-rw-r--r--doc/classes/XRCamera3D.xml2
-rw-r--r--doc/classes/XRController3D.xml26
-rw-r--r--doc/classes/XRInterface.xml24
-rw-r--r--doc/classes/XRInterfaceExtension.xml69
-rw-r--r--doc/classes/XRNode3D.xml12
-rw-r--r--doc/classes/XROrigin3D.xml2
-rw-r--r--doc/classes/XRPositionalTracker.xml44
-rw-r--r--doc/classes/XRServer.xml52
-rw-r--r--doc/classes/bool.xml14
-rw-r--r--doc/classes/float.xml82
-rw-r--r--doc/classes/int.xml98
514 files changed, 19499 insertions, 14096 deletions
diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml
index 0021b2f857..bd500f6b35 100644
--- a/doc/classes/@GlobalScope.xml
+++ b/doc/classes/@GlobalScope.xml
@@ -14,9 +14,9 @@
<methods>
<method name="abs">
<return type="Variant" />
- <argument index="0" name="x" 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] (real), [Vector2], [Vector2i], [Vector3] and [Vector3i] are supported.
[codeblock]
var a = abs(-1)
# a is 1
@@ -40,9 +40,9 @@
</method>
<method name="absf">
<return type="float" />
- <argument index="0" name="x" 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)
@@ -51,9 +51,9 @@
</method>
<method name="absi">
<return type="int" />
- <argument index="0" name="x" 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)
@@ -62,9 +62,9 @@
</method>
<method name="acos">
<return type="float" />
- <argument index="0" name="x" 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)
var c = acos(0.866025)
@@ -73,9 +73,9 @@
</method>
<method name="asin">
<return type="float" />
- <argument index="0" name="x" 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)
var s = asin(0.5)
@@ -84,20 +84,20 @@
</method>
<method name="atan">
<return type="float" />
- <argument index="0" name="x" 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">
<return type="float" />
- <argument index="0" name="y" type="float" />
- <argument index="1" name="x" type="float" />
+ <param index="0" name="y" type="float" />
+ <param index="1" name="x" type="float" />
<description>
Returns the arc tangent of [code]y/x[/code] in radians. Use to get the angle of tangent [code]y/x[/code]. To compute the value, the method takes into account the sign of both arguments in order to determine the quadrant.
Important note: The Y coordinate comes first, by convention.
@@ -106,9 +106,20 @@
[/codeblock]
</description>
</method>
+ <method name="bezier_interpolate">
+ <return type="float" />
+ <param index="0" name="start" type="float" />
+ <param index="1" name="control_1" type="float" />
+ <param index="2" name="control_2" type="float" />
+ <param index="3" name="end" type="float" />
+ <param index="4" name="t" type="float" />
+ <description>
+ Returns the point at the given [param t] on a one-dimnesional [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">
<return type="Variant" />
- <argument index="0" name="bytes" type="PackedByteArray" />
+ <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].
@@ -116,31 +127,48 @@
</method>
<method name="bytes2var_with_objects">
<return type="Variant" />
- <argument index="0" name="bytes" type="PackedByteArray" />
+ <param index="0" name="bytes" type="PackedByteArray" />
<description>
Decodes a byte array back to a [Variant] value. Decoding objects is allowed.
[b]Warning:[/b] Deserialized object can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats (remote code execution).
</description>
</method>
<method name="ceil">
- <return type="float" />
- <argument index="0" name="x" type="float" />
+ <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].
+ 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.
+ </description>
+ </method>
+ <method name="ceilf">
+ <return type="float" />
+ <param index="0" name="x" type="float" />
+ <description>
+ 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], specialzied in floats.
+ </description>
+ </method>
+ <method name="ceili">
+ <return type="int" />
+ <param index="0" name="x" type="float" />
+ <description>
+ 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] that returns integer.
</description>
</method>
<method name="clamp">
<return type="Variant" />
- <argument index="0" name="value" type="Variant" />
- <argument index="1" name="min" type="Variant" />
- <argument index="2" name="max" type="Variant" />
+ <param index="0" name="value" type="Variant" />
+ <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 [Variant] [param value] and returns a value not less than [param min] and not more than [param max]. Variant types [int], [float] (real), [Vector2], [Vector2i], [Vector3] and [Vector3i] are supported.
[codeblock]
var a = clamp(-10, -1, 5)
# a is -1
@@ -164,11 +192,11 @@
</method>
<method name="clampf">
<return type="float" />
- <argument index="0" name="value" type="float" />
- <argument index="1" name="min" type="float" />
- <argument index="2" name="max" type="float" />
+ <param index="0" name="value" type="float" />
+ <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 float [param value] and returns a value not less than [param min] and not more than [param max].
[codeblock]
var speed = 42.1
# a is 20.0
@@ -182,11 +210,11 @@
</method>
<method name="clampi">
<return type="int" />
- <argument index="0" name="value" type="int" />
- <argument index="1" name="min" type="int" />
- <argument index="2" name="max" type="int" />
+ <param index="0" name="value" type="int" />
+ <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 integer [param value] and returns a value not less than [param min] and not more than [param max].
[codeblock]
var speed = 42
# a is 20
@@ -200,9 +228,9 @@
</method>
<method name="cos">
<return type="float" />
- <argument index="0" name="angle_rad" 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
@@ -212,9 +240,9 @@
</method>
<method name="cosh">
<return type="float" />
- <argument index="0" name="x" 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))
@@ -223,25 +251,40 @@
</method>
<method name="cubic_interpolate">
<return type="float" />
- <argument index="0" name="from" type="float" />
- <argument index="1" name="to" type="float" />
- <argument index="2" name="pre" type="float" />
- <argument index="3" name="post" type="float" />
- <argument index="4" name="weight" 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 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 pre and post 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 pre and post values.
+ It can perform smoother interpolation than [code]cubic_interpolate()[/code] by the time values.
</description>
</method>
<method name="db2linear">
<return type="float" />
- <argument index="0" name="db" type="float" />
+ <param index="0" name="db" type="float" />
<description>
Converts from decibels to linear energy (audio).
</description>
</method>
<method name="deg2rad">
<return type="float" />
- <argument index="0" name="deg" type="float" />
+ <param index="0" name="deg" type="float" />
<description>
Converts an angle expressed in degrees to radians.
[codeblock]
@@ -252,10 +295,10 @@
</method>
<method name="ease">
<return type="float" />
- <argument index="0" name="x" type="float" />
- <argument index="1" name="curve" type="float" />
+ <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
@@ -271,16 +314,16 @@
</method>
<method name="error_string">
<return type="String" />
- <argument index="0" name="error" type="int" />
+ <param index="0" name="error" type="int" />
<description>
Returns a human-readable name for the given error code.
</description>
</method>
<method name="exp">
<return type="float" />
- <argument index="0" name="x" 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]
@@ -289,10 +332,10 @@
</description>
</method>
<method name="floor">
- <return type="float" />
- <argument index="0" name="x" type="float" />
+ <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].
+ 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)
@@ -300,15 +343,31 @@
a = floor(-2.99)
[/codeblock]
See also [method ceil], [method round], and [method snapped].
- [b]Note:[/b] This method returns a float. If you need an integer, you can use [code]int(x)[/code] directly.
+ [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.
+ </description>
+ </method>
+ <method name="floorf">
+ <return type="float" />
+ <param index="0" name="x" type="float" />
+ <description>
+ 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], specialzied in floats.
+ </description>
+ </method>
+ <method name="floori">
+ <return type="int" />
+ <param index="0" name="x" type="float" />
+ <description>
+ Rounds [param x] downward (towards negative infinity), returning the largest whole number that is not more than [param x].
+ Equivalent of doing [code]int(x)[/code].
</description>
</method>
<method name="fmod">
<return type="float" />
- <argument index="0" name="x" type="float" />
- <argument index="1" name="y" type="float" />
+ <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 [code]x/y[/code], keeping the sign of [param x].
[codeblock]
# Remainder is 1.5
var remainder = fmod(7, 5.5)
@@ -318,8 +377,8 @@
</method>
<method name="fposmod">
<return type="float" />
- <argument index="0" name="x" type="float" />
- <argument index="1" name="y" type="float" />
+ <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.
[codeblock]
@@ -341,7 +400,7 @@
</method>
<method name="hash">
<return type="int" />
- <argument index="0" name="variable" type="Variant" />
+ <param index="0" name="variable" type="Variant" />
<description>
Returns the integer hash of the variable passed.
[codeblock]
@@ -351,9 +410,9 @@
</method>
<method name="instance_from_id">
<return type="Object" />
- <argument index="0" name="instance_id" type="int" />
+ <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.
[codeblock]
var foo = "bar"
func _ready():
@@ -365,11 +424,11 @@
</method>
<method name="inverse_lerp">
<return type="float" />
- <argument index="0" name="from" type="float" />
- <argument index="1" name="to" type="float" />
- <argument index="2" name="weight" type="float" />
+ <param index="0" name="from" type="float" />
+ <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]).
+ 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)
@@ -378,73 +437,75 @@
var ratio = inverse_lerp(20, 30, 27.5)
# `ratio` is now 0.75.
[/codeblock]
- See also [method lerp] which performs the reverse of this operation.
+ See also [method lerp] which performs the reverse of this operation, and [method range_lerp] to map a continuous series of values to another.
</description>
</method>
<method name="is_equal_approx">
<return type="bool" />
- <argument index="0" name="a" type="float" />
- <argument index="1" name="b" type="float" />
+ <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_inf">
<return type="bool" />
- <argument index="0" name="x" type="float" />
+ <param index="0" name="x" type="float" />
<description>
- Returns whether [code]x[/code] is an infinity value (either positive infinity or negative infinity).
+ Returns whether [param x] is an infinity value (either positive infinity or negative infinity).
</description>
</method>
<method name="is_instance_id_valid">
<return type="bool" />
- <argument index="0" name="id" type="int" />
+ <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" />
- <argument index="0" name="instance" type="Variant" />
+ <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 whether [param instance] is a valid object (e.g. has not been deleted from memory).
</description>
</method>
<method name="is_nan">
<return type="bool" />
- <argument index="0" name="x" type="float" />
+ <param index="0" name="x" type="float" />
<description>
- Returns whether [code]x[/code] is a NaN ("Not a Number" or invalid) value.
+ Returns whether [param x] is a NaN ("Not a Number" or invalid) value.
</description>
</method>
<method name="is_zero_approx">
<return type="bool" />
- <argument index="0" name="x" type="float" />
+ <param index="0" name="x" type="float" />
<description>
- Returns [code]true[/code] if [code]x[/code] is zero or almost zero.
+ Returns [code]true[/code] if [param x] is zero or almost zero.
This method is faster than using [method is_equal_approx] with one value as zero.
</description>
</method>
<method name="lerp">
- <return type="float" />
- <argument index="0" name="from" type="float" />
- <argument index="1" name="to" type="float" />
- <argument index="2" name="weight" type="float" />
+ <return type="Variant" />
+ <param index="0" name="from" type="Variant" />
+ <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].
+ 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]. Use [method clamp] on the result of [method lerp] if this is not desired.
+ Both [param from] and [param to] must have matching types. 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 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.
</description>
</method>
<method name="lerp_angle">
<return type="float" />
- <argument index="0" name="from" type="float" />
- <argument index="1" name="to" type="float" />
- <argument index="2" name="weight" type="float" />
+ <param index="0" name="from" type="float" />
+ <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.
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].
@@ -457,11 +518,25 @@
rotation = lerp_angle(min_angle, max_angle, elapsed)
elapsed += delta
[/codeblock]
+ [b]Note:[/b] This method 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">
+ <return type="float" />
+ <param index="0" name="from" type="float" />
+ <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 [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].
+ [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">
<return type="float" />
- <argument index="0" name="lin" 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:
[codeblock]
@@ -474,7 +549,7 @@
</method>
<method name="log">
<return type="float" />
- <argument index="0" name="x" 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.
[b]Note:[/b] This is not the same as the "log" function on most calculators, which uses a base 10 logarithm.
@@ -495,8 +570,8 @@
</method>
<method name="maxf">
<return type="float" />
- <argument index="0" name="a" type="float" />
- <argument index="1" name="b" type="float" />
+ <param index="0" name="a" type="float" />
+ <param index="1" name="b" type="float" />
<description>
Returns the maximum of two float values.
[codeblock]
@@ -507,8 +582,8 @@
</method>
<method name="maxi">
<return type="int" />
- <argument index="0" name="a" type="int" />
- <argument index="1" name="b" type="int" />
+ <param index="0" name="a" type="int" />
+ <param index="1" name="b" type="int" />
<description>
Returns the maximum of two int values.
[codeblock]
@@ -528,8 +603,8 @@
</method>
<method name="minf">
<return type="float" />
- <argument index="0" name="a" type="float" />
- <argument index="1" name="b" type="float" />
+ <param index="0" name="a" type="float" />
+ <param index="1" name="b" type="float" />
<description>
Returns the minimum of two float values.
[codeblock]
@@ -540,8 +615,8 @@
</method>
<method name="mini">
<return type="int" />
- <argument index="0" name="a" type="int" />
- <argument index="1" name="b" type="int" />
+ <param index="0" name="a" type="int" />
+ <param index="1" name="b" type="int" />
<description>
Returns the minimum of two int values.
[codeblock]
@@ -552,12 +627,12 @@
</method>
<method name="move_toward">
<return type="float" />
- <argument index="0" name="from" type="float" />
- <argument index="1" name="to" type="float" />
- <argument index="2" name="delta" type="float" />
+ <param index="0" name="from" type="float" />
+ <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
@@ -567,9 +642,9 @@
</method>
<method name="nearest_po2">
<return type="int" />
- <argument index="0" name="value" 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 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
@@ -579,15 +654,15 @@
nearest_po2(0) # Returns 0 (this may not be what you expect)
nearest_po2(-1) # Returns 0 (this may not be what you expect)
[/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 non-positive values of [param value] (in reality, 1 is the smallest integer power of 2).
</description>
</method>
<method name="pingpong">
<return type="float" />
- <argument index="0" name="value" type="float" />
- <argument index="1" name="length" type="float" />
+ <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.
+ Returns the [param value] wrapped between [code]0[/code] and the [param length]. If the limit is reached, the next value the function returned 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
@@ -604,8 +679,8 @@
</method>
<method name="posmod">
<return type="int" />
- <argument index="0" name="x" type="int" />
- <argument index="1" name="y" type="int" />
+ <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.
[codeblock]
@@ -626,10 +701,10 @@
</method>
<method name="pow">
<return type="float" />
- <argument index="0" name="base" type="float" />
- <argument index="1" name="exp" type="float" />
+ <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].
[codeblock]
pow(2, 5) # Returns 32
[/codeblock]
@@ -645,6 +720,16 @@
[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.
</description>
</method>
+ <method name="print_rich" qualifiers="vararg">
+ <description>
+ Converts one or more arguments of any type to string in the best way possible and prints them to the console. The following BBCode tags are supported: b, i, u, s, indent, code, url, center, right, color, bgcolor, fgcolor. Color tags only support named colors such as [code]red[/code], [i]not[/i] hexadecimal color codes. Unsupported tags will be left as-is in standard output.
+ When printing to standard output, the supported subset of BBCode is converted to ANSI escape codes for the terminal emulator to display. Displaying ANSI escape codes is currently only supported on Linux and macOS. Support for ANSI escape codes may vary across terminal emulators, especially for italic and strikethrough.
+ [codeblock]
+ print_rich("[code][b]Hello world![/b][/code]") # Prints out: [b]Hello world![/b]
+ [/codeblock]
+ [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_verbose" qualifiers="vararg">
<description>
If verbose mode is enabled ([method OS.is_stdout_verbose] returning [code]true[/code]), converts one or more arguments of any type to string in the best way possible and prints them to the console.
@@ -704,7 +789,7 @@
</method>
<method name="rad2deg">
<return type="float" />
- <argument index="0" name="rad" type="float" />
+ <param index="0" name="rad" type="float" />
<description>
Converts an angle expressed in radians to degrees.
[codeblock]
@@ -714,9 +799,9 @@
</method>
<method name="rand_from_seed">
<return type="PackedInt64Array" />
- <argument index="0" name="seed" type="int" />
+ <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.
+ Random from seed: pass a [param seed], 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.
</description>
</method>
<method name="randf">
@@ -730,10 +815,10 @@
</method>
<method name="randf_range">
<return type="float" />
- <argument index="0" name="from" type="float" />
- <argument index="1" name="to" type="float" />
+ <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 on the interval between [param from] and [param to] (inclusive).
[codeblock]
prints(randf_range(-10, 10), randf_range(-10, 10)) # Prints e.g. -3.844535 7.45315
[/codeblock]
@@ -741,10 +826,10 @@
</method>
<method name="randfn">
<return type="float" />
- <argument index="0" name="mean" type="float" />
- <argument index="1" name="deviation" type="float" />
+ <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">
@@ -761,10 +846,10 @@
</method>
<method name="randi_range">
<return type="int" />
- <argument index="0" name="from" type="int" />
- <argument index="1" name="to" type="int" />
+ <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
@@ -779,16 +864,17 @@
</method>
<method name="range_lerp">
<return type="float" />
- <argument index="0" name="value" type="float" />
- <argument index="1" name="istart" type="float" />
- <argument index="2" name="istop" type="float" />
- <argument index="3" name="ostart" type="float" />
- <argument index="4" name="ostop" type="float" />
+ <param index="0" name="value" type="float" />
+ <param index="1" name="istart" type="float" />
+ <param index="2" name="istop" type="float" />
+ <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].
+ 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]. Use [method clamp] on the result of [method range_lerp] if this is not desired.
[codeblock]
range_lerp(75, 0, 100, -1, 1) # Returns 0.5
[/codeblock]
+ For complex use cases where you need multiple ranges, consider using [Curve] or [Gradient] instead.
</description>
</method>
<method name="rid_allocate_id">
@@ -799,24 +885,43 @@
</method>
<method name="rid_from_int64">
<return type="RID" />
- <argument index="0" name="base" type="int" />
+ <param index="0" name="base" type="int" />
<description>
Create a RID from an int64. This is used mainly from native extensions to build servers.
</description>
</method>
<method name="round">
- <return type="float" />
- <argument index="0" name="x" type="float" />
+ <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.
+ Rounds [param x] to the nearest whole number, with halfway cases rounded away from zero. 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.
+ </description>
+ </method>
+ <method name="roundf">
+ <return type="float" />
+ <param index="0" name="x" type="float" />
+ <description>
+ Rounds [param x] to the nearest whole number, with halfway cases rounded away from zero.
+ A type-safe version of [method round], specialzied in floats.
+ </description>
+ </method>
+ <method name="roundi">
+ <return type="int" />
+ <param index="0" name="x" type="float" />
+ <description>
+ Rounds [param x] to the nearest whole number, with halfway cases rounded away from zero.
+ A type-safe version of [method round] that returns integer.
</description>
</method>
<method name="seed">
- <argument index="0" name="base" type="int" />
+ <param index="0" name="base" type="int" />
<description>
Sets seed for the random number generator.
[codeblock]
@@ -827,9 +932,9 @@
</method>
<method name="sign">
<return type="Variant" />
- <argument index="0" name="x" 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 respectivelu. Variant types [int], [float] (real), [Vector2], [Vector2i], [Vector3] and [Vector3i] are supported.
[codeblock]
sign(-6.0) # Returns -1
sign(0.0) # Returns 0
@@ -841,9 +946,9 @@
</method>
<method name="signf">
<return type="float" />
- <argument index="0" name="x" 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.
[codeblock]
sign(-6.0) # Returns -1.0
sign(0.0) # Returns 0.0
@@ -853,9 +958,9 @@
</method>
<method name="signi">
<return type="int" />
- <argument index="0" name="x" 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 integer: -1 or 1. Returns 0 if [param x] is 0.
[codeblock]
sign(-6) # Returns -1
sign(0) # Returns 0
@@ -865,9 +970,9 @@
</method>
<method name="sin">
<return type="float" />
- <argument index="0" name="angle_rad" 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
@@ -876,9 +981,9 @@
</method>
<method name="sinh">
<return type="float" />
- <argument index="0" name="x" 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
@@ -887,12 +992,12 @@
</method>
<method name="smoothstep">
<return type="float" />
- <argument index="0" name="from" type="float" />
- <argument index="1" name="to" type="float" />
- <argument index="2" name="x" type="float" />
+ <param index="0" name="from" type="float" />
+ <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
@@ -906,10 +1011,10 @@
</method>
<method name="snapped">
<return type="float" />
- <argument index="0" name="x" type="float" />
- <argument index="1" name="step" type="float" />
+ <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 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
@@ -919,18 +1024,18 @@
</method>
<method name="sqrt">
<return type="float" />
- <argument index="0" name="x" 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
[/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. If you need negative inputs, use [code]System.Numerics.Complex[/code] in C#.
</description>
</method>
<method name="step_decimals">
<return type="int" />
- <argument index="0" name="x" type="float" />
+ <param index="0" name="x" type="float" />
<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]
@@ -951,7 +1056,7 @@
</method>
<method name="str2var">
<return type="Variant" />
- <argument index="0" name="string" type="String" />
+ <param index="0" name="string" type="String" />
<description>
Converts a formatted string that was returned by [method var2str] to the original value.
[codeblock]
@@ -963,9 +1068,9 @@
</method>
<method name="tan">
<return type="float" />
- <argument index="0" name="angle_rad" 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
[/codeblock]
@@ -973,9 +1078,9 @@
</method>
<method name="tanh">
<return type="float" />
- <argument index="0" name="x" 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
@@ -984,7 +1089,7 @@
</method>
<method name="typeof">
<return type="int" />
- <argument index="0" name="variable" type="Variant" />
+ <param index="0" name="variable" type="Variant" />
<description>
Returns the internal type of the given Variant object, using the [enum Variant.Type] values.
[codeblock]
@@ -1000,7 +1105,7 @@
</method>
<method name="var2bytes">
<return type="PackedByteArray" />
- <argument index="0" name="variable" type="Variant" />
+ <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].
@@ -1008,16 +1113,16 @@
</method>
<method name="var2bytes_with_objects">
<return type="PackedByteArray" />
- <argument index="0" name="variable" type="Variant" />
+ <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].
</description>
</method>
<method name="var2str">
<return type="String" />
- <argument index="0" name="variable" type="Variant" />
+ <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 later be parsed using [method str2var].
[codeblock]
a = { "a": 1, "b": 2 }
print(var2str(a))
@@ -1033,19 +1138,40 @@
</method>
<method name="weakref">
<return type="Variant" />
- <argument index="0" name="obj" type="Variant" />
+ <param index="0" name="obj" type="Variant" />
<description>
- Returns a weak reference to an object, or [code]null[/code] is the argument is invalid.
+ Returns a weak reference to an object, or [code]null[/code] if the argument 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>
+ <method name="wrap">
+ <return type="Variant" />
+ <param index="0" name="value" type="Variant" />
+ <param index="1" name="min" type="Variant" />
+ <param index="2" name="max" type="Variant" />
+ <description>
+ Wraps the [Variant] [param value] between [param min] and [param max].
+ 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].
+ [codeblock]
+ var a = wrap(4, 5, 10)
+ # a is 9 (int)
+
+ var a = wrap(7, 5, 10)
+ # a is 7 (int)
+
+ var a = wrap(10.5, 5, 10)
+ # a is 5.5 (float)
+ [/codeblock]
+ </description>
+ </method>
<method name="wrapf">
<return type="float" />
- <argument index="0" name="value" type="float" />
- <argument index="1" name="min" type="float" />
- <argument index="2" name="max" type="float" />
+ <param index="0" name="value" type="float" />
+ <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].
+ Wraps float [param value] between [param min] and [param max].
Usable for creating loop-alike behavior or infinite surfaces.
[codeblock]
# Infinite loop between 5.0 and 9.9
@@ -1059,17 +1185,17 @@
# 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>
<method name="wrapi">
<return type="int" />
- <argument index="0" name="value" type="int" />
- <argument index="1" name="min" type="int" />
- <argument index="2" name="max" type="int" />
+ <param index="0" name="value" type="int" />
+ <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].
+ Wraps integer [param value] between [param min] and [param max].
Usable for creating loop-alike behavior or infinite surfaces.
[codeblock]
# Infinite loop between 5 and 9
@@ -1166,6 +1292,7 @@
The [ResourceSaver] singleton.
</member>
<member name="ResourceUID" type="ResourceUID" setter="" getter="">
+ The [ResourceUID] singleton.
</member>
<member name="TextServerManager" type="TextServerManager" setter="" getter="">
The [TextServerManager] singleton.
@@ -1176,8 +1303,8 @@
<member name="TranslationServer" type="TranslationServer" setter="" getter="">
The [TranslationServer] singleton.
</member>
- <member name="VisualScriptCustomNodes" type="VisualScriptCustomNodes" setter="" getter="">
- The [VisualScriptCustomNodes] singleton.
+ <member name="WorkerThreadPool" type="WorkerThreadPool" setter="" getter="">
+ The [WorkerThreadPool] singleton.
</member>
<member name="XRServer" type="XRServer" setter="" getter="">
The [XRServer] singleton.
@@ -1413,6 +1540,63 @@
<constant name="KEY_F16" value="16777259" enum="Key">
F16 key.
</constant>
+ <constant name="KEY_F17" value="16777260" enum="Key">
+ F17 key.
+ </constant>
+ <constant name="KEY_F18" value="16777261" enum="Key">
+ F18 key.
+ </constant>
+ <constant name="KEY_F19" value="16777262" enum="Key">
+ F19 key.
+ </constant>
+ <constant name="KEY_F20" value="16777263" enum="Key">
+ F20 key.
+ </constant>
+ <constant name="KEY_F21" value="16777264" enum="Key">
+ F21 key.
+ </constant>
+ <constant name="KEY_F22" value="16777265" enum="Key">
+ F22 key.
+ </constant>
+ <constant name="KEY_F23" value="16777266" enum="Key">
+ F23 key.
+ </constant>
+ <constant name="KEY_F24" value="16777267" enum="Key">
+ F24 key.
+ </constant>
+ <constant name="KEY_F25" value="16777268" enum="Key">
+ F25 key. Only supported on macOS and Linux due to a Windows limitation.
+ </constant>
+ <constant name="KEY_F26" value="16777269" enum="Key">
+ F26 key. Only supported on macOS and Linux due to a Windows limitation.
+ </constant>
+ <constant name="KEY_F27" value="16777270" enum="Key">
+ F27 key. Only supported on macOS and Linux due to a Windows limitation.
+ </constant>
+ <constant name="KEY_F28" value="16777271" enum="Key">
+ F28 key. Only supported on macOS and Linux due to a Windows limitation.
+ </constant>
+ <constant name="KEY_F29" value="16777272" enum="Key">
+ F29 key. Only supported on macOS and Linux due to a Windows limitation.
+ </constant>
+ <constant name="KEY_F30" value="16777273" enum="Key">
+ F30 key. Only supported on macOS and Linux due to a Windows limitation.
+ </constant>
+ <constant name="KEY_F31" value="16777274" enum="Key">
+ F31 key. Only supported on macOS and Linux due to a Windows limitation.
+ </constant>
+ <constant name="KEY_F32" value="16777275" enum="Key">
+ F32 key. Only supported on macOS and Linux due to a Windows limitation.
+ </constant>
+ <constant name="KEY_F33" value="16777276" enum="Key">
+ F33 key. Only supported on macOS and Linux due to a Windows limitation.
+ </constant>
+ <constant name="KEY_F34" value="16777277" enum="Key">
+ F34 key. Only supported on macOS and Linux due to a Windows limitation.
+ </constant>
+ <constant name="KEY_F35" value="16777278" 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">
Multiply (*) key on the numeric keypad.
</constant>
@@ -1458,148 +1642,148 @@
<constant name="KEY_KP_9" value="16777359" enum="Key">
Number 9 on the numeric keypad.
</constant>
- <constant name="KEY_SUPER_L" value="16777260" enum="Key">
+ <constant name="KEY_SUPER_L" value="16777280" enum="Key">
Left Super key (Windows key).
</constant>
- <constant name="KEY_SUPER_R" value="16777261" enum="Key">
+ <constant name="KEY_SUPER_R" value="16777281" enum="Key">
Right Super key (Windows key).
</constant>
- <constant name="KEY_MENU" value="16777262" enum="Key">
+ <constant name="KEY_MENU" value="16777282" enum="Key">
Context menu key.
</constant>
- <constant name="KEY_HYPER_L" value="16777263" enum="Key">
+ <constant name="KEY_HYPER_L" value="16777283" enum="Key">
Left Hyper key.
</constant>
- <constant name="KEY_HYPER_R" value="16777264" enum="Key">
+ <constant name="KEY_HYPER_R" value="16777284" enum="Key">
Right Hyper key.
</constant>
- <constant name="KEY_HELP" value="16777265" enum="Key">
+ <constant name="KEY_HELP" value="16777285" enum="Key">
Help key.
</constant>
- <constant name="KEY_DIRECTION_L" value="16777266" enum="Key">
+ <constant name="KEY_DIRECTION_L" value="16777286" enum="Key">
Left Direction key.
</constant>
- <constant name="KEY_DIRECTION_R" value="16777267" enum="Key">
+ <constant name="KEY_DIRECTION_R" value="16777287" enum="Key">
Right Direction key.
</constant>
- <constant name="KEY_BACK" value="16777280" enum="Key">
+ <constant name="KEY_BACK" value="16777288" enum="Key">
Media back key. Not to be confused with the Back button on an Android device.
</constant>
- <constant name="KEY_FORWARD" value="16777281" enum="Key">
+ <constant name="KEY_FORWARD" value="16777289" enum="Key">
Media forward key.
</constant>
- <constant name="KEY_STOP" value="16777282" enum="Key">
+ <constant name="KEY_STOP" value="16777290" enum="Key">
Media stop key.
</constant>
- <constant name="KEY_REFRESH" value="16777283" enum="Key">
+ <constant name="KEY_REFRESH" value="16777291" enum="Key">
Media refresh key.
</constant>
- <constant name="KEY_VOLUMEDOWN" value="16777284" enum="Key">
+ <constant name="KEY_VOLUMEDOWN" value="16777292" enum="Key">
Volume down key.
</constant>
- <constant name="KEY_VOLUMEMUTE" value="16777285" enum="Key">
+ <constant name="KEY_VOLUMEMUTE" value="16777293" enum="Key">
Mute volume key.
</constant>
- <constant name="KEY_VOLUMEUP" value="16777286" enum="Key">
+ <constant name="KEY_VOLUMEUP" value="16777294" enum="Key">
Volume up key.
</constant>
- <constant name="KEY_BASSBOOST" value="16777287" enum="Key">
+ <constant name="KEY_BASSBOOST" value="16777295" enum="Key">
Bass Boost key.
</constant>
- <constant name="KEY_BASSUP" value="16777288" enum="Key">
+ <constant name="KEY_BASSUP" value="16777296" enum="Key">
Bass up key.
</constant>
- <constant name="KEY_BASSDOWN" value="16777289" enum="Key">
+ <constant name="KEY_BASSDOWN" value="16777297" enum="Key">
Bass down key.
</constant>
- <constant name="KEY_TREBLEUP" value="16777290" enum="Key">
+ <constant name="KEY_TREBLEUP" value="16777298" enum="Key">
Treble up key.
</constant>
- <constant name="KEY_TREBLEDOWN" value="16777291" enum="Key">
+ <constant name="KEY_TREBLEDOWN" value="16777299" enum="Key">
Treble down key.
</constant>
- <constant name="KEY_MEDIAPLAY" value="16777292" enum="Key">
+ <constant name="KEY_MEDIAPLAY" value="16777300" enum="Key">
Media play key.
</constant>
- <constant name="KEY_MEDIASTOP" value="16777293" enum="Key">
+ <constant name="KEY_MEDIASTOP" value="16777301" enum="Key">
Media stop key.
</constant>
- <constant name="KEY_MEDIAPREVIOUS" value="16777294" enum="Key">
+ <constant name="KEY_MEDIAPREVIOUS" value="16777302" enum="Key">
Previous song key.
</constant>
- <constant name="KEY_MEDIANEXT" value="16777295" enum="Key">
+ <constant name="KEY_MEDIANEXT" value="16777303" enum="Key">
Next song key.
</constant>
- <constant name="KEY_MEDIARECORD" value="16777296" enum="Key">
+ <constant name="KEY_MEDIARECORD" value="16777304" enum="Key">
Media record key.
</constant>
- <constant name="KEY_HOMEPAGE" value="16777297" enum="Key">
+ <constant name="KEY_HOMEPAGE" value="16777305" enum="Key">
Home page key.
</constant>
- <constant name="KEY_FAVORITES" value="16777298" enum="Key">
+ <constant name="KEY_FAVORITES" value="16777306" enum="Key">
Favorites key.
</constant>
- <constant name="KEY_SEARCH" value="16777299" enum="Key">
+ <constant name="KEY_SEARCH" value="16777307" enum="Key">
Search key.
</constant>
- <constant name="KEY_STANDBY" value="16777300" enum="Key">
+ <constant name="KEY_STANDBY" value="16777308" enum="Key">
Standby key.
</constant>
- <constant name="KEY_OPENURL" value="16777301" enum="Key">
+ <constant name="KEY_OPENURL" value="16777309" enum="Key">
Open URL / Launch Browser key.
</constant>
- <constant name="KEY_LAUNCHMAIL" value="16777302" enum="Key">
+ <constant name="KEY_LAUNCHMAIL" value="16777310" enum="Key">
Launch Mail key.
</constant>
- <constant name="KEY_LAUNCHMEDIA" value="16777303" enum="Key">
+ <constant name="KEY_LAUNCHMEDIA" value="16777311" enum="Key">
Launch Media key.
</constant>
- <constant name="KEY_LAUNCH0" value="16777304" enum="Key">
+ <constant name="KEY_LAUNCH0" value="16777312" enum="Key">
Launch Shortcut 0 key.
</constant>
- <constant name="KEY_LAUNCH1" value="16777305" enum="Key">
+ <constant name="KEY_LAUNCH1" value="16777313" enum="Key">
Launch Shortcut 1 key.
</constant>
- <constant name="KEY_LAUNCH2" value="16777306" enum="Key">
+ <constant name="KEY_LAUNCH2" value="16777314" enum="Key">
Launch Shortcut 2 key.
</constant>
- <constant name="KEY_LAUNCH3" value="16777307" enum="Key">
+ <constant name="KEY_LAUNCH3" value="16777315" enum="Key">
Launch Shortcut 3 key.
</constant>
- <constant name="KEY_LAUNCH4" value="16777308" enum="Key">
+ <constant name="KEY_LAUNCH4" value="16777316" enum="Key">
Launch Shortcut 4 key.
</constant>
- <constant name="KEY_LAUNCH5" value="16777309" enum="Key">
+ <constant name="KEY_LAUNCH5" value="16777317" enum="Key">
Launch Shortcut 5 key.
</constant>
- <constant name="KEY_LAUNCH6" value="16777310" enum="Key">
+ <constant name="KEY_LAUNCH6" value="16777318" enum="Key">
Launch Shortcut 6 key.
</constant>
- <constant name="KEY_LAUNCH7" value="16777311" enum="Key">
+ <constant name="KEY_LAUNCH7" value="16777319" enum="Key">
Launch Shortcut 7 key.
</constant>
- <constant name="KEY_LAUNCH8" value="16777312" enum="Key">
+ <constant name="KEY_LAUNCH8" value="16777320" enum="Key">
Launch Shortcut 8 key.
</constant>
- <constant name="KEY_LAUNCH9" value="16777313" enum="Key">
+ <constant name="KEY_LAUNCH9" value="16777321" enum="Key">
Launch Shortcut 9 key.
</constant>
- <constant name="KEY_LAUNCHA" value="16777314" enum="Key">
+ <constant name="KEY_LAUNCHA" value="16777322" enum="Key">
Launch Shortcut A key.
</constant>
- <constant name="KEY_LAUNCHB" value="16777315" enum="Key">
+ <constant name="KEY_LAUNCHB" value="16777323" enum="Key">
Launch Shortcut B key.
</constant>
- <constant name="KEY_LAUNCHC" value="16777316" enum="Key">
+ <constant name="KEY_LAUNCHC" value="16777324" enum="Key">
Launch Shortcut C key.
</constant>
- <constant name="KEY_LAUNCHD" value="16777317" enum="Key">
+ <constant name="KEY_LAUNCHD" value="16777325" enum="Key">
Launch Shortcut D key.
</constant>
- <constant name="KEY_LAUNCHE" value="16777318" enum="Key">
+ <constant name="KEY_LAUNCHE" value="16777326" enum="Key">
Launch Shortcut E key.
</constant>
- <constant name="KEY_LAUNCHF" value="16777319" enum="Key">
+ <constant name="KEY_LAUNCHF" value="16777327" enum="Key">
Launch Shortcut F key.
</constant>
<constant name="KEY_UNKNOWN" value="33554431" enum="Key">
@@ -2402,7 +2586,7 @@
</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 "noslider" to hide the slider.
+ 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]"no_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.
@@ -2413,53 +2597,53 @@
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_LENGTH" value="5" enum="PropertyHint">
- Deprecated hint, unused.
+ <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).
</constant>
- <constant name="PROPERTY_HINT_KEY_ACCEL" value="6" enum="PropertyHint">
- Deprecated hint, unused.
- </constant>
- <constant name="PROPERTY_HINT_FLAGS" value="7" enum="PropertyHint">
+ <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].
</constant>
- <constant name="PROPERTY_HINT_LAYERS_2D_RENDER" value="8" enum="PropertyHint">
+ <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.
</constant>
- <constant name="PROPERTY_HINT_LAYERS_2D_PHYSICS" value="9" enum="PropertyHint">
+ <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.
</constant>
- <constant name="PROPERTY_HINT_LAYERS_2D_NAVIGATION" value="10" enum="PropertyHint">
+ <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.
</constant>
- <constant name="PROPERTY_HINT_LAYERS_3D_RENDER" value="11" enum="PropertyHint">
+ <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.
</constant>
- <constant name="PROPERTY_HINT_LAYERS_3D_PHYSICS" value="12" enum="PropertyHint">
+ <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.
</constant>
- <constant name="PROPERTY_HINT_LAYERS_3D_NAVIGATION" value="13" enum="PropertyHint">
- Hints that an integer property is a bitmask using the optionally named 2D navigation layers.
+ <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.
</constant>
- <constant name="PROPERTY_HINT_FILE" value="14" enum="PropertyHint">
+ <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].
</constant>
- <constant name="PROPERTY_HINT_DIR" value="15" enum="PropertyHint">
+ <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.
</constant>
- <constant name="PROPERTY_HINT_GLOBAL_FILE" value="16" enum="PropertyHint">
+ <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].
</constant>
- <constant name="PROPERTY_HINT_GLOBAL_DIR" value="17" enum="PropertyHint">
+ <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.
</constant>
- <constant name="PROPERTY_HINT_RESOURCE_TYPE" value="18" enum="PropertyHint">
+ <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="19" enum="PropertyHint">
+ <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.
</constant>
+ <constant name="PROPERTY_HINT_EXPRESSION" value="19" enum="PropertyHint">
+ 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.
</constant>
@@ -2508,100 +2692,103 @@
</constant>
<constant name="PROPERTY_HINT_SAVE_FILE" value="37" enum="PropertyHint">
</constant>
- <constant name="PROPERTY_HINT_INT_IS_OBJECTID" value="38" enum="PropertyHint">
+ <constant name="PROPERTY_HINT_GLOBAL_SAVE_FILE" value="38" enum="PropertyHint">
</constant>
- <constant name="PROPERTY_HINT_INT_IS_POINTER" value="40" enum="PropertyHint">
+ <constant name="PROPERTY_HINT_INT_IS_OBJECTID" value="39" enum="PropertyHint">
</constant>
- <constant name="PROPERTY_HINT_ARRAY_TYPE" value="39" enum="PropertyHint">
+ <constant name="PROPERTY_HINT_INT_IS_POINTER" value="41" enum="PropertyHint">
</constant>
- <constant name="PROPERTY_HINT_LOCALE_ID" value="41" enum="PropertyHint">
+ <constant name="PROPERTY_HINT_ARRAY_TYPE" value="40" enum="PropertyHint">
+ </constant>
+ <constant name="PROPERTY_HINT_LOCALE_ID" value="42" 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="42" enum="PropertyHint">
+ <constant name="PROPERTY_HINT_LOCALIZABLE_STRING" value="43" 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_MAX" value="43" enum="PropertyHint">
+ <constant name="PROPERTY_HINT_NODE_TYPE" value="44" enum="PropertyHint">
+ </constant>
+ <constant name="PROPERTY_HINT_HIDE_QUATERNION_EDIT" value="45" enum="PropertyHint">
+ Hints that a quaternion property should disable the temporary euler editor.
+ </constant>
+ <constant name="PROPERTY_HINT_MAX" value="46" enum="PropertyHint">
</constant>
<constant name="PROPERTY_USAGE_NONE" value="0" enum="PropertyUsageFlags">
</constant>
- <constant name="PROPERTY_USAGE_STORAGE" value="1" enum="PropertyUsageFlags">
+ <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="2" enum="PropertyUsageFlags">
+ <constant name="PROPERTY_USAGE_EDITOR" value="4" enum="PropertyUsageFlags">
The property is shown in the editor inspector (default).
</constant>
- <constant name="PROPERTY_USAGE_NETWORK" value="4" enum="PropertyUsageFlags">
- Deprecated usage flag, unused.
- </constant>
- <constant name="PROPERTY_USAGE_EDITOR_HELPER" value="8" enum="PropertyUsageFlags">
- Deprecated usage flag, unused.
- </constant>
- <constant name="PROPERTY_USAGE_CHECKABLE" value="16" enum="PropertyUsageFlags">
+ <constant name="PROPERTY_USAGE_CHECKABLE" value="8" enum="PropertyUsageFlags">
The property can be checked in the editor inspector.
</constant>
- <constant name="PROPERTY_USAGE_CHECKED" value="32" enum="PropertyUsageFlags">
+ <constant name="PROPERTY_USAGE_CHECKED" value="16" enum="PropertyUsageFlags">
The property is checked in the editor inspector.
</constant>
- <constant name="PROPERTY_USAGE_INTERNATIONALIZED" value="64" enum="PropertyUsageFlags">
+ <constant name="PROPERTY_USAGE_INTERNATIONALIZED" value="32" enum="PropertyUsageFlags">
The property is a translatable string.
</constant>
- <constant name="PROPERTY_USAGE_GROUP" value="128" enum="PropertyUsageFlags">
+ <constant name="PROPERTY_USAGE_GROUP" value="64" enum="PropertyUsageFlags">
Used to group properties together in the editor. See [EditorInspector].
</constant>
- <constant name="PROPERTY_USAGE_CATEGORY" value="256" enum="PropertyUsageFlags">
+ <constant name="PROPERTY_USAGE_CATEGORY" value="128" enum="PropertyUsageFlags">
Used to categorize properties together in the editor.
</constant>
- <constant name="PROPERTY_USAGE_SUBGROUP" value="512" enum="PropertyUsageFlags">
+ <constant name="PROPERTY_USAGE_SUBGROUP" value="256" enum="PropertyUsageFlags">
Used to group properties together in the editor in a subgroup (under a group). See [EditorInspector].
</constant>
- <constant name="PROPERTY_USAGE_NO_INSTANCE_STATE" value="2048" enum="PropertyUsageFlags">
+ <constant name="PROPERTY_USAGE_CLASS_IS_BITFIELD" value="512" enum="PropertyUsageFlags">
+ </constant>
+ <constant name="PROPERTY_USAGE_NO_INSTANCE_STATE" value="1024" enum="PropertyUsageFlags">
The property does not save its state in [PackedScene].
</constant>
- <constant name="PROPERTY_USAGE_RESTART_IF_CHANGED" value="4096" enum="PropertyUsageFlags">
+ <constant name="PROPERTY_USAGE_RESTART_IF_CHANGED" value="2048" enum="PropertyUsageFlags">
Editing the property prompts the user for restarting the editor.
</constant>
- <constant name="PROPERTY_USAGE_SCRIPT_VARIABLE" value="8192" enum="PropertyUsageFlags">
+ <constant name="PROPERTY_USAGE_SCRIPT_VARIABLE" value="4096" enum="PropertyUsageFlags">
The property is a script variable which should be serialized and saved in the scene file.
</constant>
- <constant name="PROPERTY_USAGE_STORE_IF_NULL" value="16384" enum="PropertyUsageFlags">
+ <constant name="PROPERTY_USAGE_STORE_IF_NULL" value="8192" enum="PropertyUsageFlags">
</constant>
- <constant name="PROPERTY_USAGE_ANIMATE_AS_TRIGGER" value="32768" enum="PropertyUsageFlags">
+ <constant name="PROPERTY_USAGE_ANIMATE_AS_TRIGGER" value="16384" enum="PropertyUsageFlags">
</constant>
- <constant name="PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED" value="65536" enum="PropertyUsageFlags">
+ <constant name="PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED" value="32768" enum="PropertyUsageFlags">
</constant>
- <constant name="PROPERTY_USAGE_SCRIPT_DEFAULT_VALUE" value="131072" enum="PropertyUsageFlags">
+ <constant name="PROPERTY_USAGE_SCRIPT_DEFAULT_VALUE" value="65536" enum="PropertyUsageFlags">
</constant>
- <constant name="PROPERTY_USAGE_CLASS_IS_ENUM" value="262144" enum="PropertyUsageFlags">
+ <constant name="PROPERTY_USAGE_CLASS_IS_ENUM" value="131072" enum="PropertyUsageFlags">
</constant>
- <constant name="PROPERTY_USAGE_NIL_IS_VARIANT" value="524288" enum="PropertyUsageFlags">
+ <constant name="PROPERTY_USAGE_NIL_IS_VARIANT" value="262144" enum="PropertyUsageFlags">
</constant>
- <constant name="PROPERTY_USAGE_INTERNAL" value="1048576" enum="PropertyUsageFlags">
+ <constant name="PROPERTY_USAGE_INTERNAL" value="524288" enum="PropertyUsageFlags">
</constant>
- <constant name="PROPERTY_USAGE_DO_NOT_SHARE_ON_DUPLICATE" value="2097152" enum="PropertyUsageFlags">
+ <constant name="PROPERTY_USAGE_DO_NOT_SHARE_ON_DUPLICATE" value="1048576" enum="PropertyUsageFlags">
</constant>
- <constant name="PROPERTY_USAGE_HIGH_END_GFX" value="4194304" enum="PropertyUsageFlags">
+ <constant name="PROPERTY_USAGE_HIGH_END_GFX" value="2097152" enum="PropertyUsageFlags">
</constant>
- <constant name="PROPERTY_USAGE_NODE_PATH_FROM_SCENE_ROOT" value="8388608" enum="PropertyUsageFlags">
+ <constant name="PROPERTY_USAGE_NODE_PATH_FROM_SCENE_ROOT" value="4194304" enum="PropertyUsageFlags">
</constant>
- <constant name="PROPERTY_USAGE_RESOURCE_NOT_PERSISTENT" value="16777216" enum="PropertyUsageFlags">
+ <constant name="PROPERTY_USAGE_RESOURCE_NOT_PERSISTENT" value="8388608" enum="PropertyUsageFlags">
</constant>
- <constant name="PROPERTY_USAGE_KEYING_INCREMENTS" value="33554432" enum="PropertyUsageFlags">
+ <constant name="PROPERTY_USAGE_KEYING_INCREMENTS" value="16777216" enum="PropertyUsageFlags">
</constant>
- <constant name="PROPERTY_USAGE_DEFERRED_SET_RESOURCE" value="67108864" enum="PropertyUsageFlags">
+ <constant name="PROPERTY_USAGE_DEFERRED_SET_RESOURCE" value="33554432" enum="PropertyUsageFlags">
</constant>
- <constant name="PROPERTY_USAGE_EDITOR_INSTANTIATE_OBJECT" value="134217728" enum="PropertyUsageFlags">
+ <constant name="PROPERTY_USAGE_EDITOR_INSTANTIATE_OBJECT" value="67108864" enum="PropertyUsageFlags">
</constant>
- <constant name="PROPERTY_USAGE_EDITOR_BASIC_SETTING" value="268435456" enum="PropertyUsageFlags">
+ <constant name="PROPERTY_USAGE_EDITOR_BASIC_SETTING" value="134217728" enum="PropertyUsageFlags">
</constant>
- <constant name="PROPERTY_USAGE_ARRAY" value="1073741824" enum="PropertyUsageFlags">
+ <constant name="PROPERTY_USAGE_ARRAY" value="536870912" enum="PropertyUsageFlags">
</constant>
- <constant name="PROPERTY_USAGE_DEFAULT" value="7" enum="PropertyUsageFlags">
+ <constant name="PROPERTY_USAGE_DEFAULT" value="6" enum="PropertyUsageFlags">
Default usage (storage, editor and network).
</constant>
- <constant name="PROPERTY_USAGE_DEFAULT_INTL" value="71" enum="PropertyUsageFlags">
+ <constant name="PROPERTY_USAGE_DEFAULT_INTL" value="38" enum="PropertyUsageFlags">
Default usage for translatable strings (storage, editor, network and internationalized).
</constant>
- <constant name="PROPERTY_USAGE_NO_EDITOR" value="5" enum="PropertyUsageFlags">
+ <constant name="PROPERTY_USAGE_NO_EDITOR" value="2" enum="PropertyUsageFlags">
Default usage but without showing the property in the editor (storage, network).
</constant>
<constant name="METHOD_FLAG_NORMAL" value="1" enum="MethodFlags">
@@ -2610,47 +2797,22 @@
<constant name="METHOD_FLAG_EDITOR" value="2" enum="MethodFlags">
Flag for an editor method.
</constant>
- <constant name="METHOD_FLAG_NOSCRIPT" value="4" enum="MethodFlags">
- Deprecated method flag, unused.
- </constant>
- <constant name="METHOD_FLAG_CONST" value="8" enum="MethodFlags">
+ <constant name="METHOD_FLAG_CONST" value="4" enum="MethodFlags">
Flag for a constant method.
</constant>
- <constant name="METHOD_FLAG_REVERSE" value="16" enum="MethodFlags">
- Deprecated method flag, unused.
- </constant>
- <constant name="METHOD_FLAG_VIRTUAL" value="32" enum="MethodFlags">
+ <constant name="METHOD_FLAG_VIRTUAL" value="8" enum="MethodFlags">
Flag for a virtual method.
</constant>
- <constant name="METHOD_FLAG_FROM_SCRIPT" value="64" enum="MethodFlags">
- Deprecated method flag, unused.
+ <constant name="METHOD_FLAG_VARARG" value="16" enum="MethodFlags">
</constant>
- <constant name="METHOD_FLAG_STATIC" value="256" enum="MethodFlags">
+ <constant name="METHOD_FLAG_STATIC" value="32" enum="MethodFlags">
</constant>
- <constant name="METHOD_FLAG_OBJECT_CORE" value="512" enum="MethodFlags">
+ <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.
</constant>
<constant name="METHOD_FLAGS_DEFAULT" value="1" enum="MethodFlags">
Default method flags.
</constant>
- <constant name="RPC_MODE_DISABLED" value="0" enum="RPCMode">
- Used with [method Node.rpc_config] to disable a method or property for all RPC calls, making it unavailable. Default for all methods.
- </constant>
- <constant name="RPC_MODE_ANY_PEER" value="1" enum="RPCMode">
- Used with [method Node.rpc_config] to set a method to be callable remotely by any peer. Analogous to the [code]@rpc(any)[/code] annotation. Calls are accepted from all remote peers, no matter if they are node's authority or not.
- </constant>
- <constant name="RPC_MODE_AUTH" value="2" enum="RPCMode">
- Used with [method Node.rpc_config] to set a method to be callable remotely only by the current multiplayer authority (which is the server by default). Analogous to the [code]@rpc(auth)[/code] annotation. See [method Node.set_multiplayer_authority].
- </constant>
- <constant name="TRANSFER_MODE_UNRELIABLE" value="0" enum="TransferMode">
- Packets are not acknowledged, no resend attempts are made for lost packets. Packets may arrive in any order. Potentially faster than [constant TRANSFER_MODE_UNRELIABLE_ORDERED]. Use for non-critical data, and always consider whether the order matters.
- </constant>
- <constant name="TRANSFER_MODE_UNRELIABLE_ORDERED" value="1" enum="TransferMode">
- Packets are not acknowledged, no resend attempts are made for lost packets. Packets are received in the order they were sent in. Potentially faster than [constant TRANSFER_MODE_RELIABLE]. Use for non-critical data or data that would be outdated if received late due to resend attempt(s) anyway, for example movement and positional data.
- </constant>
- <constant name="TRANSFER_MODE_RELIABLE" value="2" enum="TransferMode">
- Packets must be received and resend attempts should be made until the packets are acknowledged. Packets must be received in the order they were sent in. Most reliable transfer mode, but potentially the slowest due to the overhead. Use for critical data that must be transmitted and arrive in order, for example an ability being triggered or a chat message. Consider carefully if the information really is critical, and use sparingly.
- </constant>
<constant name="TYPE_NIL" value="0" enum="Variant.Type">
Variable is [code]null[/code].
</constant>
@@ -2687,76 +2849,82 @@
<constant name="TYPE_TRANSFORM2D" value="11" enum="Variant.Type">
Variable is of type [Transform2D].
</constant>
- <constant name="TYPE_PLANE" value="12" enum="Variant.Type">
+ <constant name="TYPE_VECTOR4" value="12" enum="Variant.Type">
+ </constant>
+ <constant name="TYPE_VECTOR4I" value="13" enum="Variant.Type">
+ </constant>
+ <constant name="TYPE_PLANE" value="14" enum="Variant.Type">
Variable is of type [Plane].
</constant>
- <constant name="TYPE_QUATERNION" value="13" enum="Variant.Type">
+ <constant name="TYPE_QUATERNION" value="15" enum="Variant.Type">
Variable is of type [Quaternion].
</constant>
- <constant name="TYPE_AABB" value="14" enum="Variant.Type">
+ <constant name="TYPE_AABB" value="16" enum="Variant.Type">
Variable is of type [AABB].
</constant>
- <constant name="TYPE_BASIS" value="15" enum="Variant.Type">
+ <constant name="TYPE_BASIS" value="17" enum="Variant.Type">
Variable is of type [Basis].
</constant>
- <constant name="TYPE_TRANSFORM3D" value="16" enum="Variant.Type">
+ <constant name="TYPE_TRANSFORM3D" value="18" enum="Variant.Type">
Variable is of type [Transform3D].
</constant>
- <constant name="TYPE_COLOR" value="17" enum="Variant.Type">
+ <constant name="TYPE_PROJECTION" value="19" enum="Variant.Type">
+ </constant>
+ <constant name="TYPE_COLOR" value="20" enum="Variant.Type">
Variable is of type [Color].
</constant>
- <constant name="TYPE_STRING_NAME" value="18" enum="Variant.Type">
+ <constant name="TYPE_STRING_NAME" value="21" enum="Variant.Type">
Variable is of type [StringName].
</constant>
- <constant name="TYPE_NODE_PATH" value="19" enum="Variant.Type">
+ <constant name="TYPE_NODE_PATH" value="22" enum="Variant.Type">
Variable is of type [NodePath].
</constant>
- <constant name="TYPE_RID" value="20" enum="Variant.Type">
+ <constant name="TYPE_RID" value="23" enum="Variant.Type">
Variable is of type [RID].
</constant>
- <constant name="TYPE_OBJECT" value="21" enum="Variant.Type">
+ <constant name="TYPE_OBJECT" value="24" enum="Variant.Type">
Variable is of type [Object].
</constant>
- <constant name="TYPE_CALLABLE" value="22" enum="Variant.Type">
+ <constant name="TYPE_CALLABLE" value="25" enum="Variant.Type">
Variable is of type [Callable].
</constant>
- <constant name="TYPE_SIGNAL" value="23" enum="Variant.Type">
+ <constant name="TYPE_SIGNAL" value="26" enum="Variant.Type">
Variable is of type [Signal].
</constant>
- <constant name="TYPE_DICTIONARY" value="24" enum="Variant.Type">
+ <constant name="TYPE_DICTIONARY" value="27" enum="Variant.Type">
Variable is of type [Dictionary].
</constant>
- <constant name="TYPE_ARRAY" value="25" enum="Variant.Type">
+ <constant name="TYPE_ARRAY" value="28" enum="Variant.Type">
Variable is of type [Array].
</constant>
- <constant name="TYPE_PACKED_BYTE_ARRAY" value="26" enum="Variant.Type">
+ <constant name="TYPE_PACKED_BYTE_ARRAY" value="29" enum="Variant.Type">
Variable is of type [PackedByteArray].
</constant>
- <constant name="TYPE_PACKED_INT32_ARRAY" value="27" enum="Variant.Type">
+ <constant name="TYPE_PACKED_INT32_ARRAY" value="30" enum="Variant.Type">
Variable is of type [PackedInt32Array].
</constant>
- <constant name="TYPE_PACKED_INT64_ARRAY" value="28" enum="Variant.Type">
+ <constant name="TYPE_PACKED_INT64_ARRAY" value="31" enum="Variant.Type">
Variable is of type [PackedInt64Array].
</constant>
- <constant name="TYPE_PACKED_FLOAT32_ARRAY" value="29" enum="Variant.Type">
+ <constant name="TYPE_PACKED_FLOAT32_ARRAY" value="32" enum="Variant.Type">
Variable is of type [PackedFloat32Array].
</constant>
- <constant name="TYPE_PACKED_FLOAT64_ARRAY" value="30" enum="Variant.Type">
+ <constant name="TYPE_PACKED_FLOAT64_ARRAY" value="33" enum="Variant.Type">
Variable is of type [PackedFloat64Array].
</constant>
- <constant name="TYPE_PACKED_STRING_ARRAY" value="31" enum="Variant.Type">
+ <constant name="TYPE_PACKED_STRING_ARRAY" value="34" enum="Variant.Type">
Variable is of type [PackedStringArray].
</constant>
- <constant name="TYPE_PACKED_VECTOR2_ARRAY" value="32" enum="Variant.Type">
+ <constant name="TYPE_PACKED_VECTOR2_ARRAY" value="35" enum="Variant.Type">
Variable is of type [PackedVector2Array].
</constant>
- <constant name="TYPE_PACKED_VECTOR3_ARRAY" value="33" enum="Variant.Type">
+ <constant name="TYPE_PACKED_VECTOR3_ARRAY" value="36" enum="Variant.Type">
Variable is of type [PackedVector3Array].
</constant>
- <constant name="TYPE_PACKED_COLOR_ARRAY" value="34" enum="Variant.Type">
+ <constant name="TYPE_PACKED_COLOR_ARRAY" value="37" enum="Variant.Type">
Variable is of type [PackedColorArray].
</constant>
- <constant name="TYPE_MAX" value="35" enum="Variant.Type">
+ <constant name="TYPE_MAX" value="38" enum="Variant.Type">
Represents the size of the [enum Variant.Type] enum.
</constant>
<constant name="OP_EQUAL" value="0" enum="Variant.Operator">
@@ -2798,40 +2966,43 @@
<constant name="OP_MODULE" value="12" enum="Variant.Operator">
Remainder/modulo operator ([code]%[/code]).
</constant>
- <constant name="OP_SHIFT_LEFT" value="13" enum="Variant.Operator">
+ <constant name="OP_POWER" value="13" enum="Variant.Operator">
+ Power operator ([code]**[/code]).
+ </constant>
+ <constant name="OP_SHIFT_LEFT" value="14" enum="Variant.Operator">
Left shift operator ([code]&lt;&lt;[/code]).
</constant>
- <constant name="OP_SHIFT_RIGHT" value="14" enum="Variant.Operator">
+ <constant name="OP_SHIFT_RIGHT" value="15" enum="Variant.Operator">
Right shift operator ([code]&gt;&gt;[/code]).
</constant>
- <constant name="OP_BIT_AND" value="15" enum="Variant.Operator">
+ <constant name="OP_BIT_AND" value="16" enum="Variant.Operator">
Bitwise AND operator ([code]&amp;[/code]).
</constant>
- <constant name="OP_BIT_OR" value="16" enum="Variant.Operator">
+ <constant name="OP_BIT_OR" value="17" enum="Variant.Operator">
Bitwise OR operator ([code]|[/code]).
</constant>
- <constant name="OP_BIT_XOR" value="17" enum="Variant.Operator">
+ <constant name="OP_BIT_XOR" value="18" enum="Variant.Operator">
Bitwise XOR operator ([code]^[/code]).
</constant>
- <constant name="OP_BIT_NEGATE" value="18" enum="Variant.Operator">
+ <constant name="OP_BIT_NEGATE" value="19" enum="Variant.Operator">
Bitwise NOT operator ([code]~[/code]).
</constant>
- <constant name="OP_AND" value="19" enum="Variant.Operator">
+ <constant name="OP_AND" value="20" enum="Variant.Operator">
Logical AND operator ([code]and[/code] or [code]&amp;&amp;[/code]).
</constant>
- <constant name="OP_OR" value="20" enum="Variant.Operator">
+ <constant name="OP_OR" value="21" enum="Variant.Operator">
Logical OR operator ([code]or[/code] or [code]||[/code]).
</constant>
- <constant name="OP_XOR" value="21" enum="Variant.Operator">
+ <constant name="OP_XOR" value="22" enum="Variant.Operator">
Logical XOR operator (not implemented in GDScript).
</constant>
- <constant name="OP_NOT" value="22" enum="Variant.Operator">
+ <constant name="OP_NOT" value="23" enum="Variant.Operator">
Logical NOT operator ([code]not[/code] or [code]![/code]).
</constant>
- <constant name="OP_IN" value="23" enum="Variant.Operator">
+ <constant name="OP_IN" value="24" enum="Variant.Operator">
Logical IN operator ([code]in[/code]).
</constant>
- <constant name="OP_MAX" value="24" enum="Variant.Operator">
+ <constant name="OP_MAX" value="25" enum="Variant.Operator">
Represents the size of the [enum Variant.Operator] enum.
</constant>
</constants>
diff --git a/doc/classes/AABB.xml b/doc/classes/AABB.xml
index db880efaf2..e2e4e7c61d 100644
--- a/doc/classes/AABB.xml
+++ b/doc/classes/AABB.xml
@@ -23,15 +23,15 @@
</constructor>
<constructor name="AABB">
<return type="AABB" />
- <argument index="0" name="from" type="AABB" />
+ <param index="0" name="from" type="AABB" />
<description>
Constructs an [AABB] as a copy of the given [AABB].
</description>
</constructor>
<constructor name="AABB">
<return type="AABB" />
- <argument index="0" name="position" type="Vector3" />
- <argument index="1" name="size" type="Vector3" />
+ <param index="0" name="position" type="Vector3" />
+ <param index="1" name="size" type="Vector3" />
<description>
Constructs an [AABB] from a position and size.
</description>
@@ -46,14 +46,14 @@
</method>
<method name="encloses" qualifiers="const">
<return type="bool" />
- <argument index="0" name="with" type="AABB" />
+ <param index="0" name="with" type="AABB" />
<description>
Returns [code]true[/code] if this [AABB] completely encloses another one.
</description>
</method>
<method name="expand" qualifiers="const">
<return type="AABB" />
- <argument index="0" name="to_point" type="Vector3" />
+ <param index="0" name="to_point" type="Vector3" />
<description>
Returns a copy of this [AABB] expanded to include a given point.
[b]Example:[/b]
@@ -81,7 +81,7 @@
</method>
<method name="get_endpoint" qualifiers="const">
<return type="Vector3" />
- <argument index="0" name="idx" type="int" />
+ <param index="0" name="idx" type="int" />
<description>
Gets the position of the 8 endpoints of the [AABB] in space.
</description>
@@ -124,7 +124,7 @@
</method>
<method name="get_support" qualifiers="const">
<return type="Vector3" />
- <argument index="0" name="dir" type="Vector3" />
+ <param index="0" name="dir" type="Vector3" />
<description>
Returns the support point in a given direction. This is useful for collision detection algorithms.
</description>
@@ -137,9 +137,9 @@
</method>
<method name="grow" qualifiers="const">
<return type="AABB" />
- <argument index="0" name="by" type="float" />
+ <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">
@@ -156,7 +156,7 @@
</method>
<method name="has_point" qualifiers="const">
<return type="bool" />
- <argument index="0" name="point" type="Vector3" />
+ <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.
@@ -164,52 +164,52 @@
</method>
<method name="intersection" qualifiers="const">
<return type="AABB" />
- <argument index="0" name="with" type="AABB" />
+ <param index="0" name="with" type="AABB" />
<description>
Returns the intersection between two [AABB]. An empty AABB (size [code](0, 0, 0)[/code]) is returned on failure.
</description>
</method>
<method name="intersects" qualifiers="const">
<return type="bool" />
- <argument index="0" name="with" type="AABB" />
+ <param index="0" name="with" type="AABB" />
<description>
Returns [code]true[/code] if the [AABB] overlaps with another.
</description>
</method>
<method name="intersects_plane" qualifiers="const">
<return type="bool" />
- <argument index="0" name="plane" type="Plane" />
+ <param index="0" name="plane" type="Plane" />
<description>
Returns [code]true[/code] if the [AABB] is on both sides of a plane.
</description>
</method>
<method name="intersects_ray" qualifiers="const">
<return type="Variant" />
- <argument index="0" name="from" type="Vector3" />
- <argument index="1" name="dir" type="Vector3" />
+ <param index="0" name="from" type="Vector3" />
+ <param index="1" name="dir" type="Vector3" />
<description>
</description>
</method>
<method name="intersects_segment" qualifiers="const">
<return type="Variant" />
- <argument index="0" name="from" type="Vector3" />
- <argument index="1" name="to" type="Vector3" />
+ <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" />
- <argument index="0" name="aabb" type="AABB" />
+ <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="merge" qualifiers="const">
<return type="AABB" />
- <argument index="0" name="with" 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>
@@ -228,7 +228,7 @@
<operators>
<operator name="operator !=">
<return type="bool" />
- <argument index="0" name="right" type="AABB" />
+ <param index="0" name="right" type="AABB" />
<description>
Returns [code]true[/code] if the vectors are not equal.
[b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.
@@ -236,14 +236,14 @@
</operator>
<operator name="operator *">
<return type="AABB" />
- <argument index="0" name="right" type="Transform3D" />
+ <param index="0" name="right" type="Transform3D" />
<description>
Inversely transforms (multiplies) the [AABB] by the given [Transform3D] transformation matrix.
</description>
</operator>
<operator name="operator ==">
<return type="bool" />
- <argument index="0" name="right" type="AABB" />
+ <param index="0" name="right" type="AABB" />
<description>
Returns [code]true[/code] if the AABBs are exactly equal.
[b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.
diff --git a/doc/classes/AESContext.xml b/doc/classes/AESContext.xml
index 82634f8859..69cd54a79b 100644
--- a/doc/classes/AESContext.xml
+++ b/doc/classes/AESContext.xml
@@ -94,19 +94,19 @@
</method>
<method name="start">
<return type="int" enum="Error" />
- <argument index="0" name="mode" type="int" enum="AESContext.Mode" />
- <argument index="1" name="key" type="PackedByteArray" />
- <argument index="2" name="iv" type="PackedByteArray" default="PackedByteArray()" />
+ <param index="0" name="mode" type="int" enum="AESContext.Mode" />
+ <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" />
- <argument index="0" name="src" 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 4b65a64389..6e76df647e 100644
--- a/doc/classes/AStar2D.xml
+++ b/doc/classes/AStar2D.xml
@@ -11,8 +11,8 @@
<methods>
<method name="_compute_cost" qualifiers="virtual const">
<return type="float" />
- <argument index="0" name="from_id" type="int" />
- <argument index="1" name="to_id" type="int" />
+ <param index="0" name="from_id" type="int" />
+ <param index="1" name="to_id" type="int" />
<description>
Called when computing the cost between two connected points.
Note that this function is hidden in the default [code]AStar2D[/code] class.
@@ -20,8 +20,8 @@
</method>
<method name="_estimate_cost" qualifiers="virtual const">
<return type="float" />
- <argument index="0" name="from_id" type="int" />
- <argument index="1" name="to_id" type="int" />
+ <param index="0" name="from_id" type="int" />
+ <param index="1" name="to_id" type="int" />
<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]AStar2D[/code] class.
@@ -29,12 +29,12 @@
</method>
<method name="add_point">
<return type="void" />
- <argument index="0" name="id" type="int" />
- <argument index="1" name="position" type="Vector2" />
- <argument index="2" name="weight_scale" type="float" default="1.0" />
+ <param index="0" name="id" type="int" />
+ <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 1 or larger.
- 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,15 +45,16 @@
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">
<return type="bool" />
- <argument index="0" name="id" type="int" />
- <argument index="1" name="to_id" type="int" />
+ <param index="0" name="id" type="int" />
+ <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.
+ 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">
@@ -64,11 +65,11 @@
</method>
<method name="connect_points">
<return type="void" />
- <argument index="0" name="id" type="int" />
- <argument index="1" name="to_id" type="int" />
- <argument index="2" name="bidirectional" type="bool" default="true" />
+ <param index="0" name="id" type="int" />
+ <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()
@@ -87,10 +88,11 @@
</method>
<method name="disconnect_points">
<return type="void" />
- <argument index="0" name="id" type="int" />
- <argument index="1" name="to_id" type="int" />
+ <param index="0" name="id" type="int" />
+ <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.
+ 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">
@@ -101,18 +103,18 @@
</method>
<method name="get_closest_point" qualifiers="const">
<return type="int" />
- <argument index="0" name="to_position" type="Vector2" />
- <argument index="1" name="include_disabled" type="bool" default="false" />
+ <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" />
- <argument index="0" name="to_position" 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()
@@ -133,9 +135,9 @@
</description>
</method>
<method name="get_id_path">
- <return type="PackedInt32Array" />
- <argument index="0" name="from_id" type="int" />
- <argument index="1" name="to_id" type="int" />
+ <return type="PackedInt64Array" />
+ <param index="0" name="from_id" type="int" />
+ <param index="1" name="to_id" type="int" />
<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.
[codeblocks]
@@ -177,8 +179,8 @@
</description>
</method>
<method name="get_point_connections">
- <return type="PackedInt32Array" />
- <argument index="0" name="id" type="int" />
+ <return type="PackedInt64Array" />
+ <param index="0" name="id" type="int" />
<description>
Returns an array with the IDs of the points that form the connection with the given point.
[codeblocks]
@@ -216,15 +218,15 @@
</description>
</method>
<method name="get_point_ids">
- <return type="Array" />
+ <return type="PackedInt64Array" />
<description>
Returns an array of all point IDs.
</description>
</method>
<method name="get_point_path">
<return type="PackedVector2Array" />
- <argument index="0" name="from_id" type="int" />
- <argument index="1" name="to_id" type="int" />
+ <param index="0" name="from_id" type="int" />
+ <param index="1" name="to_id" type="int" />
<description>
Returns an array with the points that are in the path found by AStar2D 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 [PackedVector2Array] and will print an error message.
@@ -232,68 +234,68 @@
</method>
<method name="get_point_position" qualifiers="const">
<return type="Vector2" />
- <argument index="0" name="id" type="int" />
+ <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" />
- <argument index="0" name="id" type="int" />
+ <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" />
- <argument index="0" name="id" type="int" />
+ <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">
<return type="bool" />
- <argument index="0" name="id" type="int" />
+ <param index="0" name="id" type="int" />
<description>
Returns whether a point is disabled or not for pathfinding. By default, all points are enabled.
</description>
</method>
<method name="remove_point">
<return type="void" />
- <argument index="0" name="id" type="int" />
+ <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" />
- <argument index="0" name="num_nodes" type="int" />
+ <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, for a grid for instance. New capacity must be greater or equals to old capacity.
</description>
</method>
<method name="set_point_disabled">
<return type="void" />
- <argument index="0" name="id" type="int" />
- <argument index="1" name="disabled" type="bool" default="true" />
+ <param index="0" name="id" type="int" />
+ <param index="1" name="disabled" type="bool" default="true" />
<description>
Disables or enables the specified point for pathfinding. Useful for making a temporary obstacle.
</description>
</method>
<method name="set_point_position">
<return type="void" />
- <argument index="0" name="id" type="int" />
- <argument index="1" name="position" type="Vector2" />
+ <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">
<return type="void" />
- <argument index="0" name="id" type="int" />
- <argument index="1" name="weight_scale" type="float" />
+ <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 3087b9e363..45b1019bab 100644
--- a/doc/classes/AStar3D.xml
+++ b/doc/classes/AStar3D.xml
@@ -40,8 +40,8 @@
<methods>
<method name="_compute_cost" qualifiers="virtual const">
<return type="float" />
- <argument index="0" name="from_id" type="int" />
- <argument index="1" name="to_id" type="int" />
+ <param index="0" name="from_id" type="int" />
+ <param index="1" name="to_id" type="int" />
<description>
Called when computing the cost between two connected points.
Note that this function is hidden in the default [code]AStar3D[/code] class.
@@ -49,8 +49,8 @@
</method>
<method name="_estimate_cost" qualifiers="virtual const">
<return type="float" />
- <argument index="0" name="from_id" type="int" />
- <argument index="1" name="to_id" type="int" />
+ <param index="0" name="from_id" type="int" />
+ <param index="1" name="to_id" type="int" />
<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]AStar3D[/code] class.
@@ -58,12 +58,12 @@
</method>
<method name="add_point">
<return type="void" />
- <argument index="0" name="id" type="int" />
- <argument index="1" name="position" type="Vector3" />
- <argument index="2" name="weight_scale" type="float" default="1.0" />
+ <param index="0" name="id" type="int" />
+ <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 1 or larger.
- 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,16 +74,16 @@
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">
<return type="bool" />
- <argument index="0" name="id" type="int" />
- <argument index="1" name="to_id" type="int" />
- <argument index="2" name="bidirectional" type="bool" default="true" />
+ <param index="0" name="id" type="int" />
+ <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">
@@ -94,11 +94,11 @@
</method>
<method name="connect_points">
<return type="void" />
- <argument index="0" name="id" type="int" />
- <argument index="1" name="to_id" type="int" />
- <argument index="2" name="bidirectional" type="bool" default="true" />
+ <param index="0" name="id" type="int" />
+ <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()
@@ -117,11 +117,11 @@
</method>
<method name="disconnect_points">
<return type="void" />
- <argument index="0" name="id" type="int" />
- <argument index="1" name="to_id" type="int" />
- <argument index="2" name="bidirectional" type="bool" default="true" />
+ <param index="0" name="id" type="int" />
+ <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">
@@ -132,18 +132,18 @@
</method>
<method name="get_closest_point" qualifiers="const">
<return type="int" />
- <argument index="0" name="to_position" type="Vector3" />
- <argument index="1" name="include_disabled" type="bool" default="false" />
+ <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" />
- <argument index="0" name="to_position" 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()
@@ -164,9 +164,9 @@
</description>
</method>
<method name="get_id_path">
- <return type="PackedInt32Array" />
- <argument index="0" name="from_id" type="int" />
- <argument index="1" name="to_id" type="int" />
+ <return type="PackedInt64Array" />
+ <param index="0" name="from_id" type="int" />
+ <param index="1" name="to_id" type="int" />
<description>
Returns an array with the IDs of the points that form the path found by AStar3D between the given points. The array is ordered from the starting point to the ending point of the path.
[codeblocks]
@@ -207,8 +207,8 @@
</description>
</method>
<method name="get_point_connections">
- <return type="PackedInt32Array" />
- <argument index="0" name="id" type="int" />
+ <return type="PackedInt64Array" />
+ <param index="0" name="id" type="int" />
<description>
Returns an array with the IDs of the points that form the connection with the given point.
[codeblocks]
@@ -245,15 +245,15 @@
</description>
</method>
<method name="get_point_ids">
- <return type="Array" />
+ <return type="PackedInt64Array" />
<description>
Returns an array of all point IDs.
</description>
</method>
<method name="get_point_path">
<return type="PackedVector3Array" />
- <argument index="0" name="from_id" type="int" />
- <argument index="1" name="to_id" type="int" />
+ <param index="0" name="from_id" type="int" />
+ <param index="1" name="to_id" type="int" />
<description>
Returns an array with the points that are in the path found by AStar3D 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.
@@ -261,68 +261,68 @@
</method>
<method name="get_point_position" qualifiers="const">
<return type="Vector3" />
- <argument index="0" name="id" type="int" />
+ <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" />
- <argument index="0" name="id" type="int" />
+ <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" />
- <argument index="0" name="id" type="int" />
+ <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">
<return type="bool" />
- <argument index="0" name="id" type="int" />
+ <param index="0" name="id" type="int" />
<description>
Returns whether a point is disabled or not for pathfinding. By default, all points are enabled.
</description>
</method>
<method name="remove_point">
<return type="void" />
- <argument index="0" name="id" type="int" />
+ <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" />
- <argument index="0" name="num_nodes" type="int" />
+ <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, for a grid for instance. New capacity must be greater or equals to old capacity.
</description>
</method>
<method name="set_point_disabled">
<return type="void" />
- <argument index="0" name="id" type="int" />
- <argument index="1" name="disabled" type="bool" default="true" />
+ <param index="0" name="id" type="int" />
+ <param index="1" name="disabled" type="bool" default="true" />
<description>
Disables or enables the specified point for pathfinding. Useful for making a temporary obstacle.
</description>
</method>
<method name="set_point_position">
<return type="void" />
- <argument index="0" name="id" type="int" />
- <argument index="1" name="position" type="Vector3" />
+ <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">
<return type="void" />
- <argument index="0" name="id" type="int" />
- <argument index="1" name="weight_scale" type="float" />
+ <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/AcceptDialog.xml b/doc/classes/AcceptDialog.xml
index c1e28ffba3..c83ea8c60a 100644
--- a/doc/classes/AcceptDialog.xml
+++ b/doc/classes/AcceptDialog.xml
@@ -11,20 +11,20 @@
<methods>
<method name="add_button">
<return type="Button" />
- <argument index="0" name="text" type="String" />
- <argument index="1" name="right" type="bool" default="false" />
- <argument index="2" name="action" type="String" default="&quot;&quot;" />
+ <param index="0" name="text" type="String" />
+ <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>
<method name="add_cancel_button">
<return type="Button" />
- <argument index="0" name="name" type="String" />
+ <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>
@@ -44,16 +44,16 @@
</method>
<method name="register_text_enter">
<return type="void" />
- <argument index="0" name="line_edit" type="Control" />
+ <param index="0" name="line_edit" type="Control" />
<description>
Registers a [LineEdit] in the dialog. When the enter key is pressed, the dialog will be accepted.
</description>
</method>
<method name="remove_button">
<return type="void" />
- <argument index="0" name="button" type="Control" />
+ <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,6 +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.
</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.
@@ -71,6 +72,9 @@
The text displayed by the dialog.
</member>
<member name="exclusive" type="bool" setter="set_exclusive" getter="is_exclusive" overrides="Window" default="true" />
+ <member name="ok_button_text" type="String" setter="set_ok_button_text" getter="get_ok_button_text" default="&quot;OK&quot;">
+ The text displayed by the OK button (see [method get_ok_button]).
+ </member>
<member name="title" type="String" setter="set_title" getter="get_title" overrides="Window" default="&quot;Alert!&quot;" />
<member name="transient" type="bool" setter="set_transient" getter="is_transient" overrides="Window" default="true" />
<member name="visible" type="bool" setter="set_visible" getter="is_visible" overrides="Window" default="false" />
@@ -88,7 +92,7 @@
</description>
</signal>
<signal name="custom_action">
- <argument index="0" name="action" type="StringName" />
+ <param index="0" name="action" type="StringName" />
<description>
Emitted when a custom button is pressed. See [method add_button].
</description>
diff --git a/doc/classes/AnimatedSprite2D.xml b/doc/classes/AnimatedSprite2D.xml
index e89134d1ac..b207eda27f 100644
--- a/doc/classes/AnimatedSprite2D.xml
+++ b/doc/classes/AnimatedSprite2D.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AnimatedSprite2D" inherits="Node2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
- Sprite node that can use multiple textures for animation.
+ Sprite node that contains multiple textures as frames to play for animation.
</brief_description>
<description>
- Animations are created using a [SpriteFrames] resource, which can be configured in the editor via the SpriteFrames panel.
+ [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.
[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>
@@ -14,10 +14,10 @@
<methods>
<method name="play">
<return type="void" />
- <argument index="0" name="anim" type="StringName" default="&amp;&quot;&quot;" />
- <argument index="1" name="backwards" type="bool" default="false" />
+ <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 [code]backwards[/code] is [code]true[/code], the animation will be played in reverse.
</description>
</method>
<method name="stop">
@@ -29,7 +29,7 @@
</methods>
<members>
<member name="animation" type="StringName" setter="set_animation" getter="get_animation" default="&amp;&quot;default&quot;">
- The current animation from the [code]frames[/code] resource. If this value changes, the [code]frame[/code] counter is reset.
+ The current animation from the [member frames] resource. If this value changes, the [code]frame[/code] counter is reset.
</member>
<member name="centered" type="bool" setter="set_centered" getter="is_centered" default="true">
If [code]true[/code], texture will be centered.
@@ -44,7 +44,7 @@
The displayed animation frame's index.
</member>
<member name="frames" type="SpriteFrames" setter="set_sprite_frames" getter="get_sprite_frames">
- The [SpriteFrames] resource containing the animation(s).
+ The [SpriteFrames] resource containing the animation(s). Allows you the option to load, edit, clear, make unique and save the states of the [SpriteFrames] resource.
</member>
<member name="offset" type="Vector2" setter="set_offset" getter="get_offset" default="Vector2(0, 0)">
The texture's drawing offset.
diff --git a/doc/classes/AnimatedSprite3D.xml b/doc/classes/AnimatedSprite3D.xml
index 30ea2249a3..68354f092c 100644
--- a/doc/classes/AnimatedSprite3D.xml
+++ b/doc/classes/AnimatedSprite3D.xml
@@ -18,9 +18,9 @@
</method>
<method name="play">
<return type="void" />
- <argument index="0" name="anim" type="StringName" default="&amp;&quot;&quot;" />
+ <param index="0" name="anim" type="StringName" default="&amp;&quot;&quot;" />
<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.
</description>
</method>
<method name="stop">
diff --git a/doc/classes/AnimatedTexture.xml b/doc/classes/AnimatedTexture.xml
index c322db9c37..5ad4c4e10a 100644
--- a/doc/classes/AnimatedTexture.xml
+++ b/doc/classes/AnimatedTexture.xml
@@ -14,22 +14,22 @@
<methods>
<method name="get_frame_delay" qualifiers="const">
<return type="float" />
- <argument index="0" name="frame" type="int" />
+ <param index="0" name="frame" type="int" />
<description>
Returns the given frame's delay value.
</description>
</method>
<method name="get_frame_texture" qualifiers="const">
<return type="Texture2D" />
- <argument index="0" name="frame" type="int" />
+ <param index="0" name="frame" type="int" />
<description>
Returns the given frame's [Texture2D].
</description>
</method>
<method name="set_frame_delay">
<return type="void" />
- <argument index="0" name="frame" type="int" />
- <argument index="1" name="delay" type="float" />
+ <param index="0" name="frame" type="int" />
+ <param index="1" name="delay" 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:
@@ -43,8 +43,8 @@
</method>
<method name="set_frame_texture">
<return type="void" />
- <argument index="0" name="frame" type="int" />
- <argument index="1" name="texture" type="Texture2D" />
+ <param index="0" name="frame" type="int" />
+ <param index="1" name="texture" type="Texture2D" />
<description>
Assigns a [Texture2D] to the given frame. Frame IDs start at 0, so the first frame has ID 0, and the last frame of the animation has ID [member frames] - 1.
You can define any number of textures up to [constant MAX_FRAMES], but keep in mind that only frames from 0 to [member frames] - 1 will be part of the animation.
diff --git a/doc/classes/Animation.xml b/doc/classes/Animation.xml
index a92b237624..faa9ae3569 100644
--- a/doc/classes/Animation.xml
+++ b/doc/classes/Animation.xml
@@ -33,200 +33,181 @@
<methods>
<method name="add_track">
<return type="int" />
- <argument index="0" name="type" type="int" enum="Animation.TrackType" />
- <argument index="1" name="at_position" type="int" default="-1" />
+ <param index="0" name="type" type="int" enum="Animation.TrackType" />
+ <param index="1" name="at_position" type="int" default="-1" />
<description>
Adds a track to the Animation.
</description>
</method>
<method name="animation_track_get_key_animation" qualifiers="const">
<return type="StringName" />
- <argument index="0" name="track_idx" type="int" />
- <argument index="1" name="key_idx" type="int" />
+ <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">
<return type="int" />
- <argument index="0" name="track_idx" type="int" />
- <argument index="1" name="time" type="float" />
- <argument index="2" name="animation" type="StringName" />
+ <param index="0" name="track_idx" type="int" />
+ <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">
<return type="void" />
- <argument index="0" name="track_idx" type="int" />
- <argument index="1" name="key_idx" type="int" />
- <argument index="2" name="animation" type="StringName" />
+ <param index="0" name="track_idx" type="int" />
+ <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">
<return type="float" />
- <argument index="0" name="track_idx" type="int" />
- <argument index="1" name="key_idx" type="int" />
+ <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>
<method name="audio_track_get_key_start_offset" qualifiers="const">
<return type="float" />
- <argument index="0" name="track_idx" type="int" />
- <argument index="1" name="key_idx" type="int" />
+ <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>
<method name="audio_track_get_key_stream" qualifiers="const">
<return type="Resource" />
- <argument index="0" name="track_idx" type="int" />
- <argument index="1" name="key_idx" type="int" />
+ <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">
<return type="int" />
- <argument index="0" name="track_idx" type="int" />
- <argument index="1" name="time" type="float" />
- <argument index="2" name="stream" type="Resource" />
- <argument index="3" name="start_offset" type="float" default="0" />
- <argument index="4" name="end_offset" type="float" default="0" />
+ <param index="0" name="track_idx" type="int" />
+ <param index="1" name="time" type="float" />
+ <param index="2" name="stream" type="Resource" />
+ <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">
<return type="void" />
- <argument index="0" name="track_idx" type="int" />
- <argument index="1" name="key_idx" type="int" />
- <argument index="2" name="offset" type="float" />
+ <param index="0" name="track_idx" type="int" />
+ <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">
<return type="void" />
- <argument index="0" name="track_idx" type="int" />
- <argument index="1" name="key_idx" type="int" />
- <argument index="2" name="offset" type="float" />
+ <param index="0" name="track_idx" type="int" />
+ <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">
<return type="void" />
- <argument index="0" name="track_idx" type="int" />
- <argument index="1" name="key_idx" type="int" />
- <argument index="2" name="stream" type="Resource" />
+ <param index="0" name="track_idx" type="int" />
+ <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" />
- <argument index="0" name="track_idx" type="int" />
- <argument 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">
<return type="Vector2" />
- <argument index="0" name="track_idx" type="int" />
- <argument index="1" name="key_idx" type="int" />
+ <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">
<return type="Vector2" />
- <argument index="0" name="track_idx" type="int" />
- <argument index="1" name="key_idx" type="int" />
+ <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">
<return type="float" />
- <argument index="0" name="track_idx" type="int" />
- <argument index="1" name="key_idx" type="int" />
+ <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">
<return type="int" />
- <argument index="0" name="track_idx" type="int" />
- <argument index="1" name="time" type="float" />
- <argument index="2" name="value" type="float" />
- <argument index="3" name="in_handle" type="Vector2" default="Vector2(0, 0)" />
- <argument index="4" name="out_handle" type="Vector2" default="Vector2(0, 0)" />
- <argument index="5" name="handle_mode" type="int" enum="Animation.HandleMode" default="1" />
+ <param index="0" name="track_idx" type="int" />
+ <param index="1" name="time" type="float" />
+ <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)" />
<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">
<return type="float" />
- <argument index="0" name="track_idx" type="int" />
- <argument index="1" name="time" type="float" />
+ <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" />
- <argument index="0" name="track_idx" type="int" />
- <argument index="1" name="key_idx" type="int" />
- <argument index="2" name="key_handle_mode" type="int" enum="Animation.HandleMode" />
- <argument 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">
<return type="void" />
- <argument index="0" name="track_idx" type="int" />
- <argument index="1" name="key_idx" type="int" />
- <argument index="2" name="in_handle" type="Vector2" />
- <argument index="3" name="balanced_value_time_ratio" type="float" default="1.0" />
+ <param index="0" name="track_idx" type="int" />
+ <param index="1" name="key_idx" type="int" />
+ <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">
<return type="void" />
- <argument index="0" name="track_idx" type="int" />
- <argument index="1" name="key_idx" type="int" />
- <argument index="2" name="out_handle" type="Vector2" />
- <argument index="3" name="balanced_value_time_ratio" type="float" default="1.0" />
+ <param index="0" name="track_idx" type="int" />
+ <param index="1" name="key_idx" type="int" />
+ <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">
<return type="void" />
- <argument index="0" name="track_idx" type="int" />
- <argument index="1" name="key_idx" type="int" />
- <argument index="2" name="value" type="float" />
+ <param index="0" name="track_idx" type="int" />
+ <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">
<return type="int" />
- <argument index="0" name="track_idx" type="int" />
- <argument index="1" name="time" type="float" />
- <argument index="2" name="amount" type="float" />
+ <param index="0" name="track_idx" type="int" />
+ <param index="1" name="time" type="float" />
+ <param index="2" name="amount" type="float" />
<description>
</description>
</method>
@@ -238,24 +219,24 @@
</method>
<method name="compress">
<return type="void" />
- <argument index="0" name="page_size" type="int" default="8192" />
- <argument index="1" name="fps" type="int" default="120" />
- <argument index="2" name="split_tolerance" type="float" default="4.0" />
+ <param index="0" name="page_size" type="int" default="8192" />
+ <param index="1" name="fps" type="int" default="120" />
+ <param index="2" name="split_tolerance" type="float" default="4.0" />
<description>
</description>
</method>
<method name="copy_track">
<return type="void" />
- <argument index="0" name="track_idx" type="int" />
- <argument index="1" name="to_animation" type="Animation" />
+ <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">
<return type="int" />
- <argument index="0" name="path" type="NodePath" />
- <argument index="1" name="type" type="int" enum="Animation.TrackType" />
+ <param index="0" name="path" type="NodePath" />
+ <param index="1" name="type" type="int" enum="Animation.TrackType" />
<description>
Returns the index of the specified track. If the track is not found, return -1.
</description>
@@ -268,259 +249,259 @@
</method>
<method name="method_track_get_key_indices" qualifiers="const">
<return type="PackedInt32Array" />
- <argument index="0" name="track_idx" type="int" />
- <argument index="1" name="time_sec" type="float" />
- <argument index="2" name="delta" type="float" />
+ <param index="0" name="track_idx" type="int" />
+ <param index="1" name="time_sec" type="float" />
+ <param index="2" name="delta" type="float" />
<description>
Returns all the key indices of a method track, given a position and delta time.
</description>
</method>
<method name="method_track_get_name" qualifiers="const">
<return type="StringName" />
- <argument index="0" name="track_idx" type="int" />
- <argument index="1" name="key_idx" type="int" />
+ <param index="0" name="track_idx" type="int" />
+ <param index="1" name="key_idx" type="int" />
<description>
Returns the method name of a method track.
</description>
</method>
<method name="method_track_get_params" qualifiers="const">
<return type="Array" />
- <argument index="0" name="track_idx" type="int" />
- <argument index="1" name="key_idx" type="int" />
+ <param index="0" name="track_idx" type="int" />
+ <param index="1" name="key_idx" type="int" />
<description>
Returns the arguments values to be called on a method track for a given key in a given track.
</description>
</method>
<method name="position_track_insert_key">
<return type="int" />
- <argument index="0" name="track_idx" type="int" />
- <argument index="1" name="time" type="float" />
- <argument index="2" name="position" type="Vector3" />
+ <param index="0" name="track_idx" type="int" />
+ <param index="1" name="time" type="float" />
+ <param index="2" name="position" type="Vector3" />
<description>
</description>
</method>
<method name="remove_track">
<return type="void" />
- <argument index="0" name="track_idx" type="int" />
+ <param index="0" name="track_idx" type="int" />
<description>
Removes a track by specifying the track index.
</description>
</method>
<method name="rotation_track_insert_key">
<return type="int" />
- <argument index="0" name="track_idx" type="int" />
- <argument index="1" name="time" type="float" />
- <argument index="2" name="rotation" type="Quaternion" />
+ <param index="0" name="track_idx" type="int" />
+ <param index="1" name="time" type="float" />
+ <param index="2" name="rotation" type="Quaternion" />
<description>
</description>
</method>
<method name="scale_track_insert_key">
<return type="int" />
- <argument index="0" name="track_idx" type="int" />
- <argument index="1" name="time" type="float" />
- <argument index="2" name="scale" type="Vector3" />
+ <param index="0" name="track_idx" type="int" />
+ <param index="1" name="time" type="float" />
+ <param index="2" name="scale" type="Vector3" />
<description>
</description>
</method>
<method name="track_find_key" qualifiers="const">
<return type="int" />
- <argument index="0" name="track_idx" type="int" />
- <argument index="1" name="time" type="float" />
- <argument index="2" name="exact" type="bool" default="false" />
+ <param index="0" name="track_idx" type="int" />
+ <param index="1" name="time" type="float" />
+ <param index="2" name="exact" type="bool" default="false" />
<description>
Finds the key index by time in a given track. Optionally, only find it if the exact time is given.
</description>
</method>
<method name="track_get_interpolation_loop_wrap" qualifiers="const">
<return type="bool" />
- <argument index="0" name="track_idx" type="int" />
+ <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">
<return type="int" enum="Animation.InterpolationType" />
- <argument index="0" name="track_idx" type="int" />
+ <param index="0" name="track_idx" type="int" />
<description>
Returns the interpolation type of a given track.
</description>
</method>
<method name="track_get_key_count" qualifiers="const">
<return type="int" />
- <argument index="0" name="track_idx" 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">
<return type="float" />
- <argument index="0" name="track_idx" type="int" />
- <argument index="1" name="key_idx" type="int" />
+ <param index="0" name="track_idx" type="int" />
+ <param index="1" name="key_idx" type="int" />
<description>
Returns the time at which the key is located.
</description>
</method>
<method name="track_get_key_transition" qualifiers="const">
<return type="float" />
- <argument index="0" name="track_idx" type="int" />
- <argument index="1" name="key_idx" type="int" />
+ <param index="0" name="track_idx" type="int" />
+ <param index="1" name="key_idx" type="int" />
<description>
Returns the transition curve (easing) for a specific key (see the built-in math function [method @GlobalScope.ease]).
</description>
</method>
<method name="track_get_key_value" qualifiers="const">
<return type="Variant" />
- <argument index="0" name="track_idx" type="int" />
- <argument index="1" name="key_idx" type="int" />
+ <param index="0" name="track_idx" type="int" />
+ <param index="1" name="key_idx" type="int" />
<description>
Returns the value of a given key in a given track.
</description>
</method>
<method name="track_get_path" qualifiers="const">
<return type="NodePath" />
- <argument index="0" name="track_idx" type="int" />
+ <param index="0" name="track_idx" type="int" />
<description>
Gets the path of a track. For more information on the path format, see [method track_set_path].
</description>
</method>
<method name="track_get_type" qualifiers="const">
<return type="int" enum="Animation.TrackType" />
- <argument index="0" name="track_idx" type="int" />
+ <param index="0" name="track_idx" type="int" />
<description>
Gets the type of a track.
</description>
</method>
<method name="track_insert_key">
- <return type="void" />
- <argument index="0" name="track_idx" type="int" />
- <argument index="1" name="time" type="float" />
- <argument index="2" name="key" type="Variant" />
- <argument index="3" name="transition" type="float" default="1" />
+ <return type="int" />
+ <param index="0" name="track_idx" type="int" />
+ <param index="1" name="time" type="float" />
+ <param index="2" name="key" type="Variant" />
+ <param index="3" name="transition" type="float" default="1" />
<description>
- Insert a generic key in a given track.
+ Inserts a generic key in a given track. Returns the key index.
</description>
</method>
<method name="track_is_compressed" qualifiers="const">
<return type="bool" />
- <argument index="0" name="track_idx" type="int" />
+ <param index="0" name="track_idx" type="int" />
<description>
</description>
</method>
<method name="track_is_enabled" qualifiers="const">
<return type="bool" />
- <argument index="0" name="track_idx" type="int" />
+ <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">
<return type="bool" />
- <argument index="0" name="track_idx" type="int" />
+ <param index="0" name="track_idx" type="int" />
<description>
Returns [code]true[/code] if the given track is imported. Else, return [code]false[/code].
</description>
</method>
<method name="track_move_down">
<return type="void" />
- <argument index="0" name="track_idx" type="int" />
+ <param index="0" name="track_idx" type="int" />
<description>
Moves a track down.
</description>
</method>
<method name="track_move_to">
<return type="void" />
- <argument index="0" name="track_idx" type="int" />
- <argument index="1" name="to_idx" type="int" />
+ <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">
<return type="void" />
- <argument index="0" name="track_idx" type="int" />
+ <param index="0" name="track_idx" type="int" />
<description>
Moves a track up.
</description>
</method>
<method name="track_remove_key">
<return type="void" />
- <argument index="0" name="track_idx" type="int" />
- <argument index="1" name="key_idx" type="int" />
+ <param index="0" name="track_idx" type="int" />
+ <param index="1" name="key_idx" type="int" />
<description>
Removes a key by index in a given track.
</description>
</method>
<method name="track_remove_key_at_time">
<return type="void" />
- <argument index="0" name="track_idx" type="int" />
- <argument index="1" name="time" type="float" />
+ <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">
<return type="void" />
- <argument index="0" name="track_idx" type="int" />
- <argument index="1" name="enabled" type="bool" />
+ <param index="0" name="track_idx" type="int" />
+ <param index="1" name="enabled" type="bool" />
<description>
Enables/disables the given track. Tracks are enabled by default.
</description>
</method>
<method name="track_set_imported">
<return type="void" />
- <argument index="0" name="track_idx" type="int" />
- <argument index="1" name="imported" type="bool" />
+ <param index="0" name="track_idx" type="int" />
+ <param index="1" name="imported" type="bool" />
<description>
Sets the given track as imported or not.
</description>
</method>
<method name="track_set_interpolation_loop_wrap">
<return type="void" />
- <argument index="0" name="track_idx" type="int" />
- <argument index="1" name="interpolation" type="bool" />
+ <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">
<return type="void" />
- <argument index="0" name="track_idx" type="int" />
- <argument index="1" name="interpolation" type="int" enum="Animation.InterpolationType" />
+ <param index="0" name="track_idx" type="int" />
+ <param index="1" name="interpolation" type="int" enum="Animation.InterpolationType" />
<description>
Sets the interpolation type of a given track.
</description>
</method>
<method name="track_set_key_time">
<return type="void" />
- <argument index="0" name="track_idx" type="int" />
- <argument index="1" name="key_idx" type="int" />
- <argument index="2" name="time" type="float" />
+ <param index="0" name="track_idx" type="int" />
+ <param index="1" name="key_idx" type="int" />
+ <param index="2" name="time" type="float" />
<description>
Sets the time of an existing key.
</description>
</method>
<method name="track_set_key_transition">
<return type="void" />
- <argument index="0" name="track_idx" type="int" />
- <argument index="1" name="key_idx" type="int" />
- <argument index="2" name="transition" type="float" />
+ <param index="0" name="track_idx" type="int" />
+ <param index="1" name="key_idx" type="int" />
+ <param index="2" name="transition" type="float" />
<description>
Sets the transition curve (easing) for a specific key (see the built-in math function [method @GlobalScope.ease]).
</description>
</method>
<method name="track_set_key_value">
<return type="void" />
- <argument index="0" name="track_idx" type="int" />
- <argument index="1" name="key" type="int" />
- <argument index="2" name="value" type="Variant" />
+ <param index="0" name="track_idx" type="int" />
+ <param index="1" name="key" type="int" />
+ <param index="2" name="value" type="Variant" />
<description>
Sets the value of an existing key.
</description>
</method>
<method name="track_set_path">
<return type="void" />
- <argument index="0" name="track_idx" type="int" />
- <argument index="1" name="path" type="NodePath" />
+ <param index="0" name="track_idx" type="int" />
+ <param index="1" name="path" type="NodePath" />
<description>
Sets the path of a track. Paths must be valid scene-tree paths to a node and must be specified starting from the parent node of the node that will reproduce the animation. Tracks that control properties or bones must append their name after the path, separated by [code]":"[/code].
For example, [code]"character/skeleton:ankle"[/code] or [code]"character/mesh:transform/local"[/code].
@@ -528,40 +509,40 @@
</method>
<method name="track_swap">
<return type="void" />
- <argument index="0" name="track_idx" type="int" />
- <argument index="1" name="with_idx" type="int" />
+ <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">
<return type="PackedInt32Array" />
- <argument index="0" name="track_idx" type="int" />
- <argument index="1" name="time_sec" type="float" />
- <argument index="2" name="delta" type="float" />
+ <param index="0" name="track_idx" type="int" />
+ <param index="1" name="time_sec" type="float" />
+ <param index="2" name="delta" type="float" />
<description>
Returns all the key indices of a value track, given a position and delta time.
</description>
</method>
<method name="value_track_get_update_mode" qualifiers="const">
<return type="int" enum="Animation.UpdateMode" />
- <argument index="0" name="track_idx" type="int" />
+ <param index="0" name="track_idx" type="int" />
<description>
Returns the update mode of a value track.
</description>
</method>
<method name="value_track_interpolate" qualifiers="const">
<return type="Variant" />
- <argument index="0" name="track_idx" type="int" />
- <argument index="1" name="time_sec" type="float" />
+ <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">
<return type="void" />
- <argument index="0" name="track_idx" type="int" />
- <argument index="1" name="mode" type="int" enum="Animation.UpdateMode" />
+ <param index="0" name="track_idx" type="int" />
+ <param index="1" name="mode" type="int" enum="Animation.UpdateMode" />
<description>
Sets the update mode (see [enum UpdateMode]) of a value track.
</description>
@@ -619,6 +600,9 @@
<constant name="INTERPOLATION_CUBIC" value="2" enum="InterpolationType">
Cubic interpolation.
</constant>
+ <constant name="INTERPOLATION_CUBIC_IN_TIME" value="3" enum="InterpolationType">
+ Cubic interpolation with uniformed time.
+ </constant>
<constant name="UPDATE_CONTINUOUS" value="0" enum="UpdateMode">
Update between keyframes.
</constant>
@@ -640,11 +624,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 0a731edadd..fbbf9a3be4 100644
--- a/doc/classes/AnimationLibrary.xml
+++ b/doc/classes/AnimationLibrary.xml
@@ -1,47 +1,56 @@
<?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">
<return type="int" enum="Error" />
- <argument index="0" name="name" type="StringName" />
- <argument index="1" name="animation" type="Animation" />
+ <param index="0" name="name" type="StringName" />
+ <param index="1" name="animation" type="Animation" />
<description>
+ Adds the [param animation] to the library, accesible by the key [param name].
</description>
</method>
<method name="get_animation" qualifiers="const">
<return type="Animation" />
- <argument index="0" name="name" type="StringName" />
+ <param index="0" name="name" type="StringName" />
<description>
+ Returns the [Animation] with the key [param name], or [code]null[/code] if none is found.
</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" />
- <argument index="0" name="name" type="StringName" />
+ <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" />
- <argument index="0" name="name" type="StringName" />
+ <param index="0" name="name" type="StringName" />
<description>
+ Removes the [Animation] with the key [param name].
</description>
</method>
<method name="rename_animation">
<return type="void" />
- <argument index="0" name="name" type="StringName" />
- <argument index="1" name="newname" type="StringName" />
+ <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>
@@ -51,19 +60,22 @@
</members>
<signals>
<signal name="animation_added">
- <argument index="0" name="name" type="Animation" />
+ <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">
- <argument index="0" name="name" type="Animation" />
+ <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">
- <argument index="0" name="name" type="Animation" />
- <argument index="1" name="to_name" type="Animation" />
+ <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 99d21706ee..b856b5f208 100644
--- a/doc/classes/AnimationNode.xml
+++ b/doc/classes/AnimationNode.xml
@@ -14,91 +14,95 @@
<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" />
- <argument index="0" name="name" type="StringName" />
+ <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" />
- <argument index="0" name="parameter" type="StringName" />
+ <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">
<return type="float" />
- <argument index="0" name="time" type="float" />
- <argument index="1" name="seek" type="bool" />
+ <param index="0" name="time" type="float" />
+ <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>
</method>
<method name="add_input">
<return type="void" />
- <argument index="0" name="name" type="String" />
+ <param index="0" name="name" type="String" />
<description>
Adds an input to the node. This is only useful for nodes created for use in an [AnimationNodeBlendTree].
</description>
</method>
<method name="blend_animation">
<return type="void" />
- <argument index="0" name="animation" type="StringName" />
- <argument index="1" name="time" type="float" />
- <argument index="2" name="delta" type="float" />
- <argument index="3" name="seeked" type="bool" />
- <argument index="4" name="blend" type="float" />
- <argument index="5" name="pingponged" type="int" default="0" />
+ <param index="0" name="animation" type="StringName" />
+ <param index="1" name="time" type="float" />
+ <param index="2" name="delta" type="float" />
+ <param index="3" name="seeked" type="bool" />
+ <param index="4" name="seek_root" type="bool" />
+ <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">
<return type="float" />
- <argument index="0" name="input_index" type="int" />
- <argument index="1" name="time" type="float" />
- <argument index="2" name="seek" type="bool" />
- <argument index="3" name="blend" type="float" />
- <argument index="4" name="filter" type="int" enum="AnimationNode.FilterAction" default="0" />
- <argument index="5" name="optimize" type="bool" default="true" />
+ <param index="0" name="input_index" type="int" />
+ <param index="1" name="time" type="float" />
+ <param index="2" name="seek" type="bool" />
+ <param index="3" name="seek_root" type="bool" />
+ <param index="4" name="blend" type="float" />
+ <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">
<return type="float" />
- <argument index="0" name="name" type="StringName" />
- <argument index="1" name="node" type="AnimationNode" />
- <argument index="2" name="time" type="float" />
- <argument index="3" name="seek" type="bool" />
- <argument index="4" name="blend" type="float" />
- <argument index="5" name="filter" type="int" enum="AnimationNode.FilterAction" default="0" />
- <argument index="6" name="optimize" type="bool" default="true" />
+ <param index="0" name="name" type="StringName" />
+ <param index="1" name="node" type="AnimationNode" />
+ <param index="2" name="time" type="float" />
+ <param index="3" name="seek" type="bool" />
+ <param index="4" name="seek_root" type="bool" />
+ <param index="5" name="blend" type="float" />
+ <param index="6" name="filter" type="int" enum="AnimationNode.FilterAction" default="0" />
+ <param index="7" name="sync" type="bool" default="true" />
<description>
Blend another animation node (in case this node contains children animation nodes). This function is only useful if you inherit from [AnimationRootNode] instead, else editors will not display your node for addition.
</description>
@@ -111,44 +115,44 @@
</method>
<method name="get_input_name">
<return type="String" />
- <argument index="0" name="input" type="int" />
+ <param index="0" name="input" type="int" />
<description>
Gets the name of an input by index.
</description>
</method>
<method name="get_parameter" qualifiers="const">
<return type="Variant" />
- <argument index="0" name="name" type="StringName" />
+ <param index="0" name="name" type="StringName" />
<description>
Gets the value of a parameter. Parameters are custom local memory used for your nodes, given a resource can be reused in multiple trees.
</description>
</method>
<method name="is_path_filtered" qualifiers="const">
<return type="bool" />
- <argument index="0" name="path" type="NodePath" />
+ <param index="0" name="path" type="NodePath" />
<description>
Returns whether the given path is filtered.
</description>
</method>
<method name="remove_input">
<return type="void" />
- <argument index="0" name="index" type="int" />
+ <param index="0" name="index" type="int" />
<description>
Removes an input, call this only when inactive.
</description>
</method>
<method name="set_filter_path">
<return type="void" />
- <argument index="0" name="path" type="NodePath" />
- <argument index="1" name="enable" type="bool" />
+ <param index="0" name="path" type="NodePath" />
+ <param index="1" name="enable" type="bool" />
<description>
Adds or removes a path for the filter.
</description>
</method>
<method name="set_parameter">
<return type="void" />
- <argument index="0" name="name" type="StringName" />
- <argument index="1" name="value" type="Variant" />
+ <param index="0" name="name" type="StringName" />
+ <param index="1" name="value" type="Variant" />
<description>
Sets a custom parameter. These are used as local memory, because resources can be reused across the tree or scenes.
</description>
diff --git a/doc/classes/AnimationNodeAdd2.xml b/doc/classes/AnimationNodeAdd2.xml
index ca117e3ecd..e6ac1dd963 100644
--- a/doc/classes/AnimationNodeAdd2.xml
+++ b/doc/classes/AnimationNodeAdd2.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AnimationNodeAdd2" inherits="AnimationNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+<class name="AnimationNodeAdd2" inherits="AnimationNodeSync" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Blends two animations additively inside of an [AnimationNodeBlendTree].
</brief_description>
@@ -9,9 +9,4 @@
<tutorials>
<link title="AnimationTree">$DOCS_URL/tutorials/animation/animation_tree.html</link>
</tutorials>
- <members>
- <member name="sync" type="bool" setter="set_use_sync" getter="is_using_sync" default="false">
- If [code]true[/code], sets the [code]optimization[/code] to [code]false[/code] when calling [method AnimationNode.blend_input], forcing the blended animations to update every frame.
- </member>
- </members>
</class>
diff --git a/doc/classes/AnimationNodeAdd3.xml b/doc/classes/AnimationNodeAdd3.xml
index 91e030a6ae..f290032e11 100644
--- a/doc/classes/AnimationNodeAdd3.xml
+++ b/doc/classes/AnimationNodeAdd3.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AnimationNodeAdd3" inherits="AnimationNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+<class name="AnimationNodeAdd3" inherits="AnimationNodeSync" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Blends two of three animations additively inside of an [AnimationNodeBlendTree].
</brief_description>
@@ -14,9 +14,4 @@
<link title="AnimationTree">$DOCS_URL/tutorials/animation/animation_tree.html</link>
<link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
</tutorials>
- <members>
- <member name="sync" type="bool" setter="set_use_sync" getter="is_using_sync" default="false">
- If [code]true[/code], sets the [code]optimization[/code] to [code]false[/code] when calling [method AnimationNode.blend_input], forcing the blended animations to update every frame.
- </member>
- </members>
</class>
diff --git a/doc/classes/AnimationNodeBlend2.xml b/doc/classes/AnimationNodeBlend2.xml
index f17163e155..5001e3ba24 100644
--- a/doc/classes/AnimationNodeBlend2.xml
+++ b/doc/classes/AnimationNodeBlend2.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AnimationNodeBlend2" inherits="AnimationNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+<class name="AnimationNodeBlend2" inherits="AnimationNodeSync" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Blends two animations linearly inside of an [AnimationNodeBlendTree].
</brief_description>
@@ -11,9 +11,4 @@
<link title="3D Platformer Demo">https://godotengine.org/asset-library/asset/125</link>
<link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
</tutorials>
- <members>
- <member name="sync" type="bool" setter="set_use_sync" getter="is_using_sync" default="false">
- If [code]true[/code], sets the [code]optimization[/code] to [code]false[/code] when calling [method AnimationNode.blend_input], forcing the blended animations to update every frame.
- </member>
- </members>
</class>
diff --git a/doc/classes/AnimationNodeBlend3.xml b/doc/classes/AnimationNodeBlend3.xml
index 6bc7a20823..93947c2462 100644
--- a/doc/classes/AnimationNodeBlend3.xml
+++ b/doc/classes/AnimationNodeBlend3.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AnimationNodeBlend3" inherits="AnimationNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+<class name="AnimationNodeBlend3" inherits="AnimationNodeSync" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Blends two of three animations linearly inside of an [AnimationNodeBlendTree].
</brief_description>
@@ -13,9 +13,4 @@
<tutorials>
<link title="AnimationTree">$DOCS_URL/tutorials/animation/animation_tree.html</link>
</tutorials>
- <members>
- <member name="sync" type="bool" setter="set_use_sync" getter="is_using_sync" default="false">
- If [code]true[/code], sets the [code]optimization[/code] to [code]false[/code] when calling [method AnimationNode.blend_input], forcing the blended animations to update every frame.
- </member>
- </members>
</class>
diff --git a/doc/classes/AnimationNodeBlendSpace1D.xml b/doc/classes/AnimationNodeBlendSpace1D.xml
index 6ded3a7ff9..0f1ce127cd 100644
--- a/doc/classes/AnimationNodeBlendSpace1D.xml
+++ b/doc/classes/AnimationNodeBlendSpace1D.xml
@@ -15,11 +15,11 @@
<methods>
<method name="add_blend_point">
<return type="void" />
- <argument index="0" name="node" type="AnimationRootNode" />
- <argument index="1" name="pos" type="float" />
- <argument index="2" name="at_index" type="int" default="-1" />
+ <param index="0" name="node" type="AnimationRootNode" />
+ <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">
@@ -30,39 +30,39 @@
</method>
<method name="get_blend_point_node" qualifiers="const">
<return type="AnimationRootNode" />
- <argument index="0" name="point" type="int" />
+ <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" />
- <argument index="0" name="point" type="int" />
+ <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" />
- <argument index="0" name="point" type="int" />
+ <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">
<return type="void" />
- <argument index="0" name="point" type="int" />
- <argument index="1" name="node" type="AnimationRootNode" />
+ <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">
<return type="void" />
- <argument index="0" name="point" type="int" />
- <argument index="1" name="pos" type="float" />
+ <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>
@@ -76,6 +76,10 @@
<member name="snap" type="float" setter="set_snap" getter="get_snap" default="0.1">
Position increment to snap to when moving a point on the axis.
</member>
+ <member name="sync" type="bool" setter="set_use_sync" getter="is_using_sync" default="false">
+ If [code]false[/code], the blended animations' frame are stopped when the blend value is [code]0[/code].
+ If [code]true[/code], forcing the blended animations to advance frame.
+ </member>
<member name="value_label" type="String" setter="set_value_label" getter="get_value_label" default="&quot;value&quot;">
Label of the virtual axis of the blend space.
</member>
diff --git a/doc/classes/AnimationNodeBlendSpace2D.xml b/doc/classes/AnimationNodeBlendSpace2D.xml
index 9e0e408ac5..8d5e153b03 100644
--- a/doc/classes/AnimationNodeBlendSpace2D.xml
+++ b/doc/classes/AnimationNodeBlendSpace2D.xml
@@ -15,21 +15,21 @@
<methods>
<method name="add_blend_point">
<return type="void" />
- <argument index="0" name="node" type="AnimationRootNode" />
- <argument index="1" name="pos" type="Vector2" />
- <argument index="2" name="at_index" type="int" default="-1" />
+ <param index="0" name="node" type="AnimationRootNode" />
+ <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">
<return type="void" />
- <argument index="0" name="x" type="int" />
- <argument index="1" name="y" type="int" />
- <argument index="2" name="z" type="int" />
- <argument index="3" name="at_index" type="int" default="-1" />
+ <param index="0" name="x" type="int" />
+ <param index="1" name="y" type="int" />
+ <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">
@@ -40,16 +40,16 @@
</method>
<method name="get_blend_point_node" qualifiers="const">
<return type="AnimationRootNode" />
- <argument index="0" name="point" type="int" />
+ <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" />
- <argument index="0" name="point" type="int" />
+ <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">
@@ -60,40 +60,40 @@
</method>
<method name="get_triangle_point">
<return type="int" />
- <argument index="0" name="triangle" type="int" />
- <argument index="1" name="point" type="int" />
+ <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" />
- <argument index="0" name="point" type="int" />
+ <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" />
- <argument index="0" name="triangle" type="int" />
+ <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">
<return type="void" />
- <argument index="0" name="point" type="int" />
- <argument index="1" name="node" type="AnimationRootNode" />
+ <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">
<return type="void" />
- <argument index="0" name="point" type="int" />
- <argument index="1" name="pos" type="Vector2" />
+ <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>
@@ -113,6 +113,10 @@
<member name="snap" type="Vector2" setter="set_snap" getter="get_snap" default="Vector2(0.1, 0.1)">
Position increment to snap to when moving a point.
</member>
+ <member name="sync" type="bool" setter="set_use_sync" getter="is_using_sync" default="false">
+ If [code]false[/code], the blended animations' frame are stopped when the blend value is [code]0[/code].
+ If [code]true[/code], forcing the blended animations to advance frame.
+ </member>
<member name="x_label" type="String" setter="set_x_label" getter="get_x_label" default="&quot;x&quot;">
Name of the blend space's X axis.
</member>
diff --git a/doc/classes/AnimationNodeBlendTree.xml b/doc/classes/AnimationNodeBlendTree.xml
index fcdd09f144..4c7943ece3 100644
--- a/doc/classes/AnimationNodeBlendTree.xml
+++ b/doc/classes/AnimationNodeBlendTree.xml
@@ -13,70 +13,70 @@
<methods>
<method name="add_node">
<return type="void" />
- <argument index="0" name="name" type="StringName" />
- <argument index="1" name="node" type="AnimationNode" />
- <argument index="2" name="position" type="Vector2" default="Vector2(0, 0)" />
+ <param index="0" name="name" type="StringName" />
+ <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">
<return type="void" />
- <argument index="0" name="input_node" type="StringName" />
- <argument index="1" name="input_index" type="int" />
- <argument index="2" name="output_node" type="StringName" />
+ <param index="0" name="input_node" type="StringName" />
+ <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">
<return type="void" />
- <argument index="0" name="input_node" type="StringName" />
- <argument index="1" name="input_index" type="int" />
+ <param index="0" name="input_node" type="StringName" />
+ <param index="1" name="input_index" type="int" />
<description>
Disconnects the node connected to the specified input.
</description>
</method>
<method name="get_node" qualifiers="const">
<return type="AnimationNode" />
- <argument index="0" name="name" type="StringName" />
+ <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" />
- <argument index="0" name="name" type="StringName" />
+ <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" />
- <argument index="0" name="name" type="StringName" />
+ <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">
<return type="void" />
- <argument index="0" name="name" type="StringName" />
+ <param index="0" name="name" type="StringName" />
<description>
Removes a sub-node.
</description>
</method>
<method name="rename_node">
<return type="void" />
- <argument index="0" name="name" type="StringName" />
- <argument index="1" name="new_name" type="StringName" />
+ <param index="0" name="name" type="StringName" />
+ <param index="1" name="new_name" type="StringName" />
<description>
Changes the name of a sub-node.
</description>
</method>
<method name="set_node_position">
<return type="void" />
- <argument index="0" name="name" type="StringName" />
- <argument index="1" name="position" type="Vector2" />
+ <param index="0" name="name" type="StringName" />
+ <param index="1" name="position" type="Vector2" />
<description>
Modifies the position of a sub-node.
</description>
diff --git a/doc/classes/AnimationNodeOneShot.xml b/doc/classes/AnimationNodeOneShot.xml
index 727a09e110..14abc34992 100644
--- a/doc/classes/AnimationNodeOneShot.xml
+++ b/doc/classes/AnimationNodeOneShot.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AnimationNodeOneShot" inherits="AnimationNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+<class name="AnimationNodeOneShot" inherits="AnimationNodeSync" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Plays an animation once in [AnimationNodeBlendTree].
</brief_description>
@@ -20,14 +20,12 @@
<member name="autorestart_random_delay" type="float" setter="set_autorestart_random_delay" getter="get_autorestart_random_delay" default="0.0">
If [member autorestart] is [code]true[/code], a random additional delay (in seconds) between 0 and this value will be added to [member autorestart_delay].
</member>
- <member name="fadein_time" type="float" setter="set_fadein_time" getter="get_fadein_time" default="0.1">
+ <member name="fadein_time" type="float" setter="set_fadein_time" getter="get_fadein_time" default="0.0">
</member>
- <member name="fadeout_time" type="float" setter="set_fadeout_time" getter="get_fadeout_time" default="0.1">
+ <member name="fadeout_time" type="float" setter="set_fadeout_time" getter="get_fadeout_time" default="0.0">
</member>
<member name="mix_mode" type="int" setter="set_mix_mode" getter="get_mix_mode" enum="AnimationNodeOneShot.MixMode" default="0">
</member>
- <member name="sync" type="bool" setter="set_use_sync" getter="is_using_sync" default="false">
- </member>
</members>
<constants>
<constant name="MIX_MODE_BLEND" value="0" enum="MixMode">
diff --git a/doc/classes/AnimationNodeStateMachine.xml b/doc/classes/AnimationNodeStateMachine.xml
index 2cafdf8aaa..0fb789875f 100644
--- a/doc/classes/AnimationNodeStateMachine.xml
+++ b/doc/classes/AnimationNodeStateMachine.xml
@@ -23,28 +23,22 @@
<methods>
<method name="add_node">
<return type="void" />
- <argument index="0" name="name" type="StringName" />
- <argument index="1" name="node" type="AnimationNode" />
- <argument index="2" name="position" type="Vector2" default="Vector2(0, 0)" />
+ <param index="0" name="name" type="StringName" />
+ <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">
<return type="void" />
- <argument index="0" name="from" type="StringName" />
- <argument index="1" name="to" type="StringName" />
- <argument index="2" name="transition" type="AnimationNodeStateMachineTransition" />
+ <param index="0" name="from" type="StringName" />
+ <param index="1" name="to" type="StringName" />
+ <param index="2" name="transition" type="AnimationNodeStateMachineTransition" />
<description>
Adds a transition between the given nodes.
</description>
</method>
- <method name="get_end_node" qualifiers="const">
- <return type="String" />
- <description>
- Returns the graph's end node.
- </description>
- </method>
<method name="get_graph_offset" qualifiers="const">
<return type="Vector2" />
<description>
@@ -53,34 +47,28 @@
</method>
<method name="get_node" qualifiers="const">
<return type="AnimationNode" />
- <argument index="0" name="name" type="StringName" />
+ <param index="0" name="name" type="StringName" />
<description>
Returns the animation node with the given name.
</description>
</method>
<method name="get_node_name" qualifiers="const">
<return type="StringName" />
- <argument index="0" name="node" type="AnimationNode" />
+ <param index="0" name="node" type="AnimationNode" />
<description>
Returns the given animation node's name.
</description>
</method>
<method name="get_node_position" qualifiers="const">
<return type="Vector2" />
- <argument index="0" name="name" type="StringName" />
+ <param index="0" name="name" type="StringName" />
<description>
Returns the given node's coordinates. Used for display in the editor.
</description>
</method>
- <method name="get_start_node" qualifiers="const">
- <return type="String" />
- <description>
- Returns the graph's end node.
- </description>
- </method>
<method name="get_transition" qualifiers="const">
<return type="AnimationNodeStateMachineTransition" />
- <argument index="0" name="idx" type="int" />
+ <param index="0" name="idx" type="int" />
<description>
Returns the given transition.
</description>
@@ -93,98 +81,84 @@
</method>
<method name="get_transition_from" qualifiers="const">
<return type="StringName" />
- <argument index="0" name="idx" type="int" />
+ <param index="0" name="idx" type="int" />
<description>
Returns the given transition's start node.
</description>
</method>
<method name="get_transition_to" qualifiers="const">
<return type="StringName" />
- <argument index="0" name="idx" type="int" />
+ <param index="0" name="idx" type="int" />
<description>
Returns the given transition's end node.
</description>
</method>
<method name="has_node" qualifiers="const">
<return type="bool" />
- <argument index="0" name="name" type="StringName" />
+ <param index="0" name="name" type="StringName" />
<description>
Returns [code]true[/code] if the graph contains the given node.
</description>
</method>
<method name="has_transition" qualifiers="const">
<return type="bool" />
- <argument index="0" name="from" type="StringName" />
- <argument index="1" name="to" type="StringName" />
+ <param index="0" name="from" type="StringName" />
+ <param index="1" name="to" type="StringName" />
<description>
Returns [code]true[/code] if there is a transition between the given nodes.
</description>
</method>
<method name="remove_node">
<return type="void" />
- <argument index="0" name="name" type="StringName" />
+ <param index="0" name="name" type="StringName" />
<description>
Deletes the given node from the graph.
</description>
</method>
<method name="remove_transition">
<return type="void" />
- <argument index="0" name="from" type="StringName" />
- <argument index="1" name="to" type="StringName" />
+ <param index="0" name="from" type="StringName" />
+ <param index="1" name="to" type="StringName" />
<description>
Deletes the transition between the two specified nodes.
</description>
</method>
<method name="remove_transition_by_index">
<return type="void" />
- <argument index="0" name="idx" type="int" />
+ <param index="0" name="idx" type="int" />
<description>
Deletes the given transition by index.
</description>
</method>
<method name="rename_node">
<return type="void" />
- <argument index="0" name="name" type="StringName" />
- <argument index="1" name="new_name" type="StringName" />
+ <param index="0" name="name" type="StringName" />
+ <param index="1" name="new_name" type="StringName" />
<description>
Renames the given node.
</description>
</method>
<method name="replace_node">
<return type="void" />
- <argument index="0" name="name" type="StringName" />
- <argument index="1" name="node" type="AnimationNode" />
- <description>
- </description>
- </method>
- <method name="set_end_node">
- <return type="void" />
- <argument index="0" name="name" type="StringName" />
+ <param index="0" name="name" type="StringName" />
+ <param index="1" name="node" type="AnimationNode" />
<description>
- Sets the given node as the graph end point.
</description>
</method>
<method name="set_graph_offset">
<return type="void" />
- <argument index="0" name="offset" type="Vector2" />
+ <param index="0" name="offset" type="Vector2" />
<description>
Sets the draw offset of the graph. Used for display in the editor.
</description>
</method>
<method name="set_node_position">
<return type="void" />
- <argument index="0" name="name" type="StringName" />
- <argument index="1" name="position" type="Vector2" />
+ <param index="0" name="name" type="StringName" />
+ <param index="1" name="position" type="Vector2" />
<description>
Sets the node's coordinates. Used for display in the editor.
</description>
</method>
- <method name="set_start_node">
- <return type="void" />
- <argument index="0" name="name" type="StringName" />
- <description>
- Sets the given node as the graph start point.
- </description>
- </method>
</methods>
</class>
diff --git a/doc/classes/AnimationNodeStateMachinePlayback.xml b/doc/classes/AnimationNodeStateMachinePlayback.xml
index 901ab569c8..8f53ef0dcf 100644
--- a/doc/classes/AnimationNodeStateMachinePlayback.xml
+++ b/doc/classes/AnimationNodeStateMachinePlayback.xml
@@ -52,7 +52,7 @@
</method>
<method name="start">
<return type="void" />
- <argument index="0" name="node" type="StringName" />
+ <param index="0" name="node" type="StringName" />
<description>
Starts playing the given animation.
</description>
@@ -65,7 +65,7 @@
</method>
<method name="travel">
<return type="void" />
- <argument index="0" name="to_node" type="StringName" />
+ <param index="0" name="to_node" type="StringName" />
<description>
Transitions from the current state to another one, following the shortest path.
</description>
diff --git a/doc/classes/AnimationNodeStateMachineTransition.xml b/doc/classes/AnimationNodeStateMachineTransition.xml
index 94e6a2f23d..1b5a795b3c 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))
@@ -19,6 +19,12 @@
[/csharp]
[/codeblocks]
</member>
+ <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>
@@ -31,6 +37,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/AnimationNodeSync.xml b/doc/classes/AnimationNodeSync.xml
new file mode 100644
index 0000000000..21cac11d50
--- /dev/null
+++ b/doc/classes/AnimationNodeSync.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="AnimationNodeSync" inherits="AnimationNode" 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="sync" type="bool" setter="set_use_sync" getter="is_using_sync" default="false">
+ If [code]false[/code], the blended animations' frame are stopped when the blend value is [code]0[/code].
+ If [code]true[/code], forcing the blended animations to advance frame.
+ </member>
+ </members>
+</class>
diff --git a/doc/classes/AnimationNodeTransition.xml b/doc/classes/AnimationNodeTransition.xml
index 70c874d251..d574bc044d 100644
--- a/doc/classes/AnimationNodeTransition.xml
+++ b/doc/classes/AnimationNodeTransition.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AnimationNodeTransition" inherits="AnimationNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+<class name="AnimationNodeTransition" inherits="AnimationNodeSync" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A generic animation transition node for [AnimationTree].
</brief_description>
@@ -14,36 +14,41 @@
<methods>
<method name="get_input_caption" qualifiers="const">
<return type="String" />
- <argument index="0" name="input" type="int" />
+ <param index="0" name="input" type="int" />
<description>
</description>
</method>
<method name="is_input_set_as_auto_advance" qualifiers="const">
<return type="bool" />
- <argument index="0" name="input" type="int" />
+ <param index="0" name="input" type="int" />
<description>
</description>
</method>
<method name="set_input_as_auto_advance">
<return type="void" />
- <argument index="0" name="input" type="int" />
- <argument index="1" name="enable" type="bool" />
+ <param index="0" name="input" type="int" />
+ <param index="1" name="enable" type="bool" />
<description>
</description>
</method>
<method name="set_input_caption">
<return type="void" />
- <argument index="0" name="input" type="int" />
- <argument index="1" name="caption" type="String" />
+ <param index="0" name="input" type="int" />
+ <param index="1" name="caption" type="String" />
<description>
</description>
</method>
</methods>
<members>
+ <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>
- <member name="xfade_time" type="float" setter="set_cross_fade_time" getter="get_cross_fade_time" default="0.0">
+ <member name="xfade_curve" type="Curve" setter="set_xfade_curve" getter="get_xfade_curve">
+ </member>
+ <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 625cf3c47c..d771206cc2 100644
--- a/doc/classes/AnimationPlayer.xml
+++ b/doc/classes/AnimationPlayer.xml
@@ -1,11 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AnimationPlayer" inherits="Node" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
- Container and player of [Animation] resources.
+ Player of [Animation] resources.
</brief_description>
<description>
- An animation player is used for general-purpose playback of [Animation] resources. It contains a dictionary of animations (referenced by name) and custom blend times between their transitions. Additionally, animations can be played and blended in different channels.
- [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] node, but it requires doing everything by code.
+ 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.
+ [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>
<tutorials>
@@ -16,31 +17,32 @@
<methods>
<method name="add_animation_library">
<return type="int" enum="Error" />
- <argument index="0" name="name" type="StringName" />
- <argument index="1" name="library" type="AnimationLibrary" />
+ <param index="0" name="name" type="StringName" />
+ <param index="1" name="library" type="AnimationLibrary" />
<description>
+ Adds [param library] to the animation player, under the key [param name].
</description>
</method>
<method name="advance">
<return type="void" />
- <argument index="0" name="delta" type="float" />
+ <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" />
- <argument index="0" name="anim_from" type="StringName" />
+ <param index="0" name="anim_from" type="StringName" />
<description>
- Returns the name of the next animation in the queue.
+ Returns the key of the animation which is queued to play after the [param anim_from] animation.
</description>
</method>
<method name="animation_set_next">
<return type="void" />
- <argument index="0" name="anim_from" type="StringName" />
- <argument index="1" name="anim_to" type="StringName" />
+ <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">
@@ -57,47 +59,50 @@
</method>
<method name="find_animation" qualifiers="const">
<return type="StringName" />
- <argument index="0" name="animation" type="Animation" />
+ <param index="0" name="animation" type="Animation" />
<description>
- Returns the name of [code]animation[/code] or an empty string 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" />
- <argument index="0" name="animation" type="Animation" />
+ <param index="0" name="animation" type="Animation" />
<description>
+ 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" />
- <argument index="0" name="name" type="StringName" />
+ <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 key [param name] or [code]null[/code] if not found.
</description>
</method>
<method name="get_animation_library" qualifiers="const">
<return type="AnimationLibrary" />
- <argument index="0" name="name" type="StringName" />
+ <param index="0" name="name" type="StringName" />
<description>
+ 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">
<return type="StringName[]" />
<description>
+ Returns the list of stored library keys.
</description>
</method>
<method name="get_animation_list" qualifiers="const">
<return type="PackedStringArray" />
<description>
- Returns the list of stored animation names.
+ Returns the list of stored animation keys.
</description>
</method>
<method name="get_blend_time" qualifiers="const">
<return type="float" />
- <argument index="0" name="anim_from" type="StringName" />
- <argument index="1" name="anim_to" type="StringName" />
+ <param index="0" name="anim_from" type="StringName" />
+ <param index="1" name="anim_to" type="StringName" />
<description>
- Gets the blend time (in seconds) between two animations, referenced by their names.
+ Gets the blend time (in seconds) between two animations, referenced by their keys.
</description>
</method>
<method name="get_playing_speed" qualifiers="const">
@@ -109,20 +114,21 @@
<method name="get_queue">
<return type="PackedStringArray" />
<description>
- Returns a list of the animation names that are currently queued to play.
+ Returns a list of the animation keys that are currently queued to play.
</description>
</method>
<method name="has_animation" qualifiers="const">
<return type="bool" />
- <argument index="0" name="name" type="StringName" />
+ <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" />
- <argument index="0" name="name" type="StringName" />
+ <param index="0" name="name" type="StringName" />
<description>
+ Returns [code]true[/code] if the [AnimationPlayer] stores an [AnimationLibrary] with key [param name].
</description>
</method>
<method name="is_playing" qualifiers="const">
@@ -133,28 +139,28 @@
</method>
<method name="play">
<return type="void" />
- <argument index="0" name="name" type="StringName" default="&quot;&quot;" />
- <argument index="1" name="custom_blend" type="float" default="-1" />
- <argument index="2" name="custom_speed" type="float" default="1.0" />
- <argument index="3" name="from_end" type="bool" default="false" />
+ <param index="0" name="name" type="StringName" default="&quot;&quot;" />
+ <param index="1" name="custom_blend" type="float" default="-1" />
+ <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>
<method name="play_backwards">
<return type="void" />
- <argument index="0" name="name" type="StringName" default="&quot;&quot;" />
- <argument index="1" name="custom_blend" type="float" default="-1" />
+ <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>
<method name="queue">
<return type="void" />
- <argument index="0" name="name" type="StringName" />
+ <param index="0" name="name" type="StringName" />
<description>
Queues an animation for playback once the current one is done.
[b]Note:[/b] If a looped animation is currently playing, the queued animation will never play unless the looped animation is stopped somehow.
@@ -162,56 +168,59 @@
</method>
<method name="remove_animation_library">
<return type="void" />
- <argument index="0" name="name" type="StringName" />
+ <param index="0" name="name" type="StringName" />
<description>
+ Removes the [AnimationLibrary] assosiated with the key [param name].
</description>
</method>
<method name="rename_animation_library">
<return type="void" />
- <argument index="0" name="name" type="StringName" />
- <argument index="1" name="newname" type="StringName" />
+ <param index="0" name="name" type="StringName" />
+ <param index="1" name="newname" type="StringName" />
<description>
+ Moves the [AnimationLibrary] associated with the key [param name] to the key [param newname].
</description>
</method>
<method name="seek">
<return type="void" />
- <argument index="0" name="seconds" type="float" />
- <argument index="1" name="update" type="bool" default="false" />
+ <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>
<method name="set_blend_time">
<return type="void" />
- <argument index="0" name="anim_from" type="StringName" />
- <argument index="1" name="anim_to" type="StringName" />
- <argument index="2" name="sec" type="float" />
+ <param index="0" name="anim_from" type="StringName" />
+ <param index="1" name="anim_to" type="StringName" />
+ <param index="2" name="sec" type="float" />
<description>
- Specifies a blend time (in seconds) between two animations, referenced by their names.
+ Specifies a blend time (in seconds) between two animations, referenced by their keys.
</description>
</method>
<method name="stop">
<return type="void" />
- <argument index="0" name="reset" type="bool" default="true" />
+ <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>
<members>
<member name="assigned_animation" type="String" setter="set_assigned_animation" getter="get_assigned_animation">
- If playing, the current animation; otherwise, the animation last played. When set, would change the animation, but would not play it unless currently playing. See also [member current_animation].
+ If playing, the the current animation's key, otherwise, the animation last played. When set, this changes the animation, but will not play it unless already playing. See also [member current_animation].
</member>
<member name="autoplay" type="String" setter="set_autoplay" getter="get_autoplay" default="&quot;&quot;">
- The name of the animation to play when the scene loads.
+ The key of the animation to play when the scene loads.
</member>
<member name="current_animation" type="String" setter="set_current_animation" getter="get_current_animation" default="&quot;&quot;">
- The name 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.
+ 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].
</member>
<member name="current_animation_length" type="float" setter="" getter="get_current_animation_length">
- The length (in seconds) of the currently being played animation.
+ The length (in seconds) of the currently playing animation.
</member>
<member name="current_animation_position" type="float" setter="" getter="get_current_animation_position">
The position (in seconds) of the currently playing animation.
@@ -219,6 +228,10 @@
<member name="method_call_mode" type="int" setter="set_method_call_mode" getter="get_method_call_mode" enum="AnimationPlayer.AnimationMethodCallMode" default="0">
The call mode to use for Call Method tracks.
</member>
+ <member name="movie_quit_on_finish" type="bool" setter="set_movie_quit_on_finish_enabled" getter="is_movie_quit_on_finish_enabled" default="false">
+ If [code]true[/code] and the engine is running in Movie Maker mode (see [MovieWriter]), exits the engine with [method SceneTree.quit] as soon as an animation is done playing in this [AnimationPlayer]. A message is printed when the engine quits for this reason.
+ [b]Note:[/b] This obeys the same logic as the [signal animation_finished] signal, so it will not quit the engine if the animation is set to be looping.
+ </member>
<member name="playback_active" type="bool" setter="set_active" getter="is_active">
If [code]true[/code], updates animations in response to process-related notifications.
</member>
@@ -232,8 +245,8 @@
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.
</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 applied (as if it had been seeked to time 0), then reverted after saving.
- In other words, the saved scene file will contain the "default pose", as defined by the reset animation, if any, with the editor keeping the values that the nodes had before saving.
+ 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.
+ This makes it more convenient to preview and edit animations in the editor, as changes to the scene will not be saved as long as they are set in the reset animation.
</member>
<member name="root_node" type="NodePath" setter="set_root" getter="get_root" default="NodePath(&quot;..&quot;)">
The node from which node path references will travel.
@@ -241,21 +254,22 @@
</members>
<signals>
<signal name="animation_changed">
- <argument index="0" name="old_name" type="StringName" />
- <argument index="1" name="new_name" type="StringName" />
+ <param index="0" name="old_name" type="StringName" />
+ <param index="1" name="new_name" type="StringName" />
<description>
- Emitted when a queued animation plays after the previous animation was finished. See [method queue].
- [b]Note:[/b] The signal is not emitted when the animation is changed via [method play] or from [AnimationTree].
+ Emitted when a queued animation plays after the previous animation finished. See [method queue].
+ [b]Note:[/b] The signal is not emitted when the animation is changed via [method play] or by an [AnimationTree].
</description>
</signal>
<signal name="animation_finished">
- <argument index="0" name="anim_name" type="StringName" />
+ <param index="0" name="anim_name" type="StringName" />
<description>
Notifies when an animation finished playing.
+ [b]Note:[/b] This signal is not emitted if an animation is looping.
</description>
</signal>
<signal name="animation_started">
- <argument index="0" name="anim_name" type="StringName" />
+ <param index="0" name="anim_name" type="StringName" />
<description>
Notifies when an animation starts playing.
</description>
diff --git a/doc/classes/AnimationTree.xml b/doc/classes/AnimationTree.xml
index 67e64c6bee..f2bf74f495 100644
--- a/doc/classes/AnimationTree.xml
+++ b/doc/classes/AnimationTree.xml
@@ -14,7 +14,7 @@
<methods>
<method name="advance">
<return type="void" />
- <argument index="0" name="delta" type="float" />
+ <param index="0" name="delta" type="float" />
<description>
Manually advance the animations by the specified time (in seconds).
</description>
@@ -27,8 +27,8 @@
</method>
<method name="rename_parameter">
<return type="void" />
- <argument index="0" name="old_name" type="String" />
- <argument index="1" name="new_name" type="String" />
+ <param index="0" name="old_name" type="String" />
+ <param index="1" name="new_name" type="String" />
<description>
</description>
</method>
@@ -37,6 +37,9 @@
<member name="active" type="bool" setter="set_active" getter="is_active" default="false">
If [code]true[/code], the [AnimationTree] will be processing.
</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 the AnimationNode [Expression] if one is not explicitly specified internally.
+ </member>
<member name="anim_player" type="NodePath" setter="set_animation_player" getter="get_animation_player" default="NodePath(&quot;&quot;)">
The path to the [AnimationPlayer] used for animating.
</member>
diff --git a/doc/classes/Area2D.xml b/doc/classes/Area2D.xml
index 1eb74768f5..f1e40d4979 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>
@@ -29,7 +31,7 @@
</method>
<method name="overlaps_area" qualifiers="const">
<return type="bool" />
- <argument index="0" name="area" type="Node" />
+ <param index="0" name="area" type="Node" />
<description>
Returns [code]true[/code] if the given [Area2D] 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, the list of overlaps is updated once per frame and before the physics step. Consider using signals instead.
@@ -37,11 +39,11 @@
</method>
<method name="overlaps_body" qualifiers="const">
<return type="bool" />
- <argument index="0" name="body" type="Node" />
+ <param index="0" name="body" type="Node" />
<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>
@@ -96,83 +98,83 @@
</members>
<signals>
<signal name="area_entered">
- <argument index="0" name="area" type="Area2D" />
+ <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">
- <argument index="0" name="area" type="Area2D" />
+ <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">
- <argument index="0" name="area_rid" type="RID" />
- <argument index="1" name="area" type="Area2D" />
- <argument index="2" name="area_shape_index" type="int" />
- <argument index="3" name="local_shape_index" type="int" />
+ <param index="0" name="area_rid" type="RID" />
+ <param index="1" name="area" type="Area2D" />
+ <param index="2" name="area_shape_index" type="int" />
+ <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">
- <argument index="0" name="area_rid" type="RID" />
- <argument index="1" name="area" type="Area2D" />
- <argument index="2" name="area_shape_index" type="int" />
- <argument index="3" name="local_shape_index" type="int" />
+ <param index="0" name="area_rid" type="RID" />
+ <param index="1" name="area" type="Area2D" />
+ <param index="2" name="area_shape_index" type="int" />
+ <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">
- <argument index="0" name="body" type="Node2D" />
+ <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">
- <argument index="0" name="body" type="Node2D" />
+ <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">
- <argument index="0" name="body_rid" type="RID" />
- <argument index="1" name="body" type="Node2D" />
- <argument index="2" name="body_shape_index" type="int" />
- <argument index="3" name="local_shape_index" type="int" />
+ <param index="0" name="body_rid" type="RID" />
+ <param index="1" name="body" type="Node2D" />
+ <param index="2" name="body_shape_index" type="int" />
+ <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">
- <argument index="0" name="body_rid" type="RID" />
- <argument index="1" name="body" type="Node2D" />
- <argument index="2" name="body_shape_index" type="int" />
- <argument index="3" name="local_shape_index" type="int" />
+ <param index="0" name="body_rid" type="RID" />
+ <param index="1" name="body" type="Node2D" />
+ <param index="2" name="body_shape_index" type="int" />
+ <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 7d14fd825b..14081918cf 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>
@@ -27,7 +29,7 @@
</method>
<method name="overlaps_area" qualifiers="const">
<return type="bool" />
- <argument index="0" name="area" type="Node" />
+ <param index="0" name="area" type="Node" />
<description>
Returns [code]true[/code] if the given [Area3D] 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.
@@ -35,11 +37,11 @@
</method>
<method name="overlaps_body" qualifiers="const">
<return type="bool" />
- <argument index="0" name="body" type="Node" />
+ <param index="0" name="body" type="Node" />
<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>
@@ -115,83 +117,83 @@
</members>
<signals>
<signal name="area_entered">
- <argument index="0" name="area" type="Area3D" />
+ <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">
- <argument index="0" name="area" type="Area3D" />
+ <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">
- <argument index="0" name="area_rid" type="RID" />
- <argument index="1" name="area" type="Area3D" />
- <argument index="2" name="area_shape_index" type="int" />
- <argument index="3" name="local_shape_index" type="int" />
+ <param index="0" name="area_rid" type="RID" />
+ <param index="1" name="area" type="Area3D" />
+ <param index="2" name="area_shape_index" type="int" />
+ <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">
- <argument index="0" name="area_rid" type="RID" />
- <argument index="1" name="area" type="Area3D" />
- <argument index="2" name="area_shape_index" type="int" />
- <argument index="3" name="local_shape_index" type="int" />
+ <param index="0" name="area_rid" type="RID" />
+ <param index="1" name="area" type="Area3D" />
+ <param index="2" name="area_shape_index" type="int" />
+ <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">
- <argument index="0" name="body" type="Node3D" />
+ <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">
- <argument index="0" name="body" type="Node3D" />
+ <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">
- <argument index="0" name="body_rid" type="RID" />
- <argument index="1" name="body" type="Node3D" />
- <argument index="2" name="body_shape_index" type="int" />
- <argument index="3" name="local_shape_index" type="int" />
+ <param index="0" name="body_rid" type="RID" />
+ <param index="1" name="body" type="Node3D" />
+ <param index="2" name="body_shape_index" type="int" />
+ <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">
- <argument index="0" name="body_rid" type="RID" />
- <argument index="1" name="body" type="Node3D" />
- <argument index="2" name="body_shape_index" type="int" />
- <argument index="3" name="local_shape_index" type="int" />
+ <param index="0" name="body_rid" type="RID" />
+ <param index="1" name="body" type="Node3D" />
+ <param index="2" name="body_shape_index" type="int" />
+ <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 ef4f86f1a9..f6d926031d 100644
--- a/doc/classes/Array.xml
+++ b/doc/classes/Array.xml
@@ -53,86 +53,132 @@
</constructor>
<constructor name="Array">
<return type="Array" />
- <argument index="0" name="from" type="Array" />
+ <param index="0" name="from" type="Array" />
<description>
Constructs an [Array] as a copy of the given [Array].
</description>
</constructor>
<constructor name="Array">
<return type="Array" />
- <argument index="0" name="from" type="PackedByteArray" />
+ <param index="0" name="from" type="PackedByteArray" />
<description>
Constructs an array from a [PackedByteArray].
</description>
</constructor>
<constructor name="Array">
<return type="Array" />
- <argument index="0" name="from" type="PackedColorArray" />
+ <param index="0" name="from" type="PackedColorArray" />
<description>
Constructs an array from a [PackedColorArray].
</description>
</constructor>
<constructor name="Array">
<return type="Array" />
- <argument index="0" name="from" type="PackedFloat32Array" />
+ <param index="0" name="from" type="PackedFloat32Array" />
<description>
Constructs an array from a [PackedFloat32Array].
</description>
</constructor>
<constructor name="Array">
<return type="Array" />
- <argument index="0" name="from" type="PackedFloat64Array" />
+ <param index="0" name="from" type="PackedFloat64Array" />
<description>
Constructs an array from a [PackedFloat64Array].
</description>
</constructor>
<constructor name="Array">
<return type="Array" />
- <argument index="0" name="from" type="PackedInt32Array" />
+ <param index="0" name="from" type="PackedInt32Array" />
<description>
Constructs an array from a [PackedInt32Array].
</description>
</constructor>
<constructor name="Array">
<return type="Array" />
- <argument index="0" name="from" type="PackedInt64Array" />
+ <param index="0" name="from" type="PackedInt64Array" />
<description>
Constructs an array from a [PackedInt64Array].
</description>
</constructor>
<constructor name="Array">
<return type="Array" />
- <argument index="0" name="from" type="PackedStringArray" />
+ <param index="0" name="from" type="PackedStringArray" />
<description>
Constructs an array from a [PackedStringArray].
</description>
</constructor>
<constructor name="Array">
<return type="Array" />
- <argument index="0" name="from" type="PackedVector2Array" />
+ <param index="0" name="from" type="PackedVector2Array" />
<description>
Constructs an array from a [PackedVector2Array].
</description>
</constructor>
<constructor name="Array">
<return type="Array" />
- <argument index="0" name="from" type="PackedVector3Array" />
+ <param index="0" name="from" type="PackedVector3Array" />
<description>
Constructs an array from a [PackedVector3Array].
</description>
</constructor>
</constructors>
<methods>
+ <method name="all" qualifiers="const">
+ <return type="bool" />
+ <param index="0" name="method" type="Callable" />
+ <description>
+ Calls the provided [Callable] on each element in the array and returns [code]true[/code] if the [Callable] returns [code]true[/code] for [i]all[/i] elements in the array. If the [Callable] returns [code]false[/code] for one array element or more, this method returns [code]false[/code].
+ The callable's method should take one [Variant] parameter (the current array element) and return a boolean value.
+ [codeblock]
+ func _ready():
+ print([6, 10, 6].all(greater_than_5)) # Prints True (3/3 elements evaluate to `true`).
+ print([4, 10, 4].all(greater_than_5)) # Prints False (1/3 elements evaluate to `true`).
+ print([4, 4, 4].all(greater_than_5)) # Prints False (0/3 elements evaluate to `true`).
+ print([].all(greater_than_5)) # Prints True (0/0 elements evaluate to `true`).
+
+ print([6, 10, 6].all(func(number): return number &gt; 5)) # Prints True. Same as the first line above, but using lambda function.
+
+ func greater_than_5(number):
+ return number &gt; 5
+ [/codeblock]
+ See also [method any], [method filter], [method map] and [method reduce].
+ [b]Note:[/b] Unlike relying on the size of an array returned by [method filter], this method will return as early as possible to improve performance (especially with large arrays).
+ [b]Note:[/b] For an empty array, this method [url=https://en.wikipedia.org/wiki/Vacuous_truth]always[/url] returns [code]true[/code].
+ </description>
+ </method>
+ <method name="any" qualifiers="const">
+ <return type="bool" />
+ <param index="0" name="method" type="Callable" />
+ <description>
+ Calls the provided [Callable] on each element in the array and returns [code]true[/code] if the [Callable] returns [code]true[/code] for [i]one or more[/i] elements in the array. If the [Callable] returns [code]false[/code] for all elements in the array, this method returns [code]false[/code].
+ The callable's method should take one [Variant] parameter (the current array element) and return a boolean value.
+ [codeblock]
+ func _ready():
+ print([6, 10, 6].any(greater_than_5)) # Prints True (3 elements evaluate to `true`).
+ print([4, 10, 4].any(greater_than_5)) # Prints True (1 elements evaluate to `true`).
+ print([4, 4, 4].any(greater_than_5)) # Prints False (0 elements evaluate to `true`).
+ print([].any(greater_than_5)) # Prints False (0 elements evaluate to `true`).
+
+ print([6, 10, 6].any(func(number): return number &gt; 5)) # Prints True. Same as the first line above, but using lambda function.
+
+ func greater_than_5(number):
+ return number &gt; 5
+ [/codeblock]
+ See also [method all], [method filter], [method map] and [method reduce].
+ [b]Note:[/b] Unlike relying on the size of an array returned by [method filter], this method will return as early as possible to improve performance (especially with large arrays).
+ [b]Note:[/b] For an empty array, this method always returns [code]false[/code].
+ </description>
+ </method>
<method name="append">
<return type="void" />
- <argument index="0" name="value" type="Variant" />
+ <param index="0" name="value" type="Variant" />
<description>
Appends an element at the end of the array (alias of [method push_back]).
</description>
</method>
<method name="append_array">
<return type="void" />
- <argument index="0" name="array" type="Array" />
+ <param index="0" name="array" type="Array" />
<description>
Appends another array at the end of this array.
[codeblock]
@@ -152,20 +198,20 @@
</method>
<method name="bsearch">
<return type="int" />
- <argument index="0" name="value" type="Variant" />
- <argument index="1" name="before" type="bool" default="true" />
+ <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>
<method name="bsearch_custom">
<return type="int" />
- <argument index="0" name="value" type="Variant" />
- <argument index="1" name="func" type="Callable" />
- <argument index="2" name="before" type="bool" default="true" />
+ <param index="0" name="value" type="Variant" />
+ <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>
@@ -177,22 +223,22 @@
</method>
<method name="count" qualifiers="const">
<return type="int" />
- <argument index="0" name="value" type="Variant" />
+ <param index="0" name="value" type="Variant" />
<description>
Returns the number of times an element is in the array.
</description>
</method>
<method name="duplicate" qualifiers="const">
<return type="Array" />
- <argument index="0" name="deep" type="bool" default="false" />
+ <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">
<return type="void" />
- <argument index="0" name="value" type="Variant" />
+ <param index="0" name="value" type="Variant" />
<description>
Removes the first occurrence of a value from the array. If the value does not exist in the array, nothing happens. To remove an element by index, use [method remove_at] instead.
[b]Note:[/b] This method acts in-place and doesn't return a value.
@@ -201,7 +247,7 @@
</method>
<method name="fill">
<return type="void" />
- <argument index="0" name="value" type="Variant" />
+ <param index="0" name="value" type="Variant" />
<description>
Assigns the given value to all elements in the array. This can typically be used together with [method resize] to create an array with a given size and initialized elements:
[codeblocks]
@@ -220,7 +266,7 @@
</method>
<method name="filter" qualifiers="const">
<return type="Array" />
- <argument index="0" name="method" type="Callable" />
+ <param index="0" name="method" type="Callable" />
<description>
Calls the provided [Callable] on each element in the array and returns a new array with the elements for which the method returned [code]true[/code].
The callable's method should take one [Variant] parameter (the current array element) and return a boolean value.
@@ -232,19 +278,20 @@
func remove_1(number):
return number != 1
[/codeblock]
+ See also [method any], [method all], [method map] and [method reduce].
</description>
</method>
<method name="find" qualifiers="const">
<return type="int" />
- <argument index="0" name="what" type="Variant" />
- <argument index="1" name="from" type="int" default="0" />
+ <param index="0" name="what" type="Variant" />
+ <param index="1" name="from" type="int" default="0" />
<description>
Searches the array for a value and returns its index or [code]-1[/code] if not found. Optionally, the initial search index can be passed.
</description>
</method>
<method name="find_last" qualifiers="const">
<return type="int" />
- <argument index="0" name="value" type="Variant" />
+ <param index="0" name="value" type="Variant" />
<description>
Searches the array in reverse order for a value and returns its index or [code]-1[/code] if not found.
</description>
@@ -258,7 +305,7 @@
</method>
<method name="has" qualifiers="const">
<return type="bool" />
- <argument index="0" name="value" type="Variant" />
+ <param index="0" name="value" type="Variant" />
<description>
Returns [code]true[/code] if the array contains the given value.
[codeblocks]
@@ -305,8 +352,8 @@
</method>
<method name="insert">
<return type="int" />
- <argument index="0" name="position" type="int" />
- <argument index="1" name="value" type="Variant" />
+ <param index="0" name="position" type="int" />
+ <param index="1" name="value" type="Variant" />
<description>
Inserts a new element at a given position in the array. The position must be valid, or at the end of the array ([code]pos == size()[/code]).
[b]Note:[/b] This method acts in-place and doesn't return a value.
@@ -321,7 +368,7 @@
</method>
<method name="map" qualifiers="const">
<return type="Array" />
- <argument index="0" name="method" type="Callable" />
+ <param index="0" name="method" type="Callable" />
<description>
Calls the provided [Callable] for each element in the array and returns a new array filled with values returned by the method.
The callable's method should take one [Variant] parameter (the current array element) and can return any [Variant].
@@ -333,6 +380,7 @@
func negate(number):
return -number
[/codeblock]
+ See also [method filter], [method reduce], [method any] and [method all].
</description>
</method>
<method name="max" qualifiers="const">
@@ -349,9 +397,9 @@
</method>
<method name="pop_at">
<return type="Variant" />
- <argument index="0" name="position" type="int" />
+ <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>
@@ -370,14 +418,14 @@
</method>
<method name="push_back">
<return type="void" />
- <argument index="0" name="value" type="Variant" />
+ <param index="0" name="value" type="Variant" />
<description>
Appends an element at the end of the array. See also [method push_front].
</description>
</method>
<method name="push_front">
<return type="void" />
- <argument index="0" name="value" type="Variant" />
+ <param index="0" name="value" type="Variant" />
<description>
Adds an element at the beginning of the array. See also [method push_back].
[b]Note:[/b] On large arrays, this method is much slower than [method push_back] as it will reindex all the array's elements every time it's called. The larger the array, the slower [method push_front] will be.
@@ -385,11 +433,11 @@
</method>
<method name="reduce" qualifiers="const">
<return type="Variant" />
- <argument index="0" name="method" type="Callable" />
- <argument index="1" name="accum" type="Variant" default="null" />
+ <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.
@@ -398,11 +446,12 @@
func sum(accum, number):
return accum + number
[/codeblock]
+ See also [method map], [method filter], [method any] and [method all].
</description>
</method>
<method name="remove_at">
<return type="void" />
- <argument index="0" name="position" type="int" />
+ <param index="0" name="position" type="int" />
<description>
Removes an element from the array by index. If the index does not exist in the array, nothing happens. To remove an element by searching for its value, use [method erase] instead.
[b]Note:[/b] This method acts in-place and doesn't return a value.
@@ -411,7 +460,7 @@
</method>
<method name="resize">
<return type="int" />
- <argument index="0" name="size" type="int" />
+ <param index="0" name="size" type="int" />
<description>
Resizes the array to contain a different number of elements. If the array size is smaller, elements are cleared, if bigger, new elements are [code]null[/code].
</description>
@@ -424,8 +473,8 @@
</method>
<method name="rfind" qualifiers="const">
<return type="int" />
- <argument index="0" name="what" type="Variant" />
- <argument index="1" name="from" type="int" default="-1" />
+ <param index="0" name="what" type="Variant" />
+ <param index="1" name="from" type="int" default="-1" />
<description>
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>
@@ -444,16 +493,16 @@
</method>
<method name="slice" qualifiers="const">
<return type="Array" />
- <argument index="0" name="begin" type="int" />
- <argument index="1" name="end" type="int" default="2147483647" />
- <argument index="2" name="step" type="int" default="1" />
- <argument index="3" name="deep" type="bool" default="false" />
+ <param index="0" name="begin" type="int" />
+ <param index="1" name="end" type="int" default="2147483647" />
+ <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">
@@ -481,7 +530,7 @@
</method>
<method name="sort_custom">
<return type="void" />
- <argument index="0" name="func" type="Callable" />
+ <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.
@@ -511,58 +560,58 @@
<operators>
<operator name="operator !=">
<return type="bool" />
- <argument index="0" name="right" type="Array" />
+ <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" />
- <argument index="0" name="right" 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" />
- <argument index="0" name="right" type="Array" />
+ <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" />
- <argument index="0" name="right" type="Array" />
+ <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" />
- <argument index="0" name="right" type="Array" />
+ <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" />
- <argument index="0" name="right" type="Array" />
+ <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" />
- <argument index="0" name="right" type="Array" />
+ <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" />
- <argument index="0" name="index" type="int" />
+ <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 0f2dd6587a..c766becce2 100644
--- a/doc/classes/ArrayMesh.xml
+++ b/doc/classes/ArrayMesh.xml
@@ -52,22 +52,22 @@
<methods>
<method name="add_blend_shape">
<return type="void" />
- <argument index="0" name="name" type="StringName" />
+ <param index="0" name="name" type="StringName" />
<description>
Adds name for a blend shape that will be added with [method add_surface_from_arrays]. Must be called before surface is added.
</description>
</method>
<method name="add_surface_from_arrays">
<return type="void" />
- <argument index="0" name="primitive" type="int" enum="Mesh.PrimitiveType" />
- <argument index="1" name="arrays" type="Array" />
- <argument index="2" name="blend_shapes" type="Array" default="[]" />
- <argument index="3" name="lods" type="Dictionary" default="{}" />
- <argument index="4" name="compress_flags" type="int" default="0" />
+ <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="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 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">
@@ -90,15 +90,15 @@
</method>
<method name="get_blend_shape_name" qualifiers="const">
<return type="StringName" />
- <argument index="0" name="index" type="int" />
+ <param index="0" name="index" type="int" />
<description>
Returns the name of the blend shape at this index.
</description>
</method>
<method name="lightmap_unwrap">
<return type="int" enum="Error" />
- <argument index="0" name="transform" type="Transform3D" />
- <argument index="1" name="texel_size" type="float" />
+ <param index="0" name="transform" type="Transform3D" />
+ <param index="1" name="texel_size" type="float" />
<description>
Will perform a UV unwrap on the [ArrayMesh] to prepare the mesh for lightmapping.
</description>
@@ -111,83 +111,83 @@
</method>
<method name="set_blend_shape_name">
<return type="void" />
- <argument index="0" name="index" type="int" />
- <argument index="1" name="name" type="StringName" />
+ <param index="0" name="index" type="int" />
+ <param index="1" name="name" type="StringName" />
<description>
Sets the name of the blend shape at this index.
</description>
</method>
<method name="surface_find_by_name" qualifiers="const">
<return type="int" />
- <argument index="0" name="name" type="String" />
+ <param index="0" name="name" type="String" />
<description>
Returns the index of the first surface with this name held within this [ArrayMesh]. If none are found, -1 is returned.
</description>
</method>
<method name="surface_get_array_index_len" qualifiers="const">
<return type="int" />
- <argument index="0" name="surf_idx" type="int" />
+ <param index="0" name="surf_idx" type="int" />
<description>
Returns the length in indices of the index array in the requested surface (see [method add_surface_from_arrays]).
</description>
</method>
<method name="surface_get_array_len" qualifiers="const">
<return type="int" />
- <argument index="0" name="surf_idx" type="int" />
+ <param index="0" name="surf_idx" type="int" />
<description>
Returns the length in vertices of the vertex array in the requested surface (see [method add_surface_from_arrays]).
</description>
</method>
<method name="surface_get_format" qualifiers="const">
<return type="int" />
- <argument index="0" name="surf_idx" type="int" />
+ <param index="0" name="surf_idx" type="int" />
<description>
Returns the format mask of the requested surface (see [method add_surface_from_arrays]).
</description>
</method>
<method name="surface_get_name" qualifiers="const">
<return type="String" />
- <argument index="0" name="surf_idx" type="int" />
+ <param index="0" name="surf_idx" type="int" />
<description>
Gets the name assigned to this surface.
</description>
</method>
<method name="surface_get_primitive_type" qualifiers="const">
<return type="int" enum="Mesh.PrimitiveType" />
- <argument index="0" name="surf_idx" type="int" />
+ <param index="0" name="surf_idx" type="int" />
<description>
Returns the primitive type of the requested surface (see [method add_surface_from_arrays]).
</description>
</method>
<method name="surface_set_name">
<return type="void" />
- <argument index="0" name="surf_idx" type="int" />
- <argument index="1" name="name" type="String" />
+ <param index="0" name="surf_idx" type="int" />
+ <param index="1" name="name" type="String" />
<description>
Sets a name for a given surface.
</description>
</method>
<method name="surface_update_attribute_region">
<return type="void" />
- <argument index="0" name="surf_idx" type="int" />
- <argument index="1" name="offset" type="int" />
- <argument index="2" name="data" type="PackedByteArray" />
+ <param index="0" name="surf_idx" type="int" />
+ <param index="1" name="offset" type="int" />
+ <param index="2" name="data" type="PackedByteArray" />
<description>
</description>
</method>
<method name="surface_update_skin_region">
<return type="void" />
- <argument index="0" name="surf_idx" type="int" />
- <argument index="1" name="offset" type="int" />
- <argument index="2" name="data" type="PackedByteArray" />
+ <param index="0" name="surf_idx" type="int" />
+ <param index="1" name="offset" type="int" />
+ <param index="2" name="data" type="PackedByteArray" />
<description>
</description>
</method>
<method name="surface_update_vertex_region">
<return type="void" />
- <argument index="0" name="surf_idx" type="int" />
- <argument index="1" name="offset" type="int" />
- <argument index="2" name="data" type="PackedByteArray" />
+ <param index="0" name="surf_idx" type="int" />
+ <param index="1" name="offset" type="int" />
+ <param index="2" name="data" type="PackedByteArray" />
<description>
</description>
</method>
diff --git a/doc/classes/ArrayOccluder3D.xml b/doc/classes/ArrayOccluder3D.xml
index 7f6bf93c8f..866427beeb 100644
--- a/doc/classes/ArrayOccluder3D.xml
+++ b/doc/classes/ArrayOccluder3D.xml
@@ -12,8 +12,8 @@
<methods>
<method name="set_arrays">
<return type="void" />
- <argument index="0" name="vertices" type="PackedVector3Array" />
- <argument index="1" name="indices" type="PackedInt32Array" />
+ <param index="0" name="vertices" type="PackedVector3Array" />
+ <param index="1" name="indices" type="PackedInt32Array" />
<description>
</description>
</method>
diff --git a/doc/classes/AudioEffectAmplify.xml b/doc/classes/AudioEffectAmplify.xml
index 7ae0b06dad..43fa9d6ad3 100644
--- a/doc/classes/AudioEffectAmplify.xml
+++ b/doc/classes/AudioEffectAmplify.xml
@@ -2,12 +2,12 @@
<class name="AudioEffectAmplify" inherits="AudioEffect" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Adds an amplifying audio effect to an audio bus.
- Increases or decreases the volume of the selected audio bus.
</brief_description>
<description>
Increases or decreases the volume being routed through the audio bus.
</description>
<tutorials>
+ <link title="Audio buses">$DOCS_URL/tutorials/audio/audio_buses.html</link>
</tutorials>
<members>
<member name="volume_db" type="float" setter="set_volume_db" getter="get_volume_db" default="0.0">
diff --git a/doc/classes/AudioEffectBandLimitFilter.xml b/doc/classes/AudioEffectBandLimitFilter.xml
index 3635f122f2..4efa431714 100644
--- a/doc/classes/AudioEffectBandLimitFilter.xml
+++ b/doc/classes/AudioEffectBandLimitFilter.xml
@@ -7,5 +7,6 @@
Limits the frequencies in a range around the [member AudioEffectFilter.cutoff_hz] and allows frequencies outside of this range to pass.
</description>
<tutorials>
+ <link title="Audio buses">$DOCS_URL/tutorials/audio/audio_buses.html</link>
</tutorials>
</class>
diff --git a/doc/classes/AudioEffectBandPassFilter.xml b/doc/classes/AudioEffectBandPassFilter.xml
index 5e7713f3d4..6820b2c9f8 100644
--- a/doc/classes/AudioEffectBandPassFilter.xml
+++ b/doc/classes/AudioEffectBandPassFilter.xml
@@ -7,5 +7,6 @@
Attenuates the frequencies inside of a range around the [member AudioEffectFilter.cutoff_hz] and cuts frequencies outside of this band.
</description>
<tutorials>
+ <link title="Audio buses">$DOCS_URL/tutorials/audio/audio_buses.html</link>
</tutorials>
</class>
diff --git a/doc/classes/AudioEffectCapture.xml b/doc/classes/AudioEffectCapture.xml
index 5ab4403be5..c2a5ec3b45 100644
--- a/doc/classes/AudioEffectCapture.xml
+++ b/doc/classes/AudioEffectCapture.xml
@@ -5,16 +5,17 @@
</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.
+ 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.
</description>
<tutorials>
+ <link title="Audio buses">$DOCS_URL/tutorials/audio/audio_buses.html</link>
</tutorials>
<methods>
<method name="can_get_buffer" qualifiers="const">
<return type="bool" />
- <argument index="0" name="frames" type="int" />
+ <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">
@@ -25,10 +26,10 @@
</method>
<method name="get_buffer">
<return type="PackedVector2Array" />
- <argument index="0" name="frames" type="int" />
+ <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 ca04126da4..de168cdfb0 100644
--- a/doc/classes/AudioEffectChorus.xml
+++ b/doc/classes/AudioEffectChorus.xml
@@ -7,83 +7,84 @@
Adds a chorus audio effect. The effect applies a filter with voices to duplicate the audio source and manipulate it through the filter.
</description>
<tutorials>
+ <link title="Audio buses">$DOCS_URL/tutorials/audio/audio_buses.html</link>
</tutorials>
<methods>
<method name="get_voice_cutoff_hz" qualifiers="const">
<return type="float" />
- <argument index="0" name="voice_idx" type="int" />
+ <param index="0" name="voice_idx" type="int" />
<description>
</description>
</method>
<method name="get_voice_delay_ms" qualifiers="const">
<return type="float" />
- <argument index="0" name="voice_idx" type="int" />
+ <param index="0" name="voice_idx" type="int" />
<description>
</description>
</method>
<method name="get_voice_depth_ms" qualifiers="const">
<return type="float" />
- <argument index="0" name="voice_idx" type="int" />
+ <param index="0" name="voice_idx" type="int" />
<description>
</description>
</method>
<method name="get_voice_level_db" qualifiers="const">
<return type="float" />
- <argument index="0" name="voice_idx" type="int" />
+ <param index="0" name="voice_idx" type="int" />
<description>
</description>
</method>
<method name="get_voice_pan" qualifiers="const">
<return type="float" />
- <argument index="0" name="voice_idx" type="int" />
+ <param index="0" name="voice_idx" type="int" />
<description>
</description>
</method>
<method name="get_voice_rate_hz" qualifiers="const">
<return type="float" />
- <argument index="0" name="voice_idx" type="int" />
+ <param index="0" name="voice_idx" type="int" />
<description>
</description>
</method>
<method name="set_voice_cutoff_hz">
<return type="void" />
- <argument index="0" name="voice_idx" type="int" />
- <argument index="1" name="cutoff_hz" type="float" />
+ <param index="0" name="voice_idx" type="int" />
+ <param index="1" name="cutoff_hz" type="float" />
<description>
</description>
</method>
<method name="set_voice_delay_ms">
<return type="void" />
- <argument index="0" name="voice_idx" type="int" />
- <argument index="1" name="delay_ms" type="float" />
+ <param index="0" name="voice_idx" type="int" />
+ <param index="1" name="delay_ms" type="float" />
<description>
</description>
</method>
<method name="set_voice_depth_ms">
<return type="void" />
- <argument index="0" name="voice_idx" type="int" />
- <argument index="1" name="depth_ms" type="float" />
+ <param index="0" name="voice_idx" type="int" />
+ <param index="1" name="depth_ms" type="float" />
<description>
</description>
</method>
<method name="set_voice_level_db">
<return type="void" />
- <argument index="0" name="voice_idx" type="int" />
- <argument index="1" name="level_db" type="float" />
+ <param index="0" name="voice_idx" type="int" />
+ <param index="1" name="level_db" type="float" />
<description>
</description>
</method>
<method name="set_voice_pan">
<return type="void" />
- <argument index="0" name="voice_idx" type="int" />
- <argument index="1" name="pan" type="float" />
+ <param index="0" name="voice_idx" type="int" />
+ <param index="1" name="pan" type="float" />
<description>
</description>
</method>
<method name="set_voice_rate_hz">
<return type="void" />
- <argument index="0" name="voice_idx" type="int" />
- <argument index="1" name="rate_hz" type="float" />
+ <param index="0" name="voice_idx" type="int" />
+ <param index="1" name="rate_hz" type="float" />
<description>
</description>
</method>
@@ -165,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/AudioEffectCompressor.xml b/doc/classes/AudioEffectCompressor.xml
index 5ad948feba..8793ec0a02 100644
--- a/doc/classes/AudioEffectCompressor.xml
+++ b/doc/classes/AudioEffectCompressor.xml
@@ -13,6 +13,7 @@
- Accentuates transients by using a wider attack, making effects sound more punchy.
</description>
<tutorials>
+ <link title="Audio buses">$DOCS_URL/tutorials/audio/audio_buses.html</link>
</tutorials>
<members>
<member name="attack_us" type="float" setter="set_attack_us" getter="get_attack_us" default="20.0">
diff --git a/doc/classes/AudioEffectDelay.xml b/doc/classes/AudioEffectDelay.xml
index 8a95e315cd..b9ae12204e 100644
--- a/doc/classes/AudioEffectDelay.xml
+++ b/doc/classes/AudioEffectDelay.xml
@@ -8,45 +8,46 @@
Plays input signal back after a period of time. The delayed signal may be played back multiple times to create the sound of a repeating, decaying echo. Delay effects range from a subtle echo effect to a pronounced blending of previous sounds with new sounds.
</description>
<tutorials>
+ <link title="Audio buses">$DOCS_URL/tutorials/audio/audio_buses.html</link>
</tutorials>
<members>
<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/AudioEffectEQ.xml b/doc/classes/AudioEffectEQ.xml
index 908ae956ed..6e4040c16e 100644
--- a/doc/classes/AudioEffectEQ.xml
+++ b/doc/classes/AudioEffectEQ.xml
@@ -8,6 +8,7 @@
AudioEffectEQ gives you control over frequencies. Use it to compensate for existing deficiencies in audio. AudioEffectEQs are useful on the Master bus to completely master a mix and give it more character. They are also useful when a game is run on a mobile device, to adjust the mix to that kind of speakers (it can be added but disabled when headphones are plugged).
</description>
<tutorials>
+ <link title="Audio buses">$DOCS_URL/tutorials/audio/audio_buses.html</link>
</tutorials>
<methods>
<method name="get_band_count" qualifiers="const">
@@ -18,15 +19,15 @@
</method>
<method name="get_band_gain_db" qualifiers="const">
<return type="float" />
- <argument index="0" name="band_idx" type="int" />
+ <param index="0" name="band_idx" type="int" />
<description>
Returns the band's gain at the specified index, in dB.
</description>
</method>
<method name="set_band_gain_db">
<return type="void" />
- <argument index="0" name="band_idx" type="int" />
- <argument index="1" name="volume_db" type="float" />
+ <param index="0" name="band_idx" type="int" />
+ <param index="1" name="volume_db" type="float" />
<description>
Sets band's gain at the specified index, in dB.
</description>
diff --git a/doc/classes/AudioEffectEQ10.xml b/doc/classes/AudioEffectEQ10.xml
index 0b03ea99dd..8cf53b9df2 100644
--- a/doc/classes/AudioEffectEQ10.xml
+++ b/doc/classes/AudioEffectEQ10.xml
@@ -19,5 +19,6 @@
See also [AudioEffectEQ], [AudioEffectEQ6], [AudioEffectEQ21].
</description>
<tutorials>
+ <link title="Audio buses">$DOCS_URL/tutorials/audio/audio_buses.html</link>
</tutorials>
</class>
diff --git a/doc/classes/AudioEffectEQ21.xml b/doc/classes/AudioEffectEQ21.xml
index 6861a74596..2eed3b4836 100644
--- a/doc/classes/AudioEffectEQ21.xml
+++ b/doc/classes/AudioEffectEQ21.xml
@@ -30,5 +30,6 @@
See also [AudioEffectEQ], [AudioEffectEQ6], [AudioEffectEQ10].
</description>
<tutorials>
+ <link title="Audio buses">$DOCS_URL/tutorials/audio/audio_buses.html</link>
</tutorials>
</class>
diff --git a/doc/classes/AudioEffectEQ6.xml b/doc/classes/AudioEffectEQ6.xml
index 5aea8efaa9..816d4b9b38 100644
--- a/doc/classes/AudioEffectEQ6.xml
+++ b/doc/classes/AudioEffectEQ6.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AudioEffectEQ6" inherits="AudioEffectEQ" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
- Adds a 6-band equalizer audio effect to an Audio bus. Gives you control over frequencies from 32 Hz to 10000 Hz.
+ Adds a 6-band equalizer audio effect to an audio bus. Gives you control over frequencies from 32 Hz to 10000 Hz.
Each frequency can be modulated between -60/+24 dB.
</brief_description>
<description>
@@ -15,5 +15,6 @@
See also [AudioEffectEQ], [AudioEffectEQ10], [AudioEffectEQ21].
</description>
<tutorials>
+ <link title="Audio buses">$DOCS_URL/tutorials/audio/audio_buses.html</link>
</tutorials>
</class>
diff --git a/doc/classes/AudioEffectHighPassFilter.xml b/doc/classes/AudioEffectHighPassFilter.xml
index 02d8dbfffc..53e6f3ca63 100644
--- a/doc/classes/AudioEffectHighPassFilter.xml
+++ b/doc/classes/AudioEffectHighPassFilter.xml
@@ -1,11 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AudioEffectHighPassFilter" inherits="AudioEffectFilter" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
- Adds a high-pass filter to the Audio Bus.
+ Adds a high-pass filter to the audio bus.
</brief_description>
<description>
Cuts frequencies lower than the [member AudioEffectFilter.cutoff_hz] and allows higher frequencies to pass.
</description>
<tutorials>
+ <link title="Audio buses">$DOCS_URL/tutorials/audio/audio_buses.html</link>
</tutorials>
</class>
diff --git a/doc/classes/AudioEffectHighShelfFilter.xml b/doc/classes/AudioEffectHighShelfFilter.xml
index bb5cf5c4a0..f2c20862fb 100644
--- a/doc/classes/AudioEffectHighShelfFilter.xml
+++ b/doc/classes/AudioEffectHighShelfFilter.xml
@@ -1,9 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AudioEffectHighShelfFilter" inherits="AudioEffectFilter" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
- Reduces all frequencies above the [member AudioEffectFilter.cutoff_hz].
+ Adds a high-shelf filter to the audio bus.
</brief_description>
<description>
+ Reduces all frequencies above the [member AudioEffectFilter.cutoff_hz].
</description>
<tutorials>
<link title="Audio buses">$DOCS_URL/tutorials/audio/audio_buses.html</link>
diff --git a/doc/classes/AudioEffectInstance.xml b/doc/classes/AudioEffectInstance.xml
index f50246d6ca..bc3d579f36 100644
--- a/doc/classes/AudioEffectInstance.xml
+++ b/doc/classes/AudioEffectInstance.xml
@@ -9,9 +9,9 @@
<methods>
<method name="_process" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="src_buffer" type="const void*" />
- <argument index="1" name="dst_buffer" type="AudioFrame*" />
- <argument index="2" name="frame_count" type="int" />
+ <param index="0" name="src_buffer" type="const void*" />
+ <param index="1" name="dst_buffer" type="AudioFrame*" />
+ <param index="2" name="frame_count" type="int" />
<description>
</description>
</method>
diff --git a/doc/classes/AudioEffectLimiter.xml b/doc/classes/AudioEffectLimiter.xml
index 3fd099b55e..e841889b2a 100644
--- a/doc/classes/AudioEffectLimiter.xml
+++ b/doc/classes/AudioEffectLimiter.xml
@@ -8,6 +8,7 @@
Soft clipping starts to reduce the peaks a little below the threshold level and progressively increases its effect as the input level increases such that the threshold is never exceeded.
</description>
<tutorials>
+ <link title="Audio buses">$DOCS_URL/tutorials/audio/audio_buses.html</link>
</tutorials>
<members>
<member name="ceiling_db" type="float" setter="set_ceiling_db" getter="get_ceiling_db" default="-0.1">
diff --git a/doc/classes/AudioEffectLowPassFilter.xml b/doc/classes/AudioEffectLowPassFilter.xml
index 8a9ca04354..b0577f19c3 100644
--- a/doc/classes/AudioEffectLowPassFilter.xml
+++ b/doc/classes/AudioEffectLowPassFilter.xml
@@ -1,11 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AudioEffectLowPassFilter" inherits="AudioEffectFilter" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
- Adds a low-pass filter to the Audio bus.
+ Adds a low-pass filter to the audio bus.
</brief_description>
<description>
Cuts frequencies higher than the [member AudioEffectFilter.cutoff_hz] and allows lower frequencies to pass.
</description>
<tutorials>
+ <link title="Audio buses">$DOCS_URL/tutorials/audio/audio_buses.html</link>
</tutorials>
</class>
diff --git a/doc/classes/AudioEffectLowShelfFilter.xml b/doc/classes/AudioEffectLowShelfFilter.xml
index 04cc1ab1d8..f654ba3612 100644
--- a/doc/classes/AudioEffectLowShelfFilter.xml
+++ b/doc/classes/AudioEffectLowShelfFilter.xml
@@ -1,9 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AudioEffectLowShelfFilter" inherits="AudioEffectFilter" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
- Reduces all frequencies below the [member AudioEffectFilter.cutoff_hz].
+ Adds a low-shelf filter to the audio bus.
</brief_description>
<description>
+ Reduces all frequencies below the [member AudioEffectFilter.cutoff_hz].
</description>
<tutorials>
<link title="Audio buses">$DOCS_URL/tutorials/audio/audio_buses.html</link>
diff --git a/doc/classes/AudioEffectNotchFilter.xml b/doc/classes/AudioEffectNotchFilter.xml
index a2cc764003..ad4577cfbc 100644
--- a/doc/classes/AudioEffectNotchFilter.xml
+++ b/doc/classes/AudioEffectNotchFilter.xml
@@ -7,5 +7,6 @@
Attenuates frequencies in a narrow band around the [member AudioEffectFilter.cutoff_hz] and cuts frequencies outside of this range.
</description>
<tutorials>
+ <link title="Audio buses">$DOCS_URL/tutorials/audio/audio_buses.html</link>
</tutorials>
</class>
diff --git a/doc/classes/AudioEffectPanner.xml b/doc/classes/AudioEffectPanner.xml
index 1dd2d9fa27..291e86214e 100644
--- a/doc/classes/AudioEffectPanner.xml
+++ b/doc/classes/AudioEffectPanner.xml
@@ -1,12 +1,13 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AudioEffectPanner" inherits="AudioEffect" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
- Adds a panner audio effect to an Audio bus. Pans sound left or right.
+ Adds a panner audio effect to an audio bus. Pans sound left or right.
</brief_description>
<description>
Determines how much of an audio signal is sent to the left and right buses.
</description>
<tutorials>
+ <link title="Audio buses">$DOCS_URL/tutorials/audio/audio_buses.html</link>
</tutorials>
<members>
<member name="pan" type="float" setter="set_pan" getter="get_pan" default="0.0">
diff --git a/doc/classes/AudioEffectPhaser.xml b/doc/classes/AudioEffectPhaser.xml
index 9c10052b6a..7aaf404352 100644
--- a/doc/classes/AudioEffectPhaser.xml
+++ b/doc/classes/AudioEffectPhaser.xml
@@ -1,13 +1,14 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AudioEffectPhaser" inherits="AudioEffect" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
- Adds a phaser audio effect to an Audio bus.
+ Adds a phaser audio effect to an audio bus.
Combines the original signal with a copy that is slightly out of phase with the original.
</brief_description>
<description>
Combines phase-shifted signals with the original signal. The movement of the phase-shifted signals is controlled using a low-frequency oscillator.
</description>
<tutorials>
+ <link title="Audio buses">$DOCS_URL/tutorials/audio/audio_buses.html</link>
</tutorials>
<members>
<member name="depth" type="float" setter="set_depth" getter="get_depth" default="1.0">
diff --git a/doc/classes/AudioEffectPitchShift.xml b/doc/classes/AudioEffectPitchShift.xml
index aab380aa72..952d432879 100644
--- a/doc/classes/AudioEffectPitchShift.xml
+++ b/doc/classes/AudioEffectPitchShift.xml
@@ -1,13 +1,14 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AudioEffectPitchShift" inherits="AudioEffect" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
- Adds a pitch-shifting audio effect to an Audio bus.
+ Adds a pitch-shifting audio effect to an audio bus.
Raises or lowers the pitch of original sound.
</brief_description>
<description>
Allows modulation of pitch independently of tempo. All frequencies can be increased/decreased with minimal effect on transients.
</description>
<tutorials>
+ <link title="Audio buses">$DOCS_URL/tutorials/audio/audio_buses.html</link>
</tutorials>
<members>
<member name="fft_size" type="int" setter="set_fft_size" getter="get_fft_size" enum="AudioEffectPitchShift.FFTSize" default="3">
diff --git a/doc/classes/AudioEffectRecord.xml b/doc/classes/AudioEffectRecord.xml
index 9728011bb2..ff034389fc 100644
--- a/doc/classes/AudioEffectRecord.xml
+++ b/doc/classes/AudioEffectRecord.xml
@@ -14,7 +14,7 @@
</tutorials>
<methods>
<method name="get_recording" qualifiers="const">
- <return type="AudioStreamSample" />
+ <return type="AudioStreamWAV" />
<description>
Returns the recorded sample.
</description>
@@ -27,15 +27,15 @@
</method>
<method name="set_recording_active">
<return type="void" />
- <argument index="0" name="record" type="bool" />
+ <param index="0" name="record" type="bool" />
<description>
If [code]true[/code], the sound will be recorded. Note that restarting the recording will remove the previously recorded sample.
</description>
</method>
</methods>
<members>
- <member name="format" type="int" setter="set_format" getter="get_format" enum="AudioStreamSample.Format" default="1">
- Specifies the format in which the sample will be recorded. See [enum AudioStreamSample.Format] for available formats.
+ <member name="format" type="int" setter="set_format" getter="get_format" enum="AudioStreamWAV.Format" default="1">
+ Specifies the format in which the sample will be recorded. See [enum AudioStreamWAV.Format] for available formats.
</member>
</members>
</class>
diff --git a/doc/classes/AudioEffectReverb.xml b/doc/classes/AudioEffectReverb.xml
index 5525102806..b024f06849 100644
--- a/doc/classes/AudioEffectReverb.xml
+++ b/doc/classes/AudioEffectReverb.xml
@@ -2,12 +2,12 @@
<class name="AudioEffectReverb" inherits="AudioEffect" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Adds a reverberation audio effect to an Audio bus.
- Simulates the sound of acoustic environments such as rooms, concert halls, caverns, or an open spaces.
</brief_description>
<description>
- Simulates rooms of different sizes. Its parameters can be adjusted to simulate the sound of a specific room.
+ Simulates the sound of acoustic environments such as rooms, concert halls, caverns, or an open spaces.
</description>
<tutorials>
+ <link title="Audio buses">$DOCS_URL/tutorials/audio/audio_buses.html</link>
<link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
</tutorials>
<members>
diff --git a/doc/classes/AudioEffectSpectrumAnalyzerInstance.xml b/doc/classes/AudioEffectSpectrumAnalyzerInstance.xml
index 08dd5a5d69..55ac78f197 100644
--- a/doc/classes/AudioEffectSpectrumAnalyzerInstance.xml
+++ b/doc/classes/AudioEffectSpectrumAnalyzerInstance.xml
@@ -9,9 +9,9 @@
<methods>
<method name="get_magnitude_for_frequency_range" qualifiers="const">
<return type="Vector2" />
- <argument index="0" name="from_hz" type="float" />
- <argument index="1" name="to_hz" type="float" />
- <argument index="2" name="mode" type="int" enum="AudioEffectSpectrumAnalyzerInstance.MagnitudeMode" default="1" />
+ <param index="0" name="from_hz" type="float" />
+ <param index="1" name="to_hz" type="float" />
+ <param index="2" name="mode" type="int" enum="AudioEffectSpectrumAnalyzerInstance.MagnitudeMode" default="1" />
<description>
</description>
</method>
diff --git a/doc/classes/AudioEffectStereoEnhance.xml b/doc/classes/AudioEffectStereoEnhance.xml
index ff176c6ad8..088d61189f 100644
--- a/doc/classes/AudioEffectStereoEnhance.xml
+++ b/doc/classes/AudioEffectStereoEnhance.xml
@@ -1,13 +1,17 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AudioEffectStereoEnhance" inherits="AudioEffect" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
+ An audio effect that can be used to adjust the intensity of stereo panning.
</brief_description>
<description>
+ An audio effect that can be used to adjust the intensity of stereo panning.
</description>
<tutorials>
+ <link title="Audio buses">$DOCS_URL/tutorials/audio/audio_buses.html</link>
</tutorials>
<members>
<member name="pan_pullout" type="float" setter="set_pan_pullout" getter="get_pan_pullout" default="1.0">
+ Values greater than 1.0 increase intensity of any panning on audio passing through this effect, whereas values less than 1.0 will decrease the panning intensity. A value of 0.0 will downmix audio to mono.
</member>
<member name="surround" type="float" setter="set_surround" getter="get_surround" default="0.0">
</member>
diff --git a/doc/classes/AudioServer.xml b/doc/classes/AudioServer.xml
index 1e076654fb..8dc80e3bdc 100644
--- a/doc/classes/AudioServer.xml
+++ b/doc/classes/AudioServer.xml
@@ -15,22 +15,22 @@
<methods>
<method name="add_bus">
<return type="void" />
- <argument index="0" name="at_position" type="int" default="-1" />
+ <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">
<return type="void" />
- <argument index="0" name="bus_idx" type="int" />
- <argument index="1" name="effect" type="AudioEffect" />
- <argument index="2" name="at_position" type="int" default="-1" />
+ <param index="0" name="bus_idx" type="int" />
+ <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.
</description>
@@ -43,81 +43,81 @@
</method>
<method name="get_bus_channels" qualifiers="const">
<return type="int" />
- <argument index="0" name="bus_idx" 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">
<return type="AudioEffect" />
- <argument index="0" name="bus_idx" type="int" />
- <argument index="1" name="effect_idx" type="int" />
+ <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" />
- <argument index="0" name="bus_idx" 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">
<return type="AudioEffectInstance" />
- <argument index="0" name="bus_idx" type="int" />
- <argument index="1" name="effect_idx" type="int" />
- <argument index="2" name="channel" type="int" default="0" />
+ <param index="0" name="bus_idx" type="int" />
+ <param index="1" name="effect_idx" type="int" />
+ <param index="2" name="channel" type="int" default="0" />
<description>
Returns the [AudioEffectInstance] assigned to the given bus and effect indices (and optionally channel).
</description>
</method>
<method name="get_bus_index" qualifiers="const">
<return type="int" />
- <argument index="0" name="bus_name" type="StringName" />
+ <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" />
- <argument index="0" name="bus_idx" type="int" />
+ <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">
<return type="float" />
- <argument index="0" name="bus_idx" type="int" />
- <argument index="1" name="channel" type="int" />
+ <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">
<return type="float" />
- <argument index="0" name="bus_idx" type="int" />
- <argument index="1" name="channel" type="int" />
+ <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" />
- <argument index="0" name="bus_idx" type="int" />
+ <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" />
- <argument index="0" name="bus_idx" type="int" />
+ <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>
@@ -154,31 +154,31 @@
</method>
<method name="is_bus_bypassing_effects" qualifiers="const">
<return type="bool" />
- <argument index="0" name="bus_idx" type="int" />
+ <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">
<return type="bool" />
- <argument index="0" name="bus_idx" type="int" />
- <argument index="1" name="effect_idx" type="int" />
+ <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" />
- <argument index="0" name="bus_idx" type="int" />
+ <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" />
- <argument index="0" name="bus_idx" type="int" />
+ <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">
@@ -190,98 +190,104 @@
</method>
<method name="move_bus">
<return type="void" />
- <argument index="0" name="index" type="int" />
- <argument index="1" name="to_index" type="int" />
+ <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" />
- <argument index="0" name="index" type="int" />
+ <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">
<return type="void" />
- <argument index="0" name="bus_idx" type="int" />
- <argument index="1" name="effect_idx" type="int" />
+ <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">
<return type="void" />
- <argument index="0" name="bus_idx" type="int" />
- <argument index="1" name="enable" type="bool" />
+ <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">
<return type="void" />
- <argument index="0" name="bus_idx" type="int" />
- <argument index="1" name="effect_idx" type="int" />
- <argument index="2" name="enabled" type="bool" />
+ <param index="0" name="bus_idx" type="int" />
+ <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">
<return type="void" />
- <argument index="0" name="bus_layout" type="AudioBusLayout" />
+ <param index="0" name="bus_layout" type="AudioBusLayout" />
<description>
Overwrites the currently used [AudioBusLayout].
</description>
</method>
<method name="set_bus_mute">
<return type="void" />
- <argument index="0" name="bus_idx" type="int" />
- <argument index="1" name="enable" type="bool" />
+ <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">
<return type="void" />
- <argument index="0" name="bus_idx" type="int" />
- <argument index="1" name="name" type="String" />
+ <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">
<return type="void" />
- <argument index="0" name="bus_idx" type="int" />
- <argument index="1" name="send" type="StringName" />
+ <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">
<return type="void" />
- <argument index="0" name="bus_idx" type="int" />
- <argument index="1" name="enable" type="bool" />
+ <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">
<return type="void" />
- <argument index="0" name="bus_idx" type="int" />
- <argument index="1" name="volume_db" type="float" />
+ <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 [param bus_idx] to [param volume_db].
+ </description>
+ </method>
+ <method name="set_enable_tagging_used_audio_streams">
+ <return type="void" />
+ <param index="0" name="enable" type="bool" />
<description>
- Sets the volume of the bus at index [code]bus_idx[/code] to [code]volume_db[/code].
</description>
</method>
<method name="swap_bus_effects">
<return type="void" />
- <argument index="0" name="bus_idx" type="int" />
- <argument index="1" name="effect_idx" type="int" />
- <argument index="2" name="by_effect_idx" type="int" />
+ <param index="0" name="bus_idx" type="int" />
+ <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">
diff --git a/doc/classes/AudioStream.xml b/doc/classes/AudioStream.xml
index 6343da6eed..7645cafe86 100644
--- a/doc/classes/AudioStream.xml
+++ b/doc/classes/AudioStream.xml
@@ -4,7 +4,7 @@
Base class for audio streams.
</brief_description>
<description>
- Base class for audio streams. Audio streams are used for sound effects and music playback, and support WAV (via [AudioStreamSample]) and OGG (via [AudioStreamOGGVorbis]) file formats.
+ Base class for audio streams. Audio streams are used for sound effects and music playback, and support WAV (via [AudioStreamWAV]) and Ogg (via [AudioStreamOggVorbis]) file formats.
</description>
<tutorials>
<link title="Audio streams">$DOCS_URL/tutorials/audio/audio_streams.html</link>
@@ -13,6 +13,16 @@
<link title="Audio Spectrum Demo">https://godotengine.org/asset-library/asset/528</link>
</tutorials>
<methods>
+ <method name="_get_beat_count" qualifiers="virtual const">
+ <return type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="_get_bpm" qualifiers="virtual const">
+ <return type="float" />
+ <description>
+ </description>
+ </method>
<method name="_get_length" qualifiers="virtual const">
<return type="float" />
<description>
@@ -23,7 +33,7 @@
<description>
</description>
</method>
- <method name="_instance_playback" qualifiers="virtual const">
+ <method name="_instantiate_playback" qualifiers="virtual const">
<return type="AudioStreamPlayback" />
<description>
</description>
@@ -39,10 +49,10 @@
Returns the length of the audio stream in seconds.
</description>
</method>
- <method name="instance_playback">
+ <method name="instantiate_playback">
<return type="AudioStreamPlayback" />
<description>
- Returns an AudioStreamPlayback. Useful for when you want to extend `_instance_playback` but call `instance_playback` from an internally held AudioStream subresource. An example of this can be found in the source files for `AudioStreamRandomPitch::instance_playback`.
+ Returns an AudioStreamPlayback. Useful for when you want to extend [method _instantiate_playback] but call [method instantiate_playback] from an internally held AudioStream subresource. An example of this can be found in the source files for [code]AudioStreamRandomPitch::instantiate_playback[/code].
</description>
</method>
<method name="is_monophonic" qualifiers="const">
diff --git a/doc/classes/AudioStreamGeneratorPlayback.xml b/doc/classes/AudioStreamGeneratorPlayback.xml
index 06c285bff7..1c02dbd3ce 100644
--- a/doc/classes/AudioStreamGeneratorPlayback.xml
+++ b/doc/classes/AudioStreamGeneratorPlayback.xml
@@ -13,9 +13,9 @@
<methods>
<method name="can_push_buffer" qualifiers="const">
<return type="bool" />
- <argument index="0" name="amount" type="int" />
+ <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">
@@ -37,14 +37,14 @@
</method>
<method name="push_buffer">
<return type="bool" />
- <argument index="0" name="frames" type="PackedVector2Array" />
+ <param index="0" name="frames" type="PackedVector2Array" />
<description>
Pushes several audio data frames to the buffer. This is usually more efficient than [method push_frame] in C# and compiled languages via GDExtension, but [method push_buffer] may be [i]less[/i] efficient in GDScript.
</description>
</method>
<method name="push_frame">
<return type="bool" />
- <argument index="0" name="frame" type="Vector2" />
+ <param index="0" name="frame" type="Vector2" />
<description>
Pushes a single audio data frame to the buffer. This is usually less efficient than [method push_buffer] in C# and compiled languages via GDExtension, but [method push_frame] may be [i]more[/i] efficient in GDScript.
</description>
diff --git a/doc/classes/AudioStreamPlayback.xml b/doc/classes/AudioStreamPlayback.xml
index 1909c4b621..e80c112f16 100644
--- a/doc/classes/AudioStreamPlayback.xml
+++ b/doc/classes/AudioStreamPlayback.xml
@@ -4,7 +4,7 @@
Meta class for playing back audio.
</brief_description>
<description>
- Can play, loop, pause a scroll through audio. See [AudioStream] and [AudioStreamOGGVorbis] for usage.
+ Can play, loop, pause a scroll through audio. See [AudioStream] and [AudioStreamOggVorbis] for usage.
</description>
<tutorials>
<link title="Audio Generator Demo">https://godotengine.org/asset-library/asset/526</link>
@@ -27,21 +27,21 @@
</method>
<method name="_mix" qualifiers="virtual">
<return type="int" />
- <argument index="0" name="buffer" type="AudioFrame*" />
- <argument index="1" name="rate_scale" type="float" />
- <argument index="2" name="frames" type="int" />
+ <param index="0" name="buffer" type="AudioFrame*" />
+ <param index="1" name="rate_scale" type="float" />
+ <param index="2" name="frames" type="int" />
<description>
</description>
</method>
<method name="_seek" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="position" type="float" />
+ <param index="0" name="position" type="float" />
<description>
</description>
</method>
<method name="_start" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="from_pos" type="float" />
+ <param index="0" name="from_pos" type="float" />
<description>
</description>
</method>
@@ -50,5 +50,10 @@
<description>
</description>
</method>
+ <method name="_tag_used_streams" qualifiers="virtual">
+ <return type="void" />
+ <description>
+ </description>
+ </method>
</methods>
</class>
diff --git a/doc/classes/AudioStreamPlaybackResampled.xml b/doc/classes/AudioStreamPlaybackResampled.xml
index eb41e4256e..cc2268f145 100644
--- a/doc/classes/AudioStreamPlaybackResampled.xml
+++ b/doc/classes/AudioStreamPlaybackResampled.xml
@@ -14,8 +14,8 @@
</method>
<method name="_mix_resampled" qualifiers="virtual">
<return type="int" />
- <argument index="0" name="dst_buffer" type="AudioFrame*" />
- <argument index="1" name="frame_count" type="int" />
+ <param index="0" name="dst_buffer" type="AudioFrame*" />
+ <param index="1" name="frame_count" type="int" />
<description>
</description>
</method>
diff --git a/doc/classes/AudioStreamPlayer.xml b/doc/classes/AudioStreamPlayer.xml
index 26fe1278f7..06e183f4e2 100644
--- a/doc/classes/AudioStreamPlayer.xml
+++ b/doc/classes/AudioStreamPlayer.xml
@@ -30,14 +30,14 @@
</method>
<method name="play">
<return type="void" />
- <argument index="0" name="from_position" type="float" default="0.0" />
+ <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">
<return type="void" />
- <argument index="0" name="to_position" type="float" />
+ <param index="0" name="to_position" type="float" />
<description>
Sets the position from which audio will be played, in seconds.
</description>
@@ -55,6 +55,7 @@
</member>
<member name="bus" type="StringName" setter="set_bus" getter="get_bus" default="&amp;&quot;Master&quot;">
Bus on which this audio is playing.
+ [b]Note:[/b] When setting this property, keep in mind that no validation is performed to see if the given name matches an existing bus. This is because audio bus layouts might be loaded after this property is set. If this given name can't be resolved at runtime, it will fall back to [code]"Master"[/code].
</member>
<member name="max_polyphony" type="int" setter="set_max_polyphony" getter="get_max_polyphony" default="1">
The maximum number of sounds this node can play at the same time. Playing additional sounds after this value is reached will cut off the oldest sounds.
diff --git a/doc/classes/AudioStreamPlayer2D.xml b/doc/classes/AudioStreamPlayer2D.xml
index 7d0470f396..ae86fd0e66 100644
--- a/doc/classes/AudioStreamPlayer2D.xml
+++ b/doc/classes/AudioStreamPlayer2D.xml
@@ -4,7 +4,8 @@
Plays positional sound in 2D space.
</brief_description>
<description>
- Plays audio that dampens with distance from screen center.
+ Plays audio that dampens with distance from a given position.
+ By default, audio is heard from the screen center. This can be changed by adding an [AudioListener2D] node to the scene and enabling it by calling [method AudioListener2D.make_current] on it.
See also [AudioStreamPlayer] to play a sound non-positionally.
[b]Note:[/b] Hiding an [AudioStreamPlayer2D] node does not disable its audio output. To temporarily disable an [AudioStreamPlayer2D]'s audio output, set [member volume_db] to a very low value like [code]-100[/code] (which isn't audible to human hearing).
</description>
@@ -26,14 +27,14 @@
</method>
<method name="play">
<return type="void" />
- <argument index="0" name="from_position" type="float" default="0.0" />
+ <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">
<return type="void" />
- <argument index="0" name="to_position" type="float" />
+ <param index="0" name="to_position" type="float" />
<description>
Sets the position from which audio will be played, in seconds.
</description>
@@ -57,6 +58,7 @@
</member>
<member name="bus" type="StringName" setter="set_bus" getter="get_bus" default="&amp;&quot;Master&quot;">
Bus on which this audio is playing.
+ [b]Note:[/b] When setting this property, keep in mind that no validation is performed to see if the given name matches an existing bus. This is because audio bus layouts might be loaded after this property is set. If this given name can't be resolved at runtime, it will fall back to [code]"Master"[/code].
</member>
<member name="max_distance" type="float" setter="set_max_distance" getter="get_max_distance" default="2000.0">
Maximum distance from which audio is still hearable.
@@ -64,6 +66,9 @@
<member name="max_polyphony" type="int" setter="set_max_polyphony" getter="get_max_polyphony" default="1">
The maximum number of sounds this node can play at the same time. Playing additional sounds after this value is reached will cut off the oldest sounds.
</member>
+ <member name="panning_strength" type="float" setter="set_panning_strength" getter="get_panning_strength" default="1.0">
+ Scales the panning strength for this node by multiplying the base [member ProjectSettings.audio/general/2d_panning_strength] with this factor. Higher values will pan audio from left to right more dramatically than lower values.
+ </member>
<member name="pitch_scale" type="float" setter="set_pitch_scale" getter="get_pitch_scale" default="1.0">
The pitch and the tempo of the audio, as a multiplier of the audio sample's sample rate.
</member>
diff --git a/doc/classes/AudioStreamPlayer3D.xml b/doc/classes/AudioStreamPlayer3D.xml
index 8356596f54..02192a9b7c 100644
--- a/doc/classes/AudioStreamPlayer3D.xml
+++ b/doc/classes/AudioStreamPlayer3D.xml
@@ -5,7 +5,7 @@
</brief_description>
<description>
Plays a sound effect with directed sound effects, dampens with distance if needed, generates effect of hearable position in space. For greater realism, a low-pass filter is automatically applied to distant sounds. This can be disabled by setting [member attenuation_filter_cutoff_hz] to [code]20500[/code].
- By default, audio is heard from the camera position. This can be changed by adding a [AudioListener3D] node to the scene and enabling it by calling [method AudioListener3D.make_current] on it.
+ 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).
</description>
@@ -27,14 +27,14 @@
</method>
<method name="play">
<return type="void" />
- <argument index="0" name="from_position" type="float" default="0.0" />
+ <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">
<return type="void" />
- <argument index="0" name="to_position" type="float" />
+ <param index="0" name="to_position" type="float" />
<description>
Sets the position from which audio will be played, in seconds.
</description>
@@ -64,6 +64,7 @@
</member>
<member name="bus" type="StringName" setter="set_bus" getter="get_bus" default="&amp;&quot;Master&quot;">
The bus on which this audio is playing.
+ [b]Note:[/b] When setting this property, keep in mind that no validation is performed to see if the given name matches an existing bus. This is because audio bus layouts might be loaded after this property is set. If this given name can't be resolved at runtime, it will fall back to [code]"Master"[/code].
</member>
<member name="doppler_tracking" type="int" setter="set_doppler_tracking" getter="get_doppler_tracking" enum="AudioStreamPlayer3D.DopplerTracking" default="0">
Decides in which step the Doppler effect should be calculated.
@@ -86,6 +87,9 @@
<member name="max_polyphony" type="int" setter="set_max_polyphony" getter="get_max_polyphony" default="1">
The maximum number of sounds this node can play at the same time. Playing additional sounds after this value is reached will cut off the oldest sounds.
</member>
+ <member name="panning_strength" type="float" setter="set_panning_strength" getter="get_panning_strength" default="1.0">
+ Scales the panning strength for this node by multiplying the base [member ProjectSettings.audio/general/3d_panning_strength] with this factor. Higher values will pan audio from left to right more dramatically than lower values.
+ </member>
<member name="pitch_scale" type="float" setter="set_pitch_scale" getter="get_pitch_scale" default="1.0">
The pitch and the tempo of the audio, as a multiplier of the audio sample's sample rate.
</member>
diff --git a/doc/classes/AudioStreamRandomizer.xml b/doc/classes/AudioStreamRandomizer.xml
index 0eb733582a..5490770b7d 100644
--- a/doc/classes/AudioStreamRandomizer.xml
+++ b/doc/classes/AudioStreamRandomizer.xml
@@ -11,52 +11,52 @@
<methods>
<method name="add_stream">
<return type="void" />
- <argument index="0" name="index" type="int" />
+ <param index="0" name="index" type="int" />
<description>
Insert a stream at the specified index.
</description>
</method>
<method name="get_stream" qualifiers="const">
<return type="AudioStream" />
- <argument index="0" name="index" type="int" />
+ <param index="0" name="index" type="int" />
<description>
Returns the stream at the specified index.
</description>
</method>
<method name="get_stream_probability_weight" qualifiers="const">
<return type="float" />
- <argument index="0" name="index" type="int" />
+ <param index="0" name="index" type="int" />
<description>
Returns the probability weight associated with the stream at the given index.
</description>
</method>
<method name="move_stream">
<return type="void" />
- <argument index="0" name="index_from" type="int" />
- <argument index="1" name="index_to" type="int" />
+ <param index="0" name="index_from" type="int" />
+ <param index="1" name="index_to" type="int" />
<description>
Move a stream from one index to another.
</description>
</method>
<method name="remove_stream">
<return type="void" />
- <argument index="0" name="index" type="int" />
+ <param index="0" name="index" type="int" />
<description>
Remove the stream at the specified index.
</description>
</method>
<method name="set_stream">
<return type="void" />
- <argument index="0" name="index" type="int" />
- <argument index="1" name="stream" type="AudioStream" />
+ <param index="0" name="index" type="int" />
+ <param index="1" name="stream" type="AudioStream" />
<description>
Set the AudioStream at the specified index.
</description>
</method>
<method name="set_stream_probability_weight">
<return type="void" />
- <argument index="0" name="index" type="int" />
- <argument index="1" name="weight" type="float" />
+ <param index="0" name="index" type="int" />
+ <param index="1" name="weight" type="float" />
<description>
Set the probability weight of the stream at the specified index. The higher this value, the more likely that the randomizer will choose this stream during random playback modes.
</description>
diff --git a/doc/classes/AudioStreamSample.xml b/doc/classes/AudioStreamWAV.xml
index 62f27ce876..9f057dfa45 100644
--- a/doc/classes/AudioStreamSample.xml
+++ b/doc/classes/AudioStreamWAV.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioStreamSample" inherits="AudioStream" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+<class name="AudioStreamWAV" inherits="AudioStream" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Stores audio data loaded from WAV files.
</brief_description>
<description>
- AudioStreamSample stores sound samples loaded from WAV files. To play the stored sound, use an [AudioStreamPlayer] (for non-positional audio) or [AudioStreamPlayer2D]/[AudioStreamPlayer3D] (for positional audio). The sound can be looped.
+ AudioStreamWAV stores sound samples loaded from WAV files. To play the stored sound, use an [AudioStreamPlayer] (for non-positional audio) or [AudioStreamPlayer2D]/[AudioStreamPlayer3D] (for positional audio). The sound can be looped.
This class can also be used to store dynamically-generated PCM audio data. See also [AudioStreamGenerator] for procedural audio generation.
</description>
<tutorials>
@@ -12,10 +12,10 @@
<methods>
<method name="save_to_wav">
<return type="int" enum="Error" />
- <argument index="0" name="path" type="String" />
+ <param index="0" name="path" type="String" />
<description>
- Saves the AudioStreamSample as a WAV file to [code]path[/code]. Samples with IMA ADPCM format can't be saved.
- [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>
@@ -24,7 +24,7 @@
Contains the audio data in bytes.
[b]Note:[/b] This property expects signed PCM8 data. To convert unsigned PCM8 to signed PCM8, subtract 128 from each byte.
</member>
- <member name="format" type="int" setter="set_format" getter="get_format" enum="AudioStreamSample.Format" default="0">
+ <member name="format" type="int" setter="set_format" getter="get_format" enum="AudioStreamWAV.Format" default="0">
Audio format. See [enum Format] constants for values.
</member>
<member name="loop_begin" type="int" setter="set_loop_begin" getter="get_loop_begin" default="0">
@@ -33,7 +33,7 @@
<member name="loop_end" type="int" setter="set_loop_end" getter="get_loop_end" default="0">
The loop end point (in number of samples, relative to the beginning of the sample). This information will be imported automatically from the WAV file if present.
</member>
- <member name="loop_mode" type="int" setter="set_loop_mode" getter="get_loop_mode" enum="AudioStreamSample.LoopMode" default="0">
+ <member name="loop_mode" type="int" setter="set_loop_mode" getter="get_loop_mode" enum="AudioStreamWAV.LoopMode" default="0">
The loop mode. This information will be imported automatically from the WAV file if present. See [enum LoopMode] constants for values.
</member>
<member name="mix_rate" type="int" setter="set_mix_rate" getter="get_mix_rate" default="44100">
diff --git a/doc/classes/BaseButton.xml b/doc/classes/BaseButton.xml
index 13fe75a3e3..629675132a 100644
--- a/doc/classes/BaseButton.xml
+++ b/doc/classes/BaseButton.xml
@@ -17,7 +17,7 @@
</method>
<method name="_toggled" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="button_pressed" type="bool" />
+ <param index="0" name="button_pressed" type="bool" />
<description>
Called when the button is toggled (only if [member toggle_mode] is active).
</description>
@@ -36,7 +36,7 @@
</method>
<method name="set_pressed_no_signal">
<return type="void" />
- <argument index="0" name="pressed" type="bool" />
+ <param index="0" name="pressed" type="bool" />
<description>
Changes the [member button_pressed] state of the button, without emitting [signal toggled]. Use when you just want to change the state of the button without sending the pressed event (e.g. when initializing scene). Only works if [member toggle_mode] is [code]true[/code].
[b]Note:[/b] This method doesn't unpress other buttons in [member button_group].
@@ -96,9 +96,9 @@
</description>
</signal>
<signal name="toggled">
- <argument index="0" name="button_pressed" type="bool" />
+ <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 4b6f6eec67..fcdf59e36e 100644
--- a/doc/classes/BaseMaterial3D.xml
+++ b/doc/classes/BaseMaterial3D.xml
@@ -12,62 +12,65 @@
<methods>
<method name="get_feature" qualifiers="const">
<return type="bool" />
- <argument index="0" name="feature" type="int" enum="BaseMaterial3D.Feature" />
+ <param index="0" name="feature" type="int" enum="BaseMaterial3D.Feature" />
<description>
Returns [code]true[/code], if the specified [enum Feature] is enabled.
</description>
</method>
<method name="get_flag" qualifiers="const">
<return type="bool" />
- <argument index="0" name="flag" type="int" enum="BaseMaterial3D.Flags" />
+ <param index="0" name="flag" type="int" enum="BaseMaterial3D.Flags" />
<description>
Returns [code]true[/code], if the specified flag is enabled. See [enum Flags] enumerator for options.
</description>
</method>
<method name="get_texture" qualifiers="const">
<return type="Texture2D" />
- <argument index="0" name="param" type="int" enum="BaseMaterial3D.TextureParam" />
+ <param index="0" name="param" type="int" enum="BaseMaterial3D.TextureParam" />
<description>
Returns the [Texture] associated with the specified [enum TextureParam].
</description>
</method>
<method name="set_feature">
<return type="void" />
- <argument index="0" name="feature" type="int" enum="BaseMaterial3D.Feature" />
- <argument index="1" name="enable" type="bool" />
+ <param index="0" name="feature" type="int" enum="BaseMaterial3D.Feature" />
+ <param index="1" name="enable" type="bool" />
<description>
If [code]true[/code], enables the specified [enum Feature]. Many features that are available in [BaseMaterial3D]s need to be enabled before use. This way the cost for using the feature is only incurred when specified. Features can also be enabled by setting the corresponding member to [code]true[/code].
</description>
</method>
<method name="set_flag">
<return type="void" />
- <argument index="0" name="flag" type="int" enum="BaseMaterial3D.Flags" />
- <argument index="1" name="enable" type="bool" />
+ <param index="0" name="flag" type="int" enum="BaseMaterial3D.Flags" />
+ <param index="1" name="enable" type="bool" />
<description>
If [code]true[/code], enables the specified flag. Flags are optional behavior that can be turned on and off. Only one flag can be enabled at a time with this function, the flag enumerators cannot be bit-masked together to enable or disable multiple flags at once. Flags can also be enabled by setting the corresponding member to [code]true[/code]. See [enum Flags] enumerator for options.
</description>
</method>
<method name="set_texture">
<return type="void" />
- <argument index="0" name="param" type="int" enum="BaseMaterial3D.TextureParam" />
- <argument index="1" name="texture" type="Texture2D" />
+ <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>
<members>
<member name="albedo_color" type="Color" setter="set_albedo" getter="get_albedo" default="Color(1, 1, 1, 1)">
The material's base color.
- </member>
- <member name="albedo_tex_force_srgb" type="bool" setter="set_flag" getter="get_flag" default="false">
- Forces a conversion of the [member albedo_texture] from sRGB space to linear space.
- </member>
- <member name="albedo_tex_msdf" type="bool" setter="set_flag" getter="get_flag" default="false">
- Enables multichannel signed distance field rendering shader. Use [member msdf_pixel_range] and [member msdf_outline_size] to configure MSDF paramenters.
+ [b]Note:[/b] If [member detail_enabled] is [code]true[/code] and a [member detail_albedo] texture is specified, [member albedo_color] will [i]not[/i] modulate the detail texture. This can be used to color partial areas of a material by not specifying an albedo texture and using a transparent [member detail_albedo] texture instead.
</member>
<member name="albedo_texture" type="Texture2D" setter="set_texture" getter="get_texture">
Texture to multiply by [member albedo_color]. Used for basic texturing of objects.
+ If the texture appears unexpectedly too dark or too bright, check [member albedo_texture_force_srgb].
+ </member>
+ <member name="albedo_texture_force_srgb" type="bool" setter="set_flag" getter="get_flag" default="false">
+ If [code]true[/code], forces a conversion of the [member albedo_texture] from sRGB color space to linear color space. See also [member vertex_color_is_srgb].
+ This should only be enabled when needed (typically when using a [ViewportTexture] as [member albedo_texture]). If [member albedo_texture_force_srgb] is [code]true[/code] when it shouldn't be, the texture will appear to be too dark. If [member albedo_texture_force_srgb] is [code]false[/code] when it shouldn't be, the texture will appear to be too bright.
+ </member>
+ <member name="albedo_texture_msdf" type="bool" setter="set_flag" getter="get_flag" default="false">
+ Enables multichannel signed distance field rendering shader. Use [member msdf_pixel_range] and [member msdf_outline_size] to configure MSDF parameters.
</member>
<member name="alpha_antialiasing_edge" type="float" setter="set_alpha_antialiasing_edge" getter="get_alpha_antialiasing_edge">
Threshold at which antialiasing will be applied on the alpha channel.
@@ -148,19 +151,20 @@
Determines when depth rendering takes place. See [enum DepthDrawMode]. See also [member transparency].
</member>
<member name="detail_albedo" type="Texture2D" setter="set_texture" getter="get_texture">
- Texture that specifies the color of the detail overlay.
+ Texture that specifies the color of the detail overlay. [member detail_albedo]'s alpha channel is used as a mask, even when the material is opaque. To use a dedicated texture as a mask, see [member detail_mask].
+ [b]Note:[/b] [member detail_albedo] is [i]not[/i] modulated by [member albedo_color].
</member>
<member name="detail_blend_mode" type="int" setter="set_detail_blend_mode" getter="get_detail_blend_mode" enum="BaseMaterial3D.BlendMode" default="0">
Specifies how the [member detail_albedo] should blend with the current [code]ALBEDO[/code]. See [enum BlendMode] for options.
</member>
<member name="detail_enabled" type="bool" setter="set_feature" getter="get_feature" default="false">
- If [code]true[/code], enables the detail overlay. Detail is a second texture that gets mixed over the surface of the object based on [member detail_mask]. This can be used to add variation to objects, or to blend between two different albedo/normal textures.
+ If [code]true[/code], enables the detail overlay. Detail is a second texture that gets mixed over the surface of the object based on [member detail_mask] and [member detail_albedo]'s alpha channel. This can be used to add variation to objects, or to blend between two different albedo/normal textures.
</member>
<member name="detail_mask" type="Texture2D" setter="set_texture" getter="get_texture">
- Texture used to specify how the detail textures get blended with the base textures.
+ Texture used to specify how the detail textures get blended with the base textures. [member detail_mask] can be used together with [member detail_albedo]'s alpha channel (if any).
</member>
<member name="detail_normal" type="Texture2D" setter="set_texture" getter="get_texture">
- Texture that specifies the per-pixel normal of the detail overlay.
+ Texture that specifies the per-pixel normal of the detail overlay. The [member detail_normal] texture only uses the red and green channels; the blue and alpha channels are ignored. The normal read from [member detail_normal] is oriented around the surface normal provided by the [Mesh].
[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="detail_uv_layer" type="int" setter="set_detail_uv" getter="get_detail_uv" enum="BaseMaterial3D.DetailUV" default="0">
@@ -214,30 +218,44 @@
Grows object vertices in the direction of their normals.
</member>
<member name="heightmap_deep_parallax" type="bool" setter="set_heightmap_deep_parallax" getter="is_heightmap_deep_parallax_enabled" default="false">
+ If [code]true[/code], uses parallax occlusion mapping to represent depth in the material instead of simple offset mapping (see [member heightmap_enabled]). This results in a more convincing depth effect, but is much more expensive on the GPU. Only enable this on materials where it makes a significant visual difference.
</member>
<member name="heightmap_enabled" type="bool" setter="set_feature" getter="get_feature" default="false">
- If [code]true[/code], height mapping is enabled (also called "parallax mapping" or "depth mapping"). See also [member normal_enabled].
+ If [code]true[/code], height mapping is enabled (also called "parallax mapping" or "depth mapping"). See also [member normal_enabled]. Height mapping is a demanding feature on the GPU, so it should only be used on materials where it makes a significant visual difference.
[b]Note:[/b] Height mapping is not supported if triplanar mapping is used on the same material. The value of [member heightmap_enabled] will be ignored if [member uv1_triplanar] is enabled.
</member>
<member name="heightmap_flip_binormal" type="bool" setter="set_heightmap_deep_parallax_flip_binormal" getter="get_heightmap_deep_parallax_flip_binormal" default="false">
+ If [code]true[/code], flips the mesh's binormal vectors when interpreting the height map. If the heightmap effect looks strange when the camera moves (even with a reasonable [member heightmap_scale]), try setting this to [code]true[/code].
</member>
<member name="heightmap_flip_tangent" type="bool" setter="set_heightmap_deep_parallax_flip_tangent" getter="get_heightmap_deep_parallax_flip_tangent" default="false">
+ If [code]true[/code], flips the mesh's tangent vectors when interpreting the height map. If the heightmap effect looks strange when the camera moves (even with a reasonable [member heightmap_scale]), try setting this to [code]true[/code].
</member>
<member name="heightmap_flip_texture" type="bool" setter="set_flag" getter="get_flag" default="false">
+ If [code]true[/code], interprets the height map texture as a depth map, with brighter values appearing to be "lower" in altitude compared to darker values.
+ This can be enabled for compatibility with some materials authored for Godot 3.x. This is not necessary if the Invert import option was used to invert the depth map in Godot 3.x, in which case [member heightmap_flip_texture] should remain [code]false[/code].
</member>
<member name="heightmap_max_layers" type="int" setter="set_heightmap_deep_parallax_max_layers" getter="get_heightmap_deep_parallax_max_layers">
+ The number of layers to use for parallax occlusion mapping when the camera is up close to the material. Higher values result in a more convincing depth effect, especially in materials that have steep height changes. Higher values have a significant cost on the GPU, so it should only be increased on materials where it makes a significant visual difference.
+ [b]Note:[/b] Only effective if [member heightmap_deep_parallax] is [code]true[/code].
</member>
<member name="heightmap_min_layers" type="int" setter="set_heightmap_deep_parallax_min_layers" getter="get_heightmap_deep_parallax_min_layers">
+ The number of layers to use for parallax occlusion mapping when the camera is far away from the material. Higher values result in a more convincing depth effect, especially in materials that have steep height changes. Higher values have a significant cost on the GPU, so it should only be increased on materials where it makes a significant visual difference.
+ [b]Note:[/b] Only effective if [member heightmap_deep_parallax] is [code]true[/code].
</member>
- <member name="heightmap_scale" type="float" setter="set_heightmap_scale" getter="get_heightmap_scale" default="0.05">
+ <member name="heightmap_scale" type="float" setter="set_heightmap_scale" getter="get_heightmap_scale" default="5.0">
+ The heightmap scale to use for the parallax effect (see [member heightmap_enabled]). The default value is tuned so that the highest point (value = 255) appears to be 5 cm higher than the lowest point (value = 0). Higher values result in a deeper appearance, but may result in artifacts appearing when looking at the material from oblique angles, especially when the camera moves. Negative values can be used to invert the parallax effect, but this is different from inverting the texture using [member heightmap_flip_texture] as the material will also appear to be "closer" to the camera. In most cases, [member heightmap_scale] should be kept to a positive value.
+ [b]Note:[/b] If the height map effect looks strange regardless of this value, try adjusting [member heightmap_flip_binormal] and [member heightmap_flip_tangent]. See also [member heightmap_texture] for recommendations on authoring heightmap textures, as the way the heightmap texture is authored affects how [member heightmap_scale] behaves.
</member>
<member name="heightmap_texture" type="Texture2D" setter="set_texture" getter="get_texture">
+ The texture to use as a height map. See also [member heightmap_enabled].
+ For best results, the texture should be normalized (with [member heightmap_scale] reduced to compensate). In [url=https://gimp.org]GIMP[/url], this can be done using [b]Colors &gt; Auto &gt; Equalize[/b]. If the texture only uses a small part of its available range, the parallax effect may look strange, especially when the camera moves.
+ [b]Note:[/b] To reduce memory usage and improve loading times, you may be able to use a lower-resolution heightmap texture as most heightmaps are only comprised of low-frequency data.
</member>
<member name="metallic" type="float" setter="set_metallic" getter="get_metallic" default="0.0">
A high value makes the material appear more like a metal. Non-metals use their albedo as the diffuse color and add diffuse to the specular reflection. With non-metals, the reflection appears on top of the albedo color. Metals use their albedo as a multiplier to the specular reflection and set the diffuse color to black resulting in a tinted reflection. Materials work better when fully metal or fully non-metal, values between [code]0[/code] and [code]1[/code] should only be used for blending between metal and non-metal sections. To alter the amount of reflection use [member roughness].
</member>
<member name="metallic_specular" type="float" setter="set_specular" getter="get_specular" default="0.5">
- Sets the size of the specular lobe. The specular lobe is the bright spot that is reflected from light sources.
+ Adjusts the strength of specular reflections. Specular reflections are composed of scene reflections and the specular lobe which is the bright spot that is reflected from light sources. When set to [code]0.0[/code], no specular reflections will be visible. This differs from the [constant SPECULAR_DISABLED] [enum SpecularMode] as [constant SPECULAR_DISABLED] only applies to the specular lobe from the light source.
[b]Note:[/b] Unlike [member metallic], this is not energy-conserving, so it should be left at [code]0.5[/code] in most cases. See also [member roughness].
</member>
<member name="metallic_texture" type="Texture2D" setter="set_texture" getter="get_texture">
@@ -262,9 +280,10 @@
The strength of the normal map's effect.
</member>
<member name="normal_texture" type="Texture2D" setter="set_texture" getter="get_texture">
- Texture used to specify the normal at a given pixel. The [code]normal_texture[/code] only uses the red and green channels; the blue and alpha channels are ignored. The normal read from [code]normal_texture[/code] is oriented around the surface normal provided by the [Mesh].
+ Texture used to specify the normal at a given pixel. The [member normal_texture] only uses the red and green channels; the blue and alpha channels are ignored. The normal read from [member normal_texture] is oriented around the surface normal provided by the [Mesh].
[b]Note:[/b] The mesh must have both normals and tangents defined in its vertex data. Otherwise, the normal map won't render correctly and will only appear to darken the whole surface. If creating geometry with [SurfaceTool], you can use [method SurfaceTool.generate_normals] and [method SurfaceTool.generate_tangents] to automatically generate normals and tangents respectively.
[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.
+ [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">
</member>
@@ -354,6 +373,7 @@
</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.
+ [b]Note:[/b] [member heightmap_texture] is always sampled with linear filtering, even if nearest-neighbor filtering is selected here. This is to ensure the heightmap effect looks as intended. If you need sharper height transitions between pixels, resize the heightmap texture in an image editor with nearest-neighbor filtering.
</member>
<member name="texture_repeat" type="bool" setter="set_flag" getter="get_flag" default="true">
Repeat flags for the texture. See [enum TextureFilter] for options.
@@ -368,37 +388,40 @@
[b]Note:[/b] This is only effective for objects whose geometry is point-based rather than triangle-based. See also [member point_size].
</member>
<member name="uv1_offset" type="Vector3" setter="set_uv1_offset" getter="get_uv1_offset" default="Vector3(0, 0, 0)">
- How much to offset the [code]UV[/code] coordinates. This amount will be added to [code]UV[/code] in the vertex function. This can be used to offset a texture.
+ How much to offset the [code]UV[/code] coordinates. This amount will be added to [code]UV[/code] in the vertex function. This can be used to offset a texture. The Z component is used when [member uv1_triplanar] is enabled, but it is not used anywhere else.
</member>
<member name="uv1_scale" type="Vector3" setter="set_uv1_scale" getter="get_uv1_scale" default="Vector3(1, 1, 1)">
- How much to scale the [code]UV[/code] coordinates. This is multiplied by [code]UV[/code] in the vertex function.
+ How much to scale the [code]UV[/code] coordinates. This is multiplied by [code]UV[/code] in the vertex function. The Z component is used when [member uv1_triplanar] is enabled, but it is not used anywhere else.
</member>
<member name="uv1_triplanar" type="bool" setter="set_flag" getter="get_flag" default="false">
If [code]true[/code], instead of using [code]UV[/code] textures will use a triplanar texture lookup to determine how to apply textures. Triplanar uses the orientation of the object's surface to blend between texture coordinates. It reads from the source texture 3 times, once for each axis and then blends between the results based on how closely the pixel aligns with each axis. This is often used for natural features to get a realistic blend of materials. Because triplanar texturing requires many more texture reads per-pixel it is much slower than normal UV texturing. Additionally, because it is blending the texture between the three axes, it is unsuitable when you are trying to achieve crisp texturing.
</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].
</member>
<member name="uv2_offset" type="Vector3" setter="set_uv2_offset" getter="get_uv2_offset" default="Vector3(0, 0, 0)">
- How much to offset the [code]UV2[/code] coordinates. This amount will be added to [code]UV2[/code] in the vertex function. This can be used to offset a texture.
+ How much to offset the [code]UV2[/code] coordinates. This amount will be added to [code]UV2[/code] in the vertex function. This can be used to offset a texture. The Z component is used when [member uv2_triplanar] is enabled, but it is not used anywhere else.
</member>
<member name="uv2_scale" type="Vector3" setter="set_uv2_scale" getter="get_uv2_scale" default="Vector3(1, 1, 1)">
- How much to scale the [code]UV2[/code] coordinates. This is multiplied by [code]UV2[/code] in the vertex function.
+ How much to scale the [code]UV2[/code] coordinates. This is multiplied by [code]UV2[/code] in the vertex function. The Z component is used when [member uv2_triplanar] is enabled, but it is not used anywhere else.
</member>
<member name="uv2_triplanar" type="bool" setter="set_flag" getter="get_flag" default="false">
If [code]true[/code], instead of using [code]UV2[/code] textures will use a triplanar texture lookup to determine how to apply textures. Triplanar uses the orientation of the object's surface to blend between texture coordinates. It reads from the source texture 3 times, once for each axis and then blends between the results based on how closely the pixel aligns with each axis. This is often used for natural features to get a realistic blend of materials. Because triplanar texturing requires many more texture reads per-pixel it is much slower than normal UV texturing. Additionally, because it is blending the texture between the three axes, it is unsuitable when you are trying to achieve crisp texturing.
</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].
</member>
<member name="vertex_color_is_srgb" type="bool" setter="set_flag" getter="get_flag" default="false">
- If [code]true[/code], the model's vertex colors are processed as sRGB mode.
+ If [code]true[/code], vertex colors are considered to be stored in sRGB color space and are converted to linear color space during rendering. If [code]false[/code], vertex colors are considered to be stored in linear color space and are rendered as-is. See also [member albedo_texture_force_srgb].
+ [b]Note:[/b] Only effective when using the Vulkan Clustered or Vulkan Mobile backends.
</member>
<member name="vertex_color_use_as_albedo" type="bool" setter="set_flag" getter="get_flag" default="false">
If [code]true[/code], the vertex color is used as albedo color.
@@ -475,10 +498,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.
@@ -604,7 +627,8 @@
Set [code]ALBEDO[/code] to the per-vertex color specified in the mesh.
</constant>
<constant name="FLAG_SRGB_VERTEX_COLOR" value="2" enum="Flags">
- Vertex color is in sRGB space and needs to be converted to linear. Only applies in the Vulkan renderer.
+ Vertex colors are considered to be stored in sRGB color space and are converted to linear color space during rendering. See also [member vertex_color_is_srgb].
+ [b]Note:[/b] Only effective when using the Vulkan Clustered or Vulkan Mobile backends.
</constant>
<constant name="FLAG_USE_POINT_SIZE" value="3" enum="Flags">
Uses point size to alter the size of primitive points. Also changes the albedo texture lookup to use [code]POINT_COORD[/code] instead of [code]UV[/code].
@@ -634,7 +658,7 @@
Use [code]UV2[/code] coordinates to look up from the [member emission_texture].
</constant>
<constant name="FLAG_ALBEDO_TEXTURE_FORCE_SRGB" value="12" enum="Flags">
- Forces the shader to convert albedo from sRGB space to linear space.
+ Forces the shader to convert albedo from sRGB space to linear space. See also [member albedo_texture_force_srgb].
</constant>
<constant name="FLAG_DONT_RECEIVE_SHADOWS" value="13" enum="Flags">
Disables receiving shadows from other objects.
@@ -709,7 +733,7 @@
Used to read from the alpha channel of a texture.
</constant>
<constant name="TEXTURE_CHANNEL_GRAYSCALE" value="4" enum="TextureChannel">
- Currently unused.
+ Used to read from the linear (non-perceptual) average of the red, green and blue channels of a texture.
</constant>
<constant name="EMISSION_OP_ADD" value="0" enum="EmissionOperator">
Adds the emission color to the color from the emission texture.
diff --git a/doc/classes/Basis.xml b/doc/classes/Basis.xml
index 3b703884a5..d62f704528 100644
--- a/doc/classes/Basis.xml
+++ b/doc/classes/Basis.xml
@@ -27,31 +27,31 @@
</constructor>
<constructor name="Basis">
<return type="Basis" />
- <argument index="0" name="from" type="Basis" />
+ <param index="0" name="from" type="Basis" />
<description>
Constructs a [Basis] as a copy of the given [Basis].
</description>
</constructor>
<constructor name="Basis">
<return type="Basis" />
- <argument index="0" name="axis" type="Vector3" />
- <argument index="1" name="phi" type="float" />
+ <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]phi[/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">
<return type="Basis" />
- <argument index="0" name="from" type="Quaternion" />
+ <param index="0" name="from" type="Quaternion" />
<description>
Constructs a pure rotation basis matrix from the given quaternion.
</description>
</constructor>
<constructor name="Basis">
<return type="Basis" />
- <argument index="0" name="x_axis" type="Vector3" />
- <argument index="1" name="y_axis" type="Vector3" />
- <argument index="2" name="z_axis" type="Vector3" />
+ <param index="0" name="x_axis" type="Vector3" />
+ <param index="1" name="y_axis" type="Vector3" />
+ <param index="2" name="z_axis" type="Vector3" />
<description>
Constructs a basis matrix from 3 axis vectors (matrix columns).
</description>
@@ -67,32 +67,26 @@
</method>
<method name="from_euler" qualifiers="static">
<return type="Basis" />
- <argument index="0" name="euler" type="Vector3" />
- <argument index="1" name="order" type="int" default="2" />
+ <param index="0" name="euler" type="Vector3" />
+ <param index="1" name="order" type="int" default="2" />
<description>
</description>
</method>
<method name="from_scale" qualifiers="static">
<return type="Basis" />
- <argument index="0" name="scale" type="Vector3" />
+ <param index="0" name="scale" type="Vector3" />
<description>
Constructs a pure scale basis matrix with no rotation or shearing. The scale values are set as the diagonal of the matrix, and the other parts of the matrix are zero.
</description>
</method>
<method name="get_euler" qualifiers="const">
<return type="Vector3" />
- <argument index="0" name="order" type="int" default="2" />
+ <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).
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>
@@ -113,18 +107,18 @@
</method>
<method name="is_equal_approx" qualifiers="const">
<return type="bool" />
- <argument index="0" name="b" type="Basis" />
+ <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="looking_at" qualifiers="static">
<return type="Basis" />
- <argument index="0" name="target" type="Vector3" />
- <argument index="1" name="up" type="Vector3" default="Vector3(0, 1, 0)" />
+ <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">
@@ -135,44 +129,44 @@
</method>
<method name="rotated" qualifiers="const">
<return type="Basis" />
- <argument index="0" name="axis" type="Vector3" />
- <argument index="1" name="phi" type="float" />
+ <param index="0" name="axis" type="Vector3" />
+ <param index="1" name="angle" type="float" />
<description>
- Introduce an additional rotation around the given axis by phi (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">
<return type="Basis" />
- <argument index="0" name="scale" type="Vector3" />
+ <param index="0" name="scale" type="Vector3" />
<description>
Introduce an additional scaling specified by the given 3D scaling factor.
</description>
</method>
<method name="slerp" qualifiers="const">
<return type="Basis" />
- <argument index="0" name="to" type="Basis" />
- <argument index="1" name="weight" type="float" />
+ <param index="0" name="to" type="Basis" />
+ <param index="1" name="weight" type="float" />
<description>
Assuming that the matrix is a proper rotation matrix, slerp performs a spherical-linear interpolation with another rotation matrix.
</description>
</method>
<method name="tdotx" qualifiers="const">
<return type="float" />
- <argument index="0" name="with" type="Vector3" />
+ <param index="0" name="with" type="Vector3" />
<description>
Transposed dot product with the X axis of the matrix.
</description>
</method>
<method name="tdoty" qualifiers="const">
<return type="float" />
- <argument index="0" name="with" type="Vector3" />
+ <param index="0" name="with" type="Vector3" />
<description>
Transposed dot product with the Y axis of the matrix.
</description>
</method>
<method name="tdotz" qualifiers="const">
<return type="float" />
- <argument index="0" name="with" type="Vector3" />
+ <param index="0" name="with" type="Vector3" />
<description>
Transposed dot product with the Z axis of the matrix.
</description>
@@ -225,7 +219,7 @@
<operators>
<operator name="operator !=">
<return type="bool" />
- <argument index="0" name="right" type="Basis" />
+ <param index="0" name="right" type="Basis" />
<description>
Returns [code]true[/code] if the [Basis] matrices are not equal.
[b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.
@@ -233,35 +227,35 @@
</operator>
<operator name="operator *">
<return type="Basis" />
- <argument index="0" name="right" type="Basis" />
+ <param index="0" name="right" type="Basis" />
<description>
Composes these two basis matrices by multiplying them together. This has the effect of transforming the second basis (the child) by the first basis (the parent).
</description>
</operator>
<operator name="operator *">
<return type="Vector3" />
- <argument index="0" name="right" type="Vector3" />
+ <param index="0" name="right" type="Vector3" />
<description>
Transforms (multiplies) the [Vector3] by the given [Basis] matrix.
</description>
</operator>
<operator name="operator *">
<return type="Basis" />
- <argument index="0" name="right" type="float" />
+ <param index="0" name="right" type="float" />
<description>
This operator multiplies all components of the [Basis], which scales it uniformly.
</description>
</operator>
<operator name="operator *">
<return type="Basis" />
- <argument index="0" name="right" type="int" />
+ <param index="0" name="right" type="int" />
<description>
This operator multiplies all components of the [Basis], which scales it uniformly.
</description>
</operator>
<operator name="operator ==">
<return type="bool" />
- <argument index="0" name="right" type="Basis" />
+ <param index="0" name="right" type="Basis" />
<description>
Returns [code]true[/code] if the [Basis] matrices are exactly equal.
[b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.
@@ -269,7 +263,7 @@
</operator>
<operator name="operator []">
<return type="Vector3" />
- <argument index="0" name="index" type="int" />
+ <param index="0" name="index" type="int" />
<description>
Access basis components using their index. [code]b[0][/code] is equivalent to [code]b.x[/code], [code]b[1][/code] is equivalent to [code]b.y[/code], and [code]b[2][/code] is equivalent to [code]b.z[/code].
</description>
diff --git a/doc/classes/BitMap.xml b/doc/classes/BitMap.xml
index f248bec15f..9323642274 100644
--- a/doc/classes/BitMap.xml
+++ b/doc/classes/BitMap.xml
@@ -17,22 +17,22 @@
</method>
<method name="create">
<return type="void" />
- <argument index="0" name="size" type="Vector2" />
+ <param index="0" name="size" type="Vector2" />
<description>
Creates a bitmap with the specified size, filled with [code]false[/code].
</description>
</method>
<method name="create_from_image_alpha">
<return type="void" />
- <argument index="0" name="image" type="Image" />
- <argument index="1" name="threshold" type="float" default="0.1" />
+ <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" />
- <argument index="0" name="position" type="Vector2" />
+ <param index="0" name="position" type="Vector2" />
<description>
Returns bitmap's value at the specified position.
</description>
@@ -46,49 +46,49 @@
<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" />
- <argument index="0" name="pixels" type="int" />
- <argument index="1" name="rect" type="Rect2" />
+ <param index="0" name="pixels" type="int" />
+ <param index="1" name="rect" type="Rect2" />
<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" />
- <argument index="0" name="rect" type="Rect2" />
- <argument index="1" name="epsilon" type="float" default="2.0" />
+ <return type="PackedVector2Array[]" />
+ <param index="0" name="rect" type="Rect2" />
+ <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.
To get polygons covering the whole bitmap, pass:
[codeblock]
Rect2(Vector2(), get_size())
[/codeblock]
- [code]epsilon[/code] is passed to RDP to control how accurately the polygons cover the bitmap: a lower [code]epsilon[/code] corresponds to more points in the polygons.
+ [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" />
- <argument index="0" name="new_size" type="Vector2" />
+ <param index="0" name="new_size" type="Vector2" />
<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" />
- <argument index="0" name="position" type="Vector2" />
- <argument index="1" name="bit" type="bool" />
+ <param index="0" name="position" type="Vector2" />
+ <param index="1" 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" />
- <argument index="0" name="rect" type="Rect2" />
- <argument index="1" name="bit" type="bool" />
+ <param index="0" name="rect" type="Rect2" />
+ <param index="1" name="bit" type="bool" />
<description>
Sets a rectangular portion of the bitmap to the specified value.
</description>
diff --git a/doc/classes/Bone2D.xml b/doc/classes/Bone2D.xml
index 1e09e90d4a..d452edd1aa 100644
--- a/doc/classes/Bone2D.xml
+++ b/doc/classes/Bone2D.xml
@@ -57,14 +57,14 @@
</method>
<method name="set_autocalculate_length_and_angle">
<return type="void" />
- <argument index="0" name="auto_calculate" type="bool" />
+ <param index="0" name="auto_calculate" type="bool" />
<description>
When set to [code]true[/code], the [code]Bone2D[/code] node will attempt to automatically calculate the bone angle and length using the first child [code]Bone2D[/code] node, if one exists. If none exist, the [code]Bone2D[/code] cannot automatically calculate these values and will print a warning.
</description>
</method>
<method name="set_bone_angle">
<return type="void" />
- <argument index="0" name="angle" type="float" />
+ <param index="0" name="angle" type="float" />
<description>
Sets the bone angle for the [code]Bone2D[/code] node. This is typically set to the rotation from the [code]Bone2D[/code] node to a child [code]Bone2D[/code] node.
[b]Note:[/b] This is different from the [code]Bone2D[/code]'s rotation. The bone angle is the rotation of the bone shown by the [code]Bone2D[/code] gizmo, and because [code]Bone2D[/code] bones are based on positions, this can vary from the actual rotation of the [code]Bone2D[/code] node.
@@ -72,14 +72,14 @@
</method>
<method name="set_default_length">
<return type="void" />
- <argument index="0" name="default_length" type="float" />
+ <param index="0" name="default_length" type="float" />
<description>
Deprecated. Please use [code]set_length[/code] instead.
</description>
</method>
<method name="set_length">
<return type="void" />
- <argument index="0" name="length" type="float" />
+ <param index="0" name="length" type="float" />
<description>
Sets the length of the bone in the [code]Bone2D[/code] node.
</description>
diff --git a/doc/classes/BoneAttachment3D.xml b/doc/classes/BoneAttachment3D.xml
index bb4b45cd48..dc3d448621 100644
--- a/doc/classes/BoneAttachment3D.xml
+++ b/doc/classes/BoneAttachment3D.xml
@@ -36,35 +36,35 @@
</method>
<method name="on_bone_pose_update">
<return type="void" />
- <argument index="0" name="bone_index" type="int" />
+ <param index="0" name="bone_index" type="int" />
<description>
A function that is called automatically when the [Skeleton3D] the BoneAttachment3D node is using has a bone that has changed its pose. This function is where the BoneAttachment3D node updates its position so it is correctly bound when it is [i]not[/i] set to override the bone pose.
</description>
</method>
<method name="set_external_skeleton">
<return type="void" />
- <argument index="0" name="external_skeleton" type="NodePath" />
+ <param index="0" name="external_skeleton" type="NodePath" />
<description>
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">
<return type="void" />
- <argument index="0" name="override_mode" type="int" />
+ <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.
</description>
</method>
<method name="set_override_pose">
<return type="void" />
- <argument index="0" name="override_pose" type="bool" />
+ <param index="0" name="override_pose" type="bool" />
<description>
Sets whether the BoneAttachment3D node will override the bone pose of the bone it is attached to. When set to [code]true[/code], the BoneAttachment3D node can change the pose of the bone.
</description>
</method>
<method name="set_use_external_skeleton">
<return type="void" />
- <argument index="0" name="use_external_skeleton" type="bool" />
+ <param index="0" name="use_external_skeleton" type="bool" />
<description>
Sets whether the BoneAttachment3D node will use an extenral [Skeleton3D] node rather than attenpting to use its parent node as the [Skeleton3D]. When set to [code]true[/code], the BoneAttachment3D node will use the external [Skeleton3D] node set in [code]set_external_skeleton[/code].
</description>
diff --git a/doc/classes/BoneMap.xml b/doc/classes/BoneMap.xml
new file mode 100644
index 0000000000..f7a4845b7d
--- /dev/null
+++ b/doc/classes/BoneMap.xml
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="BoneMap" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ Bone map for retargeting.
+ </brief_description>
+ <description>
+ This class contains a hashmap that uses a list of bone names in [SkeletonProfile] as key names.
+ By assigning the actual [Skeleton3D] bone name as the key value, it maps the [Skeleton3D] to the [SkeletonProfile].
+ </description>
+ <tutorials>
+ </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 [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>
+ <method name="get_skeleton_bone_name" qualifiers="const">
+ <return type="StringName" />
+ <param index="0" name="profile_bone_name" type="StringName" />
+ <description>
+ 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>
+ <method name="set_skeleton_bone_name">
+ <return type="void" />
+ <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 [param profile_bone_name].
+ In the retargeting process, the setting bone name is the bone name of the source skeleton.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="profile" type="SkeletonProfile" setter="set_profile" getter="get_profile">
+ A [SkeletonProfile] of the mapping target. Key names in the [BoneMap] are synchronized with it.
+ </member>
+ </members>
+ <signals>
+ <signal name="bone_map_updated">
+ <description>
+ This signal is emitted when change the key value in the [BoneMap]. This is used to validate mapping and to update [BoneMap] editor.
+ </description>
+ </signal>
+ <signal name="profile_updated">
+ <description>
+ This signal is emitted when change the value in profile or change the reference of profile. This is used to update key names in the [BoneMap] and to redraw the [BoneMap] editor.
+ </description>
+ </signal>
+ </signals>
+</class>
diff --git a/doc/classes/BoxContainer.xml b/doc/classes/BoxContainer.xml
index c76a178368..65ceab3e30 100644
--- a/doc/classes/BoxContainer.xml
+++ b/doc/classes/BoxContainer.xml
@@ -12,9 +12,9 @@
<methods>
<method name="add_spacer">
<return type="Control" />
- <argument index="0" name="begin" type="bool" />
+ <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>
diff --git a/doc/classes/Button.xml b/doc/classes/Button.xml
index d85d02fbfb..e78cdfc951 100644
--- a/doc/classes/Button.xml
+++ b/doc/classes/Button.xml
@@ -40,29 +40,6 @@
<link title="2D Dodge The Creeps Demo">https://godotengine.org/asset-library/asset/515</link>
<link title="OS Test Demo">https://godotengine.org/asset-library/asset/677</link>
</tutorials>
- <methods>
- <method name="clear_opentype_features">
- <return type="void" />
- <description>
- Removes all OpenType features.
- </description>
- </method>
- <method name="get_opentype_feature" qualifiers="const">
- <return type="int" />
- <argument index="0" name="tag" type="String" />
- <description>
- Returns OpenType feature [code]tag[/code].
- </description>
- </method>
- <method name="set_opentype_feature">
- <return type="void" />
- <argument index="0" name="tag" type="String" />
- <argument index="1" name="value" type="int" />
- <description>
- Sets OpenType feature [code]tag[/code]. More info: [url=https://docs.microsoft.com/en-us/typography/opentype/spec/featuretags]OpenType feature tags[/url].
- </description>
- </method>
- </methods>
<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.
@@ -92,6 +69,9 @@
<member name="text_direction" type="int" setter="set_text_direction" getter="get_text_direction" enum="Control.TextDirection" default="0">
Base text writing direction.
</member>
+ <member name="text_overrun_behavior" type="int" setter="set_text_overrun_behavior" getter="get_text_overrun_behavior" enum="TextServer.OverrunBehavior" default="0">
+ Sets the clipping behavior when the text exceeds the node's bounding rectangle. See [enum TextServer.OverrunBehavior] for a description of all modes.
+ </member>
</members>
<theme_items>
<theme_item name="font_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 1)">
@@ -134,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 a887404932..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>
@@ -28,7 +28,7 @@
</members>
<signals>
<signal name="pressed">
- <argument index="0" name="button" type="BaseButton" />
+ <param index="0" name="button" type="BaseButton" />
<description>
Emitted when one of the buttons of the group is pressed.
</description>
diff --git a/doc/classes/CPUParticles2D.xml b/doc/classes/CPUParticles2D.xml
index dacdca1cee..64e9310181 100644
--- a/doc/classes/CPUParticles2D.xml
+++ b/doc/classes/CPUParticles2D.xml
@@ -13,33 +13,33 @@
<methods>
<method name="convert_from_particles">
<return type="void" />
- <argument index="0" name="particles" type="Node" />
+ <param index="0" name="particles" type="Node" />
<description>
Sets this node's properties to match a given [GPUParticles2D] node with an assigned [ParticlesMaterial].
</description>
</method>
<method name="get_param_curve" qualifiers="const">
<return type="Curve" />
- <argument index="0" name="param" type="int" enum="CPUParticles2D.Parameter" />
+ <param index="0" name="param" type="int" enum="CPUParticles2D.Parameter" />
<description>
Returns the [Curve] of the parameter specified by [enum Parameter].
</description>
</method>
<method name="get_param_max" qualifiers="const">
<return type="float" />
- <argument index="0" name="param" type="int" enum="CPUParticles2D.Parameter" />
+ <param index="0" name="param" type="int" enum="CPUParticles2D.Parameter" />
<description>
</description>
</method>
<method name="get_param_min" qualifiers="const">
<return type="float" />
- <argument index="0" name="param" type="int" enum="CPUParticles2D.Parameter" />
+ <param index="0" name="param" type="int" enum="CPUParticles2D.Parameter" />
<description>
</description>
</method>
<method name="get_particle_flag" qualifiers="const">
<return type="bool" />
- <argument index="0" name="particle_flag" type="int" enum="CPUParticles2D.ParticleFlags" />
+ <param index="0" name="particle_flag" type="int" enum="CPUParticles2D.ParticleFlags" />
<description>
Returns the enabled state of the given flag (see [enum ParticleFlags] for options).
</description>
@@ -52,30 +52,30 @@
</method>
<method name="set_param_curve">
<return type="void" />
- <argument index="0" name="param" type="int" enum="CPUParticles2D.Parameter" />
- <argument index="1" name="curve" type="Curve" />
+ <param index="0" name="param" type="int" enum="CPUParticles2D.Parameter" />
+ <param index="1" name="curve" type="Curve" />
<description>
Sets the [Curve] of the parameter specified by [enum Parameter].
</description>
</method>
<method name="set_param_max">
<return type="void" />
- <argument index="0" name="param" type="int" enum="CPUParticles2D.Parameter" />
- <argument index="1" name="value" type="float" />
+ <param index="0" name="param" type="int" enum="CPUParticles2D.Parameter" />
+ <param index="1" name="value" type="float" />
<description>
</description>
</method>
<method name="set_param_min">
<return type="void" />
- <argument index="0" name="param" type="int" enum="CPUParticles2D.Parameter" />
- <argument index="1" name="value" type="float" />
+ <param index="0" name="param" type="int" enum="CPUParticles2D.Parameter" />
+ <param index="1" name="value" type="float" />
<description>
</description>
</method>
<method name="set_particle_flag">
<return type="void" />
- <argument index="0" name="particle_flag" type="int" enum="CPUParticles2D.ParticleFlags" />
- <argument index="1" name="enable" type="bool" />
+ <param index="0" name="particle_flag" type="int" enum="CPUParticles2D.ParticleFlags" />
+ <param index="1" name="enable" type="bool" />
<description>
Enables or disables the given flag (see [enum ParticleFlags] for options).
</description>
@@ -192,8 +192,8 @@
</member>
<member name="linear_accel_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0">
</member>
- <member name="local_coords" type="bool" setter="set_use_local_coordinates" getter="get_use_local_coordinates" default="true">
- If [code]true[/code], particles use the parent node's coordinate space. If [code]false[/code], they use global coordinates.
+ <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.
</member>
<member name="one_shot" type="bool" setter="set_one_shot" getter="get_one_shot" default="false">
If [code]true[/code], only one emission cycle occurs. If set [code]true[/code] during a cycle, emission will stop at the cycle's end.
diff --git a/doc/classes/CPUParticles3D.xml b/doc/classes/CPUParticles3D.xml
index f2a0040ed4..bb1dcd322f 100644
--- a/doc/classes/CPUParticles3D.xml
+++ b/doc/classes/CPUParticles3D.xml
@@ -12,33 +12,33 @@
<methods>
<method name="convert_from_particles">
<return type="void" />
- <argument index="0" name="particles" type="Node" />
+ <param index="0" name="particles" type="Node" />
<description>
Sets this node's properties to match a given [GPUParticles3D] node with an assigned [ParticlesMaterial].
</description>
</method>
<method name="get_param_curve" qualifiers="const">
<return type="Curve" />
- <argument index="0" name="param" type="int" enum="CPUParticles3D.Parameter" />
+ <param index="0" name="param" type="int" enum="CPUParticles3D.Parameter" />
<description>
Returns the [Curve] of the parameter specified by [enum Parameter].
</description>
</method>
<method name="get_param_max" qualifiers="const">
<return type="float" />
- <argument index="0" name="param" type="int" enum="CPUParticles3D.Parameter" />
+ <param index="0" name="param" type="int" enum="CPUParticles3D.Parameter" />
<description>
</description>
</method>
<method name="get_param_min" qualifiers="const">
<return type="float" />
- <argument index="0" name="param" type="int" enum="CPUParticles3D.Parameter" />
+ <param index="0" name="param" type="int" enum="CPUParticles3D.Parameter" />
<description>
</description>
</method>
<method name="get_particle_flag" qualifiers="const">
<return type="bool" />
- <argument index="0" name="particle_flag" type="int" enum="CPUParticles3D.ParticleFlags" />
+ <param index="0" name="particle_flag" type="int" enum="CPUParticles3D.ParticleFlags" />
<description>
Returns the enabled state of the given particle flag (see [enum ParticleFlags] for options).
</description>
@@ -51,32 +51,32 @@
</method>
<method name="set_param_curve">
<return type="void" />
- <argument index="0" name="param" type="int" enum="CPUParticles3D.Parameter" />
- <argument index="1" name="curve" type="Curve" />
+ <param index="0" name="param" type="int" enum="CPUParticles3D.Parameter" />
+ <param index="1" name="curve" type="Curve" />
<description>
Sets the [Curve] of the parameter specified by [enum Parameter].
</description>
</method>
<method name="set_param_max">
<return type="void" />
- <argument index="0" name="param" type="int" enum="CPUParticles3D.Parameter" />
- <argument index="1" name="value" type="float" />
+ <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
</description>
</method>
<method name="set_param_min">
<return type="void" />
- <argument index="0" name="param" type="int" enum="CPUParticles3D.Parameter" />
- <argument index="1" name="value" type="float" />
+ <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
</description>
</method>
<method name="set_particle_flag">
<return type="void" />
- <argument index="0" name="particle_flag" type="int" enum="CPUParticles3D.ParticleFlags" />
- <argument index="1" name="enable" type="bool" />
+ <param index="0" name="particle_flag" type="int" enum="CPUParticles3D.ParticleFlags" />
+ <param index="1" name="enable" type="bool" />
<description>
Enables or disables the given particle flag (see [enum ParticleFlags] for options).
</description>
@@ -224,8 +224,8 @@
<member name="linear_accel_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0">
Minimum linear acceleration.
</member>
- <member name="local_coords" type="bool" setter="set_use_local_coordinates" getter="get_use_local_coordinates" default="true">
- If [code]true[/code], particles use the parent node's coordinate space. If [code]false[/code], they use global coordinates.
+ <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 [CPUParticles3D] 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 [CPUParticles3D] node (and its parents) when it is moved or rotated.
</member>
<member name="mesh" type="Mesh" setter="set_mesh" getter="get_mesh">
The [Mesh] used for each particle. If [code]null[/code], particles will be spheres.
diff --git a/doc/classes/Callable.xml b/doc/classes/Callable.xml
index efe3e3d091..6838bdeb70 100644
--- a/doc/classes/Callable.xml
+++ b/doc/classes/Callable.xml
@@ -44,17 +44,17 @@
</constructor>
<constructor name="Callable">
<return type="Callable" />
- <argument index="0" name="from" type="Callable" />
+ <param index="0" name="from" type="Callable" />
<description>
Constructs a [Callable] as a copy of the given [Callable].
</description>
</constructor>
<constructor name="Callable">
<return type="Callable" />
- <argument index="0" name="object" type="Object" />
- <argument index="1" name="method" type="StringName" />
+ <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>
@@ -134,14 +134,14 @@
</method>
<method name="rpc_id" qualifiers="vararg const">
<return type="void" />
- <argument index="0" name="peer_id" type="int" />
+ <param index="0" name="peer_id" type="int" />
<description>
Perform an RPC (Remote Procedure Call) on a specific peer ID (see multiplayer documentation for reference). This is used for multiplayer and is normally not available unless the function being called has been marked as [i]RPC[/i]. Calling it on unsupported functions will result in an error.
</description>
</method>
<method name="unbind" qualifiers="const">
<return type="Callable" />
- <argument index="0" name="argcount" type="int" />
+ <param index="0" name="argcount" type="int" />
<description>
Returns a copy of this [Callable] with the arguments unbound. Calling the returned [Callable] will call the method without the extra arguments that are supplied in the [Callable] on which you are calling this method.
</description>
@@ -150,14 +150,14 @@
<operators>
<operator name="operator !=">
<return type="bool" />
- <argument index="0" name="right" type="Callable" />
+ <param index="0" name="right" type="Callable" />
<description>
Returns [code]true[/code] if both [Callable]s invoke different targets.
</description>
</operator>
<operator name="operator ==">
<return type="bool" />
- <argument index="0" name="right" type="Callable" />
+ <param index="0" name="right" type="Callable" />
<description>
Returns [code]true[/code] if both [Callable]s invoke the same custom target.
</description>
diff --git a/doc/classes/CallbackTweener.xml b/doc/classes/CallbackTweener.xml
index 3d80d8f3ab..6e4ee0380e 100644
--- a/doc/classes/CallbackTweener.xml
+++ b/doc/classes/CallbackTweener.xml
@@ -12,7 +12,7 @@
<methods>
<method name="set_delay">
<return type="CallbackTweener" />
- <argument index="0" name="delay" type="float" />
+ <param index="0" name="delay" type="float" />
<description>
Makes the callback call delayed by given time in seconds. Example:
[codeblock]
diff --git a/doc/classes/Camera2D.xml b/doc/classes/Camera2D.xml
index b9373676e2..edb5235b75 100644
--- a/doc/classes/Camera2D.xml
+++ b/doc/classes/Camera2D.xml
@@ -43,14 +43,14 @@
</method>
<method name="get_drag_margin" qualifiers="const">
<return type="float" />
- <argument index="0" name="margin" type="int" enum="Side" />
+ <param index="0" name="margin" type="int" enum="Side" />
<description>
Returns the specified [enum Side]'s margin. See also [member drag_bottom_margin], [member drag_top_margin], [member drag_left_margin], and [member drag_right_margin].
</description>
</method>
<method name="get_limit" qualifiers="const">
<return type="int" />
- <argument index="0" name="margin" type="int" enum="Side" />
+ <param index="0" name="margin" type="int" enum="Side" />
<description>
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>
@@ -64,16 +64,16 @@
</method>
<method name="set_drag_margin">
<return type="void" />
- <argument index="0" name="margin" type="int" enum="Side" />
- <argument index="1" name="drag_margin" type="float" />
+ <param index="0" name="margin" type="int" enum="Side" />
+ <param index="1" name="drag_margin" type="float" />
<description>
Sets the specified [enum Side]'s margin. See also [member drag_bottom_margin], [member drag_top_margin], [member drag_left_margin], and [member drag_right_margin].
</description>
</method>
<method name="set_limit">
<return type="void" />
- <argument index="0" name="margin" type="int" enum="Side" />
- <argument index="1" name="limit" type="int" />
+ <param index="0" name="margin" type="int" enum="Side" />
+ <param index="1" name="limit" type="int" />
<description>
Sets the camera limit for the specified [enum Side]. See also [member limit_bottom], [member limit_top], [member limit_left], and [member limit_right].
</description>
diff --git a/doc/classes/Camera3D.xml b/doc/classes/Camera3D.xml
index 5008cd826e..65fdecc3c6 100644
--- a/doc/classes/Camera3D.xml
+++ b/doc/classes/Camera3D.xml
@@ -12,9 +12,9 @@
<methods>
<method name="clear_current">
<return type="void" />
- <argument index="0" name="enable_next" type="bool" default="true" />
+ <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">
@@ -31,13 +31,13 @@
</method>
<method name="get_cull_mask_value" qualifiers="const">
<return type="bool" />
- <argument index="0" name="layer_number" type="int" />
+ <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>
@@ -50,7 +50,7 @@
</method>
<method name="is_position_behind" qualifiers="const">
<return type="bool" />
- <argument index="0" name="world_point" type="Vector3" />
+ <param index="0" name="world_point" type="Vector3" />
<description>
Returns [code]true[/code] if the given position is behind the camera (the blue part of the linked diagram). [url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/camera3d_position_frustum.png]See this diagram[/url] for an overview of position query methods.
[b]Note:[/b] A position which returns [code]false[/code] may still be outside the camera's field of view.
@@ -58,7 +58,7 @@
</method>
<method name="is_position_in_frustum" qualifiers="const">
<return type="bool" />
- <argument index="0" name="world_point" type="Vector3" />
+ <param index="0" name="world_point" type="Vector3" />
<description>
Returns [code]true[/code] if the given position is inside the camera's frustum (the green part of the linked diagram). [url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/camera3d_position_frustum.png]See this diagram[/url] for an overview of position query methods.
</description>
@@ -71,72 +71,72 @@
</method>
<method name="project_local_ray_normal" qualifiers="const">
<return type="Vector3" />
- <argument index="0" name="screen_point" type="Vector2" />
+ <param index="0" name="screen_point" type="Vector2" />
<description>
Returns a normal vector from the screen point location directed along the camera. Orthogonal cameras are normalized. Perspective cameras account for perspective, screen width/height, etc.
</description>
</method>
<method name="project_position" qualifiers="const">
<return type="Vector3" />
- <argument index="0" name="screen_point" type="Vector2" />
- <argument index="1" name="z_depth" type="float" />
+ <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">
<return type="Vector3" />
- <argument index="0" name="screen_point" type="Vector2" />
+ <param index="0" name="screen_point" type="Vector2" />
<description>
- Returns a normal vector in world space, that is the result of projecting a point on the [Viewport] rectangle by the camera projection. This is useful for casting rays in the form of (origin, normal) for object intersection or picking.
+ Returns a normal vector in world space, that is the result of projecting a point on the [Viewport] rectangle by the inverse camera projection. This is useful for casting rays in the form of (origin, normal) for object intersection or picking.
</description>
</method>
<method name="project_ray_origin" qualifiers="const">
<return type="Vector3" />
- <argument index="0" name="screen_point" type="Vector2" />
+ <param index="0" name="screen_point" type="Vector2" />
<description>
- Returns a 3D position in world space, that is the result of projecting a point on the [Viewport] rectangle by the camera projection. This is useful for casting rays in the form of (origin, normal) for object intersection or picking.
+ Returns a 3D position in world space, that is the result of projecting a point on the [Viewport] rectangle by the inverse camera projection. This is useful for casting rays in the form of (origin, normal) for object intersection or picking.
</description>
</method>
<method name="set_cull_mask_value">
<return type="void" />
- <argument index="0" name="layer_number" type="int" />
- <argument index="1" name="value" type="bool" />
+ <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">
<return type="void" />
- <argument index="0" name="size" type="float" />
- <argument index="1" name="offset" type="Vector2" />
- <argument index="2" name="z_near" type="float" />
- <argument index="3" name="z_far" type="float" />
+ <param index="0" name="size" type="float" />
+ <param index="1" name="offset" type="Vector2" />
+ <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.
+ 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">
<return type="void" />
- <argument index="0" name="size" type="float" />
- <argument index="1" name="z_near" type="float" />
- <argument index="2" name="z_far" type="float" />
+ <param index="0" name="size" type="float" />
+ <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">
<return type="void" />
- <argument index="0" name="fov" type="float" />
- <argument index="1" name="z_near" type="float" />
- <argument index="2" name="z_far" type="float" />
+ <param index="0" name="fov" type="float" />
+ <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">
<return type="Vector2" />
- <argument index="0" name="world_point" type="Vector3" />
+ <param index="0" name="world_point" type="Vector3" />
<description>
Returns the 2D coordinate in the [Viewport] rectangle that maps to the given 3D point in world space.
[b]Note:[/b] When using this to position GUI elements over a 3D viewport, use [method is_position_behind] to prevent them from appearing if the 3D point is behind the camera:
@@ -144,7 +144,7 @@
# This code block is part of a script that inherits from Node3D.
# `control` is a reference to a node inheriting from Control.
control.visible = not get_viewport().get_camera_3d().is_position_behind(global_transform.origin)
- control.rect_position = get_viewport().get_camera_3d().unproject_position(global_transform.origin)
+ control.position = get_viewport().get_camera_3d().unproject_position(global_transform.origin)
[/codeblock]
</description>
</method>
@@ -155,6 +155,7 @@
</member>
<member name="current" type="bool" setter="set_current" getter="is_current" default="false">
If [code]true[/code], the ancestor [Viewport] is currently using this camera.
+ If multiple cameras are in the scene, one will always be made current. For example, if two [Camera3D] nodes are present in the scene and only one is current, setting one camera's [member current] to [code]false[/code] will cause the other camera to be made current.
</member>
<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.
@@ -178,6 +179,7 @@
</member>
<member name="frustum_offset" type="Vector2" setter="set_frustum_offset" getter="get_frustum_offset" default="Vector2(0, 0)">
The camera's frustum offset. This can be changed from the default to create "tilted frustum" effects such as [url=https://zdoom.org/wiki/Y-shearing]Y-shearing[/url].
+ [b]Note:[/b] Only effective if [member projection] is [constant PROJECTION_FRUSTUM].
</member>
<member name="h_offset" type="float" setter="set_h_offset" getter="get_h_offset" default="0.0">
The horizontal (X) offset of the camera viewport.
@@ -188,24 +190,24 @@
<member name="near" type="float" setter="set_near" getter="get_near" default="0.05">
The distance to the near culling boundary for this camera relative to its local Z axis.
</member>
- <member name="projection" type="int" setter="set_projection" getter="get_projection" enum="Camera3D.Projection" default="0">
+ <member name="projection" type="int" setter="set_projection" getter="get_projection" enum="Camera3D.ProjectionType" default="0">
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.
</member>
</members>
<constants>
- <constant name="PROJECTION_PERSPECTIVE" value="0" enum="Projection">
+ <constant name="PROJECTION_PERSPECTIVE" value="0" enum="ProjectionType">
Perspective projection. Objects on the screen becomes smaller when they are far away.
</constant>
- <constant name="PROJECTION_ORTHOGONAL" value="1" enum="Projection">
+ <constant name="PROJECTION_ORTHOGONAL" value="1" enum="ProjectionType">
Orthogonal projection, also known as orthographic projection. Objects remain the same size on the screen no matter how far away they are.
</constant>
- <constant name="PROJECTION_FRUSTUM" value="2" enum="Projection">
+ <constant name="PROJECTION_FRUSTUM" value="2" enum="ProjectionType">
Frustum projection. This mode allows adjusting [member frustum_offset] to create "tilted frustum" effects.
</constant>
<constant name="KEEP_WIDTH" value="0" enum="KeepAspect">
diff --git a/doc/classes/CameraServer.xml b/doc/classes/CameraServer.xml
index 1ccdee58f7..d346fbde4f 100644
--- a/doc/classes/CameraServer.xml
+++ b/doc/classes/CameraServer.xml
@@ -13,22 +13,22 @@
<methods>
<method name="add_feed">
<return type="void" />
- <argument index="0" name="feed" type="CameraFeed" />
+ <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>
</method>
<method name="get_feed">
<return type="CameraFeed" />
- <argument index="0" name="index" type="int" />
+ <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">
@@ -39,21 +39,21 @@
</method>
<method name="remove_feed">
<return type="void" />
- <argument index="0" name="feed" type="CameraFeed" />
+ <param index="0" name="feed" type="CameraFeed" />
<description>
- Removes the specified camera [code]feed[/code].
+ Removes the specified camera [param feed].
</description>
</method>
</methods>
<signals>
<signal name="camera_feed_added">
- <argument index="0" name="id" type="int" />
+ <param index="0" name="id" type="int" />
<description>
Emitted when a [CameraFeed] is added (e.g. a webcam is plugged in).
</description>
</signal>
<signal name="camera_feed_removed">
- <argument index="0" name="id" type="int" />
+ <param index="0" name="id" type="int" />
<description>
Emitted when a [CameraFeed] is removed (e.g. a webcam is unplugged).
</description>
diff --git a/doc/classes/CanvasItem.xml b/doc/classes/CanvasItem.xml
index 6cd2da520f..fe1fe498d1 100644
--- a/doc/classes/CanvasItem.xml
+++ b/doc/classes/CanvasItem.xml
@@ -5,7 +5,7 @@
</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 update] 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.
@@ -20,73 +20,83 @@
<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 (when [method update] 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">
<return type="void" />
- <argument index="0" name="animation_length" type="float" />
- <argument index="1" name="slice_begin" type="float" />
- <argument index="2" name="slice_end" type="float" />
- <argument index="3" name="offset" type="float" default="0.0" />
+ <param index="0" name="animation_length" type="float" />
+ <param index="1" name="slice_begin" type="float" />
+ <param index="2" name="slice_end" type="float" />
+ <param index="3" name="offset" type="float" default="0.0" />
<description>
Subsequent drawing commands will be ignored unless they fall within the specified animation slice. This is a faster way to implement animations that loop on background rather than redrawing constantly.
</description>
</method>
<method name="draw_arc">
<return type="void" />
- <argument index="0" name="center" type="Vector2" />
- <argument index="1" name="radius" type="float" />
- <argument index="2" name="start_angle" type="float" />
- <argument index="3" name="end_angle" type="float" />
- <argument index="4" name="point_count" type="int" />
- <argument index="5" name="color" type="Color" />
- <argument index="6" name="width" type="float" default="1.0" />
- <argument index="7" name="antialiased" type="bool" default="false" />
+ <param index="0" name="center" type="Vector2" />
+ <param index="1" name="radius" type="float" />
+ <param index="2" name="start_angle" type="float" />
+ <param index="3" name="end_angle" type="float" />
+ <param index="4" name="point_count" type="int" />
+ <param index="5" name="color" type="Color" />
+ <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">
- <return type="float" />
- <argument index="0" name="font" type="Font" />
- <argument index="1" name="pos" type="Vector2" />
- <argument index="2" name="char" type="String" />
- <argument index="3" name="next" type="String" default="&quot;&quot;" />
- <argument index="4" name="size" type="int" default="16" />
- <argument index="5" name="modulate" type="Color" default="Color(1, 1, 1, 1)" />
- <argument index="6" name="outline_size" type="int" default="0" />
- <argument index="7" name="outline_modulate" type="Color" default="Color(1, 1, 1, 0)" />
+ <return type="void" />
+ <param index="0" name="font" type="Font" />
+ <param index="1" name="pos" type="Vector2" />
+ <param index="2" name="char" type="String" />
+ <param index="3" name="font_size" type="int" default="16" />
+ <param index="4" name="modulate" type="Color" default="Color(1, 1, 1, 1)" />
+ <description>
+ Draws a string first character using a custom font.
+ </description>
+ </method>
+ <method name="draw_char_outline" qualifiers="const">
+ <return type="void" />
+ <param index="0" name="font" type="Font" />
+ <param index="1" name="pos" type="Vector2" />
+ <param index="2" name="char" type="String" />
+ <param index="3" name="font_size" type="int" default="16" />
+ <param index="4" name="size" type="int" default="-1" />
+ <param index="5" name="modulate" type="Color" default="Color(1, 1, 1, 1)" />
<description>
- Draws a string character using a custom font. Returns the advance, depending on the character width and kerning with an optional next character.
+ Draws a string first character outline using a custom font.
</description>
</method>
<method name="draw_circle">
<return type="void" />
- <argument index="0" name="position" type="Vector2" />
- <argument index="1" name="radius" type="float" />
- <argument index="2" name="color" type="Color" />
+ <param index="0" name="position" type="Vector2" />
+ <param index="1" name="radius" type="float" />
+ <param index="2" name="color" type="Color" />
<description>
- Draws a colored, unfilled circle. See also [method draw_arc], [method draw_polyline] and [method draw_polygon].
+ Draws a colored, filled circle. See also [method draw_arc], [method draw_polyline] and [method draw_polygon].
</description>
</method>
<method name="draw_colored_polygon">
<return type="void" />
- <argument index="0" name="points" type="PackedVector2Array" />
- <argument index="1" name="color" type="Color" />
- <argument index="2" name="uvs" type="PackedVector2Array" default="PackedVector2Array()" />
- <argument index="3" name="texture" type="Texture2D" default="null" />
+ <param index="0" name="points" type="PackedVector2Array" />
+ <param index="1" name="color" type="Color" />
+ <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">
<return type="void" />
- <argument index="0" name="from" type="Vector2" />
- <argument index="1" name="to" type="Vector2" />
- <argument index="2" name="color" type="Color" />
- <argument index="3" name="width" type="float" default="1.0" />
- <argument index="4" name="dash" type="float" default="2.0" />
+ <param index="0" name="from" type="Vector2" />
+ <param index="1" name="to" type="Vector2" />
+ <param index="2" name="color" type="Color" />
+ <param index="3" name="width" type="float" default="1.0" />
+ <param index="4" name="dash" type="float" default="2.0" />
<description>
Draws a dashed line from a 2D point to another, with a given color and width. See also [method draw_multiline] and [method draw_polyline].
</description>
@@ -99,164 +109,184 @@
</method>
<method name="draw_line">
<return type="void" />
- <argument index="0" name="from" type="Vector2" />
- <argument index="1" name="to" type="Vector2" />
- <argument index="2" name="color" type="Color" />
- <argument index="3" name="width" type="float" default="1.0" />
- <argument index="4" name="antialiased" type="bool" default="false" />
+ <param index="0" name="from" type="Vector2" />
+ <param index="1" name="to" type="Vector2" />
+ <param index="2" name="color" type="Color" />
+ <param index="3" name="width" type="float" default="1.0" />
+ <param index="4" name="antialiased" type="bool" default="false" />
<description>
Draws a line from a 2D point to another, with a given color and width. It can be optionally antialiased. See also [method draw_multiline] and [method draw_polyline].
</description>
</method>
<method name="draw_mesh">
<return type="void" />
- <argument index="0" name="mesh" type="Mesh" />
- <argument index="1" name="texture" type="Texture2D" />
- <argument index="2" name="transform" type="Transform2D" default="Transform2D(1, 0, 0, 1, 0, 0)" />
- <argument index="3" name="modulate" type="Color" default="Color(1, 1, 1, 1)" />
+ <param index="0" name="mesh" type="Mesh" />
+ <param index="1" name="texture" type="Texture2D" />
+ <param index="2" name="transform" type="Transform2D" default="Transform2D(1, 0, 0, 1, 0, 0)" />
+ <param index="3" name="modulate" type="Color" default="Color(1, 1, 1, 1)" />
<description>
Draws a [Mesh] in 2D, using the provided texture. See [MeshInstance2D] for related documentation.
</description>
</method>
<method name="draw_msdf_texture_rect_region">
<return type="void" />
- <argument index="0" name="texture" type="Texture2D" />
- <argument index="1" name="rect" type="Rect2" />
- <argument index="2" name="src_rect" type="Rect2" />
- <argument index="3" name="modulate" type="Color" default="Color(1, 1, 1, 1)" />
- <argument index="4" name="outline" type="float" default="0.0" />
- <argument index="5" name="pixel_range" type="float" default="4.0" />
+ <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)" />
+ <param index="4" name="outline" type="float" default="0.0" />
+ <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 FontData.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.
+ 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 [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">
<return type="void" />
- <argument index="0" name="points" type="PackedVector2Array" />
- <argument index="1" name="color" type="Color" />
- <argument index="2" name="width" type="float" default="1.0" />
+ <param index="0" name="points" type="PackedVector2Array" />
+ <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">
<return type="void" />
- <argument index="0" name="points" type="PackedVector2Array" />
- <argument index="1" name="colors" type="PackedColorArray" />
- <argument index="2" name="width" type="float" default="1.0" />
+ <param index="0" name="points" type="PackedVector2Array" />
+ <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">
<return type="void" />
- <argument index="0" name="font" type="Font" />
- <argument index="1" name="pos" type="Vector2" />
- <argument index="2" name="text" type="String" />
- <argument index="3" name="alignment" type="int" enum="HorizontalAlignment" default="0" />
- <argument index="4" name="width" type="float" default="-1" />
- <argument index="5" name="max_lines" type="int" default="-1" />
- <argument index="6" name="size" type="int" default="16" />
- <argument index="7" name="modulate" type="Color" default="Color(1, 1, 1, 1)" />
- <argument index="8" name="outline_size" type="int" default="0" />
- <argument index="9" name="outline_modulate" type="Color" default="Color(1, 1, 1, 0)" />
- <argument index="10" name="flags" type="int" default="99" />
- <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.
+ <param index="0" name="font" type="Font" />
+ <param index="1" name="pos" type="Vector2" />
+ <param index="2" name="text" type="String" />
+ <param index="3" name="alignment" type="int" enum="HorizontalAlignment" default="0" />
+ <param index="4" name="width" type="float" default="-1" />
+ <param index="5" name="font_size" type="int" default="16" />
+ <param index="6" name="max_lines" type="int" default="-1" />
+ <param index="7" name="modulate" type="Color" default="Color(1, 1, 1, 1)" />
+ <param index="8" name="brk_flags" type="int" enum="TextServer.LineBreakFlag" default="3" />
+ <param index="9" name="jst_flags" type="int" enum="TextServer.JustificationFlag" default="3" />
+ <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 [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">
+ <return type="void" />
+ <param index="0" name="font" type="Font" />
+ <param index="1" name="pos" type="Vector2" />
+ <param index="2" name="text" type="String" />
+ <param index="3" name="alignment" type="int" enum="HorizontalAlignment" default="0" />
+ <param index="4" name="width" type="float" default="-1" />
+ <param index="5" name="font_size" type="int" default="16" />
+ <param index="6" name="max_lines" type="int" default="-1" />
+ <param index="7" name="size" type="int" default="1" />
+ <param index="8" name="modulate" type="Color" default="Color(1, 1, 1, 1)" />
+ <param index="9" name="brk_flags" type="int" enum="TextServer.LineBreakFlag" default="3" />
+ <param index="10" name="jst_flags" type="int" enum="TextServer.JustificationFlag" default="3" />
+ <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 [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">
<return type="void" />
- <argument index="0" name="multimesh" type="MultiMesh" />
- <argument index="1" name="texture" type="Texture2D" />
+ <param index="0" name="multimesh" type="MultiMesh" />
+ <param index="1" name="texture" type="Texture2D" />
<description>
Draws a [MultiMesh] in 2D with the provided texture. See [MultiMeshInstance2D] for related documentation.
</description>
</method>
<method name="draw_polygon">
<return type="void" />
- <argument index="0" name="points" type="PackedVector2Array" />
- <argument index="1" name="colors" type="PackedColorArray" />
- <argument index="2" name="uvs" type="PackedVector2Array" default="PackedVector2Array()" />
- <argument index="3" name="texture" type="Texture2D" default="null" />
+ <param index="0" name="points" type="PackedVector2Array" />
+ <param index="1" name="colors" type="PackedColorArray" />
+ <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">
<return type="void" />
- <argument index="0" name="points" type="PackedVector2Array" />
- <argument index="1" name="color" type="Color" />
- <argument index="2" name="width" type="float" default="1.0" />
- <argument index="3" name="antialiased" type="bool" default="false" />
+ <param index="0" name="points" type="PackedVector2Array" />
+ <param index="1" name="color" type="Color" />
+ <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">
<return type="void" />
- <argument index="0" name="points" type="PackedVector2Array" />
- <argument index="1" name="colors" type="PackedColorArray" />
- <argument index="2" name="width" type="float" default="1.0" />
- <argument index="3" name="antialiased" type="bool" default="false" />
+ <param index="0" name="points" type="PackedVector2Array" />
+ <param index="1" name="colors" type="PackedColorArray" />
+ <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">
<return type="void" />
- <argument index="0" name="points" type="PackedVector2Array" />
- <argument index="1" name="colors" type="PackedColorArray" />
- <argument index="2" name="uvs" type="PackedVector2Array" />
- <argument index="3" name="texture" type="Texture2D" default="null" />
- <argument index="4" name="width" type="float" default="1.0" />
+ <param index="0" name="points" type="PackedVector2Array" />
+ <param index="1" name="colors" type="PackedColorArray" />
+ <param index="2" name="uvs" type="PackedVector2Array" />
+ <param index="3" name="texture" type="Texture2D" default="null" />
+ <param index="4" name="width" type="float" default="1.0" />
<description>
Draws a custom primitive. 1 point for a point, 2 points for a line, 3 points for a triangle, and 4 points for a quad. If 0 points or more than 4 points are specified, nothing will be drawn and an error message will be printed. See also [method draw_line], [method draw_polyline], [method draw_polygon], and [method draw_rect].
</description>
</method>
<method name="draw_rect">
<return type="void" />
- <argument index="0" name="rect" type="Rect2" />
- <argument index="1" name="color" type="Color" />
- <argument index="2" name="filled" type="bool" default="true" />
- <argument index="3" name="width" type="float" default="1.0" />
+ <param index="0" name="rect" type="Rect2" />
+ <param index="1" name="color" type="Color" />
+ <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">
<return type="void" />
- <argument index="0" name="position" type="Vector2" />
- <argument index="1" name="rotation" type="float" default="0.0" />
- <argument index="2" name="scale" type="Vector2" default="Vector2(1, 1)" />
+ <param index="0" name="position" type="Vector2" />
+ <param index="1" name="rotation" type="float" default="0.0" />
+ <param index="2" name="scale" type="Vector2" default="Vector2(1, 1)" />
<description>
Sets a custom transform for drawing via components. Anything drawn afterwards will be transformed by this.
</description>
</method>
<method name="draw_set_transform_matrix">
<return type="void" />
- <argument index="0" name="xform" type="Transform2D" />
+ <param index="0" name="xform" type="Transform2D" />
<description>
Sets a custom transform for drawing via matrix. Anything drawn afterwards will be transformed by this.
</description>
</method>
<method name="draw_string" qualifiers="const">
<return type="void" />
- <argument index="0" name="font" type="Font" />
- <argument index="1" name="pos" type="Vector2" />
- <argument index="2" name="text" type="String" />
- <argument index="3" name="alignment" type="int" enum="HorizontalAlignment" default="0" />
- <argument index="4" name="width" type="float" default="-1" />
- <argument index="5" name="size" type="int" default="16" />
- <argument index="6" name="modulate" type="Color" default="Color(1, 1, 1, 1)" />
- <argument index="7" name="outline_size" type="int" default="0" />
- <argument index="8" name="outline_modulate" type="Color" default="Color(1, 1, 1, 0)" />
- <argument index="9" name="flags" type="int" default="3" />
- <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.
+ <param index="0" name="font" type="Font" />
+ <param index="1" name="pos" type="Vector2" />
+ <param index="2" name="text" type="String" />
+ <param index="3" name="alignment" type="int" enum="HorizontalAlignment" default="0" />
+ <param index="4" name="width" type="float" default="-1" />
+ <param index="5" name="font_size" type="int" default="16" />
+ <param index="6" name="modulate" type="Color" default="Color(1, 1, 1, 1)" />
+ <param index="7" name="jst_flags" type="int" enum="TextServer.JustificationFlag" default="3" />
+ <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 [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]
@@ -279,44 +309,61 @@
See also [method Font.draw_string].
</description>
</method>
+ <method name="draw_string_outline" qualifiers="const">
+ <return type="void" />
+ <param index="0" name="font" type="Font" />
+ <param index="1" name="pos" type="Vector2" />
+ <param index="2" name="text" type="String" />
+ <param index="3" name="alignment" type="int" enum="HorizontalAlignment" default="0" />
+ <param index="4" name="width" type="float" default="-1" />
+ <param index="5" name="font_size" type="int" default="16" />
+ <param index="6" name="size" type="int" default="1" />
+ <param index="7" name="modulate" type="Color" default="Color(1, 1, 1, 1)" />
+ <param index="8" name="jst_flags" type="int" enum="TextServer.JustificationFlag" default="3" />
+ <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 [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">
<return type="void" />
- <argument index="0" name="style_box" type="StyleBox" />
- <argument index="1" name="rect" type="Rect2" />
+ <param index="0" name="style_box" type="StyleBox" />
+ <param index="1" name="rect" type="Rect2" />
<description>
Draws a styled rectangle.
</description>
</method>
<method name="draw_texture">
<return type="void" />
- <argument index="0" name="texture" type="Texture2D" />
- <argument index="1" name="position" type="Vector2" />
- <argument index="2" name="modulate" type="Color" default="Color(1, 1, 1, 1)" />
+ <param index="0" name="texture" type="Texture2D" />
+ <param index="1" name="position" type="Vector2" />
+ <param index="2" name="modulate" type="Color" default="Color(1, 1, 1, 1)" />
<description>
Draws a texture at a given position.
</description>
</method>
<method name="draw_texture_rect">
<return type="void" />
- <argument index="0" name="texture" type="Texture2D" />
- <argument index="1" name="rect" type="Rect2" />
- <argument index="2" name="tile" type="bool" />
- <argument index="3" name="modulate" type="Color" default="Color(1, 1, 1, 1)" />
- <argument index="4" name="transpose" type="bool" default="false" />
+ <param index="0" name="texture" type="Texture2D" />
+ <param index="1" name="rect" type="Rect2" />
+ <param index="2" name="tile" type="bool" />
+ <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">
<return type="void" />
- <argument index="0" name="texture" type="Texture2D" />
- <argument index="1" name="rect" type="Rect2" />
- <argument index="2" name="src_rect" type="Rect2" />
- <argument index="3" name="modulate" type="Color" default="Color(1, 1, 1, 1)" />
- <argument index="4" name="transpose" type="bool" default="false" />
- <argument index="5" name="clip_uv" type="bool" default="true" />
+ <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)" />
+ <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">
@@ -419,35 +466,35 @@
<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" />
- <argument index="0" name="screen_point" 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" />
- <argument index="0" name="event" 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="set_notify_local_transform">
<return type="void" />
- <argument index="0" name="enable" type="bool" />
+ <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" />
- <argument index="0" name="enable" type="bool" />
+ <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">
@@ -459,7 +506,7 @@
<method name="update">
<return type="void" />
<description>
- Queue the [CanvasItem] for update. [constant NOTIFICATION_DRAW] will be called on idle time to request redraw.
+ 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>
</methods>
@@ -501,7 +548,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">
@@ -528,7 +576,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.
@@ -555,11 +603,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">
diff --git a/doc/classes/CanvasLayer.xml b/doc/classes/CanvasLayer.xml
index ff2c3a8855..555137ac45 100644
--- a/doc/classes/CanvasLayer.xml
+++ b/doc/classes/CanvasLayer.xml
@@ -35,11 +35,11 @@
<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">
+ <member name="follow_viewport_enabled" 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>
<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/CharacterBody2D.xml b/doc/classes/CharacterBody2D.xml
index 63d493248f..2d169904f7 100644
--- a/doc/classes/CharacterBody2D.xml
+++ b/doc/classes/CharacterBody2D.xml
@@ -17,9 +17,9 @@
<methods>
<method name="get_floor_angle" qualifiers="const">
<return type="float" />
- <argument index="0" name="up_direction" type="Vector2" default="Vector2(0, -1)" />
+ <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">
@@ -60,7 +60,7 @@
</method>
<method name="get_slide_collision">
<return type="KinematicCollision2D" />
- <argument index="0" name="slide_idx" type="int" />
+ <param index="0" name="slide_idx" type="int" />
<description>
Returns a [KinematicCollision2D], which contains information about a collision that occurred during the last call to [method move_and_slide]. Since the body can collide several times in a single call to [method move_and_slide], you must specify the index of the collision in the range 0 to ([method get_slide_collision_count] - 1).
[b]Example usage:[/b]
@@ -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>
@@ -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 6c5cd62fe1..cbcd6b3af7 100644
--- a/doc/classes/CharacterBody3D.xml
+++ b/doc/classes/CharacterBody3D.xml
@@ -18,9 +18,9 @@
<methods>
<method name="get_floor_angle" qualifiers="const">
<return type="float" />
- <argument index="0" name="up_direction" type="Vector3" default="Vector3(0, 1, 0)" />
+ <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">
@@ -61,7 +61,7 @@
</method>
<method name="get_slide_collision">
<return type="KinematicCollision3D" />
- <argument index="0" name="slide_idx" type="int" />
+ <param index="0" name="slide_idx" type="int" />
<description>
Returns a [KinematicCollision3D], which contains information about a collision that occurred during the last call to [method move_and_slide]. Since the body can collide several times in a single call to [method move_and_slide], you must specify the index of the collision in the range 0 to ([method get_slide_collision_count] - 1).
</description>
@@ -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>
@@ -155,14 +149,20 @@
<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 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_floor_layers" type="int" setter="set_moving_platform_floor_layers" getter="get_moving_platform_floor_layers" default="4294967295">
- Collision layers that will be included for detecting floor bodies that will act as moving platforms to be followed by the [CharacterBody2D]. By default, all floor bodies are detected and propagate their velocity.
+ <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="moving_platform_wall_layers" type="int" setter="set_moving_platform_wall_layers" getter="get_moving_platform_wall_layers" default="0">
- Collision layers that will be included for detecting wall bodies that will act as moving platforms to be followed by the [CharacterBody2D]. By default, all wall bodies are ignored.
+ <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.
@@ -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..d39b75ae52 100644
--- a/doc/classes/CheckBox.xml
+++ b/doc/classes/CheckBox.xml
@@ -39,7 +39,7 @@
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..f49da69926 100644
--- a/doc/classes/CheckButton.xml
+++ b/doc/classes/CheckButton.xml
@@ -39,7 +39,7 @@
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.
diff --git a/doc/classes/ClassDB.xml b/doc/classes/ClassDB.xml
index 43210de686..58a536406f 100644
--- a/doc/classes/ClassDB.xml
+++ b/doc/classes/ClassDB.xml
@@ -11,142 +11,142 @@
<methods>
<method name="can_instantiate" qualifiers="const">
<return type="bool" />
- <argument index="0" name="class" type="StringName" />
+ <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 you can instance objects from the specified [param class], [code]false[/code] in other case.
</description>
</method>
<method name="class_exists" qualifiers="const">
<return type="bool" />
- <argument index="0" name="class" type="StringName" />
+ <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">
<return type="PackedStringArray" />
- <argument index="0" name="class" type="StringName" />
- <argument index="1" name="enum" type="StringName" />
- <argument index="2" name="no_inheritance" type="bool" default="false" />
+ <param index="0" name="class" type="StringName" />
+ <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">
<return type="PackedStringArray" />
- <argument index="0" name="class" type="StringName" />
- <argument index="1" name="no_inheritance" type="bool" default="false" />
+ <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">
<return type="int" />
- <argument index="0" name="class" type="StringName" />
- <argument index="1" name="name" type="StringName" />
+ <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">
<return type="StringName" />
- <argument index="0" name="class" type="StringName" />
- <argument index="1" name="name" type="StringName" />
- <argument index="2" name="no_inheritance" type="bool" default="false" />
+ <param index="0" name="class" type="StringName" />
+ <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">
<return type="PackedStringArray" />
- <argument index="0" name="class" type="StringName" />
- <argument index="1" name="no_inheritance" type="bool" default="false" />
+ <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" />
- <argument index="0" name="class" type="StringName" />
- <argument index="1" name="no_inheritance" type="bool" default="false" />
+ <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>
<method name="class_get_property" qualifiers="const">
<return type="Variant" />
- <argument index="0" name="object" type="Object" />
- <argument index="1" name="property" type="StringName" />
+ <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" />
- <argument index="0" name="class" type="StringName" />
- <argument index="1" name="no_inheritance" type="bool" default="false" />
+ <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">
<return type="Dictionary" />
- <argument index="0" name="class" type="StringName" />
- <argument index="1" name="signal" type="StringName" />
+ <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" />
- <argument index="0" name="class" type="StringName" />
- <argument index="1" name="no_inheritance" type="bool" default="false" />
+ <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">
<return type="bool" />
- <argument index="0" name="class" type="StringName" />
- <argument index="1" name="name" type="StringName" />
- <argument index="2" name="no_inheritance" type="bool" default="false" />
+ <param index="0" name="class" type="StringName" />
+ <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">
<return type="bool" />
- <argument index="0" name="class" type="StringName" />
- <argument index="1" name="name" type="StringName" />
+ <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">
<return type="bool" />
- <argument index="0" name="class" type="StringName" />
- <argument index="1" name="method" type="StringName" />
- <argument index="2" name="no_inheritance" type="bool" default="false" />
+ <param index="0" name="class" type="StringName" />
+ <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">
<return type="bool" />
- <argument index="0" name="class" type="StringName" />
- <argument index="1" name="signal" type="StringName" />
+ <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">
<return type="int" enum="Error" />
- <argument index="0" name="object" type="Object" />
- <argument index="1" name="property" type="StringName" />
- <argument index="2" name="value" type="Variant" />
+ <param index="0" name="object" type="Object" />
+ <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">
@@ -157,38 +157,38 @@
</method>
<method name="get_inheriters_from_class" qualifiers="const">
<return type="PackedStringArray" />
- <argument index="0" name="class" type="StringName" />
+ <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" />
- <argument index="0" name="class" 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" />
- <argument index="0" name="class" type="StringName" />
+ <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" />
- <argument index="0" name="class" type="StringName" />
+ <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">
<return type="bool" />
- <argument index="0" name="class" type="StringName" />
- <argument index="1" name="inherits" type="StringName" />
+ <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 ab55aeba05..ca482a39e0 100644
--- a/doc/classes/CodeEdit.xml
+++ b/doc/classes/CodeEdit.xml
@@ -12,30 +12,30 @@
<methods>
<method name="_confirm_code_completion" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="replace" type="bool" />
+ <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" />
- <argument index="0" name="candidates" type="Dictionary[]" />
+ <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" />
- <argument index="0" name="force" type="bool" />
+ <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">
<return type="void" />
- <argument index="0" name="start_key" type="String" />
- <argument index="1" name="end_key" type="String" />
+ <param index="0" name="start_key" type="String" />
+ <param index="1" name="end_key" type="String" />
<description>
Adds a brace pair.
Both the start and end keys must be symbols. Only the start key has to be unique.
@@ -43,12 +43,12 @@
</method>
<method name="add_code_completion_option">
<return type="void" />
- <argument index="0" name="type" type="int" enum="CodeEdit.CodeCompletionKind" />
- <argument index="1" name="display_text" type="String" />
- <argument index="2" name="insert_text" type="String" />
- <argument index="3" name="text_color" type="Color" default="Color(1, 1, 1, 1)" />
- <argument index="4" name="icon" type="Resource" default="null" />
- <argument index="5" name="value" type="Variant" default="0" />
+ <param index="0" name="type" type="int" enum="CodeEdit.CodeCompletionKind" />
+ <param index="1" name="display_text" type="String" />
+ <param index="2" name="insert_text" type="String" />
+ <param index="3" name="text_color" type="Color" default="Color(1, 1, 1, 1)" />
+ <param index="4" name="icon" type="Resource" default="null" />
+ <param index="5" name="value" type="Variant" default="0" />
<description>
Submits an item to the queue of potential candidates for the autocomplete menu. Call [method update_code_completion_options] to update the list.
[b]Note:[/b] This list will replace all current candidates.
@@ -56,9 +56,9 @@
</method>
<method name="add_comment_delimiter">
<return type="void" />
- <argument index="0" name="start_key" type="String" />
- <argument index="1" name="end_key" type="String" />
- <argument index="2" name="line_only" type="bool" default="false" />
+ <param index="0" name="start_key" type="String" />
+ <param index="1" name="end_key" type="String" />
+ <param index="2" name="line_only" type="bool" default="false" />
<description>
Adds a comment delimiter.
Both the start and end keys must be symbols. Only the start key has to be unique.
@@ -67,9 +67,9 @@
</method>
<method name="add_string_delimiter">
<return type="void" />
- <argument index="0" name="start_key" type="String" />
- <argument index="1" name="end_key" type="String" />
- <argument index="2" name="line_only" type="bool" default="false" />
+ <param index="0" name="start_key" type="String" />
+ <param index="1" name="end_key" type="String" />
+ <param index="2" name="line_only" type="bool" default="false" />
<description>
Adds a string delimiter.
Both the start and end keys must be symbols. Only the start key has to be unique.
@@ -78,7 +78,7 @@
</method>
<method name="can_fold_line" qualifiers="const">
<return type="bool" />
- <argument index="0" name="line" type="int" />
+ <param index="0" name="line" type="int" />
<description>
Returns if the given line is foldable, that is, it has indented lines right below it or a comment / string block.
</description>
@@ -121,9 +121,9 @@
</method>
<method name="confirm_code_completion">
<return type="void" />
- <argument index="0" name="replace" type="bool" default="false" />
+ <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">
@@ -146,35 +146,35 @@
</method>
<method name="fold_line">
<return type="void" />
- <argument index="0" name="line" type="int" />
+ <param index="0" name="line" type="int" />
<description>
Folds the given line, if possible (see [method can_fold_line]).
</description>
</method>
<method name="get_auto_brace_completion_close_key" qualifiers="const">
<return type="String" />
- <argument index="0" name="open_key" 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>
</method>
<method name="get_code_completion_option" qualifiers="const">
<return type="Dictionary" />
- <argument index="0" name="index" type="int" />
+ <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.
@@ -197,36 +197,36 @@
</method>
<method name="get_delimiter_end_key" qualifiers="const">
<return type="String" />
- <argument index="0" name="delimiter_index" type="int" />
+ <param index="0" name="delimiter_index" type="int" />
<description>
Gets the end key for a string or comment region index.
</description>
</method>
<method name="get_delimiter_end_position" qualifiers="const">
<return type="Vector2" />
- <argument index="0" name="line" type="int" />
- <argument index="1" name="column" type="int" />
+ <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">
<return type="String" />
- <argument index="0" name="delimiter_index" type="int" />
+ <param index="0" name="delimiter_index" type="int" />
<description>
Gets the start key for a string or comment region index.
</description>
</method>
<method name="get_delimiter_start_position" qualifiers="const">
<return type="Vector2" />
- <argument index="0" name="line" type="int" />
- <argument index="1" name="column" type="int" />
+ <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>
@@ -251,30 +251,30 @@
</method>
<method name="has_auto_brace_completion_close_key" qualifiers="const">
<return type="bool" />
- <argument index="0" name="close_key" type="String" />
+ <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" />
- <argument index="0" name="open_key" type="String" />
+ <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" />
- <argument index="0" name="start_key" type="String" />
+ <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" />
- <argument index="0" name="start_key" type="String" />
+ <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">
@@ -285,124 +285,124 @@
</method>
<method name="is_in_comment" qualifiers="const">
<return type="int" />
- <argument index="0" name="line" type="int" />
- <argument index="1" name="column" type="int" default="-1" />
+ <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">
<return type="int" />
- <argument index="0" name="line" type="int" />
- <argument index="1" name="column" type="int" default="-1" />
+ <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">
<return type="bool" />
- <argument index="0" name="line" type="int" />
+ <param index="0" name="line" type="int" />
<description>
Returns whether the line at the specified index is bookmarked or not.
</description>
</method>
<method name="is_line_breakpointed" qualifiers="const">
<return type="bool" />
- <argument index="0" name="line" type="int" />
+ <param index="0" name="line" type="int" />
<description>
Returns whether the line at the specified index is breakpointed or not.
</description>
</method>
<method name="is_line_executing" qualifiers="const">
<return type="bool" />
- <argument index="0" name="line" type="int" />
+ <param index="0" name="line" type="int" />
<description>
Returns whether the line at the specified index is marked as executing or not.
</description>
</method>
<method name="is_line_folded" qualifiers="const">
<return type="bool" />
- <argument index="0" name="line" type="int" />
+ <param index="0" name="line" type="int" />
<description>
Returns whether the line at the specified index is folded or not.
</description>
</method>
<method name="remove_comment_delimiter">
<return type="void" />
- <argument index="0" name="start_key" type="String" />
+ <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" />
- <argument index="0" name="start_key" type="String" />
+ <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" />
- <argument index="0" name="force" type="bool" default="false" />
+ <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">
<return type="void" />
- <argument index="0" name="index" type="int" />
+ <param index="0" name="index" type="int" />
<description>
Sets the current selected completion option.
</description>
</method>
<method name="set_code_hint">
<return type="void" />
- <argument index="0" name="code_hint" type="String" />
+ <param index="0" name="code_hint" type="String" />
<description>
Sets the code hint text. Pass an empty string to clear.
</description>
</method>
<method name="set_code_hint_draw_below">
<return type="void" />
- <argument index="0" name="draw_below" type="bool" />
+ <param index="0" name="draw_below" type="bool" />
<description>
Sets if the code hint should draw below the text.
</description>
</method>
<method name="set_line_as_bookmarked">
<return type="void" />
- <argument index="0" name="line" type="int" />
- <argument index="1" name="bookmarked" type="bool" />
+ <param index="0" name="line" type="int" />
+ <param index="1" name="bookmarked" type="bool" />
<description>
Sets the line as bookmarked.
</description>
</method>
<method name="set_line_as_breakpoint">
<return type="void" />
- <argument index="0" name="line" type="int" />
- <argument index="1" name="breakpointed" type="bool" />
+ <param index="0" name="line" type="int" />
+ <param index="1" name="breakpointed" type="bool" />
<description>
Sets the line as breakpointed.
</description>
</method>
<method name="set_line_as_executing">
<return type="void" />
- <argument index="0" name="line" type="int" />
- <argument index="1" name="executing" type="bool" />
+ <param index="0" name="line" type="int" />
+ <param index="1" name="executing" type="bool" />
<description>
Sets the line as executing.
</description>
</method>
<method name="set_symbol_lookup_word_as_valid">
<return type="void" />
- <argument index="0" name="valid" type="bool" />
+ <param index="0" name="valid" type="bool" />
<description>
Sets the symbol emitted by [signal symbol_validate] as a valid lookup.
</description>
</method>
<method name="toggle_foldable_line">
<return type="void" />
- <argument index="0" name="line" type="int" />
+ <param index="0" name="line" type="int" />
<description>
Toggle the folding of the code block at the given line.
</description>
@@ -415,7 +415,7 @@
</method>
<method name="unfold_line">
<return type="void" />
- <argument index="0" name="line" type="int" />
+ <param index="0" name="line" type="int" />
<description>
Unfolds all lines that were previously folded.
</description>
@@ -428,9 +428,9 @@
</method>
<method name="update_code_completion_options">
<return type="void" />
- <argument index="0" name="force" type="bool" />
+ <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>
@@ -478,11 +478,11 @@
<member name="indent_automatic" type="bool" setter="set_auto_indent_enabled" getter="is_auto_indent_enabled" default="false">
Sets whether automatic indent are enabled, this will add an extra indent if a prefix or brace is found.
</member>
- <member name="indent_automatic_prefixes" type="String[]" setter="set_auto_indent_prefixes" getter="get_auto_indent_prefixes" default="[&quot;(&quot;, &quot;:&quot;, &quot;[&quot;, &quot;{&quot;]">
+ <member name="indent_automatic_prefixes" type="String[]" setter="set_auto_indent_prefixes" getter="get_auto_indent_prefixes" default="[&quot;:&quot;, &quot;{&quot;, &quot;[&quot;, &quot;(&quot;]">
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.
@@ -501,7 +501,7 @@
</members>
<signals>
<signal name="breakpoint_toggled">
- <argument index="0" name="line" type="int" />
+ <param index="0" name="line" type="int" />
<description>
Emitted when a breakpoint is added or removed from a line. If the line is moved via backspace a removed is emitted at the old line.
</description>
@@ -512,15 +512,15 @@
</description>
</signal>
<signal name="symbol_lookup">
- <argument index="0" name="symbol" type="String" />
- <argument index="1" name="line" type="int" />
- <argument index="2" name="column" type="int" />
+ <param index="0" name="symbol" type="String" />
+ <param index="1" name="line" type="int" />
+ <param index="2" name="column" type="int" />
<description>
Emitted when the user has clicked on a valid symbol.
</description>
</signal>
<signal name="symbol_validate">
- <argument index="0" name="symbol" type="String" />
+ <param index="0" name="symbol" type="String" />
<description>
Emitted when the user hovers over a symbol. The symbol should be validated and responded to, by calling [method set_symbol_lookup_word_as_valid].
</description>
@@ -592,6 +592,9 @@
<theme_item name="completion_scroll_color" data_type="color" type="Color" default="Color(1, 1, 1, 0.29)">
[Color] of the scrollbar in the code completion popup.
</theme_item>
+ <theme_item name="completion_scroll_hovered_color" data_type="color" type="Color" default="Color(1, 1, 1, 0.4)">
+ [Color] of the scrollbar in the code completion popup when hovered.
+ </theme_item>
<theme_item name="completion_selected_color" data_type="color" type="Color" default="Color(0.26, 0.26, 0.27, 1)">
Background highlight [Color] for the current selected option item in the code completion popup.
</theme_item>
diff --git a/doc/classes/CodeHighlighter.xml b/doc/classes/CodeHighlighter.xml
index b4bde1d00b..fd1f595fc6 100644
--- a/doc/classes/CodeHighlighter.xml
+++ b/doc/classes/CodeHighlighter.xml
@@ -11,10 +11,10 @@
<methods>
<method name="add_color_region">
<return type="void" />
- <argument index="0" name="start_key" type="String" />
- <argument index="1" name="end_key" type="String" />
- <argument index="2" name="color" type="Color" />
- <argument index="3" name="line_only" type="bool" default="false" />
+ <param index="0" name="start_key" type="String" />
+ <param index="1" name="end_key" type="String" />
+ <param index="2" name="color" type="Color" />
+ <param index="3" name="line_only" type="bool" default="false" />
<description>
Adds a color region such as comments or strings.
Both the start and end keys must be symbols. Only the start key has to be unique.
@@ -23,8 +23,8 @@
</method>
<method name="add_keyword_color">
<return type="void" />
- <argument index="0" name="keyword" type="String" />
- <argument index="1" name="color" type="Color" />
+ <param index="0" name="keyword" type="String" />
+ <param index="1" name="color" type="Color" />
<description>
Sets the color for a keyword.
The keyword cannot contain any symbols except '_'.
@@ -32,8 +32,8 @@
</method>
<method name="add_member_keyword_color">
<return type="void" />
- <argument index="0" name="member_keyword" type="String" />
- <argument index="1" name="color" type="Color" />
+ <param index="0" name="member_keyword" type="String" />
+ <param index="1" name="color" type="Color" />
<description>
Sets the color for a member keyword.
The member keyword cannot contain any symbols except '_'.
@@ -60,56 +60,56 @@
</method>
<method name="get_keyword_color" qualifiers="const">
<return type="Color" />
- <argument index="0" name="keyword" type="String" />
+ <param index="0" name="keyword" type="String" />
<description>
Returns the color for a keyword.
</description>
</method>
<method name="get_member_keyword_color" qualifiers="const">
<return type="Color" />
- <argument index="0" name="member_keyword" type="String" />
+ <param index="0" name="member_keyword" type="String" />
<description>
Returns the color for a member keyword.
</description>
</method>
<method name="has_color_region" qualifiers="const">
<return type="bool" />
- <argument index="0" name="start_key" type="String" />
+ <param index="0" name="start_key" type="String" />
<description>
Returns [code]true[/code] if the start key exists, else [code]false[/code].
</description>
</method>
<method name="has_keyword_color" qualifiers="const">
<return type="bool" />
- <argument index="0" name="keyword" type="String" />
+ <param index="0" name="keyword" type="String" />
<description>
Returns [code]true[/code] if the keyword exists, else [code]false[/code].
</description>
</method>
<method name="has_member_keyword_color" qualifiers="const">
<return type="bool" />
- <argument index="0" name="member_keyword" type="String" />
+ <param index="0" name="member_keyword" type="String" />
<description>
Returns [code]true[/code] if the member keyword exists, else [code]false[/code].
</description>
</method>
<method name="remove_color_region">
<return type="void" />
- <argument index="0" name="start_key" type="String" />
+ <param index="0" name="start_key" type="String" />
<description>
Removes the color region that uses that start key.
</description>
</method>
<method name="remove_keyword_color">
<return type="void" />
- <argument index="0" name="keyword" type="String" />
+ <param index="0" name="keyword" type="String" />
<description>
Removes the keyword.
</description>
</method>
<method name="remove_member_keyword_color">
<return type="void" />
- <argument index="0" name="member_keyword" type="String" />
+ <param index="0" name="member_keyword" type="String" />
<description>
Removes the member keyword.
</description>
diff --git a/doc/classes/CollisionObject2D.xml b/doc/classes/CollisionObject2D.xml
index 5d025985cc..67d5a667e8 100644
--- a/doc/classes/CollisionObject2D.xml
+++ b/doc/classes/CollisionObject2D.xml
@@ -12,32 +12,33 @@
<methods>
<method name="_input_event" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="viewport" type="Viewport" />
- <argument index="1" name="event" type="InputEvent" />
- <argument index="2" name="shape_idx" type="int" />
+ <param index="0" name="viewport" type="Viewport" />
+ <param index="1" name="event" type="InputEvent" />
+ <param index="2" name="shape_idx" type="int" />
<description>
- Accepts unhandled [InputEvent]s. Requires [member input_pickable] to be [code]true[/code]. [code]shape_idx[/code] is the child index of the clicked [Shape2D]. Connect to the [code]input_event[/code] signal to easily pick up these events.
+ Accepts unhandled [InputEvent]s. [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="create_shape_owner">
<return type="int" />
- <argument index="0" name="owner" type="Object" />
+ <param index="0" name="owner" type="Object" />
<description>
Creates a new shape owner for the given object. Returns [code]owner_id[/code] of the new owner for future reference.
</description>
</method>
<method name="get_collision_layer_value" qualifiers="const">
<return type="bool" />
- <argument index="0" name="layer_number" type="int" />
+ <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" />
- <argument index="0" name="layer_number" type="int" />
+ <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">
@@ -48,149 +49,149 @@
</method>
<method name="get_shape_owner_one_way_collision_margin" qualifiers="const">
<return type="float" />
- <argument index="0" name="owner_id" type="int" />
+ <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>
</method>
<method name="is_shape_owner_disabled" qualifiers="const">
<return type="bool" />
- <argument index="0" name="owner_id" type="int" />
+ <param index="0" name="owner_id" type="int" />
<description>
If [code]true[/code], the shape owner and its shapes are disabled.
</description>
</method>
<method name="is_shape_owner_one_way_collision_enabled" qualifiers="const">
<return type="bool" />
- <argument index="0" name="owner_id" type="int" />
+ <param index="0" name="owner_id" type="int" />
<description>
Returns [code]true[/code] if collisions for the shape owner originating from this [CollisionObject2D] will not be reported to collided with [CollisionObject2D]s.
</description>
</method>
<method name="remove_shape_owner">
<return type="void" />
- <argument index="0" name="owner_id" type="int" />
+ <param index="0" name="owner_id" type="int" />
<description>
Removes the given shape owner.
</description>
</method>
<method name="set_collision_layer_value">
<return type="void" />
- <argument index="0" name="layer_number" type="int" />
- <argument index="1" name="value" type="bool" />
+ <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">
<return type="void" />
- <argument index="0" name="layer_number" type="int" />
- <argument index="1" name="value" type="bool" />
+ <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">
<return type="int" />
- <argument index="0" name="shape_index" type="int" />
+ <param index="0" name="shape_index" type="int" />
<description>
Returns the [code]owner_id[/code] of the given shape.
</description>
</method>
<method name="shape_owner_add_shape">
<return type="void" />
- <argument index="0" name="owner_id" type="int" />
- <argument index="1" name="shape" type="Shape2D" />
+ <param index="0" name="owner_id" type="int" />
+ <param index="1" name="shape" type="Shape2D" />
<description>
Adds a [Shape2D] to the shape owner.
</description>
</method>
<method name="shape_owner_clear_shapes">
<return type="void" />
- <argument index="0" name="owner_id" type="int" />
+ <param index="0" name="owner_id" type="int" />
<description>
Removes all shapes from the shape owner.
</description>
</method>
<method name="shape_owner_get_owner" qualifiers="const">
<return type="Object" />
- <argument index="0" name="owner_id" type="int" />
+ <param index="0" name="owner_id" type="int" />
<description>
Returns the parent object of the given shape owner.
</description>
</method>
<method name="shape_owner_get_shape" qualifiers="const">
<return type="Shape2D" />
- <argument index="0" name="owner_id" type="int" />
- <argument index="1" name="shape_id" type="int" />
+ <param index="0" name="owner_id" type="int" />
+ <param index="1" name="shape_id" type="int" />
<description>
Returns the [Shape2D] with the given id from the given shape owner.
</description>
</method>
<method name="shape_owner_get_shape_count" qualifiers="const">
<return type="int" />
- <argument index="0" name="owner_id" type="int" />
+ <param index="0" name="owner_id" type="int" />
<description>
Returns the number of shapes the given shape owner contains.
</description>
</method>
<method name="shape_owner_get_shape_index" qualifiers="const">
<return type="int" />
- <argument index="0" name="owner_id" type="int" />
- <argument index="1" name="shape_id" type="int" />
+ <param index="0" name="owner_id" type="int" />
+ <param index="1" name="shape_id" type="int" />
<description>
Returns the child index of the [Shape2D] with the given id from the given shape owner.
</description>
</method>
<method name="shape_owner_get_transform" qualifiers="const">
<return type="Transform2D" />
- <argument index="0" name="owner_id" type="int" />
+ <param index="0" name="owner_id" type="int" />
<description>
Returns the shape owner's [Transform2D].
</description>
</method>
<method name="shape_owner_remove_shape">
<return type="void" />
- <argument index="0" name="owner_id" type="int" />
- <argument index="1" name="shape_id" type="int" />
+ <param index="0" name="owner_id" type="int" />
+ <param index="1" name="shape_id" type="int" />
<description>
Removes a shape from the given shape owner.
</description>
</method>
<method name="shape_owner_set_disabled">
<return type="void" />
- <argument index="0" name="owner_id" type="int" />
- <argument index="1" name="disabled" type="bool" />
+ <param index="0" name="owner_id" type="int" />
+ <param index="1" name="disabled" type="bool" />
<description>
If [code]true[/code], disables the given shape owner.
</description>
</method>
<method name="shape_owner_set_one_way_collision">
<return type="void" />
- <argument index="0" name="owner_id" type="int" />
- <argument index="1" name="enable" type="bool" />
+ <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">
<return type="void" />
- <argument index="0" name="owner_id" type="int" />
- <argument index="1" name="margin" type="float" />
+ <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">
<return type="void" />
- <argument index="0" name="owner_id" type="int" />
- <argument index="1" name="transform" type="Transform2D" />
+ <param index="0" name="owner_id" type="int" />
+ <param index="1" name="transform" type="Transform2D" />
<description>
Sets the [Transform2D] of the given shape owner.
</description>
@@ -205,6 +206,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>
@@ -214,33 +218,35 @@
</members>
<signals>
<signal name="input_event">
- <argument index="0" name="viewport" type="Node" />
- <argument index="1" name="event" type="InputEvent" />
- <argument index="2" name="shape_idx" type="int" />
+ <param index="0" name="viewport" type="Node" />
+ <param index="1" name="event" type="InputEvent" />
+ <param index="2" name="shape_idx" type="int" />
<description>
- Emitted when an input event occurs. Requires [member input_pickable] to be [code]true[/code] and at least one [code]collision_layer[/code] bit to be set. See [method _input_event] for details.
+ Emitted when an input event occurs. Requires [member input_pickable] to be [code]true[/code] and at least one [member collision_layer] bit to be set. See [method _input_event] for details.
</description>
</signal>
<signal name="mouse_entered">
<description>
Emitted when the mouse pointer enters any of this object's shapes. Requires [member input_pickable] to be [code]true[/code] and at least one [member collision_layer] bit to be set. Note that moving between different shapes within a single [CollisionObject2D] won't cause this signal to be emitted.
+ [b]Note:[/b] Due to the lack of continuous collision detection, this signal may not be emitted in the expected order if the mouse moves fast enough and the [CollisionObject2D]'s area is small. This signal may also not be emitted if another [CollisionObject2D] is overlapping the [CollisionObject2D] in question.
</description>
</signal>
<signal name="mouse_exited">
<description>
Emitted when the mouse pointer exits all this object's shapes. Requires [member input_pickable] to be [code]true[/code] and at least one [member collision_layer] bit to be set. Note that moving between different shapes within a single [CollisionObject2D] won't cause this signal to be emitted.
+ [b]Note:[/b] Due to the lack of continuous collision detection, this signal may not be emitted in the expected order if the mouse moves fast enough and the [CollisionObject2D]'s area is small. This signal may also not be emitted if another [CollisionObject2D] is overlapping the [CollisionObject2D] in question.
</description>
</signal>
<signal name="mouse_shape_entered">
- <argument index="0" name="shape_idx" type="int" />
+ <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">
- <argument index="0" name="shape_idx" type="int" />
+ <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 2aac5528f4..4d10a33032 100644
--- a/doc/classes/CollisionObject3D.xml
+++ b/doc/classes/CollisionObject3D.xml
@@ -11,34 +11,35 @@
<methods>
<method name="_input_event" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="camera" type="Camera3D" />
- <argument index="1" name="event" type="InputEvent" />
- <argument index="2" name="position" type="Vector3" />
- <argument index="3" name="normal" type="Vector3" />
- <argument index="4" name="shape_idx" type="int" />
+ <param index="0" name="camera" type="Camera3D" />
+ <param index="1" name="event" type="InputEvent" />
+ <param index="2" name="position" type="Vector3" />
+ <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="create_shape_owner">
<return type="int" />
- <argument index="0" name="owner" type="Object" />
+ <param index="0" name="owner" type="Object" />
<description>
Creates a new shape owner for the given object. Returns [code]owner_id[/code] of the new owner for future reference.
</description>
</method>
<method name="get_collision_layer_value" qualifiers="const">
<return type="bool" />
- <argument index="0" name="layer_number" type="int" />
+ <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" />
- <argument index="0" name="layer_number" type="int" />
+ <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">
@@ -48,120 +49,120 @@
</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>
</method>
<method name="is_shape_owner_disabled" qualifiers="const">
<return type="bool" />
- <argument index="0" name="owner_id" type="int" />
+ <param index="0" name="owner_id" type="int" />
<description>
If [code]true[/code], the shape owner and its shapes are disabled.
</description>
</method>
<method name="remove_shape_owner">
<return type="void" />
- <argument index="0" name="owner_id" type="int" />
+ <param index="0" name="owner_id" type="int" />
<description>
Removes the given shape owner.
</description>
</method>
<method name="set_collision_layer_value">
<return type="void" />
- <argument index="0" name="layer_number" type="int" />
- <argument index="1" name="value" type="bool" />
+ <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">
<return type="void" />
- <argument index="0" name="layer_number" type="int" />
- <argument index="1" name="value" type="bool" />
+ <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">
<return type="int" />
- <argument index="0" name="shape_index" type="int" />
+ <param index="0" name="shape_index" type="int" />
<description>
Returns the [code]owner_id[/code] of the given shape.
</description>
</method>
<method name="shape_owner_add_shape">
<return type="void" />
- <argument index="0" name="owner_id" type="int" />
- <argument index="1" name="shape" type="Shape3D" />
+ <param index="0" name="owner_id" type="int" />
+ <param index="1" name="shape" type="Shape3D" />
<description>
Adds a [Shape3D] to the shape owner.
</description>
</method>
<method name="shape_owner_clear_shapes">
<return type="void" />
- <argument index="0" name="owner_id" type="int" />
+ <param index="0" name="owner_id" type="int" />
<description>
Removes all shapes from the shape owner.
</description>
</method>
<method name="shape_owner_get_owner" qualifiers="const">
<return type="Object" />
- <argument index="0" name="owner_id" type="int" />
+ <param index="0" name="owner_id" type="int" />
<description>
Returns the parent object of the given shape owner.
</description>
</method>
<method name="shape_owner_get_shape" qualifiers="const">
<return type="Shape3D" />
- <argument index="0" name="owner_id" type="int" />
- <argument index="1" name="shape_id" type="int" />
+ <param index="0" name="owner_id" type="int" />
+ <param index="1" name="shape_id" type="int" />
<description>
Returns the [Shape3D] with the given id from the given shape owner.
</description>
</method>
<method name="shape_owner_get_shape_count" qualifiers="const">
<return type="int" />
- <argument index="0" name="owner_id" type="int" />
+ <param index="0" name="owner_id" type="int" />
<description>
Returns the number of shapes the given shape owner contains.
</description>
</method>
<method name="shape_owner_get_shape_index" qualifiers="const">
<return type="int" />
- <argument index="0" name="owner_id" type="int" />
- <argument index="1" name="shape_id" type="int" />
+ <param index="0" name="owner_id" type="int" />
+ <param index="1" name="shape_id" type="int" />
<description>
Returns the child index of the [Shape3D] with the given id from the given shape owner.
</description>
</method>
<method name="shape_owner_get_transform" qualifiers="const">
<return type="Transform3D" />
- <argument index="0" name="owner_id" type="int" />
+ <param index="0" name="owner_id" type="int" />
<description>
Returns the shape owner's [Transform3D].
</description>
</method>
<method name="shape_owner_remove_shape">
<return type="void" />
- <argument index="0" name="owner_id" type="int" />
- <argument index="1" name="shape_id" type="int" />
+ <param index="0" name="owner_id" type="int" />
+ <param index="1" name="shape_id" type="int" />
<description>
Removes a shape from the given shape owner.
</description>
</method>
<method name="shape_owner_set_disabled">
<return type="void" />
- <argument index="0" name="owner_id" type="int" />
- <argument index="1" name="disabled" type="bool" />
+ <param index="0" name="owner_id" type="int" />
+ <param index="1" name="disabled" type="bool" />
<description>
If [code]true[/code], disables the given shape owner.
</description>
</method>
<method name="shape_owner_set_transform">
<return type="void" />
- <argument index="0" name="owner_id" type="int" />
- <argument index="1" name="transform" type="Transform3D" />
+ <param index="0" name="owner_id" type="int" />
+ <param index="1" name="transform" type="Transform3D" />
<description>
Sets the [Transform3D] of the given shape owner.
</description>
@@ -176,6 +177,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>
@@ -188,23 +192,25 @@
</members>
<signals>
<signal name="input_event">
- <argument index="0" name="camera" type="Node" />
- <argument index="1" name="event" type="InputEvent" />
- <argument index="2" name="position" type="Vector3" />
- <argument index="3" name="normal" type="Vector3" />
- <argument index="4" name="shape_idx" type="int" />
+ <param index="0" name="camera" type="Node" />
+ <param index="1" name="event" type="InputEvent" />
+ <param index="2" name="position" type="Vector3" />
+ <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">
<description>
- Emitted when the mouse pointer enters any of this object's shapes.
+ Emitted when the mouse pointer enters any of this object's shapes. Requires [member input_ray_pickable] to be [code]true[/code] and at least one [member collision_layer] bit to be set.
+ [b]Note:[/b] Due to the lack of continuous collision detection, this signal may not be emitted in the expected order if the mouse moves fast enough and the [CollisionObject2D]'s area is small. This signal may also not be emitted if another [CollisionObject2D] is overlapping the [CollisionObject2D] in question.
</description>
</signal>
<signal name="mouse_exited">
<description>
- Emitted when the mouse pointer exits all this object's shapes.
+ Emitted when the mouse pointer exits all this object's shapes. Requires [member input_ray_pickable] to be [code]true[/code] and at least one [member collision_layer] bit to be set.
+ [b]Note:[/b] Due to the lack of continuous collision detection, this signal may not be emitted in the expected order if the mouse moves fast enough and the [CollisionObject2D]'s area is small. This signal may also not be emitted if another [CollisionObject2D] is overlapping the [CollisionObject2D] in question.
</description>
</signal>
</signals>
diff --git a/doc/classes/CollisionPolygon2D.xml b/doc/classes/CollisionPolygon2D.xml
index a9d8a85226..f290fc9801 100644
--- a/doc/classes/CollisionPolygon2D.xml
+++ b/doc/classes/CollisionPolygon2D.xml
@@ -18,6 +18,7 @@
</member>
<member name="one_way_collision" type="bool" setter="set_one_way_collision" getter="is_one_way_collision_enabled" default="false">
If [code]true[/code], only edges that face up, relative to [CollisionPolygon2D]'s rotation, will collide with other objects.
+ [b]Note:[/b] This property has no effect if this [CollisionPolygon2D] is a child of an [Area2D] node.
</member>
<member name="one_way_collision_margin" type="float" setter="set_one_way_collision_margin" getter="get_one_way_collision_margin" default="1.0">
The margin used for one-way collision (in pixels). Higher values will make the shape thicker, and work better for colliders that enter the polygon at a high velocity.
diff --git a/doc/classes/CollisionShape2D.xml b/doc/classes/CollisionShape2D.xml
index f3a4cbc2d6..fa8fbd0d3e 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>
@@ -18,6 +19,7 @@
</member>
<member name="one_way_collision" type="bool" setter="set_one_way_collision" getter="is_one_way_collision_enabled" default="false">
Sets whether this collision shape should only detect collision on one side (top or bottom).
+ [b]Note:[/b] This property has no effect if this [CollisionShape2D] is a child of an [Area2D] node.
</member>
<member name="one_way_collision_margin" type="float" setter="set_one_way_collision_margin" getter="get_one_way_collision_margin" default="1.0">
The margin used for one-way collision (in pixels). Higher values will make the shape thicker, and work better for colliders that enter the shape at a high velocity.
diff --git a/doc/classes/CollisionShape3D.xml b/doc/classes/CollisionShape3D.xml
index 521a11effd..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>
@@ -21,7 +22,7 @@
</method>
<method name="resource_changed">
<return type="void" />
- <argument index="0" name="resource" type="Resource" />
+ <param index="0" name="resource" type="Resource" />
<description>
If this method exists within a script it will be called whenever the shape resource has been modified.
</description>
diff --git a/doc/classes/Color.xml b/doc/classes/Color.xml
index 7b8a57ed22..3a3803c1da 100644
--- a/doc/classes/Color.xml
+++ b/doc/classes/Color.xml
@@ -24,8 +24,8 @@
</constructor>
<constructor name="Color">
<return type="Color" />
- <argument index="0" name="from" type="Color" />
- <argument index="1" name="alpha" type="float" />
+ <param index="0" name="from" type="Color" />
+ <param index="1" name="alpha" type="float" />
<description>
Constructs a [Color] from an existing color, but with a custom alpha value.
[codeblocks]
@@ -40,31 +40,31 @@
</constructor>
<constructor name="Color">
<return type="Color" />
- <argument index="0" name="from" type="Color" />
+ <param index="0" name="from" type="Color" />
<description>
Constructs a [Color] as a copy of the given [Color].
</description>
</constructor>
<constructor name="Color">
<return type="Color" />
- <argument index="0" name="code" type="String" />
+ <param index="0" name="code" type="String" />
<description>
Constructs a [Color] either from an HTML color code or from a standardized color name. Supported color names are the same as the constants.
</description>
</constructor>
<constructor name="Color">
<return type="Color" />
- <argument index="0" name="code" type="String" />
- <argument index="1" name="alpha" type="float" />
+ <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">
<return type="Color" />
- <argument index="0" name="r" type="float" />
- <argument index="1" name="g" type="float" />
- <argument index="2" name="b" type="float" />
+ <param index="0" name="r" type="float" />
+ <param index="1" name="g" type="float" />
+ <param index="2" name="b" type="float" />
<description>
Constructs a [Color] from RGB values, typically between 0 and 1. Alpha will be 1.
[codeblocks]
@@ -79,10 +79,10 @@
</constructor>
<constructor name="Color">
<return type="Color" />
- <argument index="0" name="r" type="float" />
- <argument index="1" name="g" type="float" />
- <argument index="2" name="b" type="float" />
- <argument index="3" name="a" type="float" />
+ <param index="0" name="r" type="float" />
+ <param index="1" name="g" type="float" />
+ <param index="2" name="b" type="float" />
+ <param index="3" name="a" type="float" />
<description>
Constructs a [Color] from RGBA values, typically between 0 and 1.
[codeblocks]
@@ -99,7 +99,7 @@
<methods>
<method name="blend" qualifiers="const">
<return type="Color" />
- <argument index="0" name="over" type="Color" />
+ <param index="0" name="over" type="Color" />
<description>
Returns a new color resulting from blending this color over another. If the color is opaque, the result is also opaque. The second color may have a range of alpha values.
[codeblocks]
@@ -118,15 +118,15 @@
</method>
<method name="clamp" qualifiers="const">
<return type="Color" />
- <argument index="0" name="min" type="Color" default="Color(0, 0, 0, 0)" />
- <argument index="1" name="max" type="Color" default="Color(1, 1, 1, 1)" />
+ <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">
<return type="Color" />
- <argument index="0" name="amount" type="float" />
+ <param index="0" name="amount" type="float" />
<description>
Returns a new color resulting from making this color darker by the specified percentage (ratio from 0 to 1).
[codeblocks]
@@ -143,38 +143,56 @@
</method>
<method name="find_named_color" qualifiers="static">
<return type="int" />
- <argument index="0" name="name" type="String" />
+ <param index="0" name="name" type="String" />
<description>
</description>
</method>
<method name="from_hsv" qualifiers="static">
<return type="Color" />
- <argument index="0" name="h" type="float" />
- <argument index="1" name="s" type="float" />
- <argument index="2" name="v" type="float" />
- <argument index="3" name="alpha" type="float" default="1.0" />
+ <param index="0" name="h" type="float" />
+ <param index="1" name="s" type="float" />
+ <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 c = Color.from_hsv(0.58, 0.5, 0.79, 0.8)
+ var color = Color.from_hsv(0.58, 0.5, 0.79, 0.8)
[/gdscript]
[csharp]
- var c = Color.FromHsv(0.58f, 0.5f, 0.79f, 0.8f);
+ var color = Color.FromHsv(0.58f, 0.5f, 0.79f, 0.8f);
+ [/csharp]
+ [/codeblocks]
+ </description>
+ </method>
+ <method name="from_ok_hsl" qualifiers="static">
+ <return type="Color" />
+ <param index="0" name="h" type="float" />
+ <param index="1" name="s" type="float" />
+ <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]. [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)
+ [/gdscript]
+ [csharp]
+ var color = Color.FromOkHsl(0.58f, 0.5f, 0.79f, 0.8f);
[/csharp]
[/codeblocks]
</description>
</method>
<method name="from_rgbe9995" qualifiers="static">
<return type="Color" />
- <argument index="0" name="rgbe" type="int" />
+ <param index="0" name="rgbe" type="int" />
<description>
</description>
</method>
<method name="from_string" qualifiers="static">
<return type="Color" />
- <argument index="0" name="str" type="String" />
- <argument index="1" name="default" type="Color" />
+ <param index="0" name="str" type="String" />
+ <param index="1" name="default" type="Color" />
<description>
</description>
</method>
@@ -188,7 +206,7 @@
</method>
<method name="get_named_color" qualifiers="static">
<return type="Color" />
- <argument index="0" name="idx" type="int" />
+ <param index="0" name="idx" type="int" />
<description>
</description>
</method>
@@ -199,29 +217,29 @@
</method>
<method name="get_named_color_name" qualifiers="static">
<return type="String" />
- <argument index="0" name="idx" type="int" />
+ <param index="0" name="idx" type="int" />
<description>
</description>
</method>
<method name="hex" qualifiers="static">
<return type="Color" />
- <argument index="0" name="hex" type="int" />
+ <param index="0" name="hex" type="int" />
<description>
</description>
</method>
<method name="hex64" qualifiers="static">
<return type="Color" />
- <argument index="0" name="hex" type="int" />
+ <param index="0" name="hex" type="int" />
<description>
</description>
</method>
<method name="html" qualifiers="static">
<return type="Color" />
- <argument index="0" name="rgba" type="String" />
+ <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]
@@ -237,9 +255,9 @@
</method>
<method name="html_is_valid" qualifiers="static">
<return type="bool" />
- <argument index="0" name="color" type="String" />
+ <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]
@@ -279,17 +297,17 @@
</method>
<method name="is_equal_approx" qualifiers="const">
<return type="bool" />
- <argument index="0" name="to" type="Color" />
+ <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">
<return type="Color" />
- <argument index="0" name="to" type="Color" />
- <argument index="1" name="weight" type="float" />
+ <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)
@@ -306,7 +324,7 @@
</method>
<method name="lightened" qualifiers="const">
<return type="Color" />
- <argument index="0" name="amount" type="float" />
+ <param index="0" name="amount" type="float" />
<description>
Returns a new color resulting from making this color lighter by the specified percentage (ratio from 0 to 1).
[codeblocks]
@@ -399,10 +417,10 @@
</method>
<method name="to_html" qualifiers="const">
<return type="String" />
- <argument index="0" name="with_alpha" type="bool" default="true" />
+ <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)
@@ -928,7 +946,7 @@
<operators>
<operator name="operator !=">
<return type="bool" />
- <argument index="0" name="right" type="Color" />
+ <param index="0" name="right" type="Color" />
<description>
Returns [code]true[/code] if the colors are not equal.
[b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.
@@ -936,63 +954,63 @@
</operator>
<operator name="operator *">
<return type="Color" />
- <argument index="0" name="right" type="Color" />
+ <param index="0" name="right" type="Color" />
<description>
Multiplies each component of the [Color] by the components of the given [Color].
</description>
</operator>
<operator name="operator *">
<return type="Color" />
- <argument index="0" name="right" type="float" />
+ <param index="0" name="right" type="float" />
<description>
Multiplies each component of the [Color] by the given [float].
</description>
</operator>
<operator name="operator *">
<return type="Color" />
- <argument index="0" name="right" type="int" />
+ <param index="0" name="right" type="int" />
<description>
Multiplies each component of the [Color] by the given [int].
</description>
</operator>
<operator name="operator +">
<return type="Color" />
- <argument index="0" name="right" type="Color" />
+ <param index="0" name="right" type="Color" />
<description>
Adds each component of the [Color] with the components of the given [Color].
</description>
</operator>
<operator name="operator -">
<return type="Color" />
- <argument index="0" name="right" type="Color" />
+ <param index="0" name="right" type="Color" />
<description>
Subtracts each component of the [Color] by the components of the given [Color].
</description>
</operator>
<operator name="operator /">
<return type="Color" />
- <argument index="0" name="right" type="Color" />
+ <param index="0" name="right" type="Color" />
<description>
Divides each component of the [Color] by the components of the given [Color].
</description>
</operator>
<operator name="operator /">
<return type="Color" />
- <argument index="0" name="right" type="float" />
+ <param index="0" name="right" type="float" />
<description>
Divides each component of the [Color] by the given [float].
</description>
</operator>
<operator name="operator /">
<return type="Color" />
- <argument index="0" name="right" type="int" />
+ <param index="0" name="right" type="int" />
<description>
Divides each component of the [Color] by the given [int].
</description>
</operator>
<operator name="operator ==">
<return type="bool" />
- <argument index="0" name="right" type="Color" />
+ <param index="0" name="right" type="Color" />
<description>
Returns [code]true[/code] if the colors are exactly equal.
[b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.
@@ -1000,7 +1018,7 @@
</operator>
<operator name="operator []">
<return type="float" />
- <argument index="0" name="index" type="int" />
+ <param index="0" name="index" type="int" />
<description>
Access color components using their index. [code]c[0][/code] is equivalent to [code]c.r[/code], [code]c[1][/code] is equivalent to [code]c.g[/code], [code]c[2][/code] is equivalent to [code]c.b[/code], and [code]c[3][/code] is equivalent to [code]c.a[/code].
</description>
diff --git a/doc/classes/ColorPicker.xml b/doc/classes/ColorPicker.xml
index 5c47d6fb54..705d2282c1 100644
--- a/doc/classes/ColorPicker.xml
+++ b/doc/classes/ColorPicker.xml
@@ -13,7 +13,7 @@
<methods>
<method name="add_preset">
<return type="void" />
- <argument index="0" name="color" type="Color" />
+ <param index="0" name="color" type="Color" />
<description>
Adds the given color to a list of color presets. The presets are displayed in the color picker and the user will be able to select them.
[b]Note:[/b] The presets list is only for [i]this[/i] color picker.
@@ -21,7 +21,7 @@
</method>
<method name="erase_preset">
<return type="void" />
- <argument index="0" name="color" type="Color" />
+ <param index="0" name="color" type="Color" />
<description>
Removes the given color from the list of color presets of this color picker.
</description>
@@ -37,16 +37,15 @@
<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="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="hsv_mode" type="bool" setter="set_hsv_mode" getter="is_hsv_mode" default="false">
- If [code]true[/code], allows editing the color with Hue/Saturation/Value sliders.
- [b]Note:[/b] Cannot be enabled if raw mode is on.
- </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>
@@ -56,32 +55,42 @@
<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.
</member>
- <member name="raw_mode" type="bool" setter="set_raw_mode" getter="is_raw_mode" default="false">
- If [code]true[/code], allows the color R, G, B component values to go beyond 1.0, which can be used for certain special operations that require it (like tinting without darkening or rendering sprites in HDR).
- [b]Note:[/b] Cannot be enabled if HSV mode is on.
- </member>
</members>
<signals>
<signal name="color_changed">
- <argument index="0" name="color" type="Color" />
+ <param index="0" name="color" type="Color" />
<description>
Emitted when the color is changed.
</description>
</signal>
<signal name="preset_added">
- <argument index="0" name="color" type="Color" />
+ <param index="0" name="color" type="Color" />
<description>
Emitted when a preset is added.
</description>
</signal>
<signal name="preset_removed">
- <argument index="0" name="color" type="Color" />
+ <param index="0" name="color" type="Color" />
<description>
Emitted when a preset is removed.
</description>
</signal>
</signals>
<constants>
+ <constant name="MODE_RGB" value="0" enum="ColorModeType">
+ Allows editing the color with Red/Green/Blue sliders.
+ </constant>
+ <constant name="MODE_HSV" value="1" enum="ColorModeType">
+ Allows editing the color with Hue/Saturation/Value sliders.
+ </constant>
+ <constant name="MODE_RAW" value="2" enum="ColorModeType">
+ Allows the color R, G, B component values to go beyond 1.0, which can be used for certain special operations that require it (like tinting without darkening or rendering sprites in HDR).
+ </constant>
+ <constant name="MODE_OKHSL" value="3" enum="ColorModeType">
+ Allows editing the color with Hue/Saturation/Lightness sliders.
+ OKHSL is a new color space similar to HSL but that better match perception by leveraging the Oklab color space which is designed to be simple to use, while doing a good job at predicting perceived lightness, chroma and hue.
+ [url=https://bottosson.github.io/posts/colorpicker/]Okhsv and Okhsl color spaces[/url]
+ </constant>
<constant name="SHAPE_HSV_RECTANGLE" value="0" enum="PickerShapeType">
HSV Color Model rectangle color space.
</constant>
@@ -91,6 +100,9 @@
<constant name="SHAPE_VHS_CIRCLE" value="2" enum="PickerShapeType">
HSV Color Model circle color space. Use Saturation as a radius.
</constant>
+ <constant name="SHAPE_OKHSL_CIRCLE" value="3" enum="PickerShapeType">
+ HSL OK Color Model circle color space.
+ </constant>
</constants>
<theme_items>
<theme_item name="h_width" data_type="constant" type="int" default="30">
diff --git a/doc/classes/ColorPickerButton.xml b/doc/classes/ColorPickerButton.xml
index 53d35c1a3d..b7a0bdfb0c 100644
--- a/doc/classes/ColorPickerButton.xml
+++ b/doc/classes/ColorPickerButton.xml
@@ -6,7 +6,7 @@
<description>
Encapsulates a [ColorPicker] making it accessible by pressing a button. Pressing the button will toggle the [ColorPicker] visibility.
See also [BaseButton] which contains common properties and methods associated with this node.
- [b]Note:[/b] By default, the button may not be wide enough for the color preview swatch to be visible. Make sure to set [member Control.minimum_size] to a big enough value to give the button enough space.
+ [b]Note:[/b] By default, the button may not be wide enough for the color preview swatch to be visible. Make sure to set [member Control.custom_minimum_size] to a big enough value to give the button enough space.
</description>
<tutorials>
<link title="GUI Drag And Drop Demo">https://godotengine.org/asset-library/asset/133</link>
@@ -39,7 +39,7 @@
</members>
<signals>
<signal name="color_changed">
- <argument index="0" name="color" type="Color" />
+ <param index="0" name="color" type="Color" />
<description>
Emitted when the color changes.
</description>
diff --git a/doc/classes/CompressedTexture2D.xml b/doc/classes/CompressedTexture2D.xml
index 5f73b55f69..f74265b8d5 100644
--- a/doc/classes/CompressedTexture2D.xml
+++ b/doc/classes/CompressedTexture2D.xml
@@ -11,7 +11,7 @@
<methods>
<method name="load">
<return type="int" enum="Error" />
- <argument index="0" name="path" type="String" />
+ <param index="0" name="path" type="String" />
<description>
Loads the texture from the given path.
</description>
diff --git a/doc/classes/CompressedTexture3D.xml b/doc/classes/CompressedTexture3D.xml
index de7a93d788..50bd025861 100644
--- a/doc/classes/CompressedTexture3D.xml
+++ b/doc/classes/CompressedTexture3D.xml
@@ -9,7 +9,7 @@
<methods>
<method name="load">
<return type="int" enum="Error" />
- <argument index="0" name="path" type="String" />
+ <param index="0" name="path" type="String" />
<description>
</description>
</method>
diff --git a/doc/classes/CompressedTextureLayered.xml b/doc/classes/CompressedTextureLayered.xml
index 03bea84ba4..547679c0f0 100644
--- a/doc/classes/CompressedTextureLayered.xml
+++ b/doc/classes/CompressedTextureLayered.xml
@@ -9,7 +9,7 @@
<methods>
<method name="load">
<return type="int" enum="Error" />
- <argument index="0" name="path" type="String" />
+ <param index="0" name="path" type="String" />
<description>
</description>
</method>
diff --git a/doc/classes/ConcavePolygonShape2D.xml b/doc/classes/ConcavePolygonShape2D.xml
index f3c245c229..902993e439 100644
--- a/doc/classes/ConcavePolygonShape2D.xml
+++ b/doc/classes/ConcavePolygonShape2D.xml
@@ -7,6 +7,7 @@
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.
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 60d7e32492..d22793e52c 100644
--- a/doc/classes/ConcavePolygonShape3D.xml
+++ b/doc/classes/ConcavePolygonShape3D.xml
@@ -7,6 +7,7 @@
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]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>
@@ -20,7 +21,7 @@
</method>
<method name="set_faces">
<return type="void" />
- <argument index="0" name="faces" type="PackedVector3Array" />
+ <param index="0" name="faces" type="PackedVector3Array" />
<description>
Sets the faces (an array of triangles).
</description>
diff --git a/doc/classes/ConeTwistJoint3D.xml b/doc/classes/ConeTwistJoint3D.xml
index f78a5b5332..1cfe9d197d 100644
--- a/doc/classes/ConeTwistJoint3D.xml
+++ b/doc/classes/ConeTwistJoint3D.xml
@@ -13,14 +13,14 @@
<methods>
<method name="get_param" qualifiers="const">
<return type="float" />
- <argument index="0" name="param" type="int" enum="ConeTwistJoint3D.Param" />
+ <param index="0" name="param" type="int" enum="ConeTwistJoint3D.Param" />
<description>
</description>
</method>
<method name="set_param">
<return type="void" />
- <argument index="0" name="param" type="int" enum="ConeTwistJoint3D.Param" />
- <argument index="1" name="value" type="float" />
+ <param index="0" name="param" type="int" enum="ConeTwistJoint3D.Param" />
+ <param index="1" name="value" type="float" />
<description>
</description>
</method>
@@ -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 b766981f1e..d3ad4e6e4b 100644
--- a/doc/classes/ConfigFile.xml
+++ b/doc/classes/ConfigFile.xml
@@ -100,22 +100,22 @@
</method>
<method name="erase_section">
<return type="void" />
- <argument index="0" name="section" type="String" />
+ <param index="0" name="section" type="String" />
<description>
Deletes the specified section along with all the key-value pairs inside. Raises an error if the section does not exist.
</description>
</method>
<method name="erase_section_key">
<return type="void" />
- <argument index="0" name="section" type="String" />
- <argument index="1" name="key" type="String" />
+ <param index="0" name="section" type="String" />
+ <param index="1" name="key" type="String" />
<description>
Deletes the specified key in a section. Raises an error if either the section or the key do not exist.
</description>
</method>
<method name="get_section_keys" qualifiers="const">
<return type="PackedStringArray" />
- <argument index="0" name="section" type="String" />
+ <param index="0" name="section" type="String" />
<description>
Returns an array of all defined key identifiers in the specified section. Raises an error and returns an empty array if the section does not exist.
</description>
@@ -128,24 +128,24 @@
</method>
<method name="get_value" qualifiers="const">
<return type="Variant" />
- <argument index="0" name="section" type="String" />
- <argument index="1" name="key" type="String" />
- <argument index="2" name="default" type="Variant" default="null" />
+ <param index="0" name="section" type="String" />
+ <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">
<return type="bool" />
- <argument index="0" name="section" type="String" />
+ <param index="0" name="section" type="String" />
<description>
Returns [code]true[/code] if the specified section exists.
</description>
</method>
<method name="has_section_key" qualifiers="const">
<return type="bool" />
- <argument index="0" name="section" type="String" />
- <argument index="1" name="key" type="String" />
+ <param index="0" name="section" type="String" />
+ <param index="1" name="key" type="String" />
<description>
Returns [code]true[/code] if the specified section-key pair exists.
</description>
@@ -154,7 +154,7 @@
<return type="int" enum="Error" />
<returns_error number="0"/>
<returns_error number="12"/>
- <argument index="0" name="path" type="String" />
+ <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).
@@ -162,25 +162,25 @@
</method>
<method name="load_encrypted">
<return type="int" enum="Error" />
- <argument index="0" name="path" type="String" />
- <argument index="1" name="key" type="PackedByteArray" />
+ <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.
+ 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 ([code]OK[/code] on success).
</description>
</method>
<method name="load_encrypted_pass">
<return type="int" enum="Error" />
- <argument index="0" name="path" type="String" />
- <argument index="1" name="password" type="String" />
+ <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.
+ 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 ([code]OK[/code] on success).
</description>
</method>
<method name="parse">
<return type="int" enum="Error" />
- <argument index="0" name="data" type="String" />
+ <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).
@@ -188,7 +188,7 @@
</method>
<method name="save">
<return type="int" enum="Error" />
- <argument index="0" name="path" type="String" />
+ <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).
@@ -196,27 +196,27 @@
</method>
<method name="save_encrypted">
<return type="int" enum="Error" />
- <argument index="0" name="path" type="String" />
- <argument index="1" name="key" type="PackedByteArray" />
+ <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.
+ 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 ([code]OK[/code] on success).
</description>
</method>
<method name="save_encrypted_pass">
<return type="int" enum="Error" />
- <argument index="0" name="path" type="String" />
- <argument index="1" name="password" type="String" />
+ <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.
+ 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 ([code]OK[/code] on success).
</description>
</method>
<method name="set_value">
<return type="void" />
- <argument index="0" name="section" type="String" />
- <argument index="1" name="key" type="String" />
- <argument index="2" name="value" type="Variant" />
+ <param index="0" name="section" type="String" />
+ <param index="1" name="key" type="String" />
+ <param index="2" name="value" type="Variant" />
<description>
Assigns a value to the specified key of the specified section. If either the section or the key do not exist, they are created. Passing a [code]null[/code] value deletes the specified key if it exists, and deletes the section if it ends up empty once the key has been removed.
</description>
diff --git a/doc/classes/ConfirmationDialog.xml b/doc/classes/ConfirmationDialog.xml
index 2316e32b5d..d4c503857d 100644
--- a/doc/classes/ConfirmationDialog.xml
+++ b/doc/classes/ConfirmationDialog.xml
@@ -27,6 +27,9 @@
</method>
</methods>
<members>
+ <member name="cancel_button_text" type="String" setter="set_cancel_button_text" getter="get_cancel_button_text" default="&quot;Cancel&quot;">
+ The text displayed by the cancel button (see [method get_cancel_button]).
+ </member>
<member name="min_size" type="Vector2i" setter="set_min_size" getter="get_min_size" overrides="Window" default="Vector2i(200, 70)" />
<member name="size" type="Vector2i" setter="set_size" getter="get_size" overrides="Window" default="Vector2i(200, 100)" />
<member name="title" type="String" setter="set_title" getter="get_title" overrides="Window" default="&quot;Please Confirm...&quot;" />
diff --git a/doc/classes/Container.xml b/doc/classes/Container.xml
index 900997d119..a13e1598b2 100644
--- a/doc/classes/Container.xml
+++ b/doc/classes/Container.xml
@@ -27,8 +27,8 @@
</method>
<method name="fit_child_in_rect">
<return type="void" />
- <argument index="0" name="child" type="Control" />
- <argument index="1" name="rect" type="Rect2" />
+ <param index="0" name="child" type="Control" />
+ <param index="1" name="rect" type="Rect2" />
<description>
Fit a child control in a given rect. This is mainly a helper for creating custom container classes.
</description>
diff --git a/doc/classes/Control.xml b/doc/classes/Control.xml
index d084bd4db9..b7a9ae235e 100644
--- a/doc/classes/Control.xml
+++ b/doc/classes/Control.xml
@@ -24,10 +24,10 @@
<methods>
<method name="_can_drop_data" qualifiers="virtual const">
<return type="bool" />
- <argument index="0" name="at_position" type="Vector2" />
- <argument index="1" name="data" type="Variant" />
+ <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]
@@ -49,10 +49,10 @@
</method>
<method name="_drop_data" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="at_position" type="Vector2" />
- <argument index="1" name="data" type="Variant" />
+ <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):
@@ -75,9 +75,9 @@
</method>
<method name="_get_drag_data" qualifiers="virtual const">
<return type="Variant" />
- <argument index="0" name="at_position" type="Vector2" />
+ <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]
@@ -100,14 +100,14 @@
<method name="_get_minimum_size" qualifiers="virtual const">
<return type="Vector2" />
<description>
- Virtual method to be implemented by the user. Returns the minimum size for this control. Alternative to [member minimum_size] for controlling minimum size via code. The actual minimum size will be the max value of these two (in each axis separately).
+ Virtual method to be implemented by the user. Returns the minimum size for this control. Alternative to [member custom_minimum_size] for controlling minimum size via code. The actual minimum size will be the max value of these two (in each axis separately).
If not overridden, defaults to [constant Vector2.ZERO].
[b]Note:[/b] This method will not be called when the script is attached to a [Control] node that already overrides its minimum size (e.g. [Label], [Button], [PanelContainer] etc.). It can only be used with most basic GUI nodes, like [Control], [Container], [Panel] etc.
</description>
</method>
<method name="_gui_input" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="event" type="InputEvent" />
+ <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.
@@ -143,21 +143,21 @@
</method>
<method name="_has_point" qualifiers="virtual const">
<return type="bool" />
- <argument index="0" name="position" type="Vector2" />
+ <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>
</method>
<method name="_make_custom_tooltip" qualifiers="virtual const">
<return type="Object" />
- <argument index="0" name="for_text" type="String" />
+ <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 hint_tooltip] 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).
- [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 minimum_size] to some non-zero value.
+ [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:
[codeblocks]
@@ -196,12 +196,12 @@
</description>
</method>
<method name="_structured_text_parser" qualifiers="virtual const">
- <return type="Array" />
- <argument index="0" name="args" type="Array" />
- <argument index="1" name="text" type="String" />
+ <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 [code]Array[/code] of [code]Vector2i[/code] 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">
@@ -212,10 +212,10 @@
</method>
<method name="add_theme_color_override">
<return type="void" />
- <argument index="0" name="name" type="StringName" />
- <argument index="1" name="color" type="Color" />
+ <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]
@@ -240,46 +240,46 @@
</method>
<method name="add_theme_constant_override">
<return type="void" />
- <argument index="0" name="name" type="StringName" />
- <argument index="1" name="constant" type="int" />
+ <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>
<method name="add_theme_font_override">
<return type="void" />
- <argument index="0" name="name" type="StringName" />
- <argument index="1" name="font" type="Font" />
+ <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>
<method name="add_theme_font_size_override">
<return type="void" />
- <argument index="0" name="name" type="StringName" />
- <argument index="1" name="font_size" type="int" />
+ <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>
<method name="add_theme_icon_override">
<return type="void" />
- <argument index="0" name="name" type="StringName" />
- <argument index="1" name="texture" type="Texture2D" />
+ <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>
<method name="add_theme_stylebox_override">
<return type="void" />
- <argument index="0" name="name" type="StringName" />
- <argument index="1" name="stylebox" type="StyleBox" />
+ <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]
@@ -334,16 +334,16 @@
</method>
<method name="force_drag">
<return type="void" />
- <argument index="0" name="data" type="Variant" />
- <argument index="1" name="preview" type="Control" />
+ <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>
<method name="get_anchor" qualifiers="const">
<return type="float" />
- <argument index="0" name="side" type="int" enum="Side" />
+ <param index="0" name="side" type="int" enum="Side" />
<description>
Returns the anchor for the specified [enum Side]. A getter method for [member anchor_bottom], [member anchor_left], [member anchor_right] and [member anchor_top].
</description>
@@ -357,12 +357,12 @@
<method name="get_combined_minimum_size" qualifiers="const">
<return type="Vector2" />
<description>
- Returns combined minimum size from [member minimum_size] and [method get_minimum_size].
+ Returns combined minimum size from [member custom_minimum_size] and [method get_minimum_size].
</description>
</method>
<method name="get_cursor_shape" qualifiers="const">
<return type="int" enum="Control.CursorShape" />
- <argument index="0" name="position" type="Vector2" default="Vector2(0, 0)" />
+ <param index="0" name="position" type="Vector2" default="Vector2(0, 0)" />
<description>
Returns the mouse cursor shape the control displays on mouse hover. See [enum CursorShape].
</description>
@@ -375,7 +375,7 @@
</method>
<method name="get_focus_neighbor" qualifiers="const">
<return type="NodePath" />
- <argument index="0" name="side" type="int" enum="Side" />
+ <param index="0" name="side" type="int" enum="Side" />
<description>
Returns the focus neighbor for the specified [enum Side]. A getter method for [member focus_neighbor_bottom], [member focus_neighbor_left], [member focus_neighbor_right] and [member focus_neighbor_top].
</description>
@@ -389,12 +389,12 @@
<method name="get_minimum_size" qualifiers="const">
<return type="Vector2" />
<description>
- Returns the minimum size for this control. See [member minimum_size].
+ Returns the minimum size for this control. See [member custom_minimum_size].
</description>
</method>
<method name="get_offset" qualifiers="const">
<return type="float" />
- <argument index="0" name="offset" type="int" enum="Side" />
+ <param index="0" name="offset" type="int" enum="Side" />
<description>
Returns the anchor for the specified [enum Side]. A getter method for [member offset_bottom], [member offset_left], [member offset_right] and [member offset_top].
</description>
@@ -432,10 +432,10 @@
</method>
<method name="get_theme_color" qualifiers="const">
<return type="Color" />
- <argument index="0" name="name" type="StringName" />
- <argument index="1" name="theme_type" type="StringName" default="&quot;&quot;" />
+ <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.
+ 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, a custom project [Theme] (see [member ProjectSettings.gui/theme/custom]) and the default [Theme] are used.
[codeblocks]
[gdscript]
@@ -459,10 +459,10 @@
</method>
<method name="get_theme_constant" qualifiers="const">
<return type="int" />
- <argument index="0" name="name" type="StringName" />
- <argument index="1" name="theme_type" type="StringName" default="&quot;&quot;" />
+ <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>
@@ -489,43 +489,43 @@
</method>
<method name="get_theme_font" qualifiers="const">
<return type="Font" />
- <argument index="0" name="name" type="StringName" />
- <argument index="1" name="theme_type" type="StringName" default="&quot;&quot;" />
+ <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>
<method name="get_theme_font_size" qualifiers="const">
<return type="int" />
- <argument index="0" name="name" type="StringName" />
- <argument index="1" name="theme_type" type="StringName" default="&quot;&quot;" />
+ <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>
<method name="get_theme_icon" qualifiers="const">
<return type="Texture2D" />
- <argument index="0" name="name" type="StringName" />
- <argument index="1" name="theme_type" type="StringName" default="&quot;&quot;" />
+ <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>
<method name="get_theme_stylebox" qualifiers="const">
<return type="StyleBox" />
- <argument index="0" name="name" type="StringName" />
- <argument index="1" name="theme_type" type="StringName" default="&quot;&quot;" />
+ <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>
<method name="get_tooltip" qualifiers="const">
<return type="String" />
- <argument index="0" name="at_position" type="Vector2" default="Vector2(0, 0)" />
+ <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].
</description>
@@ -562,103 +562,103 @@
</method>
<method name="has_theme_color" qualifiers="const">
<return type="bool" />
- <argument index="0" name="name" type="StringName" />
- <argument index="1" name="theme_type" type="StringName" default="&quot;&quot;" />
+ <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>
<method name="has_theme_color_override" qualifiers="const">
<return type="bool" />
- <argument index="0" name="name" type="StringName" />
+ <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>
<method name="has_theme_constant" qualifiers="const">
<return type="bool" />
- <argument index="0" name="name" type="StringName" />
- <argument index="1" name="theme_type" type="StringName" default="&quot;&quot;" />
+ <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>
<method name="has_theme_constant_override" qualifiers="const">
<return type="bool" />
- <argument index="0" name="name" type="StringName" />
+ <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>
<method name="has_theme_font" qualifiers="const">
<return type="bool" />
- <argument index="0" name="name" type="StringName" />
- <argument index="1" name="theme_type" type="StringName" default="&quot;&quot;" />
+ <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>
<method name="has_theme_font_override" qualifiers="const">
<return type="bool" />
- <argument index="0" name="name" type="StringName" />
+ <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>
<method name="has_theme_font_size" qualifiers="const">
<return type="bool" />
- <argument index="0" name="name" type="StringName" />
- <argument index="1" name="theme_type" type="StringName" default="&quot;&quot;" />
+ <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>
<method name="has_theme_font_size_override" qualifiers="const">
<return type="bool" />
- <argument index="0" name="name" type="StringName" />
+ <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>
<method name="has_theme_icon" qualifiers="const">
<return type="bool" />
- <argument index="0" name="name" type="StringName" />
- <argument index="1" name="theme_type" type="StringName" default="&quot;&quot;" />
+ <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>
<method name="has_theme_icon_override" qualifiers="const">
<return type="bool" />
- <argument index="0" name="name" type="StringName" />
+ <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>
<method name="has_theme_stylebox" qualifiers="const">
<return type="bool" />
- <argument index="0" name="name" type="StringName" />
- <argument index="1" name="theme_type" type="StringName" default="&quot;&quot;" />
+ <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>
<method name="has_theme_stylebox_override" qualifiers="const">
<return type="bool" />
- <argument index="0" name="name" type="StringName" />
+ <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>
@@ -683,44 +683,44 @@
</method>
<method name="remove_theme_color_override">
<return type="void" />
- <argument index="0" name="name" type="StringName" />
+ <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" />
- <argument index="0" name="name" type="StringName" />
+ <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" />
- <argument index="0" name="name" type="StringName" />
+ <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" />
- <argument index="0" name="name" type="StringName" />
+ <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" />
- <argument index="0" name="name" type="StringName" />
+ <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" />
- <argument index="0" name="name" type="StringName" />
+ <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">
@@ -731,56 +731,56 @@
</method>
<method name="set_anchor">
<return type="void" />
- <argument index="0" name="side" type="int" enum="Side" />
- <argument index="1" name="anchor" type="float" />
- <argument index="2" name="keep_offset" type="bool" default="false" />
- <argument index="3" name="push_opposite_anchor" type="bool" default="true" />
+ <param index="0" name="side" type="int" enum="Side" />
+ <param index="1" name="anchor" type="float" />
+ <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">
<return type="void" />
- <argument index="0" name="side" type="int" enum="Side" />
- <argument index="1" name="anchor" type="float" />
- <argument index="2" name="offset" type="float" />
- <argument index="3" name="push_opposite_anchor" type="bool" default="false" />
+ <param index="0" name="side" type="int" enum="Side" />
+ <param index="1" name="anchor" type="float" />
+ <param index="2" name="offset" type="float" />
+ <param index="3" name="push_opposite_anchor" type="bool" default="false" />
<description>
Works the same as [method set_anchor], but instead of [code]keep_offset[/code] argument and automatic update of offset, it allows to set the offset yourself (see [method set_offset]).
</description>
</method>
<method name="set_anchors_and_offsets_preset">
<return type="void" />
- <argument index="0" name="preset" type="int" enum="Control.LayoutPreset" />
- <argument index="1" name="resize_mode" type="int" enum="Control.LayoutPresetMode" default="0" />
- <argument index="2" name="margin" type="int" default="0" />
+ <param index="0" name="preset" type="int" enum="Control.LayoutPreset" />
+ <param index="1" name="resize_mode" type="int" enum="Control.LayoutPresetMode" default="0" />
+ <param index="2" name="margin" type="int" default="0" />
<description>
Sets both anchor preset and offset preset. See [method set_anchors_preset] and [method set_offsets_preset].
</description>
</method>
<method name="set_anchors_preset">
<return type="void" />
- <argument index="0" name="preset" type="int" enum="Control.LayoutPreset" />
- <argument index="1" name="keep_offsets" type="bool" default="false" />
+ <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">
<return type="void" />
- <argument index="0" name="position" type="Vector2" />
+ <param index="0" name="position" type="Vector2" />
<description>
Sets [member offset_left] and [member offset_top] at the same time. Equivalent of changing [member position].
</description>
</method>
<method name="set_drag_forwarding">
<return type="void" />
- <argument index="0" name="target" type="Object" />
+ <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
@@ -843,7 +843,7 @@
</method>
<method name="set_drag_preview">
<return type="void" />
- <argument index="0" name="control" type="Control" />
+ <param index="0" name="control" type="Control" />
<description>
Shows the given control at the mouse pointer. A good time to call this method is in [method _get_drag_data]. The control must not be in the scene tree. You should not free the control, and you should not keep a reference to the control beyond the duration of the drag. It will be deleted automatically after the drag has ended.
[codeblocks]
@@ -877,76 +877,76 @@
</method>
<method name="set_end">
<return type="void" />
- <argument index="0" name="position" type="Vector2" />
+ <param index="0" name="position" type="Vector2" />
<description>
Sets [member offset_right] and [member offset_bottom] at the same time.
</description>
</method>
<method name="set_focus_neighbor">
<return type="void" />
- <argument index="0" name="side" type="int" enum="Side" />
- <argument index="1" name="neighbor" type="NodePath" />
+ <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">
<return type="void" />
- <argument index="0" name="position" type="Vector2" />
- <argument index="1" name="keep_offsets" type="bool" default="false" />
+ <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">
<return type="void" />
- <argument index="0" name="side" type="int" enum="Side" />
- <argument index="1" name="offset" type="float" />
+ <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">
<return type="void" />
- <argument index="0" name="preset" type="int" enum="Control.LayoutPreset" />
- <argument index="1" name="resize_mode" type="int" enum="Control.LayoutPresetMode" default="0" />
- <argument index="2" name="margin" type="int" default="0" />
+ <param index="0" name="preset" type="int" enum="Control.LayoutPreset" />
+ <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. [code]PRESET_LEFT_WIDE[/code].
+ Use parameter [param margin] to determine the gap between the [Control] and the edges.
</description>
</method>
<method name="set_position">
<return type="void" />
- <argument index="0" name="position" type="Vector2" />
- <argument index="1" name="keep_offsets" type="bool" default="false" />
+ <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">
<return type="void" />
- <argument index="0" name="size" type="Vector2" />
- <argument index="1" name="keep_offsets" type="bool" default="false" />
+ <param index="0" name="size" type="Vector2" />
+ <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">
<return type="void" />
<description>
- Invalidates the size cache in this node and in parent nodes up to top level. Intended to be used with [method get_minimum_size] when the return value is changed. Setting [member minimum_size] directly calls this method automatically.
+ Invalidates the size cache in this node and in parent nodes up to top level. Intended to be used with [method get_minimum_size] when the return value is changed. Setting [member custom_minimum_size] directly calls this method automatically.
</description>
</method>
<method name="warp_mouse">
<return type="void" />
- <argument index="0" name="position" type="Vector2" />
+ <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>
@@ -970,6 +970,9 @@
<member name="clip_contents" type="bool" setter="set_clip_contents" getter="is_clipping_contents" default="false">
Enables whether rendering of [CanvasItem] based children should be clipped to this control's rectangle. If [code]true[/code], parts of a child which would be visibly outside of this control's rectangle will not be rendered and won't receive input.
</member>
+ <member name="custom_minimum_size" type="Vector2" setter="set_custom_minimum_size" getter="get_custom_minimum_size" default="Vector2(0, 0)">
+ The minimum size of the node's bounding rectangle. If you set it to a value greater than (0, 0), the node's bounding rectangle will always have at least this size, even if its content is smaller. If it's set to (0, 0), the node sizes automatically to fit its content, be it a texture or child nodes.
+ </member>
<member name="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.
</member>
@@ -1027,9 +1030,6 @@
<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="minimum_size" type="Vector2" setter="set_custom_minimum_size" getter="get_custom_minimum_size" default="Vector2(0, 0)">
- The minimum size of the node's bounding rectangle. If you set it to a value greater than (0, 0), the node's bounding rectangle will always have at least this size, even if its content is smaller. If it's set to (0, 0), the node sizes automatically to fit its content, be it a texture or child nodes.
- </member>
<member name="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.
@@ -1037,6 +1037,10 @@
<member name="mouse_filter" type="int" setter="set_mouse_filter" getter="get_mouse_filter" enum="Control.MouseFilter" default="0">
Controls whether the control will be able to receive mouse button input events through [method _gui_input] and how these events should be handled. Also controls whether the control can receive the [signal mouse_entered], and [signal mouse_exited] signals. See the constants to learn what each does.
</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.
+ </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].
Offsets are often controlled by one or multiple parent [Container] nodes, so you should not modify them manually if your node is a direct child of a [Container]. Offsets update automatically when you move or resize the node.
@@ -1101,7 +1105,7 @@
</description>
</signal>
<signal name="gui_input">
- <argument index="0" name="event" type="InputEvent" />
+ <param index="0" name="event" type="InputEvent" />
<description>
Emitted when the node receives an [InputEvent].
</description>
@@ -1194,10 +1198,10 @@
Show the system's cross mouse cursor when the user hovers the node.
</constant>
<constant name="CURSOR_WAIT" value="4" enum="CursorShape">
- Show the system's wait mouse cursor, often an hourglass, when the user hovers the node.
+ Show the system's wait mouse cursor when the user hovers the node. Often an hourglass.
</constant>
<constant name="CURSOR_BUSY" value="5" enum="CursorShape">
- Show the system's busy mouse cursor when the user hovers the node. Often an hourglass.
+ Show the system's busy mouse cursor when the user hovers the node. Often an arrow with a small hourglass.
</constant>
<constant name="CURSOR_DRAG" value="6" enum="CursorShape">
Show the system's drag mouse cursor, often a closed fist or a cross symbol, when the user hovers the node. It tells the user they're currently dragging an item, like a node in the Scene dock.
@@ -1277,8 +1281,8 @@
<constant name="PRESET_HCENTER_WIDE" value="14" enum="LayoutPreset">
Snap all 4 anchors to a horizontal line that cuts the parent control in half. Use with [method set_anchors_preset].
</constant>
- <constant name="PRESET_WIDE" value="15" enum="LayoutPreset">
- Snap all 4 anchors to the respective corners of the parent control. Set all 4 offsets to 0 after you applied this preset and the [Control] will fit its parent control. This is equivalent to the "Full Rect" layout option in the editor. Use with [method set_anchors_preset].
+ <constant name="PRESET_FULL_RECT" value="15" enum="LayoutPreset">
+ Snap all 4 anchors to the respective corners of the parent control. Set all 4 offsets to 0 after you applied this preset and the [Control] will fit its parent control. Use with [method set_anchors_preset].
</constant>
<constant name="PRESET_MODE_MINSIZE" value="0" enum="LayoutPresetMode">
The control will be resized to its minimum size.
@@ -1315,7 +1319,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. Even if no control handled it at all, the event will still be handled automatically, so unhandled input will not be fired.
+ 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.
</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/ConvexPolygonShape2D.xml b/doc/classes/ConvexPolygonShape2D.xml
index df96b50fc1..862626d9b6 100644
--- a/doc/classes/ConvexPolygonShape2D.xml
+++ b/doc/classes/ConvexPolygonShape2D.xml
@@ -13,7 +13,7 @@
<methods>
<method name="set_point_cloud">
<return type="void" />
- <argument index="0" name="point_cloud" type="PackedVector2Array" />
+ <param index="0" name="point_cloud" type="PackedVector2Array" />
<description>
Based on the set of points provided, this creates and assigns the [member points] property using the convex hull algorithm. Removing all unneeded points. See [method Geometry2D.convex_hull] for details.
</description>
diff --git a/doc/classes/Crypto.xml b/doc/classes/Crypto.xml
index c0a76dc80e..dab2a77584 100644
--- a/doc/classes/Crypto.xml
+++ b/doc/classes/Crypto.xml
@@ -68,15 +68,14 @@
}
[/csharp]
[/codeblocks]
- [b]Note:[/b] Not available in HTML5 exports.
</description>
<tutorials>
</tutorials>
<methods>
<method name="constant_time_compare">
<return type="bool" />
- <argument index="0" name="trusted" type="PackedByteArray" />
- <argument index="1" name="received" type="PackedByteArray" />
+ <param index="0" name="trusted" type="PackedByteArray" />
+ <param index="1" name="received" type="PackedByteArray" />
<description>
Compares two [PackedByteArray]s for equality without leaking timing information in order to prevent timing attacks.
See [url=https://paragonie.com/blog/2015/11/preventing-timing-attacks-on-string-comparison-with-double-hmac-strategy]this blog post[/url] for more information.
@@ -84,44 +83,44 @@
</method>
<method name="decrypt">
<return type="PackedByteArray" />
- <argument index="0" name="key" type="CryptoKey" />
- <argument index="1" name="ciphertext" type="PackedByteArray" />
+ <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>
<method name="encrypt">
<return type="PackedByteArray" />
- <argument index="0" name="key" type="CryptoKey" />
- <argument index="1" name="plaintext" type="PackedByteArray" />
+ <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>
<method name="generate_random_bytes">
<return type="PackedByteArray" />
- <argument index="0" name="size" type="int" />
+ <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" />
- <argument index="0" name="size" type="int" />
+ <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].
</description>
</method>
<method name="generate_self_signed_certificate">
<return type="X509Certificate" />
- <argument index="0" name="key" type="CryptoKey" />
- <argument index="1" name="issuer_name" type="String" default="&quot;CN=myserver,O=myorganisation,C=IT&quot;" />
- <argument index="2" name="not_before" type="String" default="&quot;20140101000000&quot;" />
- <argument index="3" name="not_after" type="String" default="&quot;20340101000000&quot;" />
+ <param index="0" name="key" type="CryptoKey" />
+ <param index="1" name="issuer_name" type="String" default="&quot;CN=myserver,O=myorganisation,C=IT&quot;" />
+ <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]
@@ -143,31 +142,31 @@
</method>
<method name="hmac_digest">
<return type="PackedByteArray" />
- <argument index="0" name="hash_type" type="int" enum="HashingContext.HashType" />
- <argument index="1" name="key" type="PackedByteArray" />
- <argument index="2" name="msg" type="PackedByteArray" />
+ <param index="0" name="hash_type" type="int" enum="HashingContext.HashType" />
+ <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>
<method name="sign">
<return type="PackedByteArray" />
- <argument index="0" name="hash_type" type="int" enum="HashingContext.HashType" />
- <argument index="1" name="hash" type="PackedByteArray" />
- <argument index="2" name="key" type="CryptoKey" />
+ <param index="0" name="hash_type" type="int" enum="HashingContext.HashType" />
+ <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">
<return type="bool" />
- <argument index="0" name="hash_type" type="int" enum="HashingContext.HashType" />
- <argument index="1" name="hash" type="PackedByteArray" />
- <argument index="2" name="signature" type="PackedByteArray" />
- <argument index="3" name="key" type="CryptoKey" />
+ <param index="0" name="hash_type" type="int" enum="HashingContext.HashType" />
+ <param index="1" name="hash" type="PackedByteArray" />
+ <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 b0abdf60c8..1f502846b4 100644
--- a/doc/classes/CryptoKey.xml
+++ b/doc/classes/CryptoKey.xml
@@ -6,7 +6,6 @@
<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.
- [b]Note:[/b] Not available in HTML5 exports.
</description>
<tutorials>
</tutorials>
@@ -19,35 +18,35 @@
</method>
<method name="load">
<return type="int" enum="Error" />
- <argument index="0" name="path" type="String" />
- <argument index="1" name="public_only" type="bool" default="false" />
+ <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">
<return type="int" enum="Error" />
- <argument index="0" name="string_key" type="String" />
- <argument index="1" name="public_only" type="bool" default="false" />
+ <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">
<return type="int" enum="Error" />
- <argument index="0" name="path" type="String" />
- <argument index="1" name="public_only" type="bool" default="false" />
+ <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" />
- <argument index="0" name="public_only" type="bool" default="false" />
+ <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/Curve.xml b/doc/classes/Curve.xml
index 16d0e82a1f..ae9add995b 100644
--- a/doc/classes/Curve.xml
+++ b/doc/classes/Curve.xml
@@ -5,17 +5,18 @@
</brief_description>
<description>
A curve that can be saved and re-used for other objects. By default, it ranges between [code]0[/code] and [code]1[/code] on the Y axis and positions points relative to the [code]0.5[/code] Y position.
+ See also [Gradient] which is designed for color interpolation. See also [Curve2D] and [Curve3D].
</description>
<tutorials>
</tutorials>
<methods>
<method name="add_point">
<return type="int" />
- <argument index="0" name="position" type="Vector2" />
- <argument index="1" name="left_tangent" type="float" default="0" />
- <argument index="2" name="right_tangent" type="float" default="0" />
- <argument index="3" name="left_mode" type="int" enum="Curve.TangentMode" default="0" />
- <argument index="4" name="right_mode" type="int" enum="Curve.TangentMode" default="0" />
+ <param index="0" name="position" type="Vector2" />
+ <param index="1" name="left_tangent" type="float" default="0" />
+ <param index="2" name="right_tangent" type="float" default="0" />
+ <param index="3" name="left_mode" type="int" enum="Curve.TangentMode" default="0" />
+ <param index="4" name="right_mode" type="int" enum="Curve.TangentMode" default="0" />
<description>
Adds a point to the curve. For each side, if the [code]*_mode[/code] is [constant TANGENT_LINEAR], the [code]*_tangent[/code] angle (in degrees) uses the slope of the curve halfway to the adjacent point. Allows custom assignments to the [code]*_tangent[/code] angle if [code]*_mode[/code] is set to [constant TANGENT_FREE].
</description>
@@ -38,114 +39,108 @@
Removes all points from the curve.
</description>
</method>
- <method name="get_point_count" qualifiers="const">
- <return type="int" />
- <description>
- Returns the number of points describing the curve.
- </description>
- </method>
<method name="get_point_left_mode" qualifiers="const">
<return type="int" enum="Curve.TangentMode" />
- <argument index="0" name="index" type="int" />
+ <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" />
- <argument index="0" name="index" type="int" />
+ <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" />
- <argument index="0" name="index" type="int" />
+ <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" />
- <argument index="0" name="index" type="int" />
+ <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" />
- <argument index="0" name="index" type="int" />
+ <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" />
- <argument index="0" name="offset" 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.
+ Returns the Y value for the point that would exist at the X position [param offset] along the curve.
</description>
</method>
<method name="interpolate_baked" qualifiers="const">
<return type="float" />
- <argument index="0" name="offset" 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 using the baked cache. Bakes the curve's points if not already baked.
</description>
</method>
<method name="remove_point">
<return type="void" />
- <argument index="0" name="index" type="int" />
+ <param index="0" name="index" type="int" />
<description>
- Removes the point at [code]index[/code] from the curve.
+ Removes the point at [param index] from the curve.
</description>
</method>
<method name="set_point_left_mode">
<return type="void" />
- <argument index="0" name="index" type="int" />
- <argument index="1" name="mode" type="int" enum="Curve.TangentMode" />
+ <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">
<return type="void" />
- <argument index="0" name="index" type="int" />
- <argument index="1" name="tangent" type="float" />
+ <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">
<return type="int" />
- <argument index="0" name="index" type="int" />
- <argument index="1" name="offset" type="float" />
+ <param index="0" name="index" type="int" />
+ <param index="1" name="offset" type="float" />
<description>
Sets the offset from [code]0.5[/code].
</description>
</method>
<method name="set_point_right_mode">
<return type="void" />
- <argument index="0" name="index" type="int" />
- <argument index="1" name="mode" type="int" enum="Curve.TangentMode" />
+ <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">
<return type="void" />
- <argument index="0" name="index" type="int" />
- <argument index="1" name="tangent" type="float" />
+ <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">
<return type="void" />
- <argument index="0" name="index" type="int" />
- <argument index="1" name="y" type="float" />
+ <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>
@@ -159,6 +154,9 @@
<member name="min_value" type="float" setter="set_min_value" getter="get_min_value" default="0.0">
The minimum value the curve can reach.
</member>
+ <member name="point_count" type="int" setter="set_point_count" getter="get_point_count" default="0">
+ The number of points describing the curve.
+ </member>
</members>
<signals>
<signal name="range_changed">
diff --git a/doc/classes/Curve2D.xml b/doc/classes/Curve2D.xml
index 94e52912a1..f15c0d74ca 100644
--- a/doc/classes/Curve2D.xml
+++ b/doc/classes/Curve2D.xml
@@ -12,13 +12,13 @@
<methods>
<method name="add_point">
<return type="void" />
- <argument index="0" name="position" type="Vector2" />
- <argument index="1" name="in" type="Vector2" default="Vector2(0, 0)" />
- <argument index="2" name="out" type="Vector2" default="Vector2(0, 0)" />
- <argument index="3" name="at_position" type="int" default="-1" />
+ <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="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">
@@ -41,113 +41,107 @@
</method>
<method name="get_closest_offset" qualifiers="const">
<return type="float" />
- <argument index="0" name="to_point" type="Vector2" />
+ <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 interpolate_baked].
+ [param to_point] must be in this curve's local space.
</description>
</method>
<method name="get_closest_point" qualifiers="const">
<return type="Vector2" />
- <argument index="0" name="to_point" 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.
- </description>
- </method>
- <method name="get_point_count" qualifiers="const">
- <return type="int" />
- <description>
- Returns the number of points describing the curve.
+ 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" />
- <argument index="0" name="idx" type="int" />
+ <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" />
- <argument index="0" name="idx" type="int" />
+ <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" />
- <argument index="0" name="idx" type="int" />
+ <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">
<return type="Vector2" />
- <argument index="0" name="idx" type="int" />
- <argument index="1" name="t" type="float" />
+ <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">
<return type="Vector2" />
- <argument index="0" name="offset" type="float" />
- <argument index="1" name="cubic" type="bool" default="false" />
+ <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" />
- <argument index="0" name="fofs" type="float" />
+ <param index="0" name="fofs" type="float" />
<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].
+ Returns the position at the vertex [param fofs]. It calls [method interpolate] using the integer part of [param fofs] as [code]idx[/code], and its fractional part as [code]t[/code].
</description>
</method>
<method name="remove_point">
<return type="void" />
- <argument index="0" name="idx" type="int" />
+ <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.
+ Deletes the point [param idx] from the curve. Sends an error to the console if [param idx] is out of bounds.
</description>
</method>
<method name="set_point_in">
<return type="void" />
- <argument index="0" name="idx" type="int" />
- <argument index="1" name="position" type="Vector2" />
+ <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">
<return type="void" />
- <argument index="0" name="idx" type="int" />
- <argument index="1" name="position" type="Vector2" />
+ <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">
<return type="void" />
- <argument index="0" name="idx" type="int" />
- <argument index="1" name="position" type="Vector2" />
+ <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">
<return type="PackedVector2Array" />
- <argument index="0" name="max_stages" type="int" default="5" />
- <argument index="1" name="tolerance_degrees" type="float" default="4" />
+ <param index="0" name="max_stages" type="int" default="5" />
+ <param index="1" name="tolerance_degrees" type="float" default="4" />
<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>
@@ -155,5 +149,8 @@
<member name="bake_interval" type="float" setter="set_bake_interval" getter="get_bake_interval" default="5.0">
The distance in pixels between two adjacent cached points. Changing it forces the cache to be recomputed the next time the [method get_baked_points] or [method get_baked_length] function is called. The smaller the distance, the more points in the cache and the more memory it will consume, so use with care.
</member>
+ <member name="point_count" type="int" setter="set_point_count" getter="get_point_count" default="0">
+ The number of points describing the curve.
+ </member>
</members>
</class>
diff --git a/doc/classes/Curve3D.xml b/doc/classes/Curve3D.xml
index ed642e0ddc..0843453820 100644
--- a/doc/classes/Curve3D.xml
+++ b/doc/classes/Curve3D.xml
@@ -12,13 +12,13 @@
<methods>
<method name="add_point">
<return type="void" />
- <argument index="0" name="position" type="Vector3" />
- <argument index="1" name="in" type="Vector3" default="Vector3(0, 0, 0)" />
- <argument index="2" name="out" type="Vector3" default="Vector3(0, 0, 0)" />
- <argument index="3" name="at_position" type="int" default="-1" />
+ <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="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">
@@ -54,139 +54,133 @@
</method>
<method name="get_closest_offset" qualifiers="const">
<return type="float" />
- <argument index="0" name="to_point" type="Vector3" />
+ <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 interpolate_baked] or [method interpolate_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" />
- <argument index="0" name="to_point" 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.
- </description>
- </method>
- <method name="get_point_count" qualifiers="const">
- <return type="int" />
- <description>
- Returns the number of points describing the curve.
+ 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" />
- <argument index="0" name="idx" type="int" />
+ <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" />
- <argument index="0" name="idx" type="int" />
+ <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" />
- <argument index="0" name="idx" type="int" />
+ <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" />
- <argument index="0" name="idx" type="int" />
+ <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">
<return type="Vector3" />
- <argument index="0" name="idx" type="int" />
- <argument index="1" name="t" type="float" />
+ <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">
<return type="Vector3" />
- <argument index="0" name="offset" type="float" />
- <argument index="1" name="cubic" type="bool" default="false" />
+ <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">
<return type="Vector3" />
- <argument index="0" name="offset" type="float" />
- <argument index="1" name="apply_tilt" type="bool" default="false" />
+ <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" />
- <argument index="0" name="fofs" type="float" />
+ <param index="0" name="fofs" type="float" />
<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].
+ Returns the position at the vertex [param fofs]. It calls [method interpolate] using the integer part of [param fofs] as [code]idx[/code], and its fractional part as [code]t[/code].
</description>
</method>
<method name="remove_point">
<return type="void" />
- <argument index="0" name="idx" type="int" />
+ <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.
+ Deletes the point [param idx] from the curve. Sends an error to the console if [param idx] is out of bounds.
</description>
</method>
<method name="set_point_in">
<return type="void" />
- <argument index="0" name="idx" type="int" />
- <argument index="1" name="position" type="Vector3" />
+ <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">
<return type="void" />
- <argument index="0" name="idx" type="int" />
- <argument index="1" name="position" type="Vector3" />
+ <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">
<return type="void" />
- <argument index="0" name="idx" type="int" />
- <argument index="1" name="position" type="Vector3" />
+ <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">
<return type="void" />
- <argument index="0" name="idx" type="int" />
- <argument index="1" name="tilt" type="float" />
+ <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>
<method name="tessellate" qualifiers="const">
<return type="PackedVector3Array" />
- <argument index="0" name="max_stages" type="int" default="5" />
- <argument index="1" name="tolerance_degrees" type="float" default="4" />
+ <param index="0" name="max_stages" type="int" default="5" />
+ <param index="1" name="tolerance_degrees" type="float" default="4" />
<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>
@@ -194,6 +188,9 @@
<member name="bake_interval" type="float" setter="set_bake_interval" getter="get_bake_interval" default="0.2">
The distance in meters between two adjacent cached points. Changing it forces the cache to be recomputed the next time the [method get_baked_points] or [method get_baked_length] function is called. The smaller the distance, the more points in the cache and the more memory it will consume, so use with care.
</member>
+ <member name="point_count" type="int" setter="set_point_count" getter="get_point_count" default="0">
+ The number of points describing the curve.
+ </member>
<member name="up_vector_enabled" type="bool" setter="set_up_vector_enabled" getter="is_up_vector_enabled" default="true">
If [code]true[/code], the curve will bake up vectors used for orientation. This is used when [member PathFollow3D.rotation_mode] is set to [constant PathFollow3D.ROTATION_ORIENTED]. Changing it forces the cache to be recomputed.
</member>
diff --git a/doc/classes/CurveTexture.xml b/doc/classes/CurveTexture.xml
index 6aa39e453e..85473fc237 100644
--- a/doc/classes/CurveTexture.xml
+++ b/doc/classes/CurveTexture.xml
@@ -5,23 +5,27 @@
</brief_description>
<description>
Renders a given [Curve] provided to it. Simplifies the task of drawing curves and/or saving them as image files.
+ If you need to store up to 3 curves within a single texture, use [CurveXYZTexture] instead. See also [GradientTexture1D] and [GradientTexture2D].
</description>
<tutorials>
</tutorials>
<members>
<member name="curve" type="Curve" setter="set_curve" getter="get_curve">
- The [code]curve[/code] rendered onto the texture.
+ The [Curve] that is rendered onto the texture.
</member>
<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>
<member name="width" type="int" setter="set_width" getter="get_width" default="256">
- The width of the texture.
+ 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>
</members>
<constants>
<constant name="TEXTURE_MODE_RGB" value="0" enum="TextureMode">
+ Store the curve equally across the red, green and blue channels. This uses more video memory, but is more compatible with shaders that only read the green and blue values.
</constant>
<constant name="TEXTURE_MODE_RED" value="1" enum="TextureMode">
+ Store the curve only in the red channel. This saves video memory, but some custom shaders may not be able to work with this.
</constant>
</constants>
</class>
diff --git a/doc/classes/CurveXYZTexture.xml b/doc/classes/CurveXYZTexture.xml
index d289e394aa..e3f2e8fc45 100644
--- a/doc/classes/CurveXYZTexture.xml
+++ b/doc/classes/CurveXYZTexture.xml
@@ -1,19 +1,26 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="CurveXYZTexture" inherits="Texture2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
+ A texture that shows 3 different curves (stored on the red, green and blue color channels).
</brief_description>
<description>
+ Renders 3 given [Curve]s provided to it, on the red, green and blue channels respectively. Compared to using separate [CurveTexture]s, this further simplifies the task of drawing curves and/or saving them as image files.
+ If you only need to store one curve within a single texture, use [CurveTexture] instead. See also [GradientTexture1D] and [GradientTexture2D].
</description>
<tutorials>
</tutorials>
<members>
<member name="curve_x" type="Curve" setter="set_curve_x" getter="get_curve_x">
+ The [Curve] that is rendered onto the texture's red channel.
</member>
<member name="curve_y" type="Curve" setter="set_curve_y" getter="get_curve_y">
+ The [Curve] that is rendered onto the texture's green channel.
</member>
<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="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>
</members>
</class>
diff --git a/doc/classes/CylinderMesh.xml b/doc/classes/CylinderMesh.xml
index e141ba8203..045c3b914b 100644
--- a/doc/classes/CylinderMesh.xml
+++ b/doc/classes/CylinderMesh.xml
@@ -10,7 +10,15 @@
</tutorials>
<members>
<member name="bottom_radius" type="float" setter="set_bottom_radius" getter="get_bottom_radius" default="0.5">
- Bottom radius of the cylinder. If set to [code]0.0[/code], the bottom faces will not be generated, resulting in a conic shape.
+ Bottom radius of the cylinder. If set to [code]0.0[/code], the bottom faces will not be generated, resulting in a conic shape. See also [member cap_bottom].
+ </member>
+ <member name="cap_bottom" type="bool" setter="set_cap_bottom" getter="is_cap_bottom" default="true">
+ If [code]true[/code], generates a cap at the bottom of the cylinder. This can be set to [code]false[/code] to speed up generation and rendering when the cap is never seen by the camera. See also [member bottom_radius].
+ [b]Note:[/b] If [member bottom_radius] is [code]0.0[/code], cap generation is always skipped even if [member cap_bottom] is [code]true[/code].
+ </member>
+ <member name="cap_top" type="bool" setter="set_cap_top" getter="is_cap_top" default="true">
+ If [code]true[/code], generates a cap at the top of the cylinder. This can be set to [code]false[/code] to speed up generation and rendering when the cap is never seen by the camera. See also [member top_radius].
+ [b]Note:[/b] If [member top_radius] is [code]0.0[/code], cap generation is always skipped even if [member cap_top] is [code]true[/code].
</member>
<member name="height" type="float" setter="set_height" getter="get_height" default="2.0">
Full height of the cylinder.
@@ -22,7 +30,7 @@
Number of edge rings along the height of the cylinder. Changing [member rings] does not have any visual impact unless a shader or procedural mesh tool is used to alter the vertex data. Higher values result in more subdivisions, which can be used to create smoother-looking effects with shaders or procedural mesh tools (at the cost of performance). When not altering the vertex data using a shader or procedural mesh tool, [member rings] should be kept to its default value.
</member>
<member name="top_radius" type="float" setter="set_top_radius" getter="get_top_radius" default="0.5">
- Top radius of the cylinder. If set to [code]0.0[/code], the top faces will not be generated, resulting in a conic shape.
+ Top radius of the cylinder. If set to [code]0.0[/code], the top faces will not be generated, resulting in a conic shape. See also [member cap_top].
</member>
</members>
</class>
diff --git a/doc/classes/DTLSServer.xml b/doc/classes/DTLSServer.xml
index 5d8a2bc16d..9af8be99ef 100644
--- a/doc/classes/DTLSServer.xml
+++ b/doc/classes/DTLSServer.xml
@@ -148,18 +148,18 @@
<methods>
<method name="setup">
<return type="int" enum="Error" />
- <argument index="0" name="key" type="CryptoKey" />
- <argument index="1" name="certificate" type="X509Certificate" />
- <argument index="2" name="chain" type="X509Certificate" default="null" />
+ <param index="0" name="key" type="CryptoKey" />
+ <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" />
- <argument index="0" name="udp_peer" type="PacketPeerUDP" />
+ <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/Decal.xml b/doc/classes/Decal.xml
index 342bc762af..b9d3f1d81e 100644
--- a/doc/classes/Decal.xml
+++ b/doc/classes/Decal.xml
@@ -7,13 +7,14 @@
[Decal]s are used to project a texture onto a [Mesh] in the scene. Use Decals to add detail to a scene without affecting the underlying [Mesh]. They are often used to add weathering to building, add dirt or mud to the ground, or add variety to props. Decals can be moved at any time, making them suitable for things like blob shadows or laser sight dots.
They are made of an [AABB] and a group of [Texture2D]s specifying [Color], normal, ORM (ambient occlusion, roughness, metallic), and emission. Decals are projected within their [AABB] so altering the orientation of the Decal affects the direction in which they are projected. By default, Decals are projected down (i.e. from positive Y to negative Y).
The [Texture2D]s associated with the Decal are automatically stored in a texture atlas which is used for drawing the decals so all decals can be drawn at once. Godot uses clustered decals, meaning they are stored in cluster data and drawn when the mesh is drawn, they are not drawn as a post-processing effect after.
+ [b]Note:[/b] Decals cannot affect an underlying material's transparency, regardless of its transparency mode (alpha blend, alpha scissor, alpha hash, opaque pre-pass). This means translucent or transparent areas of a material will remain translucent or transparent even if an opaque decal is applied on them.
</description>
<tutorials>
</tutorials>
<methods>
<method name="get_texture" qualifiers="const">
<return type="Texture2D" />
- <argument index="0" name="type" type="int" enum="Decal.DecalTexture" />
+ <param index="0" name="type" type="int" enum="Decal.DecalTexture" />
<description>
Returns the [Texture2D] associated with the specified [enum DecalTexture]. This is a convenience method, in most cases you should access the texture directly.
For example, instead of [code]albedo_tex = $Decal.get_texture(Decal.TEXTURE_ALBEDO)[/code], use [code]albedo_tex = $Decal.texture_albedo[/code].
@@ -34,8 +35,8 @@
</method>
<method name="set_texture">
<return type="void" />
- <argument index="0" name="type" type="int" enum="Decal.DecalTexture" />
- <argument index="1" name="texture" type="Texture2D" />
+ <param index="0" name="type" type="int" enum="Decal.DecalTexture" />
+ <param index="1" name="texture" type="Texture2D" />
<description>
Sets the [Texture2D] associated with the specified [enum DecalTexture]. This is a convenience method, in most cases you should access the texture directly.
For example, instead of [code]$Decal.set_texture(Decal.TEXTURE_ALBEDO, albedo_tex)[/code], use [code]$Decal.texture_albedo = albedo_tex[/code].
@@ -57,49 +58,56 @@
</methods>
<members>
<member name="albedo_mix" type="float" setter="set_albedo_mix" getter="get_albedo_mix" default="1.0">
- Blends the albedo [Color] of the decal with albedo [Color] of the underlying mesh.
+ Blends the albedo [Color] of the decal with albedo [Color] of the underlying mesh. This can be set to [code]0.0[/code] to create a decal that only affects normal or ORM. In this case, an albedo texture is still required as its alpha channel will determine where the normal and ORM will be overridden. See also [member modulate].
</member>
<member name="cull_mask" type="int" setter="set_cull_mask" getter="get_cull_mask" default="1048575">
Specifies which [member VisualInstance3D.layers] this decal will project on. By default, Decals affect all layers. This is used so you can specify which types of objects receive the Decal and which do not. This is especially useful so you can ensure that dynamic objects don't accidentally receive a Decal intended for the terrain under them.
</member>
- <member name="distance_fade_begin" type="float" setter="set_distance_fade_begin" getter="get_distance_fade_begin" default="10.0">
- Distance from the camera at which the Decal begins to fade away.
+ <member name="distance_fade_begin" type="float" setter="set_distance_fade_begin" getter="get_distance_fade_begin" default="40.0">
+ The distance from the camera at which the Decal begins to fade away (in 3D units).
</member>
<member name="distance_fade_enabled" type="bool" setter="set_enable_distance_fade" getter="is_distance_fade_enabled" default="false">
- If [code]true[/code], decals will smoothly fade away when far from the active [Camera3D] starting at [member distance_fade_begin]. The Decal will fade out over [member distance_fade_length], after which it will be culled and not sent to the shader at all. Use this to reduce the number of active Decals in a scene and thus improve performance.
+ If [code]true[/code], decals will smoothly fade away when far from the active [Camera3D] starting at [member distance_fade_begin]. The Decal will fade out over [member distance_fade_begin] + [member distance_fade_length], after which it will be culled and not sent to the shader at all. Use this to reduce the number of active Decals in a scene and thus improve performance.
</member>
- <member name="distance_fade_length" type="float" setter="set_distance_fade_length" getter="get_distance_fade_length" default="1.0">
- Distance over which the Decal fades. The Decal becomes slowly more transparent over this distance and is completely invisible at the end.
+ <member name="distance_fade_length" type="float" setter="set_distance_fade_length" getter="get_distance_fade_length" default="10.0">
+ The distance over which the Decal fades (in 3D units). The Decal becomes slowly more transparent over this distance and is completely invisible at the end. Higher values result in a smoother fade-out transition, which is more suited when the camera moves fast.
</member>
<member name="emission_energy" type="float" setter="set_emission_energy" getter="get_emission_energy" default="1.0">
- Energy multiplier for the emission texture. This will make the decal emit light at a higher intensity.
+ Energy multiplier for the emission texture. This will make the decal emit light at a higher or lower intensity, independently of the albedo color. See also [member modulate].
</member>
<member name="extents" type="Vector3" setter="set_extents" getter="get_extents" default="Vector3(1, 1, 1)">
Sets the size of the [AABB] used by the decal. The AABB goes from [code]-extents[/code] to [code]extents[/code].
</member>
<member name="lower_fade" type="float" setter="set_lower_fade" getter="get_lower_fade" default="0.3">
- Sets the curve over which the decal will fade as the surface gets further from the center of the [AABB].
+ Sets the curve over which the decal will fade as the surface gets further from the center of the [AABB]. Only positive values are valid (negative values will be clamped to [code]0.0[/code]). See also [member upper_fade].
</member>
<member name="modulate" type="Color" setter="set_modulate" getter="get_modulate" default="Color(1, 1, 1, 1)">
- Changes the [Color] of the Decal by multiplying it with this value.
+ Changes the [Color] of the Decal by multiplying the albedo and emission colors with this value. The alpha component is only taken into account when multiplying the albedo color, not the emission color. See also [member emission_energy] and [member albedo_mix] to change the emission and albedo intensity independently of each other.
</member>
<member name="normal_fade" type="float" setter="set_normal_fade" getter="get_normal_fade" default="0.0">
Fades the Decal if the angle between the Decal's [AABB] and the target surface becomes too large. A value of [code]0[/code] projects the Decal regardless of angle, a value of [code]1[/code] limits the Decal to surfaces that are nearly perpendicular.
+ [b]Note:[/b] Setting [member normal_fade] to a value greater than [code]0.0[/code] has a small performance cost due to the added normal angle computations.
</member>
<member name="texture_albedo" type="Texture2D" setter="set_texture" getter="get_texture">
[Texture2D] with the base [Color] of the Decal. Either this or the [member texture_emission] must be set for the Decal to be visible. Use the alpha channel like a mask to smoothly blend the edges of the decal with the underlying object.
+ [b]Note:[/b] Unlike [BaseMaterial3D] whose filter mode can be adjusted on a per-material basis, the filter mode for [Decal] textures is set globally with [member ProjectSettings.rendering/textures/decals/filter].
</member>
<member name="texture_emission" type="Texture2D" setter="set_texture" getter="get_texture">
[Texture2D] with the emission [Color] of the Decal. Either this or the [member texture_emission] must be set for the Decal to be visible. Use the alpha channel like a mask to smoothly blend the edges of the decal with the underlying object.
+ [b]Note:[/b] Unlike [BaseMaterial3D] whose filter mode can be adjusted on a per-material basis, the filter mode for [Decal] textures is set globally with [member ProjectSettings.rendering/textures/decals/filter].
</member>
<member name="texture_normal" type="Texture2D" setter="set_texture" getter="get_texture">
[Texture2D] with the per-pixel normal map for the decal. Use this to add extra detail to decals.
+ [b]Note:[/b] Unlike [BaseMaterial3D] whose filter mode can be adjusted on a per-material basis, the filter mode for [Decal] textures is set globally with [member ProjectSettings.rendering/textures/decals/filter].
+ [b]Note:[/b] Setting this texture alone will not result in a visible decal, as [member texture_albedo] must also be set. To create a normal-only decal, load an albedo texture into [member texture_albedo] and set [member albedo_mix] to [code]0.0[/code]. The albedo texture's alpha channel will be used to determine where the underlying surface's normal map should be overridden (and its intensity).
</member>
<member name="texture_orm" type="Texture2D" setter="set_texture" getter="get_texture">
[Texture2D] storing ambient occlusion, roughness, and metallic for the decal. Use this to add extra detail to decals.
+ [b]Note:[/b] Unlike [BaseMaterial3D] whose filter mode can be adjusted on a per-material basis, the filter mode for [Decal] textures is set globally with [member ProjectSettings.rendering/textures/decals/filter].
+ [b]Note:[/b] Setting this texture alone will not result in a visible decal, as [member texture_albedo] must also be set. To create a ORM-only decal, load an albedo texture into [member texture_albedo] and set [member albedo_mix] to [code]0.0[/code]. The albedo texture's alpha channel will be used to determine where the underlying surface's ORM map should be overridden (and its intensity).
</member>
<member name="upper_fade" type="float" setter="set_upper_fade" getter="get_upper_fade" default="0.3">
- Sets the curve over which the decal will fade as the surface gets further from the center of the [AABB].
+ Sets the curve over which the decal will fade as the surface gets further from the center of the [AABB]. Only positive values are valid (negative values will be clamped to [code]0.0[/code]). See also [member lower_fade].
</member>
</members>
<constants>
diff --git a/doc/classes/Dictionary.xml b/doc/classes/Dictionary.xml
index 8ee09ba8f8..40b5e88fff 100644
--- a/doc/classes/Dictionary.xml
+++ b/doc/classes/Dictionary.xml
@@ -43,7 +43,7 @@
You can access a dictionary's values by referencing the appropriate key. In the above example, [code]points_dict["White"][/code] will return [code]50[/code]. You can also write [code]points_dict.White[/code], which is equivalent. However, you'll have to use the bracket syntax if the key you're accessing the dictionary with isn't a fixed string (such as a number or variable).
[codeblocks]
[gdscript]
- export(string, "White", "Yellow", "Orange") var my_color
+ export(String, "White", "Yellow", "Orange") var my_color
var points_dict = {"White": 50, "Yellow": 75, "Orange": 100}
func _ready():
# We can't use dot syntax here as `my_color` is a variable.
@@ -190,7 +190,7 @@
</constructor>
<constructor name="Dictionary">
<return type="Dictionary" />
- <argument index="0" name="from" type="Dictionary" />
+ <param index="0" name="from" type="Dictionary" />
<description>
Constructs a [Dictionary] as a copy of the given [Dictionary].
</description>
@@ -205,14 +205,14 @@
</method>
<method name="duplicate" qualifiers="const">
<return type="Dictionary" />
- <argument index="0" name="deep" type="bool" default="false" />
+ <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">
<return type="bool" />
- <argument index="0" name="key" type="Variant" />
+ <param index="0" name="key" type="Variant" />
<description>
Erase a dictionary key/value pair by key. Returns [code]true[/code] if the given key was present in the dictionary, [code]false[/code] otherwise.
[b]Note:[/b] Don't erase elements while iterating over the dictionary. You can iterate over the [method keys] array instead.
@@ -220,15 +220,15 @@
</method>
<method name="get" qualifiers="const">
<return type="Variant" />
- <argument index="0" name="key" type="Variant" />
- <argument index="1" name="default" type="Variant" default="null" />
+ <param index="0" name="key" type="Variant" />
+ <param index="1" name="default" type="Variant" default="null" />
<description>
Returns the current value for the specified key in the [Dictionary]. If the key does not exist, the method returns the value of the optional default argument, or [code]null[/code] if it is omitted.
</description>
</method>
<method name="has" qualifiers="const">
<return type="bool" />
- <argument index="0" name="key" type="Variant" />
+ <param index="0" name="key" type="Variant" />
<description>
Returns [code]true[/code] if the dictionary has a given key.
[b]Note:[/b] This is equivalent to using the [code]in[/code] operator as follows:
@@ -251,7 +251,7 @@
</method>
<method name="has_all" qualifiers="const">
<return type="bool" />
- <argument index="0" name="keys" type="Array" />
+ <param index="0" name="keys" type="Array" />
<description>
Returns [code]true[/code] if the dictionary has all the keys in the given array.
</description>
@@ -291,6 +291,14 @@
Returns the list of keys in the [Dictionary].
</description>
</method>
+ <method name="merge">
+ <return type="void" />
+ <param index="0" name="dictionary" type="Dictionary" />
+ <param index="1" name="overwrite" type="bool" default="false" />
+ <description>
+ 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">
<return type="int" />
<description>
@@ -307,19 +315,19 @@
<operators>
<operator name="operator !=">
<return type="bool" />
- <argument index="0" name="right" type="Dictionary" />
+ <param index="0" name="right" type="Dictionary" />
<description>
</description>
</operator>
<operator name="operator ==">
<return type="bool" />
- <argument index="0" name="right" type="Dictionary" />
+ <param index="0" name="right" type="Dictionary" />
<description>
</description>
</operator>
<operator name="operator []">
<return type="Variant" />
- <argument index="0" name="key" type="Variant" />
+ <param index="0" name="key" type="Variant" />
<description>
</description>
</operator>
diff --git a/doc/classes/DirectionalLight3D.xml b/doc/classes/DirectionalLight3D.xml
index 754518239c..9c943b8c8b 100644
--- a/doc/classes/DirectionalLight3D.xml
+++ b/doc/classes/DirectionalLight3D.xml
@@ -34,7 +34,6 @@
<member name="directional_shadow_split_3" type="float" setter="set_param" getter="get_param" default="0.5">
The distance from shadow split 2 to split 3. Relative to [member directional_shadow_max_distance]. Only used when [member directional_shadow_mode] is [constant SHADOW_PARALLEL_4_SPLITS].
</member>
- <member name="shadow_bias" type="float" setter="set_param" getter="get_param" overrides="Light3D" default="0.1" />
<member name="sky_mode" type="int" setter="set_sky_mode" getter="get_sky_mode" enum="DirectionalLight3D.SkyMode" default="0">
Set whether this [DirectionalLight3D] is visible in the sky, in the scene, or both in the sky and in the scene. See [enum SkyMode] for options.
</member>
diff --git a/doc/classes/Directory.xml b/doc/classes/Directory.xml
index bd16fd3936..c9a9f346a5 100644
--- a/doc/classes/Directory.xml
+++ b/doc/classes/Directory.xml
@@ -59,7 +59,7 @@
<methods>
<method name="change_dir">
<return type="int" enum="Error" />
- <argument index="0" name="todir" type="String" />
+ <param index="0" name="todir" 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).
@@ -67,10 +67,10 @@
</method>
<method name="copy">
<return type="int" enum="Error" />
- <argument index="0" name="from" type="String" />
- <argument index="1" name="to" type="String" />
+ <param index="0" name="from" type="String" />
+ <param index="1" name="to" type="String" />
<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.
+ 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.
Returns one of the [enum Error] code constants ([code]OK[/code] on success).
</description>
</method>
@@ -82,7 +82,7 @@
</method>
<method name="dir_exists">
<return type="bool" />
- <argument index="0" name="path" type="String" />
+ <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].
@@ -90,7 +90,7 @@
</method>
<method name="file_exists">
<return type="bool" />
- <argument index="0" name="path" type="String" />
+ <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].
@@ -117,7 +117,7 @@
</method>
<method name="get_drive">
<return type="String" />
- <argument index="0" name="idx" type="int" />
+ <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.
@@ -170,7 +170,7 @@
</method>
<method name="make_dir">
<return type="int" enum="Error" />
- <argument index="0" name="path" type="String" />
+ <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).
@@ -178,7 +178,7 @@
</method>
<method name="make_dir_recursive">
<return type="int" enum="Error" />
- <argument index="0" name="path" type="String" />
+ <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).
@@ -186,15 +186,15 @@
</method>
<method name="open">
<return type="int" enum="Error" />
- <argument index="0" name="path" type="String" />
+ <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]).
+ 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 one of the [enum Error] code constants ([code]OK[/code] on success).
</description>
</method>
<method name="remove">
<return type="int" enum="Error" />
- <argument index="0" name="path" type="String" />
+ <param index="0" name="path" type="String" />
<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.
@@ -203,10 +203,10 @@
</method>
<method name="rename">
<return type="int" enum="Error" />
- <argument index="0" name="from" type="String" />
- <argument index="1" name="to" type="String" />
+ <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.
+ 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 ([code]OK[/code] on success).
</description>
</method>
diff --git a/doc/classes/DisplayServer.xml b/doc/classes/DisplayServer.xml
index ede3a1e199..bcad75215a 100644
--- a/doc/classes/DisplayServer.xml
+++ b/doc/classes/DisplayServer.xml
@@ -28,14 +28,14 @@
</method>
<method name="clipboard_set">
<return type="void" />
- <argument index="0" name="clipboard" type="String" />
+ <param index="0" name="clipboard" type="String" />
<description>
Sets the user's clipboard content to the given string.
</description>
</method>
<method name="clipboard_set_primary">
<return type="void" />
- <argument index="0" name="clipboard_primary" type="String" />
+ <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.
@@ -43,10 +43,10 @@
</method>
<method name="create_sub_window">
<return type="int" />
- <argument index="0" name="mode" type="int" enum="DisplayServer.WindowMode" />
- <argument index="1" name="vsync_mode" type="int" enum="DisplayServer.VSyncMode" />
- <argument index="2" name="flags" type="int" />
- <argument index="3" name="rect" type="Rect2i" default="Rect2i(0, 0, 0, 0)" />
+ <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>
</description>
</method>
@@ -57,45 +57,45 @@
</method>
<method name="cursor_set_custom_image">
<return type="void" />
- <argument index="0" name="cursor" type="Resource" />
- <argument index="1" name="shape" type="int" enum="DisplayServer.CursorShape" default="0" />
- <argument index="2" name="hotspot" type="Vector2" default="Vector2(0, 0)" />
+ <param index="0" name="cursor" type="Resource" />
+ <param index="1" name="shape" type="int" enum="DisplayServer.CursorShape" default="0" />
+ <param index="2" name="hotspot" type="Vector2" default="Vector2(0, 0)" />
<description>
</description>
</method>
<method name="cursor_set_shape">
<return type="void" />
- <argument index="0" name="shape" type="int" enum="DisplayServer.CursorShape" />
+ <param index="0" name="shape" type="int" enum="DisplayServer.CursorShape" />
<description>
</description>
</method>
<method name="delete_sub_window">
<return type="void" />
- <argument index="0" name="window_id" type="int" />
+ <param index="0" name="window_id" type="int" />
<description>
</description>
</method>
<method name="dialog_input_text">
<return type="int" enum="Error" />
- <argument index="0" name="title" type="String" />
- <argument index="1" name="description" type="String" />
- <argument index="2" name="existing_text" type="String" />
- <argument index="3" name="callback" type="Callable" />
+ <param index="0" name="title" type="String" />
+ <param index="1" name="description" type="String" />
+ <param index="2" name="existing_text" type="String" />
+ <param index="3" name="callback" type="Callable" />
<description>
</description>
</method>
<method name="dialog_show">
<return type="int" enum="Error" />
- <argument index="0" name="title" type="String" />
- <argument index="1" name="description" type="String" />
- <argument index="2" name="buttons" type="PackedStringArray" />
- <argument index="3" name="callback" type="Callable" />
+ <param index="0" name="title" type="String" />
+ <param index="1" name="description" type="String" />
+ <param index="2" name="buttons" type="PackedStringArray" />
+ <param index="3" name="callback" type="Callable" />
<description>
</description>
</method>
<method name="enable_for_stealing_focus">
<return type="void" />
- <argument index="0" name="process_id" type="int" />
+ <param index="0" name="process_id" type="int" />
<description>
</description>
</method>
@@ -104,6 +104,19 @@
<description>
</description>
</method>
+ <method name="get_display_cutouts" qualifiers="const">
+ <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.
+ </description>
+ </method>
+ <method name="get_display_safe_area" qualifiers="const">
+ <return type="Rect2i" />
+ <description>
+ Returns the unobscured area of the display where interactive controls should be rendered. See also [method get_display_cutouts].
+ </description>
+ </method>
<method name="get_name" qualifiers="const">
<return type="String" />
<description>
@@ -121,7 +134,7 @@
</method>
<method name="get_window_at_screen_position" qualifiers="const">
<return type="int" />
- <argument index="0" name="position" type="Vector2i" />
+ <param index="0" name="position" type="Vector2i" />
<description>
</description>
</method>
@@ -131,231 +144,250 @@
</description>
</method>
<method name="global_menu_add_check_item">
- <return type="void" />
- <argument index="0" name="menu_root" type="String" />
- <argument index="1" name="label" type="String" />
- <argument index="2" name="callback" type="Callable" />
- <argument index="3" name="tag" type="Variant" default="null" />
- <argument index="4" name="accelerator" type="int" enum="Key" default="0" />
- <argument index="5" 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].
+ <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" />
+ <description>
+ 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" />
- <argument index="0" name="menu_root" type="String" />
- <argument index="1" name="icon" type="Texture2D" />
- <argument index="2" name="label" type="String" />
- <argument index="3" name="callback" type="Callable" />
- <argument index="4" name="tag" type="Variant" default="null" />
- <argument index="5" name="accelerator" type="int" enum="Key" default="0" />
- <argument index="6" 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].
+ <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" />
+ <description>
+ 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" />
- <argument index="0" name="menu_root" type="String" />
- <argument index="1" name="icon" type="Texture2D" />
- <argument index="2" name="label" type="String" />
- <argument index="3" name="callback" type="Callable" />
- <argument index="4" name="tag" type="Variant" default="null" />
- <argument index="5" name="accelerator" type="int" enum="Key" default="0" />
- <argument index="6" 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].
+ <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" />
+ <description>
+ 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" />
- <argument index="0" name="menu_root" type="String" />
- <argument index="1" name="icon" type="Texture2D" />
- <argument index="2" name="label" type="String" />
- <argument index="3" name="callback" type="Callable" />
- <argument index="4" name="tag" type="Variant" default="null" />
- <argument index="5" name="accelerator" type="int" enum="Key" default="0" />
- <argument index="6" 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].
+ <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" />
+ <description>
+ 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" />
- <argument index="0" name="menu_root" type="String" />
- <argument index="1" name="label" type="String" />
- <argument index="2" name="callback" type="Callable" />
- <argument index="3" name="tag" type="Variant" default="null" />
- <argument index="4" name="accelerator" type="int" enum="Key" default="0" />
- <argument index="5" 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].
+ <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" />
+ <description>
+ 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" />
- <argument index="0" name="menu_root" type="String" />
- <argument index="1" name="labe" type="String" />
- <argument index="2" name="max_states" type="int" />
- <argument index="3" name="default_state" type="int" />
- <argument index="4" name="callback" type="Callable" />
- <argument index="5" name="tag" type="Variant" default="null" />
- <argument index="6" name="accelerator" type="int" enum="Key" default="0" />
- <argument 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].
+ <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 [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" />
- <argument index="0" name="menu_root" type="String" />
- <argument index="1" name="label" type="String" />
- <argument index="2" name="callback" type="Callable" />
- <argument index="3" name="tag" type="Variant" default="null" />
- <argument index="4" name="accelerator" type="int" enum="Key" default="0" />
- <argument index="5" 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].
+ <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" />
+ <description>
+ 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" />
- <argument index="0" name="menu_root" type="String" />
- <argument index="1" name="index" type="int" default="-1" />
+ <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" />
- <argument index="0" name="menu_root" type="String" />
- <argument index="1" name="label" type="String" />
- <argument index="2" name="submenu" type="String" />
- <argument index="3" name="index" type="int" default="-1" />
+ <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>
</method>
<method name="global_menu_clear">
<return type="void" />
- <argument index="0" name="menu_root" type="String" />
+ <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>
</method>
<method name="global_menu_get_item_accelerator" qualifiers="const">
<return type="int" enum="Key" />
- <argument index="0" name="menu_root" type="String" />
- <argument index="1" name="idx" type="int" />
+ <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>
<method name="global_menu_get_item_callback" qualifiers="const">
<return type="Callable" />
- <argument index="0" name="menu_root" type="String" />
- <argument index="1" name="idx" type="int" />
+ <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_icon" qualifiers="const">
<return type="Texture2D" />
- <argument index="0" name="menu_root" type="String" />
- <argument index="1" name="idx" type="int" />
+ <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>
<method name="global_menu_get_item_index_from_tag" qualifiers="const">
<return type="int" />
- <argument index="0" name="menu_root" type="String" />
- <argument index="1" name="tag" type="Variant" />
+ <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>
<method name="global_menu_get_item_index_from_text" qualifiers="const">
<return type="int" />
- <argument index="0" name="menu_root" type="String" />
- <argument index="1" name="text" type="String" />
+ <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_max_states" qualifiers="const">
<return type="int" />
- <argument index="0" name="menu_root" type="String" />
- <argument index="1" name="idx" type="int" />
+ <param index="0" name="menu_root" type="String" />
+ <param index="1" name="idx" type="int" />
<description>
Returns number of states of an multistate item. See [method global_menu_add_multistate_item] for details.
[b]Note:[/b] This method is implemented on macOS.
@@ -363,8 +395,8 @@
</method>
<method name="global_menu_get_item_state" qualifiers="const">
<return type="int" />
- <argument index="0" name="menu_root" type="String" />
- <argument index="1" name="idx" type="int" />
+ <param index="0" name="menu_root" type="String" />
+ <param index="1" name="idx" type="int" />
<description>
Returns the state of an multistate item. See [method global_menu_add_multistate_item] for details.
[b]Note:[/b] This method is implemented on macOS.
@@ -372,17 +404,17 @@
</method>
<method name="global_menu_get_item_submenu" qualifiers="const">
<return type="String" />
- <argument index="0" name="menu_root" type="String" />
- <argument index="1" name="idx" type="int" />
+ <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>
<method name="global_menu_get_item_tag" qualifiers="const">
<return type="Variant" />
- <argument index="0" name="menu_root" type="String" />
- <argument index="1" name="idx" type="int" />
+ <param index="0" name="menu_root" type="String" />
+ <param index="1" name="idx" type="int" />
<description>
Returns the metadata of the specified item, which might be of any type. You can set it with [method global_menu_set_item_tag], which provides a simple way of assigning context data to items.
[b]Note:[/b] This method is implemented on macOS.
@@ -390,136 +422,146 @@
</method>
<method name="global_menu_get_item_text" qualifiers="const">
<return type="String" />
- <argument index="0" name="menu_root" type="String" />
- <argument index="1" name="idx" type="int" />
+ <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>
<method name="global_menu_get_item_tooltip" qualifiers="const">
<return type="String" />
- <argument index="0" name="menu_root" type="String" />
- <argument index="1" name="idx" type="int" />
+ <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>
<method name="global_menu_is_item_checkable" qualifiers="const">
<return type="bool" />
- <argument index="0" name="menu_root" type="String" />
- <argument index="1" name="idx" type="int" />
+ <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>
<method name="global_menu_is_item_checked" qualifiers="const">
<return type="bool" />
- <argument index="0" name="menu_root" type="String" />
- <argument index="1" name="idx" type="int" />
+ <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>
<method name="global_menu_is_item_disabled" qualifiers="const">
<return type="bool" />
- <argument index="0" name="menu_root" type="String" />
- <argument index="1" name="idx" type="int" />
+ <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>
</method>
<method name="global_menu_is_item_radio_checkable" qualifiers="const">
<return type="bool" />
- <argument index="0" name="menu_root" type="String" />
- <argument index="1" name="idx" type="int" />
+ <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>
</method>
<method name="global_menu_remove_item">
<return type="void" />
- <argument index="0" name="menu_root" type="String" />
- <argument index="1" name="idx" type="int" />
+ <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>
</method>
<method name="global_menu_set_item_accelerator">
<return type="void" />
- <argument index="0" name="menu_root" type="String" />
- <argument index="1" name="idx" type="int" />
- <argument index="2" name="keycode" type="int" enum="Key" />
+ <param index="0" name="menu_root" type="String" />
+ <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>
<method name="global_menu_set_item_callback">
<return type="void" />
- <argument index="0" name="menu_root" type="String" />
- <argument index="1" name="idx" type="int" />
- <argument index="2" name="callback" type="Callable" />
+ <param index="0" name="menu_root" type="String" />
+ <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 or its accelerator is activated.
[b]Note:[/b] This method is implemented on macOS.
</description>
</method>
<method name="global_menu_set_item_checkable">
<return type="void" />
- <argument index="0" name="menu_root" type="String" />
- <argument index="1" name="idx" type="int" />
- <argument index="2" name="checkable" type="bool" />
+ <param index="0" name="menu_root" type="String" />
+ <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>
<method name="global_menu_set_item_checked">
<return type="void" />
- <argument index="0" name="menu_root" type="String" />
- <argument index="1" name="idx" type="int" />
- <argument index="2" name="checked" type="bool" />
+ <param index="0" name="menu_root" type="String" />
+ <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>
<method name="global_menu_set_item_disabled">
<return type="void" />
- <argument index="0" name="menu_root" type="String" />
- <argument index="1" name="idx" type="int" />
- <argument index="2" name="disabled" type="bool" />
+ <param index="0" name="menu_root" type="String" />
+ <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>
<method name="global_menu_set_item_icon">
<return type="void" />
- <argument index="0" name="menu_root" type="String" />
- <argument index="1" name="idx" type="int" />
- <argument index="2" name="icon" type="Texture2D" />
+ <param index="0" name="menu_root" type="String" />
+ <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_max_states">
<return type="void" />
- <argument index="0" name="menu_root" type="String" />
- <argument index="1" name="idx" type="int" />
- <argument index="2" name="max_states" type="int" />
+ <param index="0" name="menu_root" type="String" />
+ <param index="1" name="idx" type="int" />
+ <param index="2" name="max_states" type="int" />
<description>
Sets number of state of an multistate item. See [method global_menu_add_multistate_item] for details.
[b]Note:[/b] This method is implemented on macOS.
@@ -527,20 +569,20 @@
</method>
<method name="global_menu_set_item_radio_checkable">
<return type="void" />
- <argument index="0" name="menu_root" type="String" />
- <argument index="1" name="idx" type="int" />
- <argument index="2" name="checkable" type="bool" />
+ <param index="0" name="menu_root" type="String" />
+ <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>
</method>
<method name="global_menu_set_item_state">
<return type="void" />
- <argument index="0" name="menu_root" type="String" />
- <argument index="1" name="idx" type="int" />
- <argument index="2" name="state" type="int" />
+ <param index="0" name="menu_root" type="String" />
+ <param index="1" name="idx" type="int" />
+ <param index="2" name="state" type="int" />
<description>
Sets the state of an multistate item. See [method global_menu_add_multistate_item] for details.
[b]Note:[/b] This method is implemented on macOS.
@@ -548,19 +590,19 @@
</method>
<method name="global_menu_set_item_submenu">
<return type="void" />
- <argument index="0" name="menu_root" type="String" />
- <argument index="1" name="idx" type="int" />
- <argument index="2" name="submenu" type="String" />
+ <param index="0" name="menu_root" type="String" />
+ <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>
<method name="global_menu_set_item_tag">
<return type="void" />
- <argument index="0" name="menu_root" type="String" />
- <argument index="1" name="idx" type="int" />
- <argument index="2" name="tag" type="Variant" />
+ <param index="0" name="menu_root" type="String" />
+ <param index="1" name="idx" type="int" />
+ <param index="2" name="tag" type="Variant" />
<description>
Sets the metadata of an item, which may be of any type. You can later get it with [method global_menu_get_item_tag], which provides a simple way of assigning context data to items.
[b]Note:[/b] This method is implemented on macOS.
@@ -568,27 +610,27 @@
</method>
<method name="global_menu_set_item_text">
<return type="void" />
- <argument index="0" name="menu_root" type="String" />
- <argument index="1" name="idx" type="int" />
- <argument index="2" name="text" type="String" />
+ <param index="0" name="menu_root" type="String" />
+ <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>
<method name="global_menu_set_item_tooltip">
<return type="void" />
- <argument index="0" name="menu_root" type="String" />
- <argument index="1" name="idx" type="int" />
- <argument index="2" name="tooltip" type="String" />
+ <param index="0" name="menu_root" type="String" />
+ <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>
<method name="has_feature" qualifiers="const">
<return type="bool" />
- <argument index="0" name="feature" type="int" enum="DisplayServer.Feature" />
+ <param index="0" name="feature" type="int" enum="DisplayServer.Feature" />
<description>
</description>
</method>
@@ -611,9 +653,9 @@
</method>
<method name="keyboard_get_keycode_from_physical" qualifiers="const">
<return type="int" enum="Key" />
- <argument index="0" name="keycode" 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.
+ Converts a physical (US QWERTY) [param keycode] to one in the active keyboard layout.
[b]Note:[/b] This method is implemented on Linux, macOS and Windows.
</description>
</method>
@@ -626,23 +668,23 @@
</method>
<method name="keyboard_get_layout_language" qualifiers="const">
<return type="String" />
- <argument index="0" name="index" type="int" />
+ <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].
+ 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, macOS and Windows.
</description>
</method>
<method name="keyboard_get_layout_name" qualifiers="const">
<return type="String" />
- <argument index="0" name="index" type="int" />
+ <param index="0" name="index" type="int" />
<description>
- Returns the localized name of the keyboard layout at position [code]index[/code].
+ Returns the localized name of the keyboard layout at position [param index].
[b]Note:[/b] This method is implemented on Linux, macOS and Windows.
</description>
</method>
<method name="keyboard_set_current_layout">
<return type="void" />
- <argument index="0" name="index" type="int" />
+ <param index="0" name="index" type="int" />
<description>
Sets active keyboard layout.
[b]Note:[/b] This method is implemented on Linux, macOS and Windows.
@@ -666,7 +708,7 @@
</method>
<method name="mouse_set_mode">
<return type="void" />
- <argument index="0" name="mouse_mode" type="int" enum="DisplayServer.MouseMode" />
+ <param index="0" name="mouse_mode" type="int" enum="DisplayServer.MouseMode" />
<description>
</description>
</method>
@@ -677,9 +719,9 @@
</method>
<method name="screen_get_dpi" qualifiers="const">
<return type="int" />
- <argument index="0" name="screen" type="int" default="-1" />
+ <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,21 +745,21 @@
</method>
<method name="screen_get_orientation" qualifiers="const">
<return type="int" enum="DisplayServer.ScreenOrientation" />
- <argument index="0" name="screen" type="int" default="-1" />
+ <param index="0" name="screen" type="int" default="-1" />
<description>
</description>
</method>
<method name="screen_get_position" qualifiers="const">
<return type="Vector2i" />
- <argument index="0" name="screen" type="int" default="-1" />
+ <param index="0" name="screen" type="int" default="-1" />
<description>
</description>
</method>
<method name="screen_get_refresh_rate" qualifiers="const">
<return type="float" />
- <argument index="0" name="screen" type="int" default="-1" />
+ <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.
+ 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 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.
To fallback to a default refresh rate if the method fails, try:
[codeblock]
@@ -729,7 +771,7 @@
</method>
<method name="screen_get_scale" qualifiers="const">
<return type="float" />
- <argument index="0" name="screen" type="int" default="-1" />
+ <param index="0" name="screen" type="int" default="-1" />
<description>
Returns the scale factor of the specified screen by index.
[b]Note:[/b] On macOS returned value is [code]2.0[/code] for hiDPI (Retina) screen, and [code]1.0[/code] for all other cases.
@@ -738,13 +780,13 @@
</method>
<method name="screen_get_size" qualifiers="const">
<return type="Vector2i" />
- <argument index="0" name="screen" type="int" default="-1" />
+ <param index="0" name="screen" type="int" default="-1" />
<description>
</description>
</method>
<method name="screen_get_usable_rect" qualifiers="const">
<return type="Rect2i" />
- <argument index="0" name="screen" type="int" default="-1" />
+ <param index="0" name="screen" type="int" default="-1" />
<description>
</description>
</method>
@@ -755,32 +797,32 @@
</method>
<method name="screen_is_touchscreen" qualifiers="const">
<return type="bool" />
- <argument index="0" name="screen" type="int" default="-1" />
+ <param index="0" name="screen" type="int" default="-1" />
<description>
</description>
</method>
<method name="screen_set_keep_on">
<return type="void" />
- <argument index="0" name="enable" type="bool" />
+ <param index="0" name="enable" type="bool" />
<description>
</description>
</method>
<method name="screen_set_orientation">
<return type="void" />
- <argument index="0" name="orientation" type="int" enum="DisplayServer.ScreenOrientation" />
- <argument index="1" name="screen" type="int" default="-1" />
+ <param index="0" name="orientation" type="int" enum="DisplayServer.ScreenOrientation" />
+ <param index="1" name="screen" type="int" default="-1" />
<description>
</description>
</method>
<method name="set_icon">
<return type="void" />
- <argument index="0" name="image" type="Image" />
+ <param index="0" name="image" type="Image" />
<description>
</description>
</method>
<method name="set_native_icon">
<return type="void" />
- <argument index="0" name="filename" type="String" />
+ <param index="0" name="filename" type="String" />
<description>
</description>
</method>
@@ -800,7 +842,7 @@
</method>
<method name="tablet_get_driver_name" qualifiers="const">
<return type="String" />
- <argument index="0" name="idx" type="int" />
+ <param index="0" name="idx" type="int" />
<description>
Returns the tablet driver name for the given index.
[b]Note:[/b] This method is implemented on Windows.
@@ -808,14 +850,14 @@
</method>
<method name="tablet_set_current_driver">
<return type="void" />
- <argument index="0" name="name" type="String" />
+ <param index="0" name="name" type="String" />
<description>
Set active tablet driver name.
[b]Note:[/b] This method is implemented on Windows.
</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:
@@ -827,9 +869,9 @@
</method>
<method name="tts_get_voices_for_language" qualifiers="const">
<return type="PackedStringArray" />
- <argument index="0" name="language" type="String" />
+ <param index="0" name="language" type="String" />
<description>
- Returns an [PackedStringArray] of voice identifiers for the [code]language[/code].
+ Returns an [PackedStringArray] of voice identifiers for the [param language].
[b]Note:[/b] This method is implemented on Android, iOS, HTML5, Linux, macOS, and Windows.
</description>
</method>
@@ -863,8 +905,8 @@
</method>
<method name="tts_set_utterance_callback">
<return type="void" />
- <argument index="0" name="event" type="int" enum="DisplayServer.TTSUtteranceEvent" />
- <argument index="1" name="callable" type="Callable" />
+ <param index="0" name="event" type="int" enum="DisplayServer.TTSUtteranceEvent" />
+ <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.
@@ -875,21 +917,21 @@
</method>
<method name="tts_speak">
<return type="void" />
- <argument index="0" name="text" type="String" />
- <argument index="1" name="voice" type="String" />
- <argument index="2" name="volume" type="int" default="50" />
- <argument index="3" name="pitch" type="float" default="1.0" />
- <argument index="4" name="rate" type="float" default="1.0" />
- <argument index="5" name="utterance_id" type="int" default="0" />
- <argument 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].
+ <param index="0" name="text" type="String" />
+ <param index="1" name="voice" type="String" />
+ <param index="2" name="volume" type="int" default="50" />
+ <param index="3" name="pitch" type="float" default="1.0" />
+ <param index="4" name="rate" type="float" default="1.0" />
+ <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 [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, 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.
</description>
@@ -915,40 +957,40 @@
</method>
<method name="virtual_keyboard_show">
<return type="void" />
- <argument index="0" name="existing_text" type="String" />
- <argument index="1" name="position" type="Rect2" default="Rect2(0, 0, 0, 0)" />
- <argument index="2" name="multiline" type="bool" default="false" />
- <argument index="3" name="max_length" type="int" default="-1" />
- <argument index="4" name="cursor_start" type="int" default="-1" />
- <argument index="5" name="cursor_end" type="int" default="-1" />
+ <param index="0" name="existing_text" type="String" />
+ <param index="1" name="position" type="Rect2" default="Rect2(0, 0, 0, 0)" />
+ <param index="2" name="type" type="int" enum="DisplayServer.VirtualKeyboardType" default="0" />
+ <param index="3" name="max_length" type="int" default="-1" />
+ <param index="4" name="cursor_start" type="int" default="-1" />
+ <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]multiline[/code] parameter needs to be set to [code]true[/code] to be able to enter multiple lines of text, as in [TextEdit].
- [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 UWP.
+ [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 HTML5.
</description>
</method>
<method name="warp_mouse">
<return type="void" />
- <argument index="0" name="position" type="Vector2i" />
+ <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.
+ 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_attach_instance_id">
<return type="void" />
- <argument index="0" name="instance_id" type="int" />
- <argument index="1" name="window_id" type="int" default="0" />
+ <param index="0" name="instance_id" type="int" />
+ <param index="1" name="window_id" type="int" default="0" />
<description>
</description>
</method>
<method name="window_can_draw" qualifiers="const">
<return type="bool" />
- <argument index="0" name="window_id" type="int" default="0" />
+ <param index="0" name="window_id" type="int" default="0" />
<description>
</description>
</method>
@@ -960,47 +1002,47 @@
</method>
<method name="window_get_attached_instance_id" qualifiers="const">
<return type="int" />
- <argument index="0" name="window_id" type="int" default="0" />
+ <param index="0" name="window_id" type="int" default="0" />
<description>
</description>
</method>
<method name="window_get_current_screen" qualifiers="const">
<return type="int" />
- <argument index="0" name="window_id" type="int" default="0" />
+ <param index="0" name="window_id" type="int" default="0" />
<description>
</description>
</method>
<method name="window_get_flag" qualifiers="const">
<return type="bool" />
- <argument index="0" name="flag" type="int" enum="DisplayServer.WindowFlags" />
- <argument index="1" name="window_id" type="int" default="0" />
+ <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" />
- <argument index="0" name="window_id" type="int" default="0" />
+ <param index="0" name="window_id" type="int" default="0" />
<description>
</description>
</method>
<method name="window_get_min_size" qualifiers="const">
<return type="Vector2i" />
- <argument index="0" name="window_id" type="int" default="0" />
+ <param index="0" name="window_id" type="int" default="0" />
<description>
</description>
</method>
<method name="window_get_mode" qualifiers="const">
<return type="int" enum="DisplayServer.WindowMode" />
- <argument index="0" name="window_id" type="int" default="0" />
+ <param index="0" name="window_id" type="int" default="0" />
<description>
Returns the mode of the given window.
</description>
</method>
<method name="window_get_native_handle" qualifiers="const">
<return type="int" />
- <argument index="0" name="handle_type" type="int" enum="DisplayServer.HandleType" />
- <argument index="1" name="window_id" type="int" default="0" />
+ <param index="0" name="handle_type" type="int" enum="DisplayServer.HandleType" />
+ <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.
@@ -1008,67 +1050,67 @@
</method>
<method name="window_get_popup_safe_rect" qualifiers="const">
<return type="Rect2i" />
- <argument index="0" name="window" type="int" />
+ <param index="0" name="window" type="int" />
<description>
Returns the bounding box of control, or menu item that was used to open the popup window, in the screen coordinate system.
</description>
</method>
<method name="window_get_position" qualifiers="const">
<return type="Vector2i" />
- <argument index="0" name="window_id" type="int" default="0" />
+ <param index="0" name="window_id" type="int" default="0" />
<description>
Returns the position of the given window to on the screen.
</description>
</method>
<method name="window_get_real_size" qualifiers="const">
<return type="Vector2i" />
- <argument index="0" name="window_id" type="int" default="0" />
+ <param index="0" name="window_id" type="int" default="0" />
<description>
</description>
</method>
<method name="window_get_size" qualifiers="const">
<return type="Vector2i" />
- <argument index="0" name="window_id" type="int" default="0" />
+ <param index="0" name="window_id" type="int" default="0" />
<description>
</description>
</method>
<method name="window_get_vsync_mode" qualifiers="const">
<return type="int" enum="DisplayServer.VSyncMode" />
- <argument index="0" name="window_id" type="int" default="0" />
+ <param index="0" name="window_id" type="int" default="0" />
<description>
- Returns the VSync mode of the given window.
+ Returns the V-Sync mode of the given window.
</description>
</method>
<method name="window_move_to_foreground">
<return type="void" />
- <argument index="0" name="window_id" type="int" default="0" />
+ <param index="0" name="window_id" type="int" default="0" />
<description>
</description>
</method>
<method name="window_request_attention">
<return type="void" />
- <argument index="0" name="window_id" type="int" default="0" />
+ <param index="0" name="window_id" type="int" default="0" />
<description>
</description>
</method>
<method name="window_set_current_screen">
<return type="void" />
- <argument index="0" name="screen" type="int" />
- <argument index="1" name="window_id" type="int" default="0" />
+ <param index="0" name="screen" type="int" />
+ <param index="1" name="window_id" type="int" default="0" />
<description>
</description>
</method>
<method name="window_set_drop_files_callback">
<return type="void" />
- <argument index="0" name="callback" type="Callable" />
- <argument index="1" name="window_id" type="int" default="0" />
+ <param index="0" name="callback" type="Callable" />
+ <param index="1" name="window_id" type="int" default="0" />
<description>
</description>
</method>
<method name="window_set_exclusive">
<return type="void" />
- <argument index="0" name="window_id" type="int" />
- <argument index="1" name="exclusive" type="bool" />
+ <param index="0" name="window_id" type="int" />
+ <param index="1" name="exclusive" type="bool" />
<description>
If set to [code]true[/code], this window will always stay on top of its parent window, parent window will ignore input while this window is opened.
[b]Note:[/b] On macOS, exclusive windows are confined to the same space (virtual desktop or screen) as the parent window.
@@ -1077,70 +1119,70 @@
</method>
<method name="window_set_flag">
<return type="void" />
- <argument index="0" name="flag" type="int" enum="DisplayServer.WindowFlags" />
- <argument index="1" name="enabled" type="bool" />
- <argument index="2" name="window_id" type="int" default="0" />
+ <param index="0" name="flag" type="int" enum="DisplayServer.WindowFlags" />
+ <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">
<return type="void" />
- <argument index="0" name="active" type="bool" />
- <argument index="1" name="window_id" type="int" default="0" />
+ <param index="0" name="active" type="bool" />
+ <param index="1" name="window_id" type="int" default="0" />
<description>
</description>
</method>
<method name="window_set_ime_position">
<return type="void" />
- <argument index="0" name="position" type="Vector2i" />
- <argument index="1" name="window_id" type="int" default="0" />
+ <param index="0" name="position" type="Vector2i" />
+ <param index="1" name="window_id" type="int" default="0" />
<description>
</description>
</method>
<method name="window_set_input_event_callback">
<return type="void" />
- <argument index="0" name="callback" type="Callable" />
- <argument index="1" name="window_id" type="int" default="0" />
+ <param index="0" name="callback" type="Callable" />
+ <param index="1" name="window_id" type="int" default="0" />
<description>
</description>
</method>
<method name="window_set_input_text_callback">
<return type="void" />
- <argument index="0" name="callback" type="Callable" />
- <argument index="1" name="window_id" type="int" default="0" />
+ <param index="0" name="callback" type="Callable" />
+ <param index="1" name="window_id" type="int" default="0" />
<description>
</description>
</method>
<method name="window_set_max_size">
<return type="void" />
- <argument index="0" name="max_size" type="Vector2i" />
- <argument index="1" name="window_id" type="int" default="0" />
+ <param index="0" name="max_size" type="Vector2i" />
+ <param index="1" name="window_id" type="int" default="0" />
<description>
</description>
</method>
<method name="window_set_min_size">
<return type="void" />
- <argument index="0" name="min_size" type="Vector2i" />
- <argument index="1" name="window_id" type="int" default="0" />
+ <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).
[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.
</description>
</method>
<method name="window_set_mode">
<return type="void" />
- <argument index="0" name="mode" type="int" enum="DisplayServer.WindowMode" />
- <argument index="1" name="window_id" type="int" default="0" />
+ <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.
+ 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 fullscreen 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">
<return type="void" />
- <argument index="0" name="region" type="PackedVector2Array" />
- <argument index="1" name="window_id" type="int" default="0" />
+ <param index="0" name="region" type="PackedVector2Array" />
+ <param index="1" name="window_id" type="int" default="0" />
<description>
Sets a polygonal region of the window which accepts mouse events. Mouse events outside the region will be passed through.
Passing an empty array will disable passthrough support (all mouse events will be intercepted by the window, which is the default behavior).
@@ -1172,64 +1214,64 @@
</method>
<method name="window_set_popup_safe_rect">
<return type="void" />
- <argument index="0" name="window" type="int" />
- <argument index="1" name="rect" type="Rect2i" />
+ <param index="0" name="window" type="int" />
+ <param index="1" name="rect" type="Rect2i" />
<description>
Sets the bounding box of control, or menu item that was used to open the popup window, in the screen coordinate system. Clicking this area will not auto-close this popup.
</description>
</method>
<method name="window_set_position">
<return type="void" />
- <argument index="0" name="position" type="Vector2i" />
- <argument index="1" name="window_id" type="int" default="0" />
+ <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].
</description>
</method>
<method name="window_set_rect_changed_callback">
<return type="void" />
- <argument index="0" name="callback" type="Callable" />
- <argument index="1" name="window_id" type="int" default="0" />
+ <param index="0" name="callback" type="Callable" />
+ <param index="1" name="window_id" type="int" default="0" />
<description>
</description>
</method>
<method name="window_set_size">
<return type="void" />
- <argument index="0" name="size" type="Vector2i" />
- <argument index="1" name="window_id" type="int" default="0" />
+ <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].
</description>
</method>
<method name="window_set_title">
<return type="void" />
- <argument index="0" name="title" type="String" />
- <argument index="1" name="window_id" type="int" default="0" />
+ <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].
</description>
</method>
<method name="window_set_transient">
<return type="void" />
- <argument index="0" name="window_id" type="int" />
- <argument index="1" name="parent_window_id" type="int" />
+ <param index="0" name="window_id" type="int" />
+ <param index="1" name="parent_window_id" type="int" />
<description>
</description>
</method>
<method name="window_set_vsync_mode">
<return type="void" />
- <argument index="0" name="vsync_mode" type="int" enum="DisplayServer.VSyncMode" />
- <argument index="1" name="window_id" type="int" default="0" />
+ <param index="0" name="vsync_mode" type="int" enum="DisplayServer.VSyncMode" />
+ <param index="1" name="window_id" type="int" default="0" />
<description>
- Sets the VSync mode of the given window.
+ Sets the V-Sync mode of the given window.
See [enum DisplayServer.VSyncMode] for possible values and how they affect the behavior of your application.
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_event_callback">
<return type="void" />
- <argument index="0" name="callback" type="Callable" />
- <argument index="1" name="window_id" type="int" default="0" />
+ <param index="0" name="callback" type="Callable" />
+ <param index="1" name="window_id" type="int" default="0" />
<description>
</description>
</method>
@@ -1310,6 +1352,31 @@
</constant>
<constant name="SCREEN_SENSOR" value="6" enum="ScreenOrientation">
</constant>
+ <constant name="KEYBOARD_TYPE_DEFAULT" value="0" enum="VirtualKeyboardType">
+ Default text virtual keyboard.
+ </constant>
+ <constant name="KEYBOARD_TYPE_MULTILINE" value="1" enum="VirtualKeyboardType">
+ Multiline virtual keyboard.
+ </constant>
+ <constant name="KEYBOARD_TYPE_NUMBER" value="2" enum="VirtualKeyboardType">
+ Virtual number keypad, useful for PIN entry.
+ </constant>
+ <constant name="KEYBOARD_TYPE_NUMBER_DECIMAL" value="3" enum="VirtualKeyboardType">
+ Virtual number keypad, useful for entering fractional numbers.
+ </constant>
+ <constant name="KEYBOARD_TYPE_PHONE" value="4" enum="VirtualKeyboardType">
+ Virtual phone number keypad.
+ </constant>
+ <constant name="KEYBOARD_TYPE_EMAIL_ADDRESS" value="5" enum="VirtualKeyboardType">
+ Virtual keyboard with additional keys to assist with typing email addresses.
+ </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].
+ </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">
</constant>
<constant name="CURSOR_IBEAM" value="1" enum="CursorShape">
diff --git a/doc/classes/EditorCommandPalette.xml b/doc/classes/EditorCommandPalette.xml
index 2cc07c7f1b..53a3fe5d19 100644
--- a/doc/classes/EditorCommandPalette.xml
+++ b/doc/classes/EditorCommandPalette.xml
@@ -27,24 +27,24 @@
<methods>
<method name="add_command">
<return type="void" />
- <argument index="0" name="command_name" type="String" />
- <argument index="1" name="key_name" type="String" />
- <argument index="2" name="binded_callable" type="Callable" />
- <argument index="3" name="shortcut_text" type="String" default="&quot;None&quot;" />
+ <param index="0" name="command_name" type="String" />
+ <param index="1" name="key_name" type="String" />
+ <param index="2" name="binded_callable" type="Callable" />
+ <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">
<return type="void" />
- <argument index="0" name="key_name" type="String" />
+ <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 ba0a479fa7..c3e0a995c6 100644
--- a/doc/classes/EditorDebuggerPlugin.xml
+++ b/doc/classes/EditorDebuggerPlugin.xml
@@ -14,7 +14,7 @@
<methods>
<method name="has_capture">
<return type="bool" />
- <argument index="0" name="name" type="StringName" />
+ <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>
@@ -39,24 +39,24 @@
</method>
<method name="register_message_capture">
<return type="void" />
- <argument index="0" name="name" type="StringName" />
- <argument index="1" name="callable" type="Callable" />
+ <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>
<method name="send_message">
<return type="void" />
- <argument index="0" name="message" type="String" />
- <argument index="1" name="data" type="Array" />
+ <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" />
- <argument index="0" name="name" type="StringName" />
+ <param index="0" name="name" type="StringName" />
<description>
Unregisters the message capture with given name.
</description>
@@ -64,7 +64,7 @@
</methods>
<signals>
<signal name="breaked">
- <argument index="0" name="can_debug" type="bool" />
+ <param index="0" name="can_debug" type="bool" />
<description>
Emitted when the game enters a break state.
</description>
diff --git a/doc/classes/EditorExportPlugin.xml b/doc/classes/EditorExportPlugin.xml
index 8aa2db2cf8..091bac7d8e 100644
--- a/doc/classes/EditorExportPlugin.xml
+++ b/doc/classes/EditorExportPlugin.xml
@@ -12,12 +12,12 @@
<methods>
<method name="_export_begin" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="features" type="PackedStringArray" />
- <argument index="1" name="is_debug" type="bool" />
- <argument index="2" name="path" type="String" />
- <argument index="3" name="flags" type="int" />
+ <param index="0" name="features" type="PackedStringArray" />
+ <param index="1" name="is_debug" type="bool" />
+ <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">
@@ -28,40 +28,40 @@
</method>
<method name="_export_file" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="path" type="String" />
- <argument index="1" name="type" type="String" />
- <argument index="2" name="features" type="PackedStringArray" />
+ <param index="0" name="path" type="String" />
+ <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="add_file">
<return type="void" />
- <argument index="0" name="path" type="String" />
- <argument index="1" name="file" type="PackedByteArray" />
- <argument index="2" name="remap" type="bool" />
+ <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" />
- <argument index="0" name="path" type="String" />
+ <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">
<return type="void" />
- <argument index="0" name="code" type="String" />
+ <param index="0" name="code" type="String" />
<description>
Adds a C++ code to the iOS export. The final code is created from the code appended by each active export plugin.
</description>
</method>
<method name="add_ios_embedded_framework">
<return type="void" />
- <argument index="0" name="path" type="String" />
+ <param index="0" name="path" type="String" />
<description>
Adds a dynamic library (*.dylib, *.framework) to Linking Phase in iOS's Xcode project and embeds it into resulting binary.
[b]Note:[/b] For static libraries (*.a) works in same way as [code]add_ios_framework[/code].
@@ -70,47 +70,47 @@
</method>
<method name="add_ios_framework">
<return type="void" />
- <argument index="0" name="path" type="String" />
+ <param index="0" name="path" type="String" />
<description>
Adds a static library (*.a) or dynamic library (*.dylib, *.framework) to Linking Phase in iOS's Xcode project.
</description>
</method>
<method name="add_ios_linker_flags">
<return type="void" />
- <argument index="0" name="flags" type="String" />
+ <param index="0" name="flags" type="String" />
<description>
Adds linker flags for the iOS export.
</description>
</method>
<method name="add_ios_plist_content">
<return type="void" />
- <argument index="0" name="plist_content" type="String" />
+ <param index="0" name="plist_content" type="String" />
<description>
Adds content for iOS Property List files.
</description>
</method>
<method name="add_ios_project_static_lib">
<return type="void" />
- <argument index="0" name="path" type="String" />
+ <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_osx_plugin_file">
+ <method name="add_macos_plugin_file">
<return type="void" />
- <argument index="0" name="path" type="String" />
+ <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>
<method name="add_shared_object">
<return type="void" />
- <argument index="0" name="path" type="String" />
- <argument index="1" name="tags" type="PackedStringArray" />
- <argument index="2" name="target" type="String" />
+ <param index="0" name="path" type="String" />
+ <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 2ab87b0dd1..e216059364 100644
--- a/doc/classes/EditorFeatureProfile.xml
+++ b/doc/classes/EditorFeatureProfile.xml
@@ -12,85 +12,85 @@
<methods>
<method name="get_feature_name">
<return type="String" />
- <argument index="0" name="feature" type="int" enum="EditorFeatureProfile.Feature" />
+ <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" />
- <argument index="0" name="class_name" type="StringName" />
+ <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" />
- <argument index="0" name="class_name" type="StringName" />
+ <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">
<return type="bool" />
- <argument index="0" name="class_name" type="StringName" />
- <argument index="1" name="property" type="StringName" />
+ <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" />
- <argument index="0" name="feature" type="int" enum="EditorFeatureProfile.Feature" />
+ <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">
<return type="int" enum="Error" />
- <argument index="0" name="path" type="String" />
+ <param index="0" name="path" type="String" />
<description>
Loads an editor feature profile from a file. The file must follow the JSON format obtained by using the feature profile manager's [b]Export[/b] button or the [method save_to_file] method.
</description>
</method>
<method name="save_to_file">
<return type="int" enum="Error" />
- <argument index="0" name="path" type="String" />
+ <param index="0" name="path" type="String" />
<description>
- Saves the editor feature profile to a file in JSON format. It can then be imported using the feature profile manager's [b]Import[/b] button or the [method load_from_file] button.
+ Saves the editor feature profile to a file in JSON format. It can then be imported using the feature profile manager's [b]Import[/b] button or the [method load_from_file] method.
</description>
</method>
<method name="set_disable_class">
<return type="void" />
- <argument index="0" name="class_name" type="StringName" />
- <argument index="1" name="disable" type="bool" />
+ <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">
<return type="void" />
- <argument index="0" name="class_name" type="StringName" />
- <argument index="1" name="disable" type="bool" />
+ <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">
<return type="void" />
- <argument index="0" name="class_name" type="StringName" />
- <argument index="1" name="property" type="StringName" />
- <argument index="2" name="disable" type="bool" />
+ <param index="0" name="class_name" type="StringName" />
+ <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">
<return type="void" />
- <argument index="0" name="feature" type="int" enum="EditorFeatureProfile.Feature" />
- <argument index="1" name="disable" type="bool" />
+ <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>
diff --git a/doc/classes/EditorFileDialog.xml b/doc/classes/EditorFileDialog.xml
index b1fd7b4e76..891c8d7d92 100644
--- a/doc/classes/EditorFileDialog.xml
+++ b/doc/classes/EditorFileDialog.xml
@@ -10,10 +10,12 @@
<methods>
<method name="add_filter">
<return type="void" />
- <argument index="0" name="filter" type="String" />
+ <param index="0" name="filter" type="String" />
+ <param index="1" name="description" type="String" default="&quot;&quot;" />
<description>
- Adds a comma-delimited file extension filter option to the [EditorFileDialog] with an optional semi-colon-delimited label.
- For example, [code]"*.tscn, *.scn; 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">
@@ -66,19 +68,19 @@
</members>
<signals>
<signal name="dir_selected">
- <argument index="0" name="dir" type="String" />
+ <param index="0" name="dir" type="String" />
<description>
Emitted when a directory is selected.
</description>
</signal>
<signal name="file_selected">
- <argument index="0" name="path" type="String" />
+ <param index="0" name="path" type="String" />
<description>
Emitted when a file is selected.
</description>
</signal>
<signal name="files_selected">
- <argument index="0" name="paths" type="PackedStringArray" />
+ <param index="0" name="paths" type="PackedStringArray" />
<description>
Emitted when multiple files are selected.
</description>
diff --git a/doc/classes/EditorFileSystem.xml b/doc/classes/EditorFileSystem.xml
index 300cb4bfd6..e8df6ae7fe 100644
--- a/doc/classes/EditorFileSystem.xml
+++ b/doc/classes/EditorFileSystem.xml
@@ -12,7 +12,7 @@
<methods>
<method name="get_file_type" qualifiers="const">
<return type="String" />
- <argument index="0" name="path" type="String" />
+ <param index="0" name="path" type="String" />
<description>
Returns the resource type of the file, given the full path. 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>
@@ -25,9 +25,9 @@
</method>
<method name="get_filesystem_path">
<return type="EditorFileSystemDirectory" />
- <argument index="0" name="path" type="String" />
+ <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">
@@ -39,7 +39,16 @@
<method name="is_scanning" qualifiers="const">
<return type="bool" />
<description>
- Returns [code]true[/code] of the filesystem is being scanned.
+ Returns [code]true[/code] if the filesystem is being scanned.
+ </description>
+ </method>
+ <method name="reimport_files">
+ <return type="void" />
+ <param index="0" name="files" type="PackedStringArray" />
+ <description>
+ Reimports a set of files. Call this if these files or their [code].import[/code] files were directly edited by script or an external program.
+ If the file type changed or the file was newly created, use [method update_file] or [method scan].
+ [b]Note:[/b] This function blocks until the import is finished. However, the main loop iteration, including timers and [method Node._process], will occur during the import process due to progress bar updates. Avoid calls to [method reimport_files] or [method scan] while an import is in progress.
</description>
</method>
<method name="scan">
@@ -56,9 +65,10 @@
</method>
<method name="update_file">
<return type="void" />
- <argument index="0" name="path" type="String" />
+ <param index="0" name="path" type="String" />
<description>
- Update a file information. Call this if an external program (not Godot) modified the file.
+ Add a file in an existing directory, or schedule file information to be updated on editor restart. Can be used to update text files saved by an external program.
+ This will not import the file. To reimport, call [method reimport_files] or [method scan] methods.
</description>
</method>
<method name="update_script_classes">
@@ -75,19 +85,19 @@
</description>
</signal>
<signal name="resources_reimported">
- <argument index="0" name="resources" type="PackedStringArray" />
+ <param index="0" name="resources" type="PackedStringArray" />
<description>
Emitted if a resource is reimported.
</description>
</signal>
<signal name="resources_reload">
- <argument index="0" name="resources" type="PackedStringArray" />
+ <param index="0" name="resources" type="PackedStringArray" />
<description>
Emitted if at least one resource is reloaded when the filesystem is scanned.
</description>
</signal>
<signal name="sources_changed">
- <argument index="0" name="exist" type="bool" />
+ <param index="0" name="exist" type="bool" />
<description>
Emitted if the source of any imported file changed.
</description>
diff --git a/doc/classes/EditorFileSystemDirectory.xml b/doc/classes/EditorFileSystemDirectory.xml
index 98fea40a50..e9a0e3310c 100644
--- a/doc/classes/EditorFileSystemDirectory.xml
+++ b/doc/classes/EditorFileSystemDirectory.xml
@@ -11,23 +11,23 @@
<methods>
<method name="find_dir_index" qualifiers="const">
<return type="int" />
- <argument index="0" name="name" type="String" />
+ <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" />
- <argument index="0" name="name" type="String" />
+ <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" />
- <argument index="0" name="idx" type="int" />
+ <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">
@@ -38,37 +38,37 @@
</method>
<method name="get_file_import_is_valid" qualifiers="const">
<return type="bool" />
- <argument index="0" name="idx" type="int" />
+ <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" />
- <argument index="0" name="idx" type="int" />
+ <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" />
- <argument index="0" name="idx" type="int" />
+ <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" />
- <argument index="0" name="idx" type="int" />
+ <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" />
- <argument index="0" name="idx" type="int" />
+ <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">
@@ -91,9 +91,9 @@
</method>
<method name="get_subdir">
<return type="EditorFileSystemDirectory" />
- <argument index="0" name="idx" type="int" />
+ <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/EditorFileSystemImportFormatSupportQuery.xml b/doc/classes/EditorFileSystemImportFormatSupportQuery.xml
index 8431a3a7ef..abd77909bd 100644
--- a/doc/classes/EditorFileSystemImportFormatSupportQuery.xml
+++ b/doc/classes/EditorFileSystemImportFormatSupportQuery.xml
@@ -4,7 +4,7 @@
Used to query and configure import format support.
</brief_description>
<description>
- This class is used to query and configure a certain import format. It is used in conjuntion with asset format import plugins.
+ This class is used to query and configure a certain import format. It is used in conjunction with asset format import plugins.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/EditorImportPlugin.xml b/doc/classes/EditorImportPlugin.xml
index 2e84d3094f..f7f1d456d0 100644
--- a/doc/classes/EditorImportPlugin.xml
+++ b/doc/classes/EditorImportPlugin.xml
@@ -115,9 +115,9 @@
</tutorials>
<methods>
<method name="_get_import_options" qualifiers="virtual const">
- <return type="Array" />
- <argument index="0" name="path" type="String" />
- <argument index="1" name="preset_index" type="int" />
+ <return type="Dictionary[]" />
+ <param index="0" name="path" type="String" />
+ <param index="1" name="preset_index" type="int" />
<description>
Gets the options and default values for the preset at this index. Returns an Array of Dictionaries with the following keys: [code]name[/code], [code]default_value[/code], [code]property_hint[/code] (optional), [code]hint_string[/code] (optional), [code]usage[/code] (optional).
</description>
@@ -136,9 +136,9 @@
</method>
<method name="_get_option_visibility" qualifiers="virtual const">
<return type="bool" />
- <argument index="0" name="path" type="String" />
- <argument index="1" name="option_name" type="StringName" />
- <argument index="2" name="options" type="Dictionary" />
+ <param index="0" name="path" type="String" />
+ <param index="1" name="option_name" type="StringName" />
+ <param index="2" name="options" type="Dictionary" />
<description>
This method can be overridden to hide specific import options if conditions are met. This is mainly useful for hiding options that depend on others if one of them is disabled. For example:
[codeblocks]
@@ -174,7 +174,7 @@
</method>
<method name="_get_preset_name" qualifiers="virtual const">
<return type="String" />
- <argument index="0" name="preset_index" type="int" />
+ <param index="0" name="preset_index" type="int" />
<description>
Gets the name of the options preset at this index.
</description>
@@ -211,13 +211,13 @@
</method>
<method name="_import" qualifiers="virtual const">
<return type="int" />
- <argument index="0" name="source_file" type="String" />
- <argument index="1" name="save_path" type="String" />
- <argument index="2" name="options" type="Dictionary" />
- <argument index="3" name="platform_variants" type="Array" />
- <argument index="4" name="gen_files" type="Array" />
+ <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" />
<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 365e1f13a9..280a7bf34a 100644
--- a/doc/classes/EditorInspector.xml
+++ b/doc/classes/EditorInspector.xml
@@ -23,48 +23,48 @@
</description>
</signal>
<signal name="object_id_selected">
- <argument index="0" name="id" type="int" />
+ <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.
</description>
</signal>
<signal name="property_deleted">
- <argument index="0" name="property" type="String" />
+ <param index="0" name="property" type="String" />
<description>
Emitted when a property is removed from the inspector.
</description>
</signal>
<signal name="property_edited">
- <argument index="0" name="property" type="String" />
+ <param index="0" name="property" type="String" />
<description>
Emitted when a property is edited in the inspector.
</description>
</signal>
<signal name="property_keyed">
- <argument index="0" name="property" type="String" />
- <argument index="1" name="value" type="Variant" />
- <argument index="2" name="advance" type="bool" />
+ <param index="0" name="property" type="String" />
+ <param index="1" name="value" type="Variant" />
+ <param index="2" name="advance" type="bool" />
<description>
Emitted when a property is keyed in the inspector. Properties can be keyed by clicking the "key" icon next to a property when the Animation panel is toggled.
</description>
</signal>
<signal name="property_selected">
- <argument index="0" name="property" type="String" />
+ <param index="0" name="property" type="String" />
<description>
Emitted when a property is selected in the inspector.
</description>
</signal>
<signal name="property_toggled">
- <argument index="0" name="property" type="String" />
- <argument index="1" name="checked" type="bool" />
+ <param index="0" name="property" type="String" />
+ <param index="1" name="checked" type="bool" />
<description>
Emitted when a boolean property is toggled in the inspector.
[b]Note:[/b] This signal is never emitted if the internal [code]autoclear[/code] property enabled. Since this property is always enabled in the editor inspector, this signal is never emitted by the editor itself.
</description>
</signal>
<signal name="resource_selected">
- <argument index="0" name="resource" type="Resource" />
- <argument index="1" name="path" type="String" />
+ <param index="0" name="resource" type="Resource" />
+ <param index="1" name="path" type="String" />
<description>
Emitted when a resource is selected in the inspector.
</description>
diff --git a/doc/classes/EditorInspectorPlugin.xml b/doc/classes/EditorInspectorPlugin.xml
index 2bbed84b1e..c8a499260e 100644
--- a/doc/classes/EditorInspectorPlugin.xml
+++ b/doc/classes/EditorInspectorPlugin.xml
@@ -18,76 +18,77 @@
<methods>
<method name="_can_handle" qualifiers="virtual const">
<return type="bool" />
- <argument index="0" name="object" type="Variant" />
+ <param index="0" name="object" type="Variant" />
<description>
Returns [code]true[/code] if this object can be handled by this plugin.
</description>
</method>
<method name="_parse_begin" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="object" type="Object" />
+ <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">
<return type="void" />
- <argument index="0" name="object" type="Object" />
- <argument index="1" name="category" type="String" />
+ <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" />
- <argument index="0" name="object" type="Object" />
+ <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">
<return type="void" />
- <argument index="0" name="object" type="Object" />
- <argument index="1" name="group" type="String" />
+ <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">
<return type="bool" />
- <argument index="0" name="object" type="Object" />
- <argument index="1" name="type" type="int" />
- <argument index="2" name="name" type="String" />
- <argument index="3" name="hint_type" type="int" />
- <argument index="4" name="hint_string" type="String" />
- <argument index="5" name="usage_flags" type="int" />
- <argument index="6" name="wide" type="bool" />
+ <param index="0" name="object" type="Object" />
+ <param index="1" name="type" type="int" />
+ <param index="2" name="name" type="String" />
+ <param index="3" name="hint_type" type="int" />
+ <param index="4" name="hint_string" type="String" />
+ <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">
<return type="void" />
- <argument index="0" name="control" type="Control" />
+ <param index="0" name="control" type="Control" />
<description>
Adds a custom control, which is not necessarily a property editor.
</description>
</method>
<method name="add_property_editor">
<return type="void" />
- <argument index="0" name="property" type="String" />
- <argument index="1" name="editor" type="Control" />
+ <param index="0" name="property" type="String" />
+ <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">
<return type="void" />
- <argument index="0" name="label" type="String" />
- <argument index="1" name="properties" type="PackedStringArray" />
- <argument index="2" name="editor" type="Control" />
+ <param index="0" name="label" type="String" />
+ <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 cc2f33ce89..49cd715f5e 100644
--- a/doc/classes/EditorInterface.xml
+++ b/doc/classes/EditorInterface.xml
@@ -12,24 +12,24 @@
<methods>
<method name="edit_node">
<return type="void" />
- <argument index="0" name="node" type="Node" />
+ <param index="0" name="node" type="Node" />
<description>
Edits the given [Node]. The node will be also selected if it's inside the scene tree.
</description>
</method>
<method name="edit_resource">
<return type="void" />
- <argument index="0" name="resource" type="Resource" />
+ <param index="0" name="resource" type="Resource" />
<description>
Edits the given [Resource]. If the resource is a [Script] you can also edit it with [method edit_script] to specify the line and column position.
</description>
</method>
<method name="edit_script">
<return type="void" />
- <argument index="0" name="script" type="Script" />
- <argument index="1" name="line" type="int" default="-1" />
- <argument index="2" name="column" type="int" default="0" />
- <argument index="3" name="grab_focus" type="bool" default="true" />
+ <param index="0" name="script" type="Script" />
+ <param index="1" name="line" type="int" default="-1" />
+ <param index="2" name="column" type="int" default="0" />
+ <param index="3" name="grab_focus" type="bool" default="true" />
<description>
Edits the given [Script]. The line and column on which to open the script can also be specified. The script will be open with the user-configured editor for the script's language which may be an external editor.
</description>
@@ -101,7 +101,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>
@@ -145,11 +145,11 @@
</method>
<method name="inspect_object">
<return type="void" />
- <argument index="0" name="object" type="Object" />
- <argument index="1" name="for_property" type="String" default="&quot;&quot;" />
- <argument index="2" name="inspector_only" type="bool" default="false" />
+ <param index="0" name="object" type="Object" />
+ <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_playing_scene" qualifiers="const">
@@ -160,22 +160,22 @@
</method>
<method name="is_plugin_enabled" qualifiers="const">
<return type="bool" />
- <argument index="0" name="plugin" type="String" />
+ <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" />
- <argument index="0" name="meshes" type="Array" />
- <argument index="1" name="preview_size" type="int" />
+ <return type="Texture2D[]" />
+ <param index="0" name="meshes" type="Array" />
+ <param index="1" name="preview_size" type="int" />
<description>
Returns mesh previews rendered at the given size as an [Array] of [Texture2D]s.
</description>
</method>
<method name="open_scene_from_path">
<return type="void" />
- <argument index="0" name="scene_filepath" type="String" />
+ <param index="0" name="scene_filepath" type="String" />
<description>
Opens the scene at the given path.
</description>
@@ -188,7 +188,7 @@
</method>
<method name="play_custom_scene">
<return type="void" />
- <argument index="0" name="scene_filepath" type="String" />
+ <param index="0" name="scene_filepath" type="String" />
<description>
Plays the scene specified by its filepath.
</description>
@@ -201,11 +201,18 @@
</method>
<method name="reload_scene_from_path">
<return type="void" />
- <argument index="0" name="scene_filepath" type="String" />
+ <param index="0" name="scene_filepath" type="String" />
<description>
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>
@@ -214,30 +221,30 @@
</method>
<method name="save_scene_as">
<return type="void" />
- <argument index="0" name="path" type="String" />
- <argument index="1" name="with_preview" type="bool" default="true" />
+ <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" />
- <argument index="0" name="file" type="String" />
+ <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" />
- <argument index="0" name="name" type="String" />
+ <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_plugin_enabled">
<return type="void" />
- <argument index="0" name="plugin" type="String" />
- <argument index="1" name="enabled" type="bool" />
+ <param index="0" name="plugin" type="String" />
+ <param index="1" name="enabled" type="bool" />
<description>
Sets the enabled status of a plugin. The plugin name is the same as its directory name.
</description>
diff --git a/doc/classes/EditorNode3DGizmo.xml b/doc/classes/EditorNode3DGizmo.xml
index 2eec5310dc..9ee21fd63b 100644
--- a/doc/classes/EditorNode3DGizmo.xml
+++ b/doc/classes/EditorNode3DGizmo.xml
@@ -11,58 +11,58 @@
<methods>
<method name="_commit_handle" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="id" type="int" />
- <argument index="1" name="secondary" type="bool" />
- <argument index="2" name="restore" type="Variant" />
- <argument index="3" name="cancel" type="bool" />
+ <param index="0" name="id" type="int" />
+ <param index="1" name="secondary" type="bool" />
+ <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">
<return type="void" />
- <argument index="0" name="ids" type="PackedInt32Array" />
- <argument index="1" name="restores" type="Transform3D[]" />
- <argument index="2" name="cancel" type="bool" />
+ <param index="0" name="ids" type="PackedInt32Array" />
+ <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">
<return type="String" />
- <argument index="0" name="id" type="int" />
- <argument index="1" name="secondary" type="bool" />
+ <param index="0" name="id" type="int" />
+ <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">
<return type="Variant" />
- <argument index="0" name="id" type="int" />
- <argument index="1" name="secondary" type="bool" />
+ <param index="0" name="id" type="int" />
+ <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">
<return type="Transform3D" />
- <argument index="0" name="id" type="int" />
+ <param index="0" name="id" type="int" />
<description>
Override this method to return the current transform of a subgizmo. This transform will be requested at the start of an edit and used as the [code]restore[/code] argument in [method _commit_subgizmos].
</description>
</method>
<method name="_is_handle_highlighted" qualifiers="virtual const">
<return type="bool" />
- <argument index="0" name="id" type="int" />
- <argument index="1" name="secondary" type="bool" />
+ <param index="0" name="id" type="int" />
+ <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">
@@ -73,91 +73,91 @@
</method>
<method name="_set_handle" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="id" type="int" />
- <argument index="1" name="secondary" type="bool" />
- <argument index="2" name="camera" type="Camera3D" />
- <argument index="3" name="point" type="Vector2" />
+ <param index="0" name="id" type="int" />
+ <param index="1" name="secondary" type="bool" />
+ <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">
<return type="void" />
- <argument index="0" name="id" type="int" />
- <argument index="1" name="transform" type="Transform3D" />
+ <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">
<return type="PackedInt32Array" />
- <argument index="0" name="camera" type="Camera3D" />
- <argument index="1" name="frustum" type="Plane[]" />
+ <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">
<return type="int" />
- <argument index="0" name="camera" type="Camera3D" />
- <argument index="1" name="point" type="Vector2" />
+ <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" />
- <argument index="0" name="segments" type="PackedVector3Array" />
+ <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">
<return type="void" />
- <argument index="0" name="triangles" type="TriangleMesh" />
+ <param index="0" name="triangles" type="TriangleMesh" />
<description>
Adds collision triangles to the gizmo for picking. A [TriangleMesh] can be generated from a regular [Mesh] too. Call this method during [method _redraw].
</description>
</method>
<method name="add_handles">
<return type="void" />
- <argument index="0" name="handles" type="PackedVector3Array" />
- <argument index="1" name="material" type="Material" />
- <argument index="2" name="ids" type="PackedInt32Array" />
- <argument index="3" name="billboard" type="bool" default="false" />
- <argument 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.
+ <param index="0" name="handles" type="PackedVector3Array" />
+ <param index="1" name="material" type="Material" />
+ <param index="2" name="ids" type="PackedInt32Array" />
+ <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 [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>
<method name="add_lines">
<return type="void" />
- <argument index="0" name="lines" type="PackedVector3Array" />
- <argument index="1" name="material" type="Material" />
- <argument index="2" name="billboard" type="bool" default="false" />
- <argument index="3" name="modulate" type="Color" default="Color(1, 1, 1, 1)" />
+ <param index="0" name="lines" type="PackedVector3Array" />
+ <param index="1" name="material" type="Material" />
+ <param index="2" name="billboard" type="bool" default="false" />
+ <param index="3" name="modulate" type="Color" default="Color(1, 1, 1, 1)" />
<description>
Adds lines to the gizmo (as sets of 2 points), with a given material. The lines are used for visualizing the gizmo. Call this method during [method _redraw].
</description>
</method>
<method name="add_mesh">
<return type="void" />
- <argument index="0" name="mesh" type="Mesh" />
- <argument index="1" name="material" type="Material" default="null" />
- <argument index="2" name="transform" type="Transform3D" default="Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)" />
- <argument index="3" name="skeleton" type="SkinReference" default="null" />
+ <param index="0" name="mesh" type="Mesh" />
+ <param index="1" name="material" type="Material" default="null" />
+ <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">
<return type="void" />
- <argument index="0" name="material" type="Material" />
- <argument index="1" name="default_scale" type="float" default="1" />
- <argument index="2" name="modulate" type="Color" default="Color(1, 1, 1, 1)" />
+ <param index="0" name="material" type="Material" />
+ <param index="1" name="default_scale" type="float" default="1" />
+ <param index="2" name="modulate" type="Color" default="Color(1, 1, 1, 1)" />
<description>
Adds an unscaled billboard for visualization and selection. Call this method during [method _redraw].
</description>
@@ -188,23 +188,23 @@
</method>
<method name="is_subgizmo_selected" qualifiers="const">
<return type="bool" />
- <argument index="0" name="id" type="int" />
+ <param index="0" name="id" type="int" />
<description>
Returns [code]true[/code] if the given subgizmo is currently selected. Can be used to highlight selected elements during [method _redraw].
</description>
</method>
<method name="set_hidden">
<return type="void" />
- <argument index="0" name="hidden" type="bool" />
+ <param index="0" name="hidden" type="bool" />
<description>
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">
<return type="void" />
- <argument index="0" name="node" type="Node" />
+ <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 d194786131..8a97dda9ae 100644
--- a/doc/classes/EditorNode3DGizmoPlugin.xml
+++ b/doc/classes/EditorNode3DGizmoPlugin.xml
@@ -19,32 +19,32 @@
</method>
<method name="_commit_handle" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="gizmo" type="EditorNode3DGizmo" />
- <argument index="1" name="handle_id" type="int" />
- <argument index="2" name="secondary" type="bool" />
- <argument index="3" name="restore" type="Variant" />
- <argument 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).
+ <param index="0" name="gizmo" type="EditorNode3DGizmo" />
+ <param index="1" name="handle_id" type="int" />
+ <param index="2" name="secondary" type="bool" />
+ <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 [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>
<method name="_commit_subgizmos" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="gizmo" type="EditorNode3DGizmo" />
- <argument index="1" name="ids" type="PackedInt32Array" />
- <argument index="2" name="restores" type="Transform3D[]" />
- <argument index="3" name="cancel" type="bool" />
+ <param index="0" name="gizmo" type="EditorNode3DGizmo" />
+ <param index="1" name="ids" type="PackedInt32Array" />
+ <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">
<return type="EditorNode3DGizmo" />
- <argument index="0" name="for_node_3d" type="Node3D" />
+ <param index="0" name="for_node_3d" type="Node3D" />
<description>
Override this method to return a custom [EditorNode3DGizmo] for the spatial nodes of your choice, return [code]null[/code] for the rest of nodes. See also [method _has_gizmo].
</description>
@@ -57,21 +57,21 @@
</method>
<method name="_get_handle_name" qualifiers="virtual const">
<return type="String" />
- <argument index="0" name="gizmo" type="EditorNode3DGizmo" />
- <argument index="1" name="handle_id" type="int" />
- <argument index="2" name="secondary" type="bool" />
+ <param index="0" name="gizmo" type="EditorNode3DGizmo" />
+ <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">
<return type="Variant" />
- <argument index="0" name="gizmo" type="EditorNode3DGizmo" />
- <argument index="1" name="handle_id" type="int" />
- <argument index="2" name="secondary" type="bool" />
+ <param index="0" name="gizmo" type="EditorNode3DGizmo" />
+ <param index="1" name="handle_id" type="int" />
+ <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>
@@ -84,26 +84,26 @@
</method>
<method name="_get_subgizmo_transform" qualifiers="virtual const">
<return type="Transform3D" />
- <argument index="0" name="gizmo" type="EditorNode3DGizmo" />
- <argument index="1" name="subgizmo_id" type="int" />
+ <param index="0" name="gizmo" type="EditorNode3DGizmo" />
+ <param index="1" name="subgizmo_id" type="int" />
<description>
Override this method to return the current transform of a subgizmo. As with all subgizmo methods, the transform should be in local space respect to the gizmo's Node3D. This transform will be requested at the start of an edit and used in the [code]restore[/code] argument in [method _commit_subgizmos]. Called for this plugin's active gizmos.
</description>
</method>
<method name="_has_gizmo" qualifiers="virtual const">
<return type="bool" />
- <argument index="0" name="for_node_3d" type="Node3D" />
+ <param index="0" name="for_node_3d" type="Node3D" />
<description>
Override this method to define which Node3D nodes have a gizmo from this plugin. Whenever a [Node3D] node is added to a scene this method is called, if it returns [code]true[/code] the node gets a generic [EditorNode3DGizmo] assigned and is added to this plugin's list of active gizmos.
</description>
</method>
<method name="_is_handle_highlighted" qualifiers="virtual const">
<return type="bool" />
- <argument index="0" name="gizmo" type="EditorNode3DGizmo" />
- <argument index="1" name="handle_id" type="int" />
- <argument index="2" name="secondary" type="bool" />
+ <param index="0" name="gizmo" type="EditorNode3DGizmo" />
+ <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">
@@ -114,64 +114,64 @@
</method>
<method name="_redraw" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="gizmo" type="EditorNode3DGizmo" />
+ <param index="0" name="gizmo" type="EditorNode3DGizmo" />
<description>
Override this method to add all the gizmo elements whenever a gizmo update is requested. It's common to call [method EditorNode3DGizmo.clear] at the beginning of this method and then add visual elements depending on the node's properties.
</description>
</method>
<method name="_set_handle" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="gizmo" type="EditorNode3DGizmo" />
- <argument index="1" name="handle_id" type="int" />
- <argument index="2" name="secondary" type="bool" />
- <argument index="3" name="camera" type="Camera3D" />
- <argument 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).
+ <param index="0" name="gizmo" type="EditorNode3DGizmo" />
+ <param index="1" name="handle_id" type="int" />
+ <param index="2" name="secondary" type="bool" />
+ <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 [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>
<method name="_set_subgizmo_transform" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="gizmo" type="EditorNode3DGizmo" />
- <argument index="1" name="subgizmo_id" type="int" />
- <argument index="2" name="transform" type="Transform3D" />
+ <param index="0" name="gizmo" type="EditorNode3DGizmo" />
+ <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">
<return type="PackedInt32Array" />
- <argument index="0" name="gizmo" type="EditorNode3DGizmo" />
- <argument index="1" name="camera" type="Camera3D" />
- <argument index="2" name="frustum_planes" type="Plane[]" />
+ <param index="0" name="gizmo" type="EditorNode3DGizmo" />
+ <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">
<return type="int" />
- <argument index="0" name="gizmo" type="EditorNode3DGizmo" />
- <argument index="1" name="camera" type="Camera3D" />
- <argument index="2" name="screen_pos" type="Vector2" />
+ <param index="0" name="gizmo" type="EditorNode3DGizmo" />
+ <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">
<return type="void" />
- <argument index="0" name="name" type="String" />
- <argument index="1" name="material" type="StandardMaterial3D" />
+ <param index="0" name="name" type="String" />
+ <param index="1" name="material" type="StandardMaterial3D" />
<description>
Adds a new material to the internal material list for the plugin. It can then be accessed with [method get_material]. Should not be overridden.
</description>
</method>
<method name="create_handle_material">
<return type="void" />
- <argument index="0" name="name" type="String" />
- <argument index="1" name="billboard" type="bool" default="false" />
- <argument index="2" name="texture" type="Texture2D" default="null" />
+ <param index="0" name="name" type="String" />
+ <param index="1" name="billboard" type="bool" default="false" />
+ <param index="2" name="texture" type="Texture2D" default="null" />
<description>
Creates a handle material with its variants (selected and/or editable) and adds them to the internal material list. They can then be accessed with [method get_material] and used in [method EditorNode3DGizmo.add_handles]. Should not be overridden.
You can optionally provide a texture to use instead of the default icon.
@@ -179,29 +179,29 @@
</method>
<method name="create_icon_material">
<return type="void" />
- <argument index="0" name="name" type="String" />
- <argument index="1" name="texture" type="Texture2D" />
- <argument index="2" name="on_top" type="bool" default="false" />
- <argument index="3" name="color" type="Color" default="Color(1, 1, 1, 1)" />
+ <param index="0" name="name" type="String" />
+ <param index="1" name="texture" type="Texture2D" />
+ <param index="2" name="on_top" type="bool" default="false" />
+ <param index="3" name="color" type="Color" default="Color(1, 1, 1, 1)" />
<description>
Creates an icon material with its variants (selected and/or editable) and adds them to the internal material list. They can then be accessed with [method get_material] and used in [method EditorNode3DGizmo.add_unscaled_billboard]. Should not be overridden.
</description>
</method>
<method name="create_material">
<return type="void" />
- <argument index="0" name="name" type="String" />
- <argument index="1" name="color" type="Color" />
- <argument index="2" name="billboard" type="bool" default="false" />
- <argument index="3" name="on_top" type="bool" default="false" />
- <argument index="4" name="use_vertex_color" type="bool" default="false" />
+ <param index="0" name="name" type="String" />
+ <param index="1" name="color" type="Color" />
+ <param index="2" name="billboard" type="bool" default="false" />
+ <param index="3" name="on_top" type="bool" default="false" />
+ <param index="4" name="use_vertex_color" type="bool" default="false" />
<description>
Creates an unshaded material with its variants (selected and/or editable) and adds them to the internal material list. They can then be accessed with [method get_material] and used in [method EditorNode3DGizmo.add_mesh] and [method EditorNode3DGizmo.add_lines]. Should not be overridden.
</description>
</method>
<method name="get_material">
<return type="StandardMaterial3D" />
- <argument index="0" name="name" type="String" />
- <argument index="1" name="gizmo" type="EditorNode3DGizmo" default="null" />
+ <param index="0" name="name" type="String" />
+ <param index="1" name="gizmo" type="EditorNode3DGizmo" default="null" />
<description>
Gets material from the internal list of materials. If an [EditorNode3DGizmo] is provided, it will try to get the corresponding variant (selected and/or editable).
</description>
diff --git a/doc/classes/EditorPaths.xml b/doc/classes/EditorPaths.xml
index d44c08cb0f..2975ea6d75 100644
--- a/doc/classes/EditorPaths.xml
+++ b/doc/classes/EditorPaths.xml
@@ -48,6 +48,12 @@
[/codeblock]
</description>
</method>
+ <method name="get_project_settings_dir" qualifiers="const">
+ <return type="String" />
+ <description>
+ Returns the project-specific editor settings path. Projects all have a unique subdirectory inside the settings path where project-specific editor settings are saved.
+ </description>
+ </method>
<method name="get_self_contained_file" qualifiers="const">
<return type="String" />
<description>
diff --git a/doc/classes/EditorPlugin.xml b/doc/classes/EditorPlugin.xml
index 7bbb2ae26c..fdd3807b69 100644
--- a/doc/classes/EditorPlugin.xml
+++ b/doc/classes/EditorPlugin.xml
@@ -38,7 +38,7 @@
</method>
<method name="_edit" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="object" type="Variant" />
+ <param index="0" name="object" type="Variant" />
<description>
This function is used for plugins that edit specific object types (nodes or resources). It requests the editor to edit the given object.
</description>
@@ -51,7 +51,7 @@
</method>
<method name="_forward_3d_draw_over_viewport" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="viewport_control" type="Control" />
+ <param index="0" name="viewport_control" type="Control" />
<description>
Called by the engine when the 3D editor's viewport is updated. Use the [code]overlay[/code] [Control] for drawing. You can update the viewport manually by calling [method update_overlays].
[codeblocks]
@@ -89,7 +89,7 @@
</method>
<method name="_forward_3d_force_draw_over_viewport" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="viewport_control" type="Control" />
+ <param index="0" name="viewport_control" type="Control" />
<description>
This method is the same as [method _forward_3d_draw_over_viewport], except it draws on top of everything. Useful when you need an extra layer that shows over anything else.
You need to enable calling of this method by using [method set_force_draw_over_forwarding_enabled].
@@ -97,10 +97,10 @@
</method>
<method name="_forward_3d_gui_input" qualifiers="virtual">
<return type="int" />
- <argument index="0" name="viewport_camera" type="Camera3D" />
- <argument index="1" name="event" type="InputEvent" />
+ <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. Intercepts the [InputEvent], if [code]return true[/code] [EditorPlugin] consumes the [param event], otherwise forwards [param event] to other Editor classes. Example:
[codeblocks]
[gdscript]
# Prevents the InputEvent to reach other Editor classes.
@@ -134,7 +134,7 @@
</method>
<method name="_forward_canvas_draw_over_viewport" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="viewport_control" type="Control" />
+ <param index="0" name="viewport_control" type="Control" />
<description>
Called by the engine when the 2D editor's viewport is updated. Use the [code]overlay[/code] [Control] for drawing. You can update the viewport manually by calling [method update_overlays].
[codeblocks]
@@ -172,7 +172,7 @@
</method>
<method name="_forward_canvas_force_draw_over_viewport" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="viewport_control" type="Control" />
+ <param index="0" name="viewport_control" type="Control" />
<description>
This method is the same as [method _forward_canvas_draw_over_viewport], except it draws on top of everything. Useful when you need an extra layer that shows over anything else.
You need to enable calling of this method by using [method set_force_draw_over_forwarding_enabled].
@@ -180,9 +180,9 @@
</method>
<method name="_forward_canvas_gui_input" qualifiers="virtual">
<return type="bool" />
- <argument index="0" name="event" type="InputEvent" />
+ <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. Example:
[codeblocks]
[gdscript]
# Prevents the InputEvent to reach other Editor classes.
@@ -261,19 +261,33 @@
<method name="_get_state" qualifiers="virtual const">
<return type="Dictionary" />
<description>
- Gets the state of your plugin editor. This is used when saving the scene (so state is kept when opening it again) and for switching tabs (so state can be restored when the tab returns).
+ Override this method to provide a state data you want to be saved, like view position, grid settings, folding, etc. This is used when saving the scene (so state is kept when opening it again) and for switching tabs (so state can be restored when the tab returns). This data is automatically saved for each scene in an [code]editstate[/code] file in the editor metadata folder. If you want to store global (scene-independent) editor data for your plugin, you can use [method _get_window_layout] instead.
+ Use [method _set_state] to restore your saved state.
+ [b]Note:[/b] This method should not be used to save important settings that should persist with the project.
+ [b]Note:[/b] You must implement [method _get_plugin_name] for the state to be stored and restored correctly.
+ [codeblock]
+ func _get_state():
+ var state = {"zoom": zoom, "preferred_color": my_color}
+ return state
+ [/codeblock]
</description>
</method>
<method name="_get_window_layout" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="configuration" type="ConfigFile" />
+ <param index="0" name="configuration" type="ConfigFile" />
<description>
- Gets the GUI layout of the plugin. This is used to save the project's editor layout when [method queue_save_layout] is called or the editor layout was changed(For example changing the position of a dock).
+ Override this method to provide the GUI layout of the plugin or any other data you want to be stored. This is used to save the project's editor layout when [method queue_save_layout] is called or the editor layout was changed (for example changing the position of a dock). The data is stored in the [code]editor_layout.cfg[/code] file in the editor metadata directory.
+ Use [method _set_window_layout] to restore your saved layout.
+ [codeblock]
+ func _get_window_layout(configuration):
+ configuration.set_value("MyPlugin", "window_position", $Window.position)
+ configuration.set_value("MyPlugin", "icon_color", $Icon.modulate)
+ [/codeblock]
</description>
</method>
<method name="_handles" qualifiers="virtual const">
<return type="bool" />
- <argument index="0" name="object" type="Variant" />
+ <param index="0" name="object" type="Variant" />
<description>
Implement this function if your plugin edits a specific type of object (Resource or Node). If you return [code]true[/code], then you will get the functions [method _edit] and [method _make_visible] called when the editor requests them. If you have declared the methods [method _forward_canvas_gui_input] and [method _forward_3d_gui_input] these will be called too.
</description>
@@ -282,11 +296,33 @@
<return type="bool" />
<description>
Returns [code]true[/code] if this is a main screen editor plugin (it goes in the workspace selector together with [b]2D[/b], [b]3D[/b], [b]Script[/b] and [b]AssetLib[/b]).
+ When the plugin's workspace is selected, other main screen plugins will be hidden, but your plugin will not appear automatically. It needs to be added as a child of [method EditorInterface.get_base_control] and made visible inside [method _make_visible].
+ Use [method _get_plugin_name] and [method _get_plugin_icon] to customize the plugin button's appearance.
+ [codeblock]
+ var plugin_control
+
+ func _enter_tree():
+ plugin_control = preload("my_plugin_control.tscn").instantiate()
+ get_editor_interface().get_editor_main_control().add_child(plugin_control)
+ plugin_control.hide()
+
+ func _has_main_screen():
+ return true
+
+ func _make_visible(visible):
+ plugin_control.visible = visible
+
+ func _get_plugin_name():
+ return "My Super Cool Plugin 3000"
+
+ func _get_plugin_icon():
+ return get_editor_interface().get_base_control().get_theme_icon("Node", "EditorIcons")
+ [/codeblock]
</description>
</method>
<method name="_make_visible" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="visible" type="bool" />
+ <param index="0" name="visible" type="bool" />
<description>
This function will be called when the editor is requested to become visible. It is used for plugins that edit a specific object type.
Remember that you have to manage the visibility of all your editor controls manually.
@@ -300,38 +336,49 @@
</method>
<method name="_set_state" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="state" type="Dictionary" />
+ <param index="0" name="state" type="Dictionary" />
<description>
- Restore the state saved by [method _get_state].
+ Restore the state saved by [method _get_state]. This method is called when the current scene tab is changed in the editor.
+ [b]Note:[/b] Your plugin must implement [method _get_plugin_name], otherwise it will not be recognized and this method will not be called.
+ [codeblock]
+ func _set_state(data):
+ zoom = data.get("zoom", 1.0)
+ preferred_color = data.get("my_color", Color.white)
+ [/codeblock]
</description>
</method>
<method name="_set_window_layout" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="configuration" type="ConfigFile" />
+ <param index="0" name="configuration" type="ConfigFile" />
<description>
- Restore the plugin GUI layout saved by [method _get_window_layout].
+ 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())
+ $Icon.modulate = configuration.get_value("MyPlugin", "icon_color", Color.white)
+ [/codeblock]
</description>
</method>
<method name="add_autoload_singleton">
<return type="void" />
- <argument index="0" name="name" type="String" />
- <argument index="1" name="path" type="String" />
+ <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">
<return type="Button" />
- <argument index="0" name="control" type="Control" />
- <argument index="1" name="title" type="String" />
+ <param index="0" name="control" type="Control" />
+ <param index="1" name="title" type="String" />
<description>
Adds a control to the bottom panel (together with Output, Debug, Animation, etc). Returns a reference to the button added. It's up to you to hide/show the button when needed. When your plugin is deactivated, make sure to remove your custom control with [method remove_control_from_bottom_panel] and free it with [method Node.queue_free].
</description>
</method>
<method name="add_control_to_container">
<return type="void" />
- <argument index="0" name="container" type="int" enum="EditorPlugin.CustomControlContainer" />
- <argument index="1" name="control" type="Control" />
+ <param index="0" name="container" type="int" enum="EditorPlugin.CustomControlContainer" />
+ <param index="1" name="control" type="Control" />
<description>
Adds a custom control to a container (see [enum CustomControlContainer]). There are many locations where custom controls can be added in the editor UI.
Please remember that you have to manage the visibility of your custom controls yourself (and likely hide it after adding it).
@@ -340,8 +387,8 @@
</method>
<method name="add_control_to_dock">
<return type="void" />
- <argument index="0" name="slot" type="int" enum="EditorPlugin.DockSlot" />
- <argument index="1" name="control" type="Control" />
+ <param index="0" name="slot" type="int" enum="EditorPlugin.DockSlot" />
+ <param index="1" name="control" type="Control" />
<description>
Adds the control to a specific dock slot (see [enum DockSlot] for options).
If the dock is repositioned and as long as the plugin is active, the editor will save the dock position on further sessions.
@@ -350,10 +397,10 @@
</method>
<method name="add_custom_type">
<return type="void" />
- <argument index="0" name="type" type="String" />
- <argument index="1" name="base" type="String" />
- <argument index="2" name="script" type="Script" />
- <argument index="3" name="icon" type="Texture2D" />
+ <param index="0" name="type" type="String" />
+ <param index="1" name="base" type="String" />
+ <param index="2" name="script" type="Script" />
+ <param index="3" name="icon" type="Texture2D" />
<description>
Adds a custom type, which will appear in the list of nodes or resources. An icon can be optionally passed.
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.
@@ -363,14 +410,14 @@
</method>
<method name="add_debugger_plugin">
<return type="void" />
- <argument index="0" name="script" type="Script" />
+ <param index="0" name="script" type="Script" />
<description>
Adds a [Script] as debugger plugin to the Debugger. The script must extend [EditorDebuggerPlugin].
</description>
</method>
<method name="add_export_plugin">
<return type="void" />
- <argument index="0" name="plugin" type="EditorExportPlugin" />
+ <param index="0" name="plugin" type="EditorExportPlugin" />
<description>
Registers a new [EditorExportPlugin]. Export plugins are used to perform tasks when the project is being exported.
See [method add_inspector_plugin] for an example of how to register a plugin.
@@ -378,18 +425,18 @@
</method>
<method name="add_import_plugin">
<return type="void" />
- <argument index="0" name="importer" type="EditorImportPlugin" />
- <argument index="1" name="first_priority" type="bool" default="false" />
+ <param index="0" name="importer" type="EditorImportPlugin" />
+ <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>
</method>
<method name="add_inspector_plugin">
<return type="void" />
- <argument index="0" name="plugin" type="EditorInspectorPlugin" />
+ <param index="0" name="plugin" type="EditorInspectorPlugin" />
<description>
Registers a new [EditorInspectorPlugin]. Inspector plugins are used to extend [EditorInspector] and provide custom configuration tools for your object's properties.
[b]Note:[/b] Always use [method remove_inspector_plugin] to remove the registered [EditorInspectorPlugin] when your [EditorPlugin] is disabled to prevent leaks and an unexpected behavior.
@@ -409,25 +456,25 @@
</method>
<method name="add_scene_format_importer_plugin">
<return type="void" />
- <argument index="0" name="scene_format_importer" type="EditorSceneFormatImporter" />
- <argument index="1" name="first_priority" type="bool" default="false" />
+ <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">
<return type="void" />
- <argument index="0" name="scene_import_plugin" type="EditorScenePostImportPlugin" />
- <argument index="1" name="first_priority" type="bool" default="false" />
+ <param index="0" name="scene_import_plugin" type="EditorScenePostImportPlugin" />
+ <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.
+ 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_spatial_gizmo_plugin">
<return type="void" />
- <argument index="0" name="plugin" type="EditorNode3DGizmoPlugin" />
+ <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.
@@ -435,30 +482,30 @@
</method>
<method name="add_tool_menu_item">
<return type="void" />
- <argument index="0" name="name" type="String" />
- <argument index="1" name="callable" type="Callable" />
+ <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">
<return type="void" />
- <argument index="0" name="name" type="String" />
- <argument index="1" name="submenu" type="PopupMenu" />
+ <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">
<return type="void" />
- <argument index="0" name="parser" type="EditorTranslationParserPlugin" />
+ <param index="0" name="parser" type="EditorTranslationParserPlugin" />
<description>
Registers a custom translation parser plugin for extracting translatable strings from custom files.
</description>
</method>
<method name="add_undo_redo_inspector_hook_callback">
<return type="void" />
- <argument index="0" name="callable" type="Callable" />
+ <param index="0" name="callable" type="Callable" />
<description>
Hooks a callback into the undo/redo action creation when a property is modified in the inspector. This allows, for example, to save other properties that may be lost when a given property is modified.
The callback should have 4 arguments: [Object] [code]undo_redo[/code], [Object] [code]modified_object[/code], [String] [code]property[/code] and [Variant] [code]new_value[/code]. They are, respectively, the [UndoRedo] object used by the inspector, the currently modified object, the name of the modified property and the new value the property is about to take.
@@ -479,13 +526,13 @@
<method name="get_script_create_dialog">
<return type="ScriptCreateDialog" />
<description>
- Gets the Editor's dialogue used for making scripts.
+ Gets the Editor's dialog used for making scripts.
[b]Note:[/b] Users can configure it before use.
[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_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>
@@ -498,7 +545,7 @@
</method>
<method name="make_bottom_panel_item_visible">
<return type="void" />
- <argument index="0" name="item" type="Control" />
+ <param index="0" name="item" type="Control" />
<description>
Makes a specific item in the bottom panel visible.
</description>
@@ -511,106 +558,106 @@
</method>
<method name="remove_autoload_singleton">
<return type="void" />
- <argument index="0" name="name" type="String" />
+ <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">
<return type="void" />
- <argument index="0" name="control" type="Control" />
+ <param index="0" name="control" type="Control" />
<description>
Removes the control from the bottom panel. You have to manually [method Node.queue_free] the control.
</description>
</method>
<method name="remove_control_from_container">
<return type="void" />
- <argument index="0" name="container" type="int" enum="EditorPlugin.CustomControlContainer" />
- <argument index="1" name="control" type="Control" />
+ <param index="0" name="container" type="int" enum="EditorPlugin.CustomControlContainer" />
+ <param index="1" name="control" type="Control" />
<description>
Removes the control from the specified container. You have to manually [method Node.queue_free] the control.
</description>
</method>
<method name="remove_control_from_docks">
<return type="void" />
- <argument index="0" name="control" type="Control" />
+ <param index="0" name="control" type="Control" />
<description>
Removes the control from the dock. You have to manually [method Node.queue_free] the control.
</description>
</method>
<method name="remove_custom_type">
<return type="void" />
- <argument index="0" name="type" type="String" />
+ <param index="0" name="type" type="String" />
<description>
Removes a custom type added by [method add_custom_type].
</description>
</method>
<method name="remove_debugger_plugin">
<return type="void" />
- <argument index="0" name="script" type="Script" />
+ <param index="0" name="script" type="Script" />
<description>
Removes the debugger plugin with given script from the Debugger.
</description>
</method>
<method name="remove_export_plugin">
<return type="void" />
- <argument index="0" name="plugin" type="EditorExportPlugin" />
+ <param index="0" name="plugin" type="EditorExportPlugin" />
<description>
Removes an export plugin registered by [method add_export_plugin].
</description>
</method>
<method name="remove_import_plugin">
<return type="void" />
- <argument index="0" name="importer" type="EditorImportPlugin" />
+ <param index="0" name="importer" type="EditorImportPlugin" />
<description>
Removes an import plugin registered by [method add_import_plugin].
</description>
</method>
<method name="remove_inspector_plugin">
<return type="void" />
- <argument index="0" name="plugin" type="EditorInspectorPlugin" />
+ <param index="0" name="plugin" type="EditorInspectorPlugin" />
<description>
Removes an inspector plugin registered by [method add_import_plugin]
</description>
</method>
<method name="remove_scene_format_importer_plugin">
<return type="void" />
- <argument index="0" name="scene_format_importer" type="EditorSceneFormatImporter" />
+ <param index="0" name="scene_format_importer" type="EditorSceneFormatImporter" />
<description>
Removes a scene format importer registered by [method add_scene_format_importer_plugin].
</description>
</method>
<method name="remove_scene_post_import_plugin">
<return type="void" />
- <argument index="0" name="scene_import_plugin" type="EditorScenePostImportPlugin" />
+ <param index="0" name="scene_import_plugin" type="EditorScenePostImportPlugin" />
<description>
Remove the [EditorScenePostImportPlugin], added with [method add_scene_post_import_plugin].
</description>
</method>
<method name="remove_spatial_gizmo_plugin">
<return type="void" />
- <argument index="0" name="plugin" type="EditorNode3DGizmoPlugin" />
+ <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" />
- <argument index="0" name="name" type="String" />
+ <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">
<return type="void" />
- <argument index="0" name="parser" type="EditorTranslationParserPlugin" />
+ <param index="0" name="parser" type="EditorTranslationParserPlugin" />
<description>
Removes a custom translation parser plugin registered by [method add_translation_parser_plugin].
</description>
</method>
<method name="remove_undo_redo_inspector_hook_callback">
<return type="void" />
- <argument index="0" name="callable" type="Callable" />
+ <param index="0" name="callable" type="Callable" />
<description>
Removes a callback previsously added by [method add_undo_redo_inspector_hook_callback].
</description>
@@ -636,7 +683,7 @@
</methods>
<signals>
<signal name="main_screen_changed">
- <argument index="0" name="screen_name" type="String" />
+ <param index="0" name="screen_name" type="String" />
<description>
Emitted when user changes the workspace ([b]2D[/b], [b]3D[/b], [b]Script[/b], [b]AssetLib[/b]). Also works with custom screens defined by plugins.
</description>
@@ -646,18 +693,18 @@
</description>
</signal>
<signal name="resource_saved">
- <argument index="0" name="resource" type="Resource" />
+ <param index="0" name="resource" type="Resource" />
<description>
</description>
</signal>
<signal name="scene_changed">
- <argument index="0" name="scene_root" type="Node" />
+ <param index="0" name="scene_root" type="Node" />
<description>
Emitted when the scene is changed in the editor. The argument will return the root node of the scene that has just become active. If this scene is new and empty, the argument will be [code]null[/code].
</description>
</signal>
<signal name="scene_closed">
- <argument index="0" name="filepath" type="String" />
+ <param index="0" name="filepath" type="String" />
<description>
Emitted when user closes a scene. The argument is file path to a closed scene.
</description>
@@ -682,7 +729,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>
diff --git a/doc/classes/EditorProperty.xml b/doc/classes/EditorProperty.xml
index c428233372..4a6a0e7226 100644
--- a/doc/classes/EditorProperty.xml
+++ b/doc/classes/EditorProperty.xml
@@ -17,19 +17,19 @@
</method>
<method name="add_focusable">
<return type="void" />
- <argument index="0" name="control" type="Control" />
+ <param index="0" name="control" type="Control" />
<description>
If any of the controls added can gain keyboard focus, add it here. This ensures that focus will be restored if the inspector is refreshed.
</description>
</method>
<method name="emit_changed">
<return type="void" />
- <argument index="0" name="property" type="StringName" />
- <argument index="1" name="value" type="Variant" />
- <argument index="2" name="field" type="StringName" default="&amp;&quot;&quot;" />
- <argument index="3" name="changing" type="bool" default="false" />
+ <param index="0" name="property" type="StringName" />
+ <param index="1" name="value" type="Variant" />
+ <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">
@@ -38,7 +38,7 @@
Gets the edited object.
</description>
</method>
- <method name="get_edited_property">
+ <method name="get_edited_property" qualifiers="const">
<return type="StringName" />
<description>
Gets the edited property. If your editor is for a single property (added via [method EditorInspectorPlugin._parse_property]), then this will return the property.
@@ -52,9 +52,9 @@
</method>
<method name="set_bottom_editor">
<return type="void" />
- <argument index="0" name="editor" type="Control" />
+ <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">
@@ -88,70 +88,77 @@
</members>
<signals>
<signal name="multiple_properties_changed">
- <argument index="0" name="properties" type="PackedStringArray" />
- <argument index="1" name="value" type="Array" />
+ <param index="0" name="properties" type="PackedStringArray" />
+ <param index="1" name="value" type="Array" />
<description>
Emit it if you want multiple properties modified at the same time. Do not use if added via [method EditorInspectorPlugin._parse_property].
</description>
</signal>
<signal name="object_id_selected">
- <argument index="0" name="property" type="StringName" />
- <argument index="1" name="id" type="int" />
+ <param index="0" name="property" type="StringName" />
+ <param index="1" name="id" type="int" />
<description>
Used by sub-inspectors. Emit it if what was selected was an Object ID.
</description>
</signal>
+ <signal name="property_can_revert_changed">
+ <param index="0" name="property" type="StringName" />
+ <param index="1" name="can_revert" type="bool" />
+ <description>
+ Emitted when the revertability (i.e., whether it has a non-default value and thus is displayed with a revert icon) of a property has changed.
+ </description>
+ </signal>
<signal name="property_changed">
- <argument index="0" name="property" type="StringName" />
- <argument index="1" name="value" type="Variant" />
+ <param index="0" name="property" type="StringName" />
+ <param index="1" name="value" type="Variant" />
<description>
Do not emit this manually, use the [method emit_changed] method instead.
</description>
</signal>
<signal name="property_checked">
- <argument index="0" name="property" type="StringName" />
- <argument index="1" name="checked" type="bool" />
+ <param index="0" name="property" type="StringName" />
+ <param index="1" name="checked" type="bool" />
<description>
Emitted when a property was checked. Used internally.
</description>
</signal>
<signal name="property_deleted">
- <argument index="0" name="property" type="StringName" />
+ <param index="0" name="property" type="StringName" />
<description>
Emitted when a property was deleted. Used internally.
</description>
</signal>
<signal name="property_keyed">
- <argument index="0" name="property" type="StringName" />
+ <param index="0" name="property" type="StringName" />
<description>
Emit it if you want to add this value as an animation key (check for keying being enabled first).
</description>
</signal>
<signal name="property_keyed_with_value">
- <argument index="0" name="property" type="StringName" />
- <argument index="1" name="value" type="Variant" />
+ <param index="0" name="property" type="StringName" />
+ <param index="1" name="value" type="Variant" />
<description>
Emit it if you want to key a property with a single value.
</description>
</signal>
<signal name="property_pinned">
- <argument index="0" name="property" type="StringName" />
- <argument index="1" name="pinned" type="bool" />
+ <param index="0" name="property" type="StringName" />
+ <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.
</description>
</signal>
<signal name="resource_selected">
- <argument index="0" name="path" type="String" />
- <argument index="1" name="resource" type="Resource" />
+ <param index="0" name="path" type="String" />
+ <param index="1" name="resource" type="Resource" />
<description>
If you want a sub-resource to be edited, emit this signal with the resource.
</description>
</signal>
<signal name="selected">
- <argument index="0" name="path" type="String" />
- <argument index="1" name="focusable_idx" type="int" />
+ <param index="0" name="path" type="String" />
+ <param index="1" name="focusable_idx" type="int" />
<description>
Emitted when selected. Used internally.
</description>
diff --git a/doc/classes/EditorResourceConversionPlugin.xml b/doc/classes/EditorResourceConversionPlugin.xml
index 8a4aee0eef..c40bb1d91e 100644
--- a/doc/classes/EditorResourceConversionPlugin.xml
+++ b/doc/classes/EditorResourceConversionPlugin.xml
@@ -9,7 +9,7 @@
<methods>
<method name="_convert" qualifiers="virtual const">
<return type="Resource" />
- <argument index="0" name="resource" type="Resource" />
+ <param index="0" name="resource" type="Resource" />
<description>
</description>
</method>
@@ -20,7 +20,7 @@
</method>
<method name="_handles" qualifiers="virtual const">
<return type="bool" />
- <argument index="0" name="resource" type="Resource" />
+ <param index="0" name="resource" type="Resource" />
<description>
</description>
</method>
diff --git a/doc/classes/EditorResourcePicker.xml b/doc/classes/EditorResourcePicker.xml
index aa8f75d764..4182ab3c16 100644
--- a/doc/classes/EditorResourcePicker.xml
+++ b/doc/classes/EditorResourcePicker.xml
@@ -12,16 +12,16 @@
<methods>
<method name="_handle_menu_selected" qualifiers="virtual">
<return type="bool" />
- <argument index="0" name="id" type="int" />
+ <param index="0" name="id" type="int" />
<description>
This virtual method can be implemented to handle context menu items not handled by default. See [method _set_create_options].
</description>
</method>
<method name="_set_create_options" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="menu_node" type="Object" />
+ <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>
@@ -33,7 +33,7 @@
</method>
<method name="set_toggle_pressed">
<return type="void" />
- <argument index="0" name="pressed" type="bool" />
+ <param index="0" name="pressed" type="bool" />
<description>
Sets the toggle mode state for the main button. Works only if [member toggle_mode] is set to [code]true[/code].
</description>
@@ -55,16 +55,16 @@
</members>
<signals>
<signal name="resource_changed">
- <argument index="0" name="resource" type="Resource" />
+ <param index="0" name="resource" type="Resource" />
<description>
Emitted when the value of the edited resource was changed.
</description>
</signal>
<signal name="resource_selected">
- <argument index="0" name="resource" type="Resource" />
- <argument index="1" name="edit" type="bool" />
+ <param index="0" name="resource" type="Resource" />
+ <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 5df797f516..68ead12c03 100644
--- a/doc/classes/EditorResourcePreview.xml
+++ b/doc/classes/EditorResourcePreview.xml
@@ -12,43 +12,43 @@
<methods>
<method name="add_preview_generator">
<return type="void" />
- <argument index="0" name="generator" type="EditorResourcePreviewGenerator" />
+ <param index="0" name="generator" type="EditorResourcePreviewGenerator" />
<description>
Create an own, custom preview generator.
</description>
</method>
<method name="check_for_invalidation">
<return type="void" />
- <argument index="0" name="path" type="String" />
+ <param index="0" name="path" type="String" />
<description>
Check if the resource changed, if so, it will be invalidated and the corresponding signal emitted.
</description>
</method>
<method name="queue_edited_resource_preview">
<return type="void" />
- <argument index="0" name="resource" type="Resource" />
- <argument index="1" name="receiver" type="Object" />
- <argument index="2" name="receiver_func" type="StringName" />
- <argument index="3" name="userdata" type="Variant" />
+ <param index="0" name="resource" type="Resource" />
+ <param index="1" name="receiver" type="Object" />
+ <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">
<return type="void" />
- <argument index="0" name="path" type="String" />
- <argument index="1" name="receiver" type="Object" />
- <argument index="2" name="receiver_func" type="StringName" />
- <argument index="3" name="userdata" type="Variant" />
+ <param index="0" name="path" type="String" />
+ <param index="1" name="receiver" type="Object" />
+ <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">
<return type="void" />
- <argument index="0" name="generator" type="EditorResourcePreviewGenerator" />
+ <param index="0" name="generator" type="EditorResourcePreviewGenerator" />
<description>
Removes a custom preview generator.
</description>
@@ -56,9 +56,9 @@
</methods>
<signals>
<signal name="preview_invalidated">
- <argument index="0" name="path" type="String" />
+ <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 d8b4a86a97..75628beae9 100644
--- a/doc/classes/EditorResourcePreviewGenerator.xml
+++ b/doc/classes/EditorResourcePreviewGenerator.xml
@@ -18,8 +18,8 @@
</method>
<method name="_generate" qualifiers="virtual const">
<return type="Texture2D" />
- <argument index="0" name="resource" type="Resource" />
- <argument index="1" name="size" type="Vector2i" />
+ <param index="0" name="resource" type="Resource" />
+ <param index="1" name="size" type="Vector2i" />
<description>
Generate a preview from a given resource with the specified size. This must always be implemented.
Returning an empty texture is an OK way to fail and let another generator take care.
@@ -28,8 +28,8 @@
</method>
<method name="_generate_from_path" qualifiers="virtual const">
<return type="Texture2D" />
- <argument index="0" name="path" type="String" />
- <argument index="1" name="size" type="Vector2i" />
+ <param index="0" name="path" type="String" />
+ <param index="1" name="size" type="Vector2i" />
<description>
Generate a preview directly from a path with the specified size. Implementing this is optional, as default code will load and call [method _generate].
Returning an empty texture is an OK way to fail and let another generator take care.
@@ -45,9 +45,9 @@
</method>
<method name="_handles" qualifiers="virtual const">
<return type="bool" />
- <argument index="0" name="type" type="String" />
+ <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/EditorSceneFormatImporter.xml b/doc/classes/EditorSceneFormatImporter.xml
index 0290d7207d..6de9c2c5dc 100644
--- a/doc/classes/EditorSceneFormatImporter.xml
+++ b/doc/classes/EditorSceneFormatImporter.xml
@@ -22,24 +22,24 @@
</method>
<method name="_get_import_options" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="path" type="String" />
+ <param index="0" name="path" type="String" />
<description>
</description>
</method>
<method name="_get_option_visibility" qualifiers="virtual const">
<return type="Variant" />
- <argument index="0" name="path" type="String" />
- <argument index="1" name="for_animation" type="bool" />
- <argument index="2" name="option" type="String" />
+ <param index="0" name="path" type="String" />
+ <param index="1" name="for_animation" type="bool" />
+ <param index="2" name="option" type="String" />
<description>
</description>
</method>
<method name="_import_scene" qualifiers="virtual">
<return type="Object" />
- <argument index="0" name="path" type="String" />
- <argument index="1" name="flags" type="int" />
- <argument index="2" name="options" type="Dictionary" />
- <argument index="3" name="bake_fps" type="int" />
+ <param index="0" name="path" type="String" />
+ <param index="1" name="flags" type="int" />
+ <param index="2" name="options" type="Dictionary" />
+ <param index="3" name="bake_fps" type="int" />
<description>
</description>
</method>
diff --git a/doc/classes/EditorScenePostImport.xml b/doc/classes/EditorScenePostImport.xml
index 3adf814947..395b094bf2 100644
--- a/doc/classes/EditorScenePostImport.xml
+++ b/doc/classes/EditorScenePostImport.xml
@@ -57,7 +57,7 @@
<methods>
<method name="_post_import" qualifiers="virtual">
<return type="Object" />
- <argument index="0" name="scene" type="Node" />
+ <param index="0" name="scene" type="Node" />
<description>
Called after the scene was imported. This method must return the modified version of the scene.
</description>
diff --git a/doc/classes/EditorScenePostImportPlugin.xml b/doc/classes/EditorScenePostImportPlugin.xml
index 0fdbd5db1e..3ea0e53c01 100644
--- a/doc/classes/EditorScenePostImportPlugin.xml
+++ b/doc/classes/EditorScenePostImportPlugin.xml
@@ -11,91 +11,91 @@
<methods>
<method name="_get_import_options" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="path" type="String" />
+ <param index="0" name="path" type="String" />
<description>
Override to add general import options. These will appear in the main import dock on the editor. Add options via [method add_import_option] and [method add_import_option_advanced].
</description>
</method>
<method name="_get_internal_import_options" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="category" type="int" />
+ <param index="0" name="category" type="int" />
<description>
Override to add internal import options. These will appear in the 3D scene import dialog. Add options via [method add_import_option] and [method add_import_option_advanced].
</description>
</method>
<method name="_get_internal_option_update_view_required" qualifiers="virtual const">
<return type="Variant" />
- <argument index="0" name="category" type="int" />
- <argument index="1" name="option" type="String" />
+ <param index="0" name="category" type="int" />
+ <param index="1" name="option" type="String" />
<description>
Return true whether updating the 3D view of the import dialog needs to be updated if an option has changed.
</description>
</method>
<method name="_get_internal_option_visibility" qualifiers="virtual const">
<return type="Variant" />
- <argument index="0" name="category" type="int" />
- <argument index="1" name="for_animation" type="bool" />
- <argument index="2" name="option" type="String" />
+ <param index="0" name="category" type="int" />
+ <param index="1" name="for_animation" type="bool" />
+ <param index="2" name="option" type="String" />
<description>
Return true or false whether a given option should be visible. Return null to ignore.
</description>
</method>
<method name="_get_option_visibility" qualifiers="virtual const">
<return type="Variant" />
- <argument index="0" name="path" type="String" />
- <argument index="1" name="for_animation" type="bool" />
- <argument index="2" name="option" type="String" />
+ <param index="0" name="path" type="String" />
+ <param index="1" name="for_animation" type="bool" />
+ <param index="2" name="option" type="String" />
<description>
Return true or false whether a given option should be visible. Return null to ignore.
</description>
</method>
<method name="_internal_process" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="category" type="int" />
- <argument index="1" name="base_node" type="Node" />
- <argument index="2" name="node" type="Node" />
- <argument index="3" name="resource" type="Resource" />
+ <param index="0" name="category" type="int" />
+ <param index="1" name="base_node" type="Node" />
+ <param index="2" name="node" type="Node" />
+ <param index="3" name="resource" type="Resource" />
<description>
Process a specific node or resource for a given category.
</description>
</method>
<method name="_post_process" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="scene" type="Node" />
+ <param index="0" name="scene" type="Node" />
<description>
Post process the scene. This function is called after the final scene has been configured.
</description>
</method>
<method name="_pre_process" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="scene" type="Node" />
+ <param index="0" name="scene" type="Node" />
<description>
Pre Process the scene. This function is called right after the scene format loader loaded the scene and no changes have been made.
</description>
</method>
<method name="add_import_option">
<return type="void" />
- <argument index="0" name="name" type="String" />
- <argument index="1" name="value" type="Variant" />
+ <param index="0" name="name" type="String" />
+ <param index="1" name="value" type="Variant" />
<description>
Add a specific import option (name and default value only). This function can only be called from [method _get_import_options] and [method _get_internal_import_options].
</description>
</method>
<method name="add_import_option_advanced">
<return type="void" />
- <argument index="0" name="type" type="int" enum="Variant.Type" />
- <argument index="1" name="name" type="String" />
- <argument index="2" name="default_value" type="Variant" />
- <argument index="3" name="hint" type="int" enum="PropertyHint" default="0" />
- <argument index="4" name="hint_string" type="String" default="&quot;&quot;" />
- <argument index="5" name="usage_flags" type="int" default="7" />
+ <param index="0" name="type" type="int" enum="Variant.Type" />
+ <param index="1" name="name" type="String" />
+ <param index="2" name="default_value" type="Variant" />
+ <param index="3" name="hint" type="int" enum="PropertyHint" default="0" />
+ <param index="4" name="hint_string" type="String" default="&quot;&quot;" />
+ <param index="5" name="usage_flags" type="int" default="6" />
<description>
Add a specific import option. This function can only be called from [method _get_import_options] and [method _get_internal_import_options].
</description>
</method>
<method name="get_option_value" qualifiers="const">
<return type="Variant" />
- <argument index="0" name="name" type="StringName" />
+ <param index="0" name="name" type="StringName" />
<description>
Query the value of an option. This function can only be called from those querying visibility, or processing.
</description>
@@ -114,7 +114,9 @@
</constant>
<constant name="INTERNAL_IMPORT_CATEGORY_ANIMATION_NODE" value="5" enum="InternalImportCategory">
</constant>
- <constant name="INTERNAL_IMPORT_CATEGORY_MAX" value="6" enum="InternalImportCategory">
+ <constant name="INTERNAL_IMPORT_CATEGORY_SKELETON_3D_NODE" value="6" enum="InternalImportCategory">
+ </constant>
+ <constant name="INTERNAL_IMPORT_CATEGORY_MAX" value="7" enum="InternalImportCategory">
</constant>
</constants>
</class>
diff --git a/doc/classes/EditorScript.xml b/doc/classes/EditorScript.xml
index 68ee939370..2ff8a7ba2a 100644
--- a/doc/classes/EditorScript.xml
+++ b/doc/classes/EditorScript.xml
@@ -42,9 +42,9 @@
</method>
<method name="add_root_node">
<return type="void" />
- <argument index="0" name="node" type="Node" />
+ <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 ff6f5f9206..54029c2ccf 100644
--- a/doc/classes/EditorSelection.xml
+++ b/doc/classes/EditorSelection.xml
@@ -12,7 +12,7 @@
<methods>
<method name="add_node">
<return type="void" />
- <argument index="0" name="node" type="Node" />
+ <param index="0" name="node" type="Node" />
<description>
Adds a node to the selection.
[b]Note:[/b] The newly selected node will not be automatically edited in the inspector. If you want to edit a node, use [method EditorInterface.edit_node].
@@ -31,14 +31,14 @@
</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>
</method>
<method name="remove_node">
<return type="void" />
- <argument index="0" name="node" type="Node" />
+ <param index="0" name="node" type="Node" />
<description>
Removes a node from the selection.
</description>
diff --git a/doc/classes/EditorSettings.xml b/doc/classes/EditorSettings.xml
index ac2250ab6d..7fc9c81985 100644
--- a/doc/classes/EditorSettings.xml
+++ b/doc/classes/EditorSettings.xml
@@ -32,7 +32,7 @@
<methods>
<method name="add_property_info">
<return type="void" />
- <argument index="0" name="info" type="Dictionary" />
+ <param index="0" name="info" type="Dictionary" />
<description>
Adds a custom property info to a property. The dictionary must contain:
- [code]name[/code]: [String] (the name of the property)
@@ -72,20 +72,20 @@
</method>
<method name="check_changed_settings_in_group" qualifiers="const">
<return type="bool" />
- <argument index="0" name="setting_prefix" type="String" />
+ <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" />
- <argument index="0" name="property" type="String" />
+ <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>
@@ -98,17 +98,11 @@
</method>
<method name="get_project_metadata" qualifiers="const">
<return type="Variant" />
- <argument index="0" name="section" type="String" />
- <argument index="1" name="key" type="String" />
- <argument 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].
- </description>
- </method>
- <method name="get_project_settings_dir" qualifiers="const">
- <return type="String" />
+ <param index="0" name="section" type="String" />
+ <param index="1" name="key" type="String" />
+ <param index="2" name="default" type="Variant" default="null" />
<description>
- Returns the project-specific settings path. Projects all have a unique subdirectory inside the settings path where project-specific settings are saved.
+ 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">
@@ -119,87 +113,802 @@
</method>
<method name="get_setting" qualifiers="const">
<return type="Variant" />
- <argument index="0" name="name" type="String" />
+ <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" />
- <argument index="0" name="name" type="String" />
+ <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">
<return type="void" />
- <argument index="0" name="setting" type="String" />
+ <param index="0" name="setting" type="String" />
<description>
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" />
- <argument 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" />
- <argument 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" />
- <argument index="0" name="name" type="String" />
- <argument index="1" name="actions_list" type="Array" />
+ <param index="0" name="name" type="String" />
+ <param index="1" name="actions_list" type="Array" />
<description>
+ Overrides the built-in editor action [param name] with the input actions defined in [param actions_list].
</description>
</method>
<method name="set_favorites">
<return type="void" />
- <argument index="0" name="dirs" type="PackedStringArray" />
+ <param index="0" name="dirs" type="PackedStringArray" />
<description>
Sets the list of favorite files and directories for this project.
</description>
</method>
<method name="set_initial_value">
<return type="void" />
- <argument index="0" name="name" type="StringName" />
- <argument index="1" name="value" type="Variant" />
- <argument index="2" name="update_current" type="bool" />
+ <param index="0" name="name" type="StringName" />
+ <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">
<return type="void" />
- <argument index="0" name="section" type="String" />
- <argument index="1" name="key" type="String" />
- <argument index="2" name="data" type="Variant" />
+ <param index="0" name="section" type="String" />
+ <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">
<return type="void" />
- <argument index="0" name="dirs" type="PackedStringArray" />
+ <param index="0" name="dirs" type="PackedStringArray" />
<description>
Sets the list of recently visited folders in the file dialog for this project.
</description>
</method>
<method name="set_setting">
<return type="void" />
- <argument index="0" name="name" type="String" />
- <argument index="1" name="value" type="Variant" />
+ <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>
+ <members>
+ <member name="debugger/profiler_frame_history_size" type="int" setter="" getter="">
+ The size of the profiler's frame history. The default value (3600) allows seeing up to 60 seconds of profiling if the project renders at a constant 60 FPS. Higher values allow viewing longer periods of profiling in the graphs, especially when the project is running at high framerates.
+ </member>
+ <member name="docks/filesystem/always_show_folders" type="bool" setter="" getter="">
+ If [code]true[/code], displays folders in the FileSystem dock's bottom pane when split mode is enabled. If [code]false[/code], only files will be displayed in the bottom pane. Split mode can be toggled by pressing the icon next to the [code]res://[/code] folder path.
+ [b]Note:[/b] This setting has no effect when split mode is disabled (which is the default).
+ </member>
+ <member name="docks/filesystem/textfile_extensions" type="String" setter="" getter="">
+ List of file extensions to consider as editable text files in the FileSystem dock (by double-clicking on the files).
+ </member>
+ <member name="docks/filesystem/thumbnail_size" type="int" setter="" getter="">
+ 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.
+ </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.
+ </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.
+ </member>
+ <member name="docks/scene_tree/start_create_dialog_fully_expanded" type="bool" setter="" getter="">
+ If [code]true[/code], the Create dialog (Create New Node/Create New Resource) will start with all its sections expanded. Otherwise, sections will be collapsed until the user starts searching (which will automatically expand sections as needed).
+ </member>
+ <member name="editors/2d/bone_color1" type="Color" setter="" getter="">
+ The "start" stop of the color gradient to use for bones in the 2D skeleton editor.
+ </member>
+ <member name="editors/2d/bone_color2" type="Color" setter="" getter="">
+ The "end" stop of the color gradient to use for bones in the 2D skeleton editor.
+ </member>
+ <member name="editors/2d/bone_ik_color" type="Color" setter="" getter="">
+ The color to use for inverse kinematics-enabled bones in the 2D skeleton editor.
+ </member>
+ <member name="editors/2d/bone_outline_color" type="Color" setter="" getter="">
+ The outline color to use for non-selected bones in the 2D skeleton editor. See also [member editors/2d/bone_selected_color].
+ </member>
+ <member name="editors/2d/bone_outline_size" type="int" setter="" getter="">
+ The outline size in the 2D skeleton editor (in pixels). See also [member editors/2d/bone_width].
+ </member>
+ <member name="editors/2d/bone_selected_color" type="Color" setter="" getter="">
+ The color to use for selected bones in the 2D skeleton editor. See also [member editors/2d/bone_outline_color].
+ </member>
+ <member name="editors/2d/bone_width" type="int" setter="" getter="">
+ The bone width in the 2D skeleton editor (in pixels). See also [member editors/2d/bone_outline_size].
+ </member>
+ <member name="editors/2d/constrain_editor_view" type="bool" setter="" getter="">
+ If [code]true[/code], prevents the 2D editor viewport from leaving the scene. Limits are calculated dynamically based on nodes present in the current scene. If [code]false[/code], the 2D editor viewport will be able to move freely, but you risk getting lost when zooming out too far. You can refocus on the scene by selecting a node then pressing [kbd]F[/kbd].
+ </member>
+ <member name="editors/2d/grid_color" type="Color" setter="" getter="">
+ The grid color to use in the 2D editor.
+ </member>
+ <member name="editors/2d/guides_color" type="Color" setter="" getter="">
+ The guides color to use in the 2D editor. Guides can be created by dragging the mouse cursor from the rulers.
+ </member>
+ <member name="editors/2d/smart_snapping_line_color" type="Color" setter="" getter="">
+ The color to use when drawing smart snapping lines in the 2D editor. The smart snapping lines will automatically display when moving 2D nodes if smart snapping is enabled in the Snapping Options menu at the top of the 2D editor viewport.
+ </member>
+ <member name="editors/2d/viewport_border_color" type="Color" setter="" getter="">
+ The color of the viewport border in the 2D editor. This border represents the viewport's size at the base resolution defined in the Project Settings. Objects placed outside this border will not be visible unless a [Camera2D] node is used, or unless the window is resized and the stretch mode is set to [code]disabled[/code].
+ </member>
+ <member name="editors/3d/default_fov" type="float" setter="" getter="">
+ The default camera field of view to use in the 3D editor (in degrees). The camera field of view can be adjusted on a per-scene basis using the [b]View[/b] menu at the top of the 3D editor. If a scene had its camera field of view adjusted using the [b]View[/b] menu, this setting is ignored in the scene in question. This setting is also ignored while a Camera3D node is being previewed in the editor.
+ </member>
+ <member name="editors/3d/default_z_far" type="float" setter="" getter="">
+ The default camera far clip distance to use in the 3D editor (in degrees). Higher values make it possible to view objects placed further away from the camera, at the cost of lower precision in the depth buffer (which can result in visible Z-fighting in the distance). The camera far clip distance can be adjusted on a per-scene basis using the [b]View[/b] menu at the top of the 3D editor. If a scene had its camera far clip distance adjusted using the [b]View[/b] menu, this setting is ignored in the scene in question. This setting is also ignored while a Camera3D node is being previewed in the editor.
+ </member>
+ <member name="editors/3d/default_z_near" type="float" setter="" getter="">
+ The default camera near clip distance to use in the 3D editor (in degrees). Lower values make it possible to view objects placed closer to the camera, at the cost of lower precision in the depth buffer (which can result in visible Z-fighting in the distance). The camera near clip distance can be adjusted on a per-scene basis using the [b]View[/b] menu at the top of the 3D editor. If a scene had its camera near clip distance adjusted using the [b]View[/b] menu, this setting is ignored in the scene in question. This setting is also ignored while a Camera3D node is being previewed in the editor.
+ </member>
+ <member name="editors/3d/freelook/freelook_activation_modifier" type="int" setter="" getter="">
+ The modifier key to use to enable freelook in the 3D editor (on top of pressing the right mouse button).
+ [b]Note:[/b] Regardless of this setting, the freelook toggle keyboard shortcut ([kbd]Shift + F[/kbd] by default) is always available.
+ [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>
+ <member name="editors/3d/freelook/freelook_base_speed" type="float" setter="" getter="">
+ The base 3D freelook speed in units per second. This can be adjusted by using the mouse wheel while in freelook mode, or by holding down the "fast" or "slow" modifier keys ([kbd]Shift[/kbd] and [kbd]Alt[/kbd] by default, respectively).
+ </member>
+ <member name="editors/3d/freelook/freelook_inertia" type="float" setter="" getter="">
+ The inertia of the 3D freelook camera. Higher values make the camera start and stop slower, which looks smoother but adds latency.
+ </member>
+ <member name="editors/3d/freelook/freelook_navigation_scheme" type="int" setter="" getter="">
+ The navigation scheme to use when freelook is enabled in the 3D editor. Some of the navigation schemes below may be more convenient when designing specific levels in the 3D editor.
+ - [b]Default:[/b] The "Freelook Forward", "Freelook Backward", "Freelook Up" and "Freelook Down" keys will move relative to the camera, taking its pitch angle into account for the movement.
+ - [b]Partially Axis-Locked:[/b] The "Freelook Forward" and "Freelook Backward" keys will move relative to the camera, taking its pitch angle into account for the movement. The "Freelook Up" and "Freelook Down" keys will move in an "absolute" manner, [i]not[/i] taking the camera's pitch angle into account for the movement.
+ - [b]Fully Axis-Locked:[/b] The "Freelook Forward", "Freelook Backward", "Freelook Up" and "Freelook Down" keys will move in an "absolute" manner, [i]not[/i] taking the camera's pitch angle into account for the movement.
+ See also [member editors/3d/navigation/navigation_scheme].
+ </member>
+ <member name="editors/3d/freelook/freelook_sensitivity" type="float" setter="" getter="">
+ The mouse sensitivity to use while freelook mode is active in the 3D editor. See also [member editors/3d/navigation_feel/orbit_sensitivity].
+ </member>
+ <member name="editors/3d/freelook/freelook_speed_zoom_link" type="bool" setter="" getter="">
+ If [code]true[/code], freelook speed is linked to the zoom value used in the camera orbit mode in the 3D editor.
+ </member>
+ <member name="editors/3d/grid_division_level_bias" type="float" setter="" getter="">
+ The grid division bias to use in the 3D editor. Negative values will cause small grid divisions to appear earlier, whereas positive values will cause small grid divisions to appear later.
+ </member>
+ <member name="editors/3d/grid_division_level_max" type="int" setter="" getter="">
+ The smallest grid division to use in the 3D editor, specified as a power of 2. The grid will not be able to get larger than [code]1 ^ grid_division_level_max[/code] units. By default, this means grid divisions cannot get smaller than 100 units each, no matter how far away the camera is from the grid.
+ </member>
+ <member name="editors/3d/grid_division_level_min" type="int" setter="" getter="">
+ The smallest grid division to use in the 3D editor, specified as a power of 2. The grid will not be able to get smaller than [code]1 ^ grid_division_level_min[/code] units. By default, this means grid divisions cannot get smaller than 1 unit each, no matter how close the camera is from the grid.
+ </member>
+ <member name="editors/3d/grid_size" type="int" setter="" getter="">
+ The grid size in units. Higher values prevent the grid from appearing "cut off" at certain angles, but make the grid more demanding to render. Depending on the camera's position, the grid may not be fully visible since a shader is used to fade it progressively.
+ </member>
+ <member name="editors/3d/grid_xy_plane" type="bool" setter="" getter="">
+ If [code]true[/code], render the grid on an XY plane. This can be useful for 3D side-scrolling games.
+ </member>
+ <member name="editors/3d/grid_xz_plane" type="bool" setter="" getter="">
+ If [code]true[/code], render the grid on an XZ plane.
+ </member>
+ <member name="editors/3d/grid_yz_plane" type="bool" setter="" getter="">
+ If [code]true[/code], render the grid on an YZ plane. This can be useful for 3D side-scrolling games.
+ </member>
+ <member name="editors/3d/navigation/emulate_3_button_mouse" type="bool" setter="" getter="">
+ If [code]true[/code], enables 3-button mouse emulation mode. This is useful on laptops when using a trackpad.
+ When 3-button mouse emulation mode is enabled, the pan, zoom and orbit modifiers can always be used in the 3D editor viewport, even when not holding down any mouse button.
+ [b]Note:[/b] No matter the orbit modifier configured in [member editors/3d/navigation/orbit_modifier], [kbd]Alt[/kbd] will always remain usable for orbiting in this mode to improve usability with graphics tablets.
+ </member>
+ <member name="editors/3d/navigation/emulate_numpad" type="bool" setter="" getter="">
+ If [code]true[/code], allows using the top row [kbd]0[/kbd]-[kbd]9[/kbd] keys to function as their equivalent numpad keys for 3D editor navigation. This should be enabled on keyboards that have no numeric keypad available.
+ </member>
+ <member name="editors/3d/navigation/invert_x_axis" type="bool" setter="" getter="">
+ If [code]true[/code], invert the horizontal mouse axis when panning or orbiting in the 3D editor. This setting does [i]not[/i] apply to freelook mode.
+ </member>
+ <member name="editors/3d/navigation/invert_y_axis" type="bool" setter="" getter="">
+ If [code]true[/code], invert the vertical mouse axis when panning, orbiting, or using freelook mode in the 3D editor.
+ </member>
+ <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.
+ 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>
+ <member name="editors/3d/navigation/orbit_modifier" type="int" setter="" getter="">
+ The modifier key that must be held to orbit in the 3D editor.
+ [b]Note:[/b] If [member editors/3d/navigation/emulate_3_button_mouse] is [code]true[/code], [kbd]Alt[/kbd] will always remain usable for orbiting to improve usability with graphics tablets.
+ [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>
+ <member name="editors/3d/navigation/pan_modifier" type="int" setter="" getter="">
+ The modifier key that must be held to pan in the 3D editor.
+ [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>
+ <member name="editors/3d/navigation/warped_mouse_panning" type="bool" setter="" getter="">
+ If [code]true[/code], warps the mouse around the 3D viewport while panning in the 3D editor. This makes it possible to pan over a large area without having to exit panning then mouse the mouse back constantly.
+ </member>
+ <member name="editors/3d/navigation/zoom_modifier" type="int" setter="" getter="">
+ The modifier key that must be held to zoom in the 3D editor.
+ [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>
+ <member name="editors/3d/navigation/zoom_style" type="int" setter="" getter="">
+ The mouse cursor movement direction to use when zooming by moving the mouse. This does not affect zooming with the mouse wheel.
+ </member>
+ <member name="editors/3d/navigation_feel/orbit_inertia" type="float" setter="" getter="">
+ The inertia to use when orbiting in the 3D editor. Higher values make the camera start and stop slower, which looks smoother but adds latency.
+ </member>
+ <member name="editors/3d/navigation_feel/orbit_sensitivity" type="float" setter="" getter="">
+ The mouse sensitivity to use when orbiting in the 3D editor. See also [member editors/3d/freelook/freelook_sensitivity].
+ </member>
+ <member name="editors/3d/navigation_feel/translation_inertia" type="float" setter="" getter="">
+ The inertia to use when panning in the 3D editor. Higher values make the camera start and stop slower, which looks smoother but adds latency.
+ </member>
+ <member name="editors/3d/navigation_feel/zoom_inertia" type="float" setter="" getter="">
+ The inertia to use when zooming in the 3D editor. Higher values make the camera start and stop slower, which looks smoother but adds latency.
+ </member>
+ <member name="editors/3d/primary_grid_color" type="Color" setter="" getter="">
+ The color to use for the primary 3D grid. The color's alpha channel affects the grid's opacity.
+ </member>
+ <member name="editors/3d/primary_grid_steps" type="int" setter="" getter="">
+ If set above 0, where a primary grid line should be drawn. By default, primary lines are configured to be more visible than secondary lines. This helps with measurements in the 3D editor. See also [member editors/3d/primary_grid_color] and [member editors/3d/secondary_grid_color].
+ </member>
+ <member name="editors/3d/secondary_grid_color" type="Color" setter="" getter="">
+ The color to use for the secondary 3D grid. This is generally a less visible color than [member editors/3d/primary_grid_color]. The color's alpha channel affects the grid's opacity.
+ </member>
+ <member name="editors/3d/selection_box_color" type="Color" setter="" getter="">
+ 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).
+ </member>
+ <member name="editors/3d_gizmos/gizmo_colors/joint" type="Color" setter="" getter="">
+ The 3D editor gizmo color for [Joint3D]s and [PhysicalBone3D]s.
+ </member>
+ <member name="editors/3d_gizmos/gizmo_colors/shape" type="Color" setter="" getter="">
+ The 3D editor gizmo color for [CollisionShape3D]s, [VehicleWheel3D]s, [RayCast3D]s and [SpringArm3D]s.
+ </member>
+ <member name="editors/animation/autorename_animation_tracks" type="bool" setter="" getter="">
+ If [code]true[/code], automatically updates animation tracks' target paths when renaming or reparenting nodes in the Scene tree dock.
+ </member>
+ <member name="editors/animation/confirm_insert_track" type="bool" setter="" getter="">
+ If [code]true[/code], display a confirmation dialog when adding a new track to an animation by pressing the "key" icon next to a property.
+ </member>
+ <member name="editors/animation/default_create_bezier_tracks" type="bool" setter="" getter="">
+ If [code]true[/code], create a Bezier track instead of a standard track when pressing the "key" icon next to a property. Bezier tracks provide more control over animation curves, but are more difficult to adjust quickly.
+ </member>
+ <member name="editors/animation/default_create_reset_tracks" type="bool" setter="" getter="">
+ If [code]true[/code], create a [code]RESET[/code] track when creating a new animation track. This track can be used to restore the animation to a "default" state.
+ </member>
+ <member name="editors/animation/onion_layers_future_color" type="Color" setter="" getter="">
+ The modulate color to use for "future" frames displayed in the animation editor's onion skinning feature.
+ </member>
+ <member name="editors/animation/onion_layers_past_color" type="Color" setter="" getter="">
+ The modulate color to use for "past" frames displayed in the animation editor's onion skinning feature.
+ </member>
+ <member name="editors/grid_map/pick_distance" type="float" setter="" getter="">
+ The maximum distance at which tiles can be placed on a GridMap, relative to the camera position (in 3D units).
+ </member>
+ <member name="editors/panning/2d_editor_pan_speed" type="int" setter="" getter="">
+ The panning speed when using the mouse wheel or touchscreen events in the 2D editor. This setting does not apply to panning by holding down the middle or right mouse buttons.
+ </member>
+ <member name="editors/panning/2d_editor_panning_scheme" type="int" setter="" getter="">
+ Controls whether the mouse wheel scroll zooms or pans in the 2D editor. See also [member editors/panning/sub_editors_panning_scheme] and [member editors/panning/animation_editors_panning_scheme].
+ </member>
+ <member name="editors/panning/animation_editors_panning_scheme" type="int" setter="" getter="">
+ Controls whether the mouse wheel scroll zooms or pans in the animation track and Bezier editors. See also [member editors/panning/2d_editor_panning_scheme] and [member editors/panning/sub_editors_panning_scheme] (which controls the animation blend tree editor's pan behavior).
+ </member>
+ <member name="editors/panning/simple_panning" type="bool" setter="" getter="">
+ 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].
+ </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.
+ </member>
+ <member name="editors/polygon_editor/point_grab_radius" type="int" setter="" getter="">
+ The radius in which points can be selected in the [Polygon2D] and [CollisionPolygon2D] editors (in pixels). Higher values make it easier to select points quickly, but can make it more difficult to select the expected point when several points are located close to each other.
+ </member>
+ <member name="editors/polygon_editor/show_previous_outline" type="bool" setter="" getter="">
+ If [code]true[/code], displays the polygon's previous shape in the 2D polygon editors with an opaque gray outline. This outline is displayed while dragging a point until the left mouse button is released.
+ </member>
+ <member name="editors/tiles_editor/display_grid" type="bool" setter="" getter="">
+ If [code]true[/code], displays a grid while the TileMap editor is active. See also [member editors/tiles_editor/grid_color].
+ </member>
+ <member name="editors/tiles_editor/grid_color" type="Color" setter="" getter="">
+ The color to use for the TileMap editor's grid.
+ [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.
+ </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.
+ </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.
+ </member>
+ <member name="filesystem/directories/autoscan_project_path" type="String" setter="" getter="">
+ The folder where projects should be scanned for (recursively), in a way similar to the project manager's [b]Scan[/b]button. This can be set to the same value as [member filesystem/directories/default_project_path] for convenience.
+ [b]Note:[/b] Setting this path to a folder with very large amounts of files/folders can slow down the project manager startup significantly. To keep the project manager quick to start up, it is recommended to set this value to a folder as "specific" as possible.
+ </member>
+ <member name="filesystem/directories/default_project_path" type="String" setter="" getter="">
+ The folder where new projects should be created by default when clicking the project manager's [b]New Project[/b] button. This can be set to the same value as [member filesystem/directories/autoscan_project_path] for convenience.
+ </member>
+ <member name="filesystem/file_dialog/display_mode" type="int" setter="" getter="">
+ The display mode to use in the editor's file dialogs.
+ - [b]Thumbnails[/b] takes more space, but displays dynamic resource thumbnails, making resources easier to preview without having to open them.
+ - [b]List[/b] is more compact but doesn't display dynamic resource thumbnails. Instead, it displays static icons based on the file extension.
+ </member>
+ <member name="filesystem/file_dialog/show_hidden_files" type="bool" setter="" getter="">
+ If [code]true[/code], display hidden files in the editor's file dialogs. Files that have names starting with [code].[/code] are considered hidden (e.g. [code].hidden_file[/code]).
+ </member>
+ <member name="filesystem/file_dialog/thumbnail_size" type="int" setter="" getter="">
+ The thumbnail size to use in the editor's file dialogs (in pixels). See also [member docks/filesystem/thumbnail_size].
+ </member>
+ <member name="filesystem/on_save/compress_binary_resources" type="bool" setter="" getter="">
+ If [code]true[/code], uses lossless compression for binary resources.
+ </member>
+ <member name="filesystem/on_save/safe_save_on_backup_then_rename" type="bool" setter="" getter="">
+ 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/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>
+ <member name="interface/editor/code_font" type="String" setter="" getter="">
+ The font to use for the script editor. Must be a resource of a [Font] type such as a [code].ttf[/code] or [code].otf[/code] font file.
+ </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 ([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 ([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 ([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]).
+ </member>
+ <member name="interface/editor/custom_display_scale" type="float" setter="" getter="">
+ The custom editor scale factor to use. This can be used for displays with very high DPI where a scale factor of 200% is not sufficient.
+ [b]Note:[/b] Only effective if [member interface/editor/display_scale] is set to [b]Custom[/b].
+ </member>
+ <member name="interface/editor/debug/enable_pseudolocalization" type="bool" setter="" getter="">
+ If [code]true[/code], lengthens the editor's localizable strings and replaces their characters with accented variants. This allows spotting non-localizable strings easily, while also ensuring the UI layout doesn't break when strings are made longer (as many languages require strings to be longer).
+ This is a debugging feature and should only be enabled when working on the editor itself.
+ </member>
+ <member name="interface/editor/display_scale" type="int" setter="" getter="">
+ The display scale factor to use for the editor interface. Higher values are more suited to hiDPI/Retina displays.
+ If set to [b]Auto[/b], the editor scale is automatically determined based on the screen resolution and reported display DPI. This heuristic is not always ideal, which means you can get better results by setting the editor scale manually.
+ If set to [b]Custom[/b], the scaling value in [member interface/editor/custom_display_scale] will be used.
+ </member>
+ <member name="interface/editor/editor_language" type="String" setter="" getter="">
+ 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>
+ <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:
+ - [b]None:[/b] Don't use font hinting when rasterizing the font. This results in a smooth font, but it can look blurry.
+ - [b]Light:[/b] Use hinting on the X axis only. This is a compromise between font sharpness and smoothness.
+ - [b]Normal:[/b] Use hinting on both X and Y axes. This results in a sharp font, but it doesn't look very smooth.
+ 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).
+ </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].
+ </member>
+ <member name="interface/editor/main_font" type="String" setter="" getter="">
+ The font to use for the editor interface. Must be a resource of a [Font] type such as a [code].ttf[/code] or [code].otf[/code] font file.
+ </member>
+ <member name="interface/editor/main_font_bold" type="String" setter="" getter="">
+ The font to use for bold text in the editor interface. Must be a resource of a [Font] type such as a [code].ttf[/code] or [code].otf[/code] font file.
+ </member>
+ <member name="interface/editor/main_font_size" type="int" setter="" getter="">
+ The size of the font in the editor interface.
+ </member>
+ <member name="interface/editor/mouse_extra_buttons_navigate_history" type="bool" setter="" getter="">
+ If [code]true[/code], the mouse's additional side buttons will be usable to navigate in the script editor's file history. Set this to [code]false[/code] if you're using the side buttons for other purposes (such as a push-to-talk button in a VoIP program).
+ </member>
+ <member name="interface/editor/save_each_scene_on_quit" type="bool" setter="" getter="">
+ If [code]true[/code], the editor will save all scenes when confirming the [b]Save[/b] action when quitting the editor or quitting to the project list. If [code]false[/code], the editor will ask to save each scene individually.
+ </member>
+ <member name="interface/editor/separate_distraction_mode" type="bool" setter="" getter="">
+ If [code]true[/code], the editor's Script tab will have a separate distraction mode setting from the 2D/3D/AssetLib tabs. If [code]false[/code], the distraction-free mode toggle is shared between all tabs.
+ </member>
+ <member name="interface/editor/show_internal_errors_in_toast_notifications" type="int" setter="" getter="">
+ If enabled, displays internal engine errors in toast notifications (toggleable by clicking the "bell" icon at the bottom of the editor). No matter the value of this setting, non-internal engine errors will always be visible in toast notifications.
+ The default [b]Auto[/b] value will only enable this if the editor was compiled with the [code]dev=yes[/code] option (the default is [code]dev=no[/code]).
+ </member>
+ <member name="interface/editor/single_window_mode" type="bool" setter="" getter="">
+ If [code]true[/code], embed modal windows such as docks inside the main editor window. When single-window mode is enabled, tooltips will also be embedded inside the main editor window, which means they can't be displayed outside of the editor window.
+ </member>
+ <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>
+ <member name="interface/inspector/show_low_level_opentype_features" type="bool" setter="" getter="">
+ If [code]true[/code], display OpenType features marked as [code]hidden[/code] by the font file in the [Font] editor.
+ </member>
+ <member name="interface/scene_tabs/display_close_button" type="int" setter="" getter="">
+ Controls when the Close (X) button is displayed on scene tabs at the top of the editor.
+ </member>
+ <member name="interface/scene_tabs/maximum_width" type="int" setter="" getter="">
+ The maximum width of each scene tab at the top editor (in pixels).
+ </member>
+ <member name="interface/scene_tabs/show_script_button" type="bool" setter="" getter="">
+ If [code]true[/code], show a button next to each scene tab that opens the scene's "dominant" script when clicked. The "dominant" script is the one that is at the highest level in the scene's hierarchy.
+ </member>
+ <member name="interface/scene_tabs/show_thumbnail_on_hover" type="bool" setter="" getter="">
+ If [code]true[/code], display an automatically-generated thumbnail when hovering scene tabs with the mouse. Scene thumbnails are generated when saving the scene.
+ </member>
+ <member name="interface/theme/accent_color" type="Color" setter="" getter="">
+ The color to use for "highlighted" user interface elements in the editor (pressed and hovered items).
+ </member>
+ <member name="interface/theme/additional_spacing" type="float" setter="" getter="">
+ The spacing to add for buttons and list items in the editor (in pixels). Increasing this value is useful to improve usability on touch screens, at the cost of reducing the amount of usable screen real estate.
+ </member>
+ <member name="interface/theme/base_color" type="Color" setter="" getter="">
+ The base color to use for user interface elements in the editor. Secondary colors (such as darker/lighter variants) are derived from this color.
+ </member>
+ <member name="interface/theme/border_size" type="int" setter="" getter="">
+ The border size to use for interface elements (in pixels).
+ </member>
+ <member name="interface/theme/contrast" type="float" setter="" getter="">
+ The contrast factor to use when deriving the editor theme's base color (see [member interface/theme/base_color]). When using a positive values, the derived colors will be [i]darker[/i] than the base color. This contrast factor can be set to a negative value, which will make the derived colors [i]brighter[/i] than the base color. Negative contrast rates often look better for light themes.
+ </member>
+ <member name="interface/theme/corner_radius" type="int" setter="" getter="">
+ The corner radius to use for interface elements (in pixels). [code]0[/code] is square.
+ </member>
+ <member name="interface/theme/custom_theme" type="String" setter="" getter="">
+ The custom theme resource to use for the editor. Must be a Godot theme resource in [code].tres[/code] or [code].res[/code] format.
+ </member>
+ <member name="interface/theme/icon_and_font_color" type="int" setter="" getter="">
+ The icon and font color scheme to use in the editor.
+ - [b]Auto[/b] determines the color scheme to use automatically based on [member interface/theme/base_color].
+ - [b]Dark[/b] makes fonts and icons light (suitable for dark themes).
+ - [b]Light[/b] makes fonts and icons dark (suitable for light themes). Icon colors are automatically converted by the editor following [url=https://github.com/godotengine/godot/blob/master/editor/editor_themes.cpp#L135]this set of rules[/url].
+ </member>
+ <member name="interface/theme/icon_saturation" type="float" setter="" getter="">
+ The saturation to use for editor icons. Higher values result in more vibrant colors.
+ [b]Note:[/b] The default editor icon saturation was increased by 30% in Godot 4.0 and later. To get Godot 3.x's icon saturation back, set [member interface/theme/icon_saturation] to [code]0.77[/code].
+ </member>
+ <member name="interface/theme/preset" type="String" setter="" getter="">
+ The editor theme preset to use.
+ </member>
+ <member name="interface/theme/relationship_line_opacity" type="float" setter="" getter="">
+ The opacity to use when drawing relationship lines in the editor's [Tree]-based GUIs (such as the Scene tree dock).
+ </member>
+ <member name="network/debug/remote_host" type="String" setter="" getter="">
+ The address to listen to when starting the remote debugger. This can be set to [code]0.0.0.0[/code] to allow external clients to connect to the remote debugger (instead of restricting the remote debugger to connections from [code]localhost[/code]).
+ </member>
+ <member name="network/debug/remote_port" type="int" setter="" getter="">
+ The port to listen to when starting the remote debugger. Godot will try to use port numbers above the configured number if the configured number is already taken by another application.
+ </member>
+ <member name="network/http_proxy/host" type="String" setter="" getter="">
+ The host 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/port].
+ [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/http_proxy/port" type="int" setter="" getter="">
+ 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>
+ <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.
+ </member>
+ <member name="run/auto_save/save_before_running" type="bool" setter="" getter="">
+ If [code]true[/code], saves all scenes and scripts automatically before running the project. Setting this to [code]false[/code] prevents the editor from saving if there are no changes which can speed up the project startup slightly, but it makes it possible to run a project that has unsaved changes. (Unsaved changes will not be visible in the running project.)
+ </member>
+ <member name="run/output/always_clear_output_on_play" type="bool" setter="" getter="">
+ If [code]true[/code], the editor will clear the Output panel when running the project.
+ </member>
+ <member name="run/output/always_close_output_on_stop" type="bool" setter="" getter="">
+ If [code]true[/code], the editor will collapse the Output panel when stopping the project.
+ </member>
+ <member name="run/output/always_open_output_on_play" type="bool" setter="" getter="">
+ If [code]true[/code], the editor will expand the Output panel when running the project.
+ </member>
+ <member name="run/output/font_size" type="int" setter="" getter="">
+ The size of the font in the [b]Output[/b] panel at the bottom of the editor. This setting does not impact the font size of the script editor (see [member interface/editor/code_font_size]).
+ </member>
+ <member name="run/window_placement/rect" type="int" setter="" getter="">
+ The window mode to use to display the project when starting the project from the editor.
+ </member>
+ <member name="run/window_placement/rect_custom_position" type="Vector2" setter="" getter="">
+ The custom position to use when starting the project from the editor (in pixels from the top-left corner). Only effective if [member run/window_placement/rect] is set to [b]Custom Position[/b].
+ </member>
+ <member name="run/window_placement/screen" type="int" setter="" getter="">
+ 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.
+ </member>
+ <member name="text_editor/appearance/caret/caret_blink_speed" 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="">
+ If [code]true[/code], highlights all occurrences of the currently selected text in the script editor. See also [member text_editor/theme/highlighting/word_highlighted_color].
+ </member>
+ <member name="text_editor/appearance/caret/highlight_current_line" type="bool" setter="" getter="">
+ If [code]true[/code], colors the background of the line the caret is currently on with [member text_editor/theme/highlighting/current_line_color].
+ </member>
+ <member name="text_editor/appearance/caret/type" type="int" setter="" getter="">
+ The shape of the caret to use in the script editor. [b]Line[/b] displays a vertical line to the left of the current character, whereas [b]Block[/b] displays a outline over the current character.
+ </member>
+ <member name="text_editor/appearance/guidelines/line_length_guideline_hard_column" type="int" setter="" getter="">
+ The column at which to display a subtle line as a line length guideline for scripts. This should generally be greater than [member text_editor/appearance/guidelines/line_length_guideline_soft_column].
+ </member>
+ <member name="text_editor/appearance/guidelines/line_length_guideline_soft_column" type="int" setter="" getter="">
+ The column at which to display a [i]very[/i] subtle line as a line length guideline for scripts. This should generally be lower than [member text_editor/appearance/guidelines/line_length_guideline_hard_column].
+ </member>
+ <member name="text_editor/appearance/guidelines/show_line_length_guidelines" type="bool" setter="" getter="">
+ 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.
+ </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.
+ </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.
+ </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.
+ </member>
+ <member name="text_editor/appearance/lines/word_wrap" type="int" setter="" getter="">
+ If [code]true[/code], wraps long lines over multiple lines to avoid horizontal scrolling. This is a display-only feature; it does not actually insert line breaks in your scripts.
+ </member>
+ <member name="text_editor/appearance/minimap/minimap_width" type="int" setter="" getter="">
+ The width of the minimap in the script editor (in pixels).
+ </member>
+ <member name="text_editor/appearance/minimap/show_minimap" type="bool" setter="" getter="">
+ If [code]true[/code], draws an overview of the script near the scroll bar. The minimap can be left-clicked to scroll directly to a location in an "absolute" manner.
+ </member>
+ <member name="text_editor/appearance/whitespace/draw_spaces" type="bool" setter="" getter="">
+ If [code]true[/code], draws space characters as centered points.
+ </member>
+ <member name="text_editor/appearance/whitespace/draw_tabs" type="bool" setter="" getter="">
+ 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 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.
+ </member>
+ <member name="text_editor/behavior/files/autosave_interval_secs" type="int" setter="" getter="">
+ If set to a value greater than [code]0[/code], automatically saves the current script following the specified interval (in seconds). This can be used to prevent data loss if the editor crashes.
+ </member>
+ <member name="text_editor/behavior/files/convert_indent_on_save" type="bool" setter="" getter="">
+ If [code]true[/code], converts indentation to match the script editor's indentation settings when saving a script. See also [member text_editor/behavior/indent/type].
+ </member>
+ <member name="text_editor/behavior/files/restore_scripts_on_load" type="bool" setter="" getter="">
+ If [code]true[/code], reopens scripts that were opened in the last session when the editor is reopened on a given project.
+ </member>
+ <member name="text_editor/behavior/files/trim_trailing_whitespace_on_save" type="bool" setter="" getter="">
+ If [code]true[/code], trims trailing whitespace when saving a script. Trailing whitespace refers to tab and space characters placed at the end of lines. Since these serve no practical purpose, they can and should be removed to make version control diffs less noisy.
+ </member>
+ <member name="text_editor/behavior/indent/auto_indent" type="bool" setter="" getter="">
+ If [code]true[/code], automatically indents code when pressing the [kbd]Enter[/kbd] key based on blocks above the new line.
+ </member>
+ <member name="text_editor/behavior/indent/size" type="int" setter="" getter="">
+ When using tab indentation, determines the length of each tab. When using space indentation, determines how many spaces are inserted when pressing [kbd]Tab[/kbd] and when automatic indentation is performed.
+ </member>
+ <member name="text_editor/behavior/indent/type" type="int" setter="" getter="">
+ The indentation style to use (tabs or spaces).
+ [b]Note:[/b] The [url=https://docs.godotengine.org/en/latest/getting_started/scripting/gdscript/gdscript_styleguide.html]GDScript style guide[/url] recommends using tabs for indentation. It is advised to change this setting only if you need to work on a project that currently uses spaces for indentation.
+ </member>
+ <member name="text_editor/behavior/navigation/drag_and_drop_selection" type="bool" setter="" getter="">
+ If [code]true[/code], allows drag-and-dropping text in the script editor to move text. Disable this if you find yourself accidentally drag-and-dropping text in the script editor.
+ </member>
+ <member name="text_editor/behavior/navigation/move_caret_on_right_click" type="bool" setter="" getter="">
+ If [code]true[/code], the caret will be moved when right-clicking somewhere in the script editor (like when left-clicking or middle-clicking). If [code]false[/code], the caret will only be moved when left-clicking or middle-clicking somewhere.
+ </member>
+ <member name="text_editor/behavior/navigation/scroll_past_end_of_file" type="bool" setter="" getter="">
+ If [code]true[/code], allows scrolling past the end of the file.
+ </member>
+ <member name="text_editor/behavior/navigation/smooth_scrolling" type="bool" setter="" getter="">
+ If [code]true[/code], allows scrolling in sub-line intervals and enables a smooth scrolling animation when using the mouse wheel to scroll.
+ [b]Note:[/b] [member text_editor/behavior/navigation/smooth_scrolling] currently behaves poorly in projects where [member ProjectSettings.physics/common/physics_ticks_per_second] has been increased significantly from its default value ([code]60[/code]). In this case, it is recommended to disable this setting.
+ </member>
+ <member name="text_editor/behavior/navigation/stay_in_script_editor_on_node_selected" type="bool" setter="" getter="">
+ If [code]true[/code], prevents automatically switching between the Script and 2D/3D screens when selecting a node in the Scene tree dock.
+ </member>
+ <member name="text_editor/behavior/navigation/v_scroll_speed" type="int" setter="" getter="">
+ The number of pixels to scroll with every mouse wheel increment. Higher values make the script scroll by faster when using the mouse wheel.
+ [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.
+ </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.
+ </member>
+ <member name="text_editor/completion/code_complete_delay" type="float" setter="" getter="">
+ The delay in seconds after which autocompletion suggestions should be displayed when the user stops typing.
+ </member>
+ <member name="text_editor/completion/complete_file_paths" type="bool" setter="" getter="">
+ If [code]true[/code], provides autocompletion suggestions for file paths in methods such as [code]load()[/code] and [code]preload()[/code].
+ </member>
+ <member name="text_editor/completion/idle_parse_delay" type="float" setter="" getter="">
+ The delay in seconds after which the script editor should check for errors when the user stops typing.
+ </member>
+ <member name="text_editor/completion/put_callhint_tooltip_below_current_line" type="bool" setter="" getter="">
+ If [code]true[/code], the code completion tooltip will appear below the current line unless there is no space on screen below the current line. If [code]false[/code], the code completion tooltip will appear above the current line.
+ </member>
+ <member name="text_editor/completion/use_single_quotes" type="bool" setter="" getter="">
+ If [code]true[/code], performs string autocompletion with single quotes. If [code]false[/code], performs string autocompletion with double quotes (which matches the [url=https://docs.godotengine.org/en/latest/tutorials/scripting/gdscript/gdscript_styleguide.html]GDScript style guide[/url]).
+ </member>
+ <member name="text_editor/help/class_reference_examples" type="int" setter="" getter="">
+ Controls which multi-line code blocks should be displayed in the editor help. This setting does not affect single-line code literals in the editor help.
+ </member>
+ <member name="text_editor/help/help_font_size" type="int" setter="" getter="">
+ The font size to use for the editor help (built-in class reference).
+ </member>
+ <member name="text_editor/help/help_source_font_size" type="int" setter="" getter="">
+ The font size to use for code samples in the editor help (built-in class reference).
+ </member>
+ <member name="text_editor/help/help_title_font_size" type="int" setter="" getter="">
+ The font size to use for headings in the editor help (built-in class reference).
+ </member>
+ <member name="text_editor/help/show_help_index" type="bool" setter="" getter="">
+ If [code]true[/code], displays a table of contents at the left of the editor help (at the location where the members overview would appear when editing a script).
+ </member>
+ <member name="text_editor/script_list/show_members_overview" type="bool" setter="" getter="">
+ If [code]true[/code], displays an overview of the current script's member variables and functions at the left of the script editor. See also [member text_editor/script_list/sort_members_outline_alphabetically].
+ </member>
+ <member name="text_editor/script_list/sort_members_outline_alphabetically" type="bool" setter="" getter="">
+ If [code]true[/code], sorts the members outline (located at the left of the script editor) using alphabetical order. If [code]false[/code], sorts the members outline depending on the order in which members are found in the script.
+ [b]Note:[/b] Only effective if [member text_editor/script_list/show_members_overview] is [code]true[/code].
+ </member>
+ <member name="text_editor/theme/color_theme" type="String" setter="" getter="">
+ The syntax theme to use in the script editor.
+ You can save your own syntax theme from your current settings by using [b]File &gt; Theme &gt; Save As...[/b] at the top of the script editor. The syntax theme will then be available locally in the list of color themes.
+ You can find additional syntax themes to install in the [url=https://github.com/godotengine/godot-syntax-themes]godot-syntax-themes[/url] repository.
+ </member>
+ <member name="text_editor/theme/highlighting/background_color" type="Color" setter="" getter="">
+ 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], ...).
+ </member>
+ <member name="text_editor/theme/highlighting/bookmark_color" type="Color" setter="" getter="">
+ The script editor's bookmark icon color (displayed in the gutter).
+ </member>
+ <member name="text_editor/theme/highlighting/brace_mismatch_color" type="Color" setter="" getter="">
+ The script editor's brace mismatch color. Used when the caret is currently on a mismatched brace, parenthesis or bracket character.
+ </member>
+ <member name="text_editor/theme/highlighting/breakpoint_color" type="Color" setter="" getter="">
+ The script editor's breakpoint icon color (displayed in the gutter).
+ </member>
+ <member name="text_editor/theme/highlighting/caret_background_color" type="Color" setter="" getter="">
+ The script editor's caret background color.
+ [b]Note:[/b] This setting has no effect as it's currently unused.
+ </member>
+ <member name="text_editor/theme/highlighting/caret_color" type="Color" setter="" getter="">
+ The script editor's caret color.
+ </member>
+ <member name="text_editor/theme/highlighting/code_folding_color" type="Color" setter="" getter="">
+ The script editor's color for the code folding icon (displayed in the gutter).
+ </member>
+ <member name="text_editor/theme/highlighting/comment_color" type="Color" setter="" getter="">
+ The script editor's comment color.
+ [b]Note:[/b] In GDScript, unlike Python, multiline strings are not considered to be comments, and will use the string highlighting color instead.
+ </member>
+ <member name="text_editor/theme/highlighting/completion_background_color" type="Color" setter="" getter="">
+ The script editor's autocompletion box background color.
+ </member>
+ <member name="text_editor/theme/highlighting/completion_existing_color" type="Color" setter="" getter="">
+ The script editor's autocompletion box background color to highlight existing characters in the completion results. This should be a translucent color so that [member text_editor/theme/highlighting/completion_selected_color] can be seen behind.
+ </member>
+ <member name="text_editor/theme/highlighting/completion_font_color" type="Color" setter="" getter="">
+ The script editor's autocompletion box text color.
+ </member>
+ <member name="text_editor/theme/highlighting/completion_scroll_color" type="Color" setter="" getter="">
+ The script editor's autocompletion box scroll bar color.
+ </member>
+ <member name="text_editor/theme/highlighting/completion_scroll_hovered_color" type="Color" setter="" getter="">
+ The script editor's autocompletion box scroll bar color when hovered or pressed with the mouse.
+ </member>
+ <member name="text_editor/theme/highlighting/completion_selected_color" type="Color" setter="" getter="">
+ The script editor's autocompletion box background color for the currently selected line.
+ </member>
+ <member name="text_editor/theme/highlighting/control_flow_keyword_color" type="Color" setter="" getter="">
+ The script editor's control flow keyword color (used for keywords like [code]if[/code], [code]for[/code], [code]return[/code], ...).
+ </member>
+ <member name="text_editor/theme/highlighting/current_line_color" type="Color" setter="" getter="">
+ The script editor's background color for the line the caret is currently on. 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/mark_color].
+ </member>
+ <member name="text_editor/theme/highlighting/engine_type_color" type="Color" setter="" getter="">
+ The script editor's engine type color ([Vector2], [Vector3], [Color], ...).
+ </member>
+ <member name="text_editor/theme/highlighting/executing_line_color" type="Color" setter="" getter="">
+ The script editor's color for the debugger's executing line icon (displayed in the gutter).
+ </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 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, ...).
+ </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.
+ </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].
+ </member>
+ <member name="text_editor/theme/highlighting/mark_color" type="Color" setter="" getter="">
+ The script editor's background color for lines with errors. 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/member_variable_color" type="Color" setter="" getter="">
+ The script editor's color for member variables on objects (e.g. [code]self.some_property[/code]).
+ [b]Note:[/b] This color is not used for local variable declaration and access.
+ </member>
+ <member name="text_editor/theme/highlighting/number_color" type="Color" setter="" getter="">
+ The script editor's color for numbers (integer and floating-point).
+ </member>
+ <member name="text_editor/theme/highlighting/safe_line_number_color" type="Color" setter="" getter="">
+ The script editor's color for type-safe line numbers. See also [member text_editor/theme/highlighting/line_number_color].
+ [b]Note:[/b] Only displayed if [member text_editor/appearance/gutters/highlight_type_safe_lines] is [code]true[/code].
+ </member>
+ <member name="text_editor/theme/highlighting/search_result_border_color" type="Color" setter="" getter="">
+ The script editor's color for the border of search results. This border helps bring further attention to the search result. Set this color's opacity to 0 to disable the border.
+ </member>
+ <member name="text_editor/theme/highlighting/search_result_color" type="Color" setter="" getter="">
+ The script editor's background color for search results.
+ </member>
+ <member name="text_editor/theme/highlighting/selection_color" type="Color" setter="" getter="">
+ The script editor's background color for the currently selected text.
+ </member>
+ <member name="text_editor/theme/highlighting/string_color" type="Color" setter="" getter="">
+ The script editor's color for strings (single-line and multi-line).
+ </member>
+ <member name="text_editor/theme/highlighting/symbol_color" type="Color" setter="" getter="">
+ The script editor's color for operators ([code]( ) [ ] { } + - * /[/code], ...).
+ </member>
+ <member name="text_editor/theme/highlighting/text_color" type="Color" setter="" getter="">
+ The script editor's color for text not highlighted by any syntax highlighting rule.
+ </member>
+ <member name="text_editor/theme/highlighting/text_selected_color" type="Color" setter="" getter="">
+ 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]).
+ </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].
+ </member>
+ </members>
<signals>
<signal name="settings_changed">
<description>
diff --git a/doc/classes/EditorSpinSlider.xml b/doc/classes/EditorSpinSlider.xml
index 96dea1edce..2ada211dab 100644
--- a/doc/classes/EditorSpinSlider.xml
+++ b/doc/classes/EditorSpinSlider.xml
@@ -11,6 +11,9 @@
<members>
<member name="flat" type="bool" setter="set_flat" getter="is_flat" default="false">
</member>
+ <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;">
</member>
<member name="read_only" type="bool" setter="set_read_only" getter="is_read_only" default="false">
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 84a671a93c..bbae06899c 100644
--- a/doc/classes/EditorTranslationParserPlugin.xml
+++ b/doc/classes/EditorTranslationParserPlugin.xml
@@ -111,9 +111,9 @@
</method>
<method name="_parse_file" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="path" type="String" />
- <argument index="1" name="msgids" type="Array" />
- <argument index="2" name="msgids_context_plural" type="Array" />
+ <param index="0" name="path" type="String" />
+ <param index="1" name="msgids" type="Array" />
+ <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..1350e4487c
--- /dev/null
+++ b/doc/classes/EditorUndoRedoManager.xml
@@ -0,0 +1,118 @@
+<?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>
+ <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 0215d81a4e..89ba79f7d9 100644
--- a/doc/classes/EditorVCSInterface.xml
+++ b/doc/classes/EditorVCSInterface.xml
@@ -11,14 +11,14 @@
<methods>
<method name="commit">
<return type="void" />
- <argument index="0" name="msg" type="String" />
+ <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.
</description>
</method>
<method name="get_file_diff">
- <return type="Array" />
- <argument index="0" name="file_path" type="String" />
+ <return type="Dictionary[]" />
+ <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:
@@ -56,7 +56,7 @@
</method>
<method name="initialize">
<return type="bool" />
- <argument index="0" name="project_root_path" type="String" />
+ <param index="0" name="project_root_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].
</description>
@@ -81,14 +81,14 @@
</method>
<method name="stage_file">
<return type="void" />
- <argument index="0" name="file_path" type="String" />
+ <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.
</description>
</method>
<method name="unstage_file">
<return type="void" />
- <argument index="0" name="file_path" type="String" />
+ <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.
</description>
diff --git a/doc/classes/Engine.xml b/doc/classes/Engine.xml
index 506992e3af..301a3e55fb 100644
--- a/doc/classes/Engine.xml
+++ b/doc/classes/Engine.xml
@@ -9,6 +9,20 @@
<tutorials>
</tutorials>
<methods>
+ <method name="get_architecture_name" qualifiers="const">
+ <return type="String" />
+ <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]
+ if "64" in Engine.get_architecture_name():
+ print("Running on 64-bit CPU.")
+ else:
+ print("Running on 32-bit CPU.")
+ [/codeblock]
+ [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>
<method name="get_author_info" qualifiers="const">
<return type="Dictionary" />
<description>
@@ -20,7 +34,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
@@ -96,7 +110,7 @@
</method>
<method name="get_script_language" qualifiers="const">
<return type="ScriptLanguage" />
- <argument index="0" name="index" type="int" />
+ <param index="0" name="index" type="int" />
<description>
</description>
</method>
@@ -107,9 +121,9 @@
</method>
<method name="get_singleton" qualifiers="const">
<return type="Object" />
- <argument index="0" name="name" type="StringName" />
+ <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">
@@ -151,11 +165,17 @@
[/codeblocks]
</description>
</method>
+ <method name="get_write_movie_path" qualifiers="const">
+ <return type="String" />
+ <description>
+ Returns the path to the [MovieWriter]'s output file, or an empty string if the engine wasn't started in Movie Maker mode. This path can be absolute or relative depending on how the user specified it.
+ </description>
+ </method>
<method name="has_singleton" qualifiers="const">
<return type="bool" />
- <argument index="0" name="name" type="StringName" />
+ <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">
@@ -180,20 +200,20 @@
</method>
<method name="register_script_language">
<return type="void" />
- <argument index="0" name="language" type="ScriptLanguage" />
+ <param index="0" name="language" type="ScriptLanguage" />
<description>
</description>
</method>
<method name="register_singleton">
<return type="void" />
- <argument index="0" name="name" type="StringName" />
- <argument index="1" name="instance" type="Object" />
+ <param index="0" name="name" type="StringName" />
+ <param index="1" name="instance" type="Object" />
<description>
</description>
</method>
<method name="unregister_singleton">
<return type="void" />
- <argument index="0" name="name" type="StringName" />
+ <param index="0" name="name" type="StringName" />
<description>
</description>
</method>
diff --git a/doc/classes/EngineDebugger.xml b/doc/classes/EngineDebugger.xml
index cd502dce81..176bc1f135 100644
--- a/doc/classes/EngineDebugger.xml
+++ b/doc/classes/EngineDebugger.xml
@@ -11,14 +11,14 @@
<methods>
<method name="has_capture">
<return type="bool" />
- <argument index="0" name="name" type="StringName" />
+ <param index="0" name="name" type="StringName" />
<description>
Returns [code]true[/code] if a capture with the given name is present otherwise [code]false[/code].
</description>
</method>
<method name="has_profiler">
<return type="bool" />
- <argument index="0" name="name" type="StringName" />
+ <param index="0" name="name" type="StringName" />
<description>
Returns [code]true[/code] if a profiler with the given name is present otherwise [code]false[/code].
</description>
@@ -31,65 +31,65 @@
</method>
<method name="is_profiling">
<return type="bool" />
- <argument index="0" name="name" type="StringName" />
+ <param index="0" name="name" type="StringName" />
<description>
Returns [code]true[/code] if a profiler with the given name is present and active otherwise [code]false[/code].
</description>
</method>
<method name="profiler_add_frame_data">
<return type="void" />
- <argument index="0" name="name" type="StringName" />
- <argument index="1" name="data" type="Array" />
+ <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">
<return type="void" />
- <argument index="0" name="name" type="StringName" />
- <argument index="1" name="enable" type="bool" />
- <argument index="2" name="arguments" type="Array" default="[]" />
+ <param index="0" name="name" type="StringName" />
+ <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">
<return type="void" />
- <argument index="0" name="name" type="StringName" />
- <argument index="1" name="callable" type="Callable" />
+ <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>
<method name="register_profiler">
<return type="void" />
- <argument index="0" name="name" type="StringName" />
- <argument index="1" name="profiler" type="EngineProfiler" />
+ <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">
<return type="void" />
- <argument index="0" name="message" type="String" />
- <argument index="1" name="data" type="Array" />
+ <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" />
- <argument index="0" name="name" type="StringName" />
+ <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" />
- <argument index="0" name="name" type="StringName" />
+ <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 45eb926108..a7a66c4564 100644
--- a/doc/classes/EngineProfiler.xml
+++ b/doc/classes/EngineProfiler.xml
@@ -12,27 +12,27 @@
<methods>
<method name="_add_frame" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="data" type="Array" />
+ <param index="0" name="data" type="Array" />
<description>
Called when data is added to profiler using [method EngineDebugger.profiler_add_frame_data].
</description>
</method>
<method name="_tick" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="frame_time" type="float" />
- <argument index="1" name="idle_time" type="float" />
- <argument index="2" name="physics_time" type="float" />
- <argument index="3" name="physics_frame_time" type="float" />
+ <param index="0" name="frame_time" type="float" />
+ <param index="1" name="process_time" type="float" />
+ <param index="2" name="physics_time" type="float" />
+ <param index="3" name="physics_frame_time" type="float" />
<description>
- Called once every engine iteration when the profiler is active with information about the current frame.
+ Called once every engine iteration when the profiler is active with information about the current frame. All time values are in seconds. Lower values represent faster processing times and are therefore considered better.
</description>
</method>
<method name="_toggle" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="enable" type="bool" />
- <argument index="1" name="options" type="Array" />
+ <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 e5e7efd315..864dbd423a 100644
--- a/doc/classes/Environment.xml
+++ b/doc/classes/Environment.xml
@@ -20,17 +20,17 @@
<methods>
<method name="get_glow_level" qualifiers="const">
<return type="float" />
- <argument index="0" name="idx" type="int" />
+ <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">
<return type="void" />
- <argument index="0" name="idx" type="int" />
- <argument index="1" name="intensity" type="float" />
+ <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>
@@ -51,16 +51,17 @@
The global color saturation value of the rendered scene (default value is 1). Effective only if [code]adjustment_enabled[/code] is [code]true[/code].
</member>
<member name="ambient_light_color" type="Color" setter="set_ambient_light_color" getter="get_ambient_light_color" default="Color(0, 0, 0, 1)">
- The ambient light's [Color].
+ The ambient light's [Color]. Only effective if [member ambient_light_sky_contribution] is lower than [code]1.0[/code] (exclusive).
</member>
<member name="ambient_light_energy" type="float" setter="set_ambient_light_energy" getter="get_ambient_light_energy" default="1.0">
- The ambient light's energy. The higher the value, the stronger the light.
+ The ambient light's energy. The higher the value, the stronger the light. Only effective if [member ambient_light_sky_contribution] is lower than [code]1.0[/code] (exclusive).
</member>
<member name="ambient_light_sky_contribution" type="float" setter="set_ambient_light_sky_contribution" getter="get_ambient_light_sky_contribution" default="1.0">
Defines the amount of light that the sky brings on the scene. A value of [code]0.0[/code] means that the sky's light emission has no effect on the scene illumination, thus all ambient illumination is provided by the ambient light. On the contrary, a value of [code]1.0[/code] means that [i]all[/i] the light that affects the scene is provided by the sky, thus the ambient light parameter has no effect on the scene.
[b]Note:[/b] [member ambient_light_sky_contribution] is internally clamped between [code]0.0[/code] and [code]1.0[/code] (inclusive).
</member>
<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.
@@ -96,7 +97,8 @@
Blend factor between the fog's color and the color of the background [Sky]. 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.001">
+ <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.
</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.
@@ -107,11 +109,14 @@
<member name="fog_height_density" type="float" setter="set_fog_height_density" getter="get_fog_height_density" default="0.0">
The density used to increase fog as height decreases. To make fog increase as height increases, use a negative value.
</member>
- <member name="fog_light_color" type="Color" setter="set_fog_light_color" getter="get_fog_light_color" default="Color(0.5, 0.6, 0.7, 1)">
+ <member name="fog_light_color" type="Color" setter="set_fog_light_color" getter="get_fog_light_color" default="Color(0.518, 0.553, 0.608, 1)">
+ The fog's color.
</member>
<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_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>
<member name="glow_blend_mode" type="int" setter="set_glow_blend_mode" getter="get_glow_blend_mode" enum="Environment.GlowBlendMode" default="2">
The glow blending mode.
@@ -132,7 +137,7 @@
The lower threshold of the HDR glow. When using the OpenGL renderer (which doesn't support HDR), this needs to be below [code]1.0[/code] for glow to be visible. A value of [code]0.9[/code] works well in this case.
</member>
<member name="glow_intensity" type="float" setter="set_glow_intensity" getter="get_glow_intensity" default="0.8">
- The overall brightness multiplier of the glow effect. When using the OpenGL renderer, this should be increased to 1.5 to compensate for the lack of HDR rendering.
+ The overall brightness multiplier of the glow effect. When using the OpenGL renderer, this should be increased to [code]1.5[/code] to compensate for the lack of HDR rendering.
</member>
<member name="glow_levels/1" type="float" setter="set_glow_level" getter="get_glow_level" default="0.0">
The intensity of the 1st level of glow. This is the most "local" level (least blurry).
@@ -163,6 +168,7 @@
How strong of an impact the [member glow_map] should have on the overall glow effect. A strength of [code]0.0[/code] means the glow map has no effect on the overall glow effect. A strength of [code]1.0[/code] means the glow has a full effect on the overall glow effect (and can turn off glow entirely in specific areas of the screen if the glow map has black areas).
</member>
<member name="glow_mix" type="float" setter="set_glow_mix" getter="get_glow_mix" default="0.05">
+ When using the [constant GLOW_BLEND_MODE_MIX] [member glow_blend_mode], this controls how much the source image is blended with the glow layer. A value of [code]0.0[/code] makes the glow rendering invisible, while a value of [code]1.0[/code] is equivalent to [constant GLOW_BLEND_MODE_REPLACE].
</member>
<member name="glow_normalized" type="bool" setter="set_glow_normalized" getter="is_glow_normalized" default="false">
If [code]true[/code], glow levels will be normalized so that summed together their intensities equal [code]1.0[/code].
@@ -171,10 +177,15 @@
The strength of the glow effect. This applies as the glow is blurred across the screen and increases the distance and intensity of the blur. When using the OpenGL renderer, this should be increased to 1.3 to compensate for the lack of HDR rendering.
</member>
<member name="reflected_light_source" type="int" setter="set_reflection_source" getter="get_reflection_source" enum="Environment.ReflectionSource" default="0">
+ The reflected (specular) light source.
</member>
<member name="sdfgi_bounce_feedback" type="float" setter="set_sdfgi_bounce_feedback" getter="get_sdfgi_bounce_feedback" default="0.5">
+ The energy multiplier applied to light every time it bounces from a surface when using SDFGI. Values greater than [code]0.0[/code] will simulate multiple bounces, resulting in a more realistic appearance. Increasing [member sdfgi_bounce_feedback] generally has no performance impact. See also [member sdfgi_energy].
+ [b]Note:[/b] Values greater than [code]0.5[/code] can cause infinite feedback loops and should be avoided in scenes with bright materials.
+ [b]Note:[/b] If [member sdfgi_bounce_feedback] is [code]0.0[/code], indirect lighting will not be represented in reflections as light will only bounce one time.
</member>
<member name="sdfgi_cascade0_distance" type="float" setter="set_sdfgi_cascade0_distance" getter="get_sdfgi_cascade0_distance" default="12.8">
+ [b]Note:[/b] This property is linked to [member sdfgi_min_cell_size] and [member sdfgi_max_distance]. Changing its value will automatically change those properties as well.
</member>
<member name="sdfgi_cascades" type="int" setter="set_sdfgi_cascades" getter="get_sdfgi_cascades" default="4">
The number of cascades to use for SDFGI (between 1 and 8). A higher number of cascades allows displaying SDFGI further away while preserving detail up close, at the cost of performance. When using SDFGI on small-scale levels, [member sdfgi_cascades] can often be decreased between [code]1[/code] and [code]4[/code] to improve performance.
@@ -185,27 +196,39 @@
[b]Note:[/b] Meshes should have sufficiently thick walls to avoid light leaks (avoid one-sided walls). For interior levels, enclose your level geometry in a sufficiently large box and bridge the loops to close the mesh.
</member>
<member name="sdfgi_energy" type="float" setter="set_sdfgi_energy" getter="get_sdfgi_energy" default="1.0">
+ The energy multiplier to use for SDFGI. Higher values will result in brighter indirect lighting and reflections. See also [member sdfgi_bounce_feedback].
</member>
<member name="sdfgi_max_distance" type="float" setter="set_sdfgi_max_distance" getter="get_sdfgi_max_distance" default="204.8">
+ The maximum distance at which SDFGI is visible. Beyond this distance, environment lighting or other sources of GI such as [ReflectionProbe] will be used as a fallback.
+ [b]Note:[/b] This property is linked to [member sdfgi_min_cell_size] and [member sdfgi_cascade0_distance]. Changing its value will automatically change those properties as well.
</member>
<member name="sdfgi_min_cell_size" type="float" setter="set_sdfgi_min_cell_size" getter="get_sdfgi_min_cell_size" default="0.2">
+ The cell size to use for the closest SDFGI cascade (in 3D units). Lower values allow SDFGI to be more precise up close, at the cost of making SDFGI updates more demanding. This can cause stuttering when the camera moves fast. Higher values allow SDFGI to cover more ground, while also reducing the performance impact of SDFGI updates.
+ [b]Note:[/b] This property is linked to [member sdfgi_max_distance] and [member sdfgi_cascade0_distance]. Changing its value will automatically change those properties as well.
</member>
<member name="sdfgi_normal_bias" type="float" setter="set_sdfgi_normal_bias" getter="get_sdfgi_normal_bias" default="1.1">
+ The normal bias to use for SDFGI probes. Increasing this value can reduce visible streaking artifacts on sloped surfaces, at the cost of increased light leaking.
</member>
<member name="sdfgi_probe_bias" type="float" setter="set_sdfgi_probe_bias" getter="get_sdfgi_probe_bias" default="1.1">
+ The constant bias to use for SDFGI probes. Increasing this value can reduce visible streaking artifacts on sloped surfaces, at the cost of increased light leaking.
</member>
<member name="sdfgi_read_sky_light" type="bool" setter="set_sdfgi_read_sky_light" getter="is_sdfgi_reading_sky_light" default="true">
+ If [code]true[/code], SDFGI takes the environment lighting into account. This should be set to [code]false[/code] for interior scenes.
</member>
<member name="sdfgi_use_occlusion" type="bool" setter="set_sdfgi_use_occlusion" getter="is_sdfgi_using_occlusion" default="false">
+ If [code]true[/code], SDFGI uses an occlusion detection approach to reduce light leaking. Occlusion may however introduce dark blotches in certain spots, which may be undesired in mostly outdoor scenes. [member sdfgi_use_occlusion] has a performance impact and should only be enabled when needed.
</member>
<member name="sdfgi_y_scale" type="int" setter="set_sdfgi_y_scale" getter="get_sdfgi_y_scale" enum="Environment.SDFGIYScale" default="1">
+ The Y scale to use for SDFGI cells. Lower values will result in SDFGI cells being packed together more closely on the Y axis. This is used to balance between quality and covering a lot of vertical ground. [member sdfgi_y_scale] should be set depending on how vertical your scene is (and how fast your camera may move on the Y axis).
</member>
<member name="sky" type="Sky" setter="set_sky" getter="get_sky">
The [Sky] resource used for this [Environment].
</member>
<member name="sky_custom_fov" type="float" setter="set_sky_custom_fov" getter="get_sky_custom_fov" default="0.0">
+ If set to a value greater than [code]0.0[/code], overrides the field of view to use for sky rendering. If set to [code]0.0[/code], the same FOV as the current [Camera3D] is used for sky rendering.
</member>
<member name="sky_rotation" type="Vector3" setter="set_sky_rotation" getter="get_sky_rotation" default="Vector3(0, 0, 0)">
+ The rotation to use for sky rendering.
</member>
<member name="ssao_ao_channel_affect" type="float" setter="set_ssao_ao_channel_affect" getter="get_ssao_ao_channel_affect" default="0.0">
The screen-space ambient occlusion intensity on materials that have an AO texture defined. Values higher than [code]0[/code] will make the SSAO effect visible in areas darkened by AO textures.
@@ -265,13 +288,13 @@
The maximum number of steps for screen-space reflections. Higher values are slower.
</member>
<member name="tonemap_exposure" type="float" setter="set_tonemap_exposure" getter="get_tonemap_exposure" default="1.0">
- The default exposure used for tonemapping.
+ The default exposure used for tonemapping. Higher values result in a brighter image. See also [member tonemap_white].
</member>
<member name="tonemap_mode" type="int" setter="set_tonemapper" getter="get_tonemapper" enum="Environment.ToneMapper" default="0">
The tonemapping mode to use. Tonemapping is the process that "converts" HDR values to be suitable for rendering on a LDR display. (Godot doesn't support rendering on HDR displays yet.)
</member>
<member name="tonemap_white" type="float" setter="set_tonemap_white" getter="get_tonemap_white" default="1.0">
- The white reference value for tonemapping. Only effective if the [member tonemap_mode] isn't set to [constant TONE_MAPPER_LINEAR].
+ The white reference value for tonemapping (also called "whitepoint"). Higher values can make highlights look less blown out, and will also slightly darken the whole scene as a result. Only effective if the [member tonemap_mode] isn't set to [constant TONE_MAPPER_LINEAR]. See also [member tonemap_exposure].
</member>
<member name="volumetric_fog_albedo" type="Color" setter="set_volumetric_fog_albedo" getter="get_volumetric_fog_albedo" default="Color(1, 1, 1, 1)">
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.
@@ -297,8 +320,9 @@
<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.
</member>
- <member name="volumetric_fog_gi_inject" type="float" setter="set_volumetric_fog_gi_inject" getter="get_volumetric_fog_gi_inject" default="0.0">
- Scales the strength of Global Illumination used in the volumetric fog. A value of [code]0[/code] means that Global Illumination will not impact the volumetric fog.
+ <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.
+ [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.
@@ -336,10 +360,10 @@
Gather ambient light from whichever source is specified as the background.
</constant>
<constant name="AMBIENT_SOURCE_DISABLED" value="1" enum="AmbientSource">
- Disable ambient light.
+ Disable ambient light. This provides a slight performance boost over [constant AMBIENT_SOURCE_SKY].
</constant>
<constant name="AMBIENT_SOURCE_COLOR" value="2" enum="AmbientSource">
- Specify a specific [Color] for ambient light.
+ Specify a specific [Color] for ambient light. This provides a slight performance boost over [constant AMBIENT_SOURCE_SKY].
</constant>
<constant name="AMBIENT_SOURCE_SKY" value="3" enum="AmbientSource">
Gather ambient light from the [Sky] regardless of what the background is.
@@ -348,22 +372,23 @@
Use the background for reflections.
</constant>
<constant name="REFLECTION_SOURCE_DISABLED" value="1" enum="ReflectionSource">
- Disable reflections.
+ Disable reflections. This provides a slight performance boost over other options.
</constant>
<constant name="REFLECTION_SOURCE_SKY" value="2" enum="ReflectionSource">
Use the [Sky] for reflections regardless of what the background is.
</constant>
<constant name="TONE_MAPPER_LINEAR" value="0" enum="ToneMapper">
- Linear tonemapper operator. Reads the linear data and passes it on unmodified.
+ Linear tonemapper operator. Reads the linear data and passes it on unmodified. This can cause bright lighting to look blown out, with noticeable clipping in the output colors.
</constant>
<constant name="TONE_MAPPER_REINHARDT" value="1" enum="ToneMapper">
- Reinhardt tonemapper operator. Performs a variation on rendered pixels' colors by this formula: [code]color = color / (1 + color)[/code].
+ Reinhardt tonemapper operator. Performs a variation on rendered pixels' colors by this formula: [code]color = color / (1 + color)[/code]. This avoids clipping bright highlights, but the resulting image can look a bit dull.
</constant>
<constant name="TONE_MAPPER_FILMIC" value="2" enum="ToneMapper">
- Filmic tonemapper operator.
+ Filmic tonemapper operator. This avoids clipping bright highlights, with a resulting image that usually looks more vivid than [constant TONE_MAPPER_REINHARDT].
</constant>
<constant name="TONE_MAPPER_ACES" value="3" enum="ToneMapper">
- Academy Color Encoding System tonemapper operator.
+ Use the Academy Color Encoding System tonemapper. ACES is slightly more expensive than other options, but it handles bright lighting in a more realistic fashion by desaturating it as it becomes brighter. ACES typically has a more contrasted output compared to [constant TONE_MAPPER_REINHARDT] and [constant TONE_MAPPER_FILMIC].
+ [b]Note:[/b] This tonemapping operator is called "ACES Fitted" in Godot 3.x.
</constant>
<constant name="GLOW_BLEND_MODE_ADDITIVE" value="0" enum="GlowBlendMode">
Additive glow blending mode. Mostly used for particles, glows (bloom), lens flare, bright sources.
@@ -381,10 +406,13 @@
Mixes the glow with the underlying color to avoid increasing brightness as much while still maintaining a glow effect.
</constant>
<constant name="SDFGI_Y_SCALE_50_PERCENT" value="0" enum="SDFGIYScale">
+ Use 50% scale for SDFGI on the Y (vertical) axis. SDFGI cells will be twice as short as they are wide. This allows providing increased GI detail and reduced light leaking with thin floors and ceilings. This is usually the best choice for scenes that don't feature much verticality.
</constant>
<constant name="SDFGI_Y_SCALE_75_PERCENT" value="1" enum="SDFGIYScale">
+ Use 75% scale for SDFGI on the Y (vertical) axis. This is a balance between the 50% and 100% SDFGI Y scales.
</constant>
<constant name="SDFGI_Y_SCALE_100_PERCENT" value="2" enum="SDFGIYScale">
+ Use 100% scale for SDFGI on the Y (vertical) axis. SDFGI cells will be as tall as they are wide. This is usually the best choice for highly vertical scenes. The downside is that light leaking may become more noticeable with thin floors and ceilings.
</constant>
</constants>
</class>
diff --git a/doc/classes/Expression.xml b/doc/classes/Expression.xml
index b37de09e04..3a397f56a9 100644
--- a/doc/classes/Expression.xml
+++ b/doc/classes/Expression.xml
@@ -53,9 +53,10 @@
<methods>
<method name="execute">
<return type="Variant" />
- <argument index="0" name="inputs" type="Array" default="[]" />
- <argument index="1" name="base_instance" type="Object" default="null" />
- <argument index="2" name="show_error" type="bool" default="true" />
+ <param index="0" name="inputs" type="Array" default="[]" />
+ <param index="1" name="base_instance" type="Object" default="null" />
+ <param index="2" name="show_error" type="bool" default="true" />
+ <param index="3" name="const_calls_only" type="bool" default="false" />
<description>
Executes the expression that was previously parsed by [method parse] and returns the result. Before you use the returned object, you should check if the method failed by calling [method has_execute_failed].
If you defined input variables in [method parse], you can specify their values in the inputs array, in the same order.
@@ -75,11 +76,11 @@
</method>
<method name="parse">
<return type="int" enum="Error" />
- <argument index="0" name="expression" type="String" />
- <argument index="1" name="input_names" type="PackedStringArray" default="PackedStringArray()" />
+ <param index="0" name="expression" type="String" />
+ <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/File.xml
index 0b4a8fa46e..76c6a4871c 100644
--- a/doc/classes/File.xml
+++ b/doc/classes/File.xml
@@ -76,7 +76,7 @@
</method>
<method name="file_exists" qualifiers="static">
<return type="bool" />
- <argument index="0" name="path" type="String" />
+ <param index="0" name="path" type="String" />
<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.
@@ -115,23 +115,24 @@
</method>
<method name="get_as_text" qualifiers="const">
<return type="String" />
+ <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.
+ Returns the whole file as a [String]. Text is interpreted as being UTF-8 encoded.
+ 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" />
- <argument index="0" name="length" type="int" />
+ <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" />
- <argument index="0" name="delim" type="String" default="&quot;,&quot;" />
+ <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]
@@ -175,16 +176,16 @@
</method>
<method name="get_md5" qualifiers="const">
<return type="String" />
- <argument index="0" name="path" 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">
<return type="int" />
- <argument index="0" name="file" type="String" />
+ <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_pascal_string">
@@ -220,16 +221,16 @@
</method>
<method name="get_sha256" qualifiers="const">
<return type="String" />
- <argument index="0" name="path" type="String" />
+ <param index="0" name="path" type="String" />
<description>
Returns a SHA-256 [String] representing the file at the given path or an empty [String] on failure.
</description>
</method>
<method name="get_var" qualifiers="const">
<return type="Variant" />
- <argument index="0" name="allow_objects" type="bool" default="false" />
+ <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>
@@ -241,17 +242,17 @@
</method>
<method name="open">
<return type="int" enum="Error" />
- <argument index="0" name="path" type="String" />
- <argument index="1" name="flags" type="int" enum="File.ModeFlags" />
+ <param index="0" name="path" type="String" />
+ <param index="1" name="flags" type="int" enum="File.ModeFlags" />
<description>
Opens the file for writing or reading, depending on the flags.
</description>
</method>
<method name="open_compressed">
<return type="int" enum="Error" />
- <argument index="0" name="path" type="String" />
- <argument index="1" name="mode_flags" type="int" enum="File.ModeFlags" />
- <argument index="2" name="compression_mode" type="int" enum="File.CompressionMode" default="0" />
+ <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" />
<description>
Opens a compressed file for reading or writing.
[b]Note:[/b] [method open_compressed] can only read files that were saved by Godot, not third-party compression formats. See [url=https://github.com/godotengine/godot/issues/28999]GitHub issue #28999[/url] for a workaround.
@@ -259,9 +260,9 @@
</method>
<method name="open_encrypted">
<return type="int" enum="Error" />
- <argument index="0" name="path" type="String" />
- <argument index="1" name="mode_flags" type="int" enum="File.ModeFlags" />
- <argument index="2" name="key" type="PackedByteArray" />
+ <param index="0" name="path" type="String" />
+ <param index="1" name="mode_flags" type="int" enum="File.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.
[b]Note:[/b] The provided key must be 32 bytes long.
@@ -269,23 +270,23 @@
</method>
<method name="open_encrypted_with_pass">
<return type="int" enum="Error" />
- <argument index="0" name="path" type="String" />
- <argument index="1" name="mode_flags" type="int" enum="File.ModeFlags" />
- <argument index="2" name="pass" type="String" />
+ <param index="0" name="path" type="String" />
+ <param index="1" name="mode_flags" type="int" enum="File.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.
</description>
</method>
<method name="seek">
<return type="void" />
- <argument index="0" name="position" type="int" />
+ <param index="0" name="position" type="int" />
<description>
Changes the file reading/writing cursor to the specified position (in bytes from the beginning of the file).
</description>
</method>
<method name="seek_end">
<return type="void" />
- <argument index="0" name="position" type="int" default="0" />
+ <param index="0" name="position" type="int" default="0" />
<description>
Changes the file reading/writing cursor to the specified position (in bytes from the end of the file).
[b]Note:[/b] This is an offset, so you should use negative numbers or the cursor will be at the end of the file.
@@ -293,10 +294,10 @@
</method>
<method name="store_16">
<return type="void" />
- <argument index="0" name="value" type="int" />
+ <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]
@@ -336,70 +337,70 @@
</method>
<method name="store_32">
<return type="void" />
- <argument index="0" name="value" type="int" />
+ <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>
<method name="store_64">
<return type="void" />
- <argument index="0" name="value" type="int" />
+ <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">
<return type="void" />
- <argument index="0" name="value" type="int" />
+ <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>
<method name="store_buffer">
<return type="void" />
- <argument index="0" name="buffer" type="PackedByteArray" />
+ <param index="0" name="buffer" type="PackedByteArray" />
<description>
Stores the given array of bytes in the file.
</description>
</method>
<method name="store_csv_line">
<return type="void" />
- <argument index="0" name="values" type="PackedStringArray" />
- <argument index="1" name="delim" type="String" default="&quot;,&quot;" />
+ <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>
<method name="store_double">
<return type="void" />
- <argument index="0" name="value" type="float" />
+ <param index="0" name="value" type="float" />
<description>
Stores a floating-point number as 64 bits in the file.
</description>
</method>
<method name="store_float">
<return type="void" />
- <argument index="0" name="value" type="float" />
+ <param index="0" name="value" type="float" />
<description>
Stores a floating-point number as 32 bits in the file.
</description>
</method>
<method name="store_line">
<return type="void" />
- <argument index="0" name="line" type="String" />
+ <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">
<return type="void" />
- <argument index="0" name="string" type="String" />
+ <param index="0" name="string" type="String" />
<description>
Stores the given [String] as a line in the file in Pascal format (i.e. also store the length of the string).
Text will be encoded as UTF-8.
@@ -407,25 +408,25 @@
</method>
<method name="store_real">
<return type="void" />
- <argument index="0" name="value" type="float" />
+ <param index="0" name="value" type="float" />
<description>
Stores a floating-point number in the file.
</description>
</method>
<method name="store_string">
<return type="void" />
- <argument index="0" name="string" type="String" />
+ <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>
<method name="store_var">
<return type="void" />
- <argument index="0" name="value" type="Variant" />
- <argument index="1" name="full_objects" type="bool" default="false" />
+ <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>
diff --git a/doc/classes/FileDialog.xml b/doc/classes/FileDialog.xml
index db536a738a..ba6f4ffb89 100644
--- a/doc/classes/FileDialog.xml
+++ b/doc/classes/FileDialog.xml
@@ -11,11 +11,12 @@
<methods>
<method name="add_filter">
<return type="void" />
- <argument index="0" name="filter" type="String" />
+ <param index="0" name="filter" type="String" />
+ <param index="1" name="description" type="String" default="&quot;&quot;" />
<description>
- Adds [code]filter[/code] to the list of filters, which restricts what files can be picked.
- A [code]filter[/code] should be of the form [code]"filename.extension ; Description"[/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.
- Example filters: [code]"*.png ; PNG Images"[/code], [code]"project.godot ; Godot Project"[/code].
+ 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">
@@ -75,6 +76,9 @@
<member name="mode_overrides_title" type="bool" setter="set_mode_overrides_title" getter="is_mode_overriding_title" default="true">
If [code]true[/code], changing the [code]Mode[/code] property will set the window title accordingly (e.g. setting mode to [constant FILE_MODE_OPEN_FILE] will change the window title to "Open a File").
</member>
+ <member name="root_subfolder" type="String" setter="set_root_subfolder" getter="get_root_subfolder" default="&quot;&quot;">
+ If non-empty, the given sub-folder will be "root" of this [FileDialog], i.e. user won't be able to go to its parent directory.
+ </member>
<member name="show_hidden_files" type="bool" setter="set_show_hidden_files" getter="is_showing_hidden_files" default="false">
If [code]true[/code], the dialog will show hidden files.
</member>
@@ -82,19 +86,19 @@
</members>
<signals>
<signal name="dir_selected">
- <argument index="0" name="dir" type="String" />
+ <param index="0" name="dir" type="String" />
<description>
Emitted when the user selects a directory.
</description>
</signal>
<signal name="file_selected">
- <argument index="0" name="path" type="String" />
+ <param index="0" name="path" type="String" />
<description>
Emitted when the user selects a file by double-clicking it or pressing the [b]OK[/b] button.
</description>
</signal>
<signal name="files_selected">
- <argument index="0" name="paths" type="PackedStringArray" />
+ <param index="0" name="paths" type="PackedStringArray" />
<description>
Emitted when the user selects multiple files.
</description>
@@ -130,7 +134,7 @@
<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(0, 0, 0, 0.7)">
+ <theme_item name="files_disabled" 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)">
diff --git a/doc/classes/FileSystemDock.xml b/doc/classes/FileSystemDock.xml
index 31299deb7d..22048c6761 100644
--- a/doc/classes/FileSystemDock.xml
+++ b/doc/classes/FileSystemDock.xml
@@ -9,7 +9,7 @@
<methods>
<method name="navigate_to_path">
<return type="void" />
- <argument index="0" name="path" type="String" />
+ <param index="0" name="path" type="String" />
<description>
</description>
</method>
@@ -20,34 +20,34 @@
</description>
</signal>
<signal name="file_removed">
- <argument index="0" name="file" type="String" />
+ <param index="0" name="file" type="String" />
<description>
</description>
</signal>
<signal name="files_moved">
- <argument index="0" name="old_file" type="String" />
- <argument index="1" name="new_file" type="String" />
+ <param index="0" name="old_file" type="String" />
+ <param index="1" name="new_file" type="String" />
<description>
</description>
</signal>
<signal name="folder_moved">
- <argument index="0" name="old_folder" type="String" />
- <argument index="1" name="new_file" type="String" />
+ <param index="0" name="old_folder" type="String" />
+ <param index="1" name="new_file" type="String" />
<description>
</description>
</signal>
<signal name="folder_removed">
- <argument index="0" name="folder" type="String" />
+ <param index="0" name="folder" type="String" />
<description>
</description>
</signal>
<signal name="inherit">
- <argument index="0" name="file" type="String" />
+ <param index="0" name="file" type="String" />
<description>
</description>
</signal>
<signal name="instance">
- <argument index="0" name="files" type="PackedStringArray" />
+ <param index="0" name="files" type="PackedStringArray" />
<description>
</description>
</signal>
diff --git a/doc/classes/FogVolume.xml b/doc/classes/FogVolume.xml
index d28a6a8783..3f2ee3035c 100644
--- a/doc/classes/FogVolume.xml
+++ b/doc/classes/FogVolume.xml
@@ -11,14 +11,15 @@
</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] or [constant RenderingServer.FOG_VOLUME_SHAPE_BOX].
+ 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].
[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].
</member>
- <member name="shape" type="int" setter="set_shape" getter="get_shape" enum="RenderingServer.FogVolumeShape" default="1">
- Sets the shape of the [FogVolume] to either [constant RenderingServer.FOG_VOLUME_SHAPE_ELLIPSOID], [constant RenderingServer.FOG_VOLUME_SHAPE_BOX], or [constant RenderingServer.FOG_VOLUME_SHAPE_ELLIPSOID] or [constant RenderingServer.FOG_VOLUME_SHAPE_WORLD].
+ <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].
</member>
</members>
</class>
diff --git a/doc/classes/Font.xml b/doc/classes/Font.xml
index dae42ddf34..ad3a16afbb 100644
--- a/doc/classes/Font.xml
+++ b/doc/classes/Font.xml
@@ -1,134 +1,126 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="Font" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
- Font class is set of font data sources used to draw text.
+ Base class for fonts and font variations.
</brief_description>
<description>
- Font contains a set of glyphs to represent Unicode characters, as well as the ability to draw it with variable width, ascent, descent and kerning.
- [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 non 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 font = Font.new()
- font.add_data(load("res://BarlowCondensed-Bold.ttf"))
- $"Label".set("custom_fonts/font", font)
- $"Label".set("custom_fonts/font_size", 64)
- [/gdscript]
- [csharp]
- var font = new Font();
- font.AddData(ResourceLoader.Load&lt;FontData&gt;("res://BarlowCondensed-Bold.ttf"));
- GetNode("Label").Set("custom_fonts/font", font);
- GetNode("Label").Set("custom_font_sizes/font_size", 64);
- [/csharp]
- [/codeblocks]
- To control font substitution priority use [FontData] language and script support.
- Use language overrides to use same [Font] stack for multiple languages:
- [codeblocks]
- [gdscript]
- # Use Naskh font for Persian and Nastaʼlīq font for Urdu text.
- var font_data_fa = load("res://NotoNaskhArabicUI_Regular.ttf");
- font_data_fa.set_language_support_override("fa", true);
- font_data_fa.set_language_support_override("ur", false);
-
- var font_data_ur = load("res://NotoNastaliqUrdu_Regular.ttf");
- font_data_ur.set_language_support_override("fa", false);
- font_data_ur.set_language_support_override("ur", true);
- [/gdscript]
- [csharp]
- // Use Naskh font for Persian and Nastaʼlīq font for Urdu text.
- var fontDataFA = ResourceLoader.Load&lt;FontData&gt;("res://NotoNaskhArabicUI_Regular.ttf");
- fontDataFA.SetLanguageSupportOverride("fa", true);
- fontDataFA.SetLanguageSupportOverride("ur", false);
-
- var fontDataUR = ResourceLoader.Load&lt;FontData&gt;("res://NotoNastaliqUrdu_Regular.ttf");
- fontDataUR.SetLanguageSupportOverride("fa", false);
- fontDataUR.SetLanguageSupportOverride("ur", true);
- [/csharp]
- [/codeblocks]
- Use script overrides to specify supported scripts for bitmap font or for less common scripts not directly supported by TrueType format:
- [codeblocks]
- [gdscript]
- # Use specified font for Egyptian hieroglyphs.
- var font_data = load("res://unifont.ttf");
- font_data.set_script_support_override("Egyp", true);
- [/gdscript]
- [csharp]
- // Use specified font for Egyptian hieroglyphs.
- var fontData = ResourceLoader.Load&lt;FontData&gt;("res://unifont.ttf");
- fontData.SetScriptSupportOverride("Egyp", true);
- [/csharp]
- [/codeblocks]
+ Font is the abstract base class for font, so it shouldn't be used directly. Other types of fonts inherit from it.
</description>
<tutorials>
</tutorials>
<methods>
- <method name="add_data">
- <return type="void" />
- <argument index="0" name="data" type="FontData" />
- <description>
- Add font data source to the set.
- </description>
- </method>
- <method name="clear_data">
- <return type="void" />
+ <method name="draw_char" qualifiers="const">
+ <return type="float" />
+ <param index="0" name="canvas_item" type="RID" />
+ <param index="1" name="pos" type="Vector2" />
+ <param index="2" name="char" type="int" />
+ <param index="3" name="font_size" type="int" />
+ <param index="4" name="modulate" type="Color" default="Color(1, 1, 1, 1)" />
<description>
- Removes all font data sourcers for the set.
+ 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>
- <method name="draw_char" qualifiers="const">
+ <method name="draw_char_outline" qualifiers="const">
<return type="float" />
- <argument index="0" name="canvas_item" type="RID" />
- <argument index="1" name="pos" type="Vector2" />
- <argument index="2" name="char" type="int" />
- <argument index="3" name="next" type="int" default="0" />
- <argument index="4" name="size" type="int" default="16" />
- <argument index="5" name="modulate" type="Color" default="Color(1, 1, 1, 1)" />
- <argument index="6" name="outline_size" type="int" default="0" />
- <argument index="7" name="outline_modulate" type="Color" default="Color(1, 1, 1, 0)" />
+ <param index="0" name="canvas_item" type="RID" />
+ <param index="1" name="pos" type="Vector2" />
+ <param index="2" name="char" type="int" />
+ <param index="3" name="font_size" type="int" />
+ <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] into a canvas item using the font, at a given position, with [code]modulate[/code] color, and optionally kerning if [code]next[/code] is passed. [code]position[/code] specifies the baseline, not the top. To draw from the top, [i]ascent[/i] must be added to the Y axis.
+ 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>
<method name="draw_multiline_string" qualifiers="const">
<return type="void" />
- <argument index="0" name="canvas_item" type="RID" />
- <argument index="1" name="pos" type="Vector2" />
- <argument index="2" name="text" type="String" />
- <argument index="3" name="alignment" type="int" enum="HorizontalAlignment" default="0" />
- <argument index="4" name="width" type="float" default="-1" />
- <argument index="5" name="max_lines" type="int" default="-1" />
- <argument index="6" name="size" type="int" default="16" />
- <argument index="7" name="modulate" type="Color" default="Color(1, 1, 1, 1)" />
- <argument index="8" name="outline_size" type="int" default="0" />
- <argument index="9" name="outline_modulate" type="Color" default="Color(1, 1, 1, 0)" />
- <argument index="10" name="flags" type="int" default="99" />
+ <param index="0" name="canvas_item" type="RID" />
+ <param index="1" name="pos" type="Vector2" />
+ <param index="2" name="text" type="String" />
+ <param index="3" name="alignment" type="int" enum="HorizontalAlignment" default="0" />
+ <param index="4" name="width" type="float" default="-1" />
+ <param index="5" name="font_size" type="int" default="16" />
+ <param index="6" name="max_lines" type="int" default="-1" />
+ <param index="7" name="modulate" type="Color" default="Color(1, 1, 1, 1)" />
+ <param index="8" name="brk_flags" type="int" enum="TextServer.LineBreakFlag" default="3" />
+ <param index="9" name="jst_flags" type="int" enum="TextServer.JustificationFlag" default="3" />
+ <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>
+ <method name="draw_multiline_string_outline" qualifiers="const">
+ <return type="void" />
+ <param index="0" name="canvas_item" type="RID" />
+ <param index="1" name="pos" type="Vector2" />
+ <param index="2" name="text" type="String" />
+ <param index="3" name="alignment" type="int" enum="HorizontalAlignment" default="0" />
+ <param index="4" name="width" type="float" default="-1" />
+ <param index="5" name="font_size" type="int" default="16" />
+ <param index="6" name="max_lines" type="int" default="-1" />
+ <param index="7" name="size" type="int" default="1" />
+ <param index="8" name="modulate" type="Color" default="Color(1, 1, 1, 1)" />
+ <param index="9" name="brk_flags" type="int" enum="TextServer.LineBreakFlag" default="3" />
+ <param index="10" name="jst_flags" type="int" enum="TextServer.JustificationFlag" default="3" />
+ <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 [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>
<method name="draw_string" qualifiers="const">
<return type="void" />
- <argument index="0" name="canvas_item" type="RID" />
- <argument index="1" name="pos" type="Vector2" />
- <argument index="2" name="text" type="String" />
- <argument index="3" name="alignment" type="int" enum="HorizontalAlignment" default="0" />
- <argument index="4" name="width" type="float" default="-1" />
- <argument index="5" name="size" type="int" default="16" />
- <argument index="6" name="modulate" type="Color" default="Color(1, 1, 1, 1)" />
- <argument index="7" name="outline_size" type="int" default="0" />
- <argument index="8" name="outline_modulate" type="Color" default="Color(1, 1, 1, 0)" />
- <argument index="9" name="flags" type="int" default="3" />
+ <param index="0" name="canvas_item" type="RID" />
+ <param index="1" name="pos" type="Vector2" />
+ <param index="2" name="text" type="String" />
+ <param index="3" name="alignment" type="int" enum="HorizontalAlignment" default="0" />
+ <param index="4" name="width" type="float" default="-1" />
+ <param index="5" name="font_size" type="int" default="16" />
+ <param index="6" name="modulate" type="Color" default="Color(1, 1, 1, 1)" />
+ <param index="7" name="jst_flags" type="int" enum="TextServer.JustificationFlag" default="3" />
+ <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>
+ <method name="draw_string_outline" qualifiers="const">
+ <return type="void" />
+ <param index="0" name="canvas_item" type="RID" />
+ <param index="1" name="pos" type="Vector2" />
+ <param index="2" name="text" type="String" />
+ <param index="3" name="alignment" type="int" enum="HorizontalAlignment" default="0" />
+ <param index="4" name="width" type="float" default="-1" />
+ <param index="5" name="font_size" type="int" default="16" />
+ <param index="6" name="size" type="int" default="1" />
+ <param index="7" name="modulate" type="Color" default="Color(1, 1, 1, 1)" />
+ <param index="8" name="jst_flags" type="int" enum="TextServer.JustificationFlag" default="3" />
+ <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 [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>
+ <method name="find_variation" qualifiers="const">
+ <return type="RID" />
+ <param index="0" name="variation_coordinates" type="Dictionary" />
+ <param index="1" name="face_index" type="int" default="0" />
+ <param index="2" name="strength" type="float" default="0.0" />
+ <param index="3" name="transform" type="Transform2D" default="Transform2D(1, 0, 0, 1, 0, 0)" />
+ <description>
+ Returns [TextServer] RID of the font cache for specific variation.
+ </description>
+ </method>
<method name="get_ascent" qualifiers="const">
<return type="float" />
- <argument index="0" name="size" type="int" default="16" />
+ <param index="0" name="font_size" type="int" default="16" />
<description>
Returns the average font ascent (number of pixels above the baseline).
[b]Note:[/b] Real ascent of the string is context-dependent and can be significantly different from the value returned by this function. Use it only as rough estimate (e.g. as the ascent of empty line).
@@ -136,45 +128,54 @@
</method>
<method name="get_char_size" qualifiers="const">
<return type="Vector2" />
- <argument index="0" name="char" type="int" />
- <argument index="1" name="next" type="int" default="0" />
- <argument index="2" name="size" type="int" default="16" />
+ <param index="0" name="char" type="int" />
+ <param index="1" name="font_size" type="int" />
<description>
Returns the size of a character, optionally taking kerning into account if the next character is provided.
[b]Note:[/b] Do not use this function to calculate width of the string character by character, use [method get_string_size] or [TextLine] instead. The height returned is the font height (see also [method get_height]) and has no relation to the glyph height.
</description>
</method>
- <method name="get_data" qualifiers="const">
- <return type="FontData" />
- <argument index="0" name="idx" type="int" />
+ <method name="get_descent" qualifiers="const">
+ <return type="float" />
+ <param index="0" name="font_size" type="int" default="16" />
<description>
- Returns the font data source at index [code]idx[/code]. If the index does not exist, returns [code]null[/code].
+ Returns the average font descent (number of pixels below the baseline).
+ [b]Note:[/b] Real descent of the string is context-dependent and can be significantly different from the value returned by this function. Use it only as rough estimate (e.g. as the descent of empty line).
</description>
</method>
- <method name="get_data_count" qualifiers="const">
+ <method name="get_face_count" qualifiers="const">
<return type="int" />
<description>
- Returns the number of font data sources.
+ Returns number of faces in the TrueType / OpenType collection.
</description>
</method>
- <method name="get_data_rid" qualifiers="const">
- <return type="RID" />
- <argument index="0" name="idx" type="int" />
+ <method name="get_fallbacks" qualifiers="const">
+ <return type="Font[]" />
<description>
- Returns TextServer RID of the font data resources.
+ Returns array of fallback [Font]s.
</description>
</method>
- <method name="get_descent" qualifiers="const">
- <return type="float" />
- <argument index="0" name="size" type="int" default="16" />
+ <method name="get_font_name" qualifiers="const">
+ <return type="String" />
<description>
- Returns the average font descent (number of pixels below the baseline).
- [b]Note:[/b] Real descent of the string is context-dependent and can be significantly different from the value returned by this function. Use it only as rough estimate (e.g. as the descent of empty line).
+ Returns font family name.
+ </description>
+ </method>
+ <method name="get_font_style" qualifiers="const">
+ <return type="int" enum="TextServer.FontStyle" />
+ <description>
+ Returns font style flags, see [enum TextServer.FontStyle].
+ </description>
+ </method>
+ <method name="get_font_style_name" qualifiers="const">
+ <return type="String" />
+ <description>
+ Returns font style name.
</description>
</method>
<method name="get_height" qualifiers="const">
<return type="float" />
- <argument index="0" name="size" type="int" default="16" />
+ <param index="0" name="font_size" type="int" default="16" />
<description>
Returns the total average font height (ascent plus descent) in pixels.
[b]Note:[/b] Real height of the string is context-dependent and can be significantly different from the value returned by this function. Use it only as rough estimate (e.g. as the height of empty line).
@@ -182,39 +183,55 @@
</method>
<method name="get_multiline_string_size" qualifiers="const">
<return type="Vector2" />
- <argument index="0" name="text" type="String" />
- <argument index="1" name="width" type="float" default="-1" />
- <argument index="2" name="size" type="int" default="16" />
- <argument index="3" name="flags" type="int" default="96" />
+ <param index="0" name="text" type="String" />
+ <param index="1" name="alignment" type="int" enum="HorizontalAlignment" default="0" />
+ <param index="2" name="width" type="float" default="-1" />
+ <param index="3" name="font_size" type="int" default="16" />
+ <param index="4" name="max_lines" type="int" default="-1" />
+ <param index="5" name="brk_flags" type="int" enum="TextServer.LineBreakFlag" default="3" />
+ <param index="6" name="jst_flags" type="int" enum="TextServer.JustificationFlag" default="3" />
+ <param index="7" name="direction" type="int" enum="TextServer.Direction" default="0" />
+ <param index="8" name="orientation" type="int" enum="TextServer.Orientation" default="0" />
<description>
Returns the size of a bounding box of a string broken into the lines, taking kerning and advance into account.
See also [method draw_multiline_string].
</description>
</method>
+ <method name="get_opentype_features" qualifiers="const">
+ <return type="Dictionary" />
+ <description>
+ Returns a set of OpenType feature tags. More info: [url=https://docs.microsoft.com/en-us/typography/opentype/spec/featuretags]OpenType feature tags[/url].
+ </description>
+ </method>
<method name="get_rids" qualifiers="const">
- <return type="Array" />
+ <return type="RID[]" />
<description>
- Returns [Array] of valid [FontData] [RID]s, which can be passed to the [TextServer] methods.
+ Returns [Array] of valid [Font] [RID]s, which can be passed to the [TextServer] methods.
</description>
</method>
<method name="get_spacing" qualifiers="const">
<return type="int" />
- <argument index="0" name="spacing" type="int" enum="TextServer.SpacingType" />
+ <param index="0" name="spacing" type="int" enum="TextServer.SpacingType" />
<description>
Returns the spacing for the given [code]type[/code] (see [enum TextServer.SpacingType]).
</description>
</method>
<method name="get_string_size" qualifiers="const">
<return type="Vector2" />
- <argument index="0" name="text" type="String" />
- <argument index="1" name="size" type="int" default="16" />
- <argument index="2" name="alignment" type="int" enum="HorizontalAlignment" default="0" />
- <argument index="3" name="width" type="float" default="-1" />
- <argument index="4" name="flags" type="int" default="3" />
+ <param index="0" name="text" type="String" />
+ <param index="1" name="alignment" type="int" enum="HorizontalAlignment" default="0" />
+ <param index="2" name="width" type="float" default="-1" />
+ <param index="3" name="font_size" type="int" default="16" />
+ <param index="4" name="jst_flags" type="int" enum="TextServer.JustificationFlag" default="3" />
+ <param index="5" name="direction" type="int" enum="TextServer.Direction" default="0" />
+ <param index="6" name="orientation" type="int" enum="TextServer.Orientation" default="0" />
<description>
- Returns the size of a bounding box of a string, taking kerning and advance into account.
+ 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]
+ 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]
[b]Note:[/b] Real height of the string is context-dependent and can be significantly different from the value returned by [method get_height].
- See also [method draw_string].
</description>
</method>
<method name="get_supported_chars" qualifiers="const">
@@ -224,9 +241,22 @@
If a given character is included in more than one font data source, it appears only once in the returned string.
</description>
</method>
+ <method name="get_supported_feature_list" qualifiers="const">
+ <return type="Dictionary" />
+ <description>
+ Returns list of OpenType features supported by font.
+ </description>
+ </method>
+ <method name="get_supported_variation_list" qualifiers="const">
+ <return type="Dictionary" />
+ <description>
+ Returns list of supported [url=https://docs.microsoft.com/en-us/typography/opentype/spec/dvaraxisreg]variation coordinates[/url], each coordinate is returned as [code]tag: Vector3i(min_value,max_value,default_value)[/code].
+ Font variations allow for continuous change of glyph characteristics along some given design axis, such as weight, width or slant.
+ </description>
+ </method>
<method name="get_underline_position" qualifiers="const">
<return type="float" />
- <argument index="0" name="size" type="int" default="16" />
+ <param index="0" name="font_size" type="int" default="16" />
<description>
Returns average pixel offset of the underline below the baseline.
[b]Note:[/b] Real underline position of the string is context-dependent and can be significantly different from the value returned by this function. Use it only as rough estimate.
@@ -234,7 +264,7 @@
</method>
<method name="get_underline_thickness" qualifiers="const">
<return type="float" />
- <argument index="0" name="size" type="int" default="16" />
+ <param index="0" name="font_size" type="int" default="16" />
<description>
Returns average thickness of the underline.
[b]Note:[/b] Real underline thickness of the string is context-dependent and can be significantly different from the value returned by this function. Use it only as rough estimate.
@@ -242,50 +272,39 @@
</method>
<method name="has_char" qualifiers="const">
<return type="bool" />
- <argument index="0" name="char" type="int" />
+ <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="remove_data">
- <return type="void" />
- <argument index="0" name="idx" type="int" />
+ <method name="is_language_supported" qualifiers="const">
+ <return type="bool" />
+ <param index="0" name="language" type="String" />
<description>
- Removes the font data source at index [code]idx[/code]. If the index does not exist, nothing happens.
+ 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="set_data">
- <return type="void" />
- <argument index="0" name="idx" type="int" />
- <argument index="1" name="data" type="FontData" />
+ <method name="is_script_supported" qualifiers="const">
+ <return type="bool" />
+ <param index="0" name="script" type="String" />
<description>
- Sets the font data source at index [code]idx[/code]. If the index does not exist, nothing happens.
+ Returns [code]true[/code], if font supports given script ([url=https://en.wikipedia.org/wiki/ISO_15924]ISO 15924[/url] code).
</description>
</method>
- <method name="set_spacing">
+ <method name="set_cache_capacity">
<return type="void" />
- <argument index="0" name="spacing" type="int" enum="TextServer.SpacingType" />
- <argument index="1" name="value" type="int" />
+ <param index="0" name="single_line" type="int" />
+ <param index="1" name="multi_line" 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 LRU cache capacity for [code]draw_*[/code] methods.
</description>
</method>
- <method name="update_changes">
+ <method name="set_fallbacks">
<return type="void" />
+ <param index="0" name="fallbacks" type="Font[]" />
<description>
- After editing a font (changing data sources, etc.). Call this function to propagate changes to controls that might use it.
+ Sets array of fallback [Font]s.
</description>
</method>
</methods>
- <members>
- <member name="spacing_bottom" type="int" setter="set_spacing" getter="get_spacing" default="0">
- Extra spacing at the bottom of the line in pixels.
- </member>
- <member name="spacing_top" type="int" setter="set_spacing" getter="get_spacing" default="0">
- Extra spacing at the top of the line in pixels.
- </member>
- <member name="variation_coordinates" type="Dictionary" setter="set_variation_coordinates" getter="get_variation_coordinates" default="{}">
- Default font [url=https://docs.microsoft.com/en-us/typography/opentype/spec/dvaraxisreg]variation coordinates[/url].
- </member>
- </members>
</class>
diff --git a/doc/classes/FontData.xml b/doc/classes/FontFile.xml
index a423d7a4e4..b9b20dc75b 100644
--- a/doc/classes/FontData.xml
+++ b/doc/classes/FontFile.xml
@@ -1,13 +1,32 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="FontData" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+<class name="FontFile" inherits="Font" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Font source data and prerendered glyph cache, imported from dynamic or bitmap font.
+ </brief_description>
+ <description>
+ [FontFile] contains a set of glyphs to represent Unicode characters imported from a font file, as well as a cache of rasterized glyphs, and a set of fallback [Font]s to use.
+ Use [FontVariation] to access specific OpenType variation of the font, create simulated bold / slanted version, and draw lines of text.
+ For more complex text processing, use [FontVariation] in conjunction with [TextLine] or [TextParagraph].
Supported font formats:
- - Dynamic font importer: TrueType (.ttf), OpenType (.otf), WOFF (.woff), WOFF2 (.woff2), Type 1 (.pfb, .pfm).
+ - Dynamic font importer: TrueType (.ttf), TrueType collection (.ttc), OpenType (.otf), OpenType collection (.otc), WOFF (.woff), WOFF2 (.woff2), Type 1 (.pfb, .pfm).
- Bitmap font importer: AngelCode BMFont (.fnt, .font), text and binary (version 3) format variants.
- Monospace image font importer: All supported image formats.
- </brief_description>
- <description>
+ [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")
+ $"Label".set("custom_fonts/font", f)
+ $"Label".set("custom_fonts/font_size", 64)
+ [/gdscript]
+ [csharp]
+ var f = ResourceLoader.Load&lt;FontFile&gt;("res://BarlowCondensed-Bold.ttf");
+ GetNode("Label").Set("custom_fonts/font", f);
+ GetNode("Label").Set("custom_font_sizes/font_size", 64);
+ [/csharp]
+ [/codeblocks]
</description>
<tutorials>
</tutorials>
@@ -20,8 +39,8 @@
</method>
<method name="clear_glyphs">
<return type="void" />
- <argument index="0" name="cache_index" type="int" />
- <argument index="1" name="size" type="Vector2i" />
+ <param index="0" name="cache_index" type="int" />
+ <param index="1" name="size" type="Vector2i" />
<description>
Removes all rendered glyphs information from the cache entry.
[b]Note:[/b] This function will not remove textures associated with the glyphs, use [method remove_texture] to remove them manually.
@@ -29,39 +48,32 @@
</method>
<method name="clear_kerning_map">
<return type="void" />
- <argument index="0" name="cache_index" type="int" />
- <argument index="1" name="size" type="int" />
+ <param index="0" name="cache_index" type="int" />
+ <param index="1" name="size" type="int" />
<description>
Removes all kerning overrides.
</description>
</method>
<method name="clear_size_cache">
<return type="void" />
- <argument index="0" name="cache_index" type="int" />
+ <param index="0" name="cache_index" type="int" />
<description>
Removes all font sizes from the cache entry
</description>
</method>
<method name="clear_textures">
<return type="void" />
- <argument index="0" name="cache_index" type="int" />
- <argument index="1" name="size" type="Vector2i" />
+ <param index="0" name="cache_index" type="int" />
+ <param index="1" name="size" type="Vector2i" />
<description>
Removes all textures from font cache entry.
[b]Note:[/b] This function will not remove glyphs associated with the texture, use [method remove_glyph] to remove them manually.
</description>
</method>
- <method name="find_cache" qualifiers="const">
- <return type="RID" />
- <argument index="0" name="variation_coordinates" type="Dictionary" />
- <description>
- Returns existing or creates a new font cache entry for the specified variation coordinates.
- </description>
- </method>
- <method name="get_ascent" qualifiers="const">
+ <method name="get_cache_ascent" qualifiers="const">
<return type="float" />
- <argument index="0" name="cache_index" type="int" />
- <argument index="1" name="size" type="int" />
+ <param index="0" name="cache_index" type="int" />
+ <param index="1" name="size" type="int" />
<description>
Returns the font ascent (number of pixels above the baseline).
</description>
@@ -72,26 +84,53 @@
Returns number of the font cache entries.
</description>
</method>
- <method name="get_cache_rid" qualifiers="const">
- <return type="RID" />
- <argument index="0" name="cache_index" type="int" />
+ <method name="get_cache_descent" qualifiers="const">
+ <return type="float" />
+ <param index="0" name="cache_index" type="int" />
+ <param index="1" name="size" type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="get_cache_scale" qualifiers="const">
+ <return type="float" />
+ <param index="0" name="cache_index" type="int" />
+ <param index="1" name="size" type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="get_cache_underline_position" qualifiers="const">
+ <return type="float" />
+ <param index="0" name="cache_index" type="int" />
+ <param index="1" name="size" type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="get_cache_underline_thickness" qualifiers="const">
+ <return type="float" />
+ <param index="0" name="cache_index" type="int" />
+ <param index="1" name="size" type="int" />
<description>
- Returns text server font cache entry resource id.
</description>
</method>
- <method name="get_descent" qualifiers="const">
+ <method name="get_embolden" qualifiers="const">
<return type="float" />
- <argument index="0" name="cache_index" type="int" />
- <argument index="1" name="size" type="int" />
+ <param index="0" name="cache_index" type="int" />
+ <description>
+ Returns embolden strength, if is not equal to zero, emboldens the font outlines. Negative values reduce the outline thickness.
+ </description>
+ </method>
+ <method name="get_face_index" qualifiers="const">
+ <return type="int" />
+ <param index="0" name="cache_index" type="int" />
<description>
- Returns font descent (number of pixels below the baseline).
+ Recturns an active face index in the TrueType / OpenType collection.
</description>
</method>
<method name="get_glyph_advance" qualifiers="const">
<return type="Vector2" />
- <argument index="0" name="cache_index" type="int" />
- <argument index="1" name="size" type="int" />
- <argument index="2" name="glyph" type="int" />
+ <param index="0" name="cache_index" type="int" />
+ <param index="1" name="size" type="int" />
+ <param index="2" name="glyph" type="int" />
<description>
Returns glyph advance (offset of the next glyph).
[b]Note:[/b] Advance for glyphs outlines is the same as the base glyph advance and is not saved.
@@ -99,79 +138,79 @@
</method>
<method name="get_glyph_index" qualifiers="const">
<return type="int" />
- <argument index="0" name="size" type="int" />
- <argument index="1" name="char" type="int" />
- <argument index="2" name="variation_selector" type="int" />
+ <param index="0" name="size" type="int" />
+ <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" />
- <argument index="0" name="cache_index" type="int" />
- <argument index="1" name="size" type="Vector2i" />
+ <return type="PackedInt32Array" />
+ <param index="0" name="cache_index" type="int" />
+ <param index="1" name="size" type="Vector2i" />
<description>
Returns list of rendered glyphs in the cache entry.
</description>
</method>
<method name="get_glyph_offset" qualifiers="const">
<return type="Vector2" />
- <argument index="0" name="cache_index" type="int" />
- <argument index="1" name="size" type="Vector2i" />
- <argument index="2" name="glyph" type="int" />
+ <param index="0" name="cache_index" type="int" />
+ <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="get_glyph_size" qualifiers="const">
<return type="Vector2" />
- <argument index="0" name="cache_index" type="int" />
- <argument index="1" name="size" type="Vector2i" />
- <argument index="2" name="glyph" type="int" />
+ <param index="0" name="cache_index" type="int" />
+ <param index="1" name="size" type="Vector2i" />
+ <param index="2" name="glyph" type="int" />
<description>
Returns glyph size.
</description>
</method>
<method name="get_glyph_texture_idx" qualifiers="const">
<return type="int" />
- <argument index="0" name="cache_index" type="int" />
- <argument index="1" name="size" type="Vector2i" />
- <argument index="2" name="glyph" type="int" />
+ <param index="0" name="cache_index" type="int" />
+ <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="get_glyph_uv_rect" qualifiers="const">
<return type="Rect2" />
- <argument index="0" name="cache_index" type="int" />
- <argument index="1" name="size" type="Vector2i" />
- <argument index="2" name="glyph" type="int" />
+ <param index="0" name="cache_index" type="int" />
+ <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="get_kerning" qualifiers="const">
<return type="Vector2" />
- <argument index="0" name="cache_index" type="int" />
- <argument index="1" name="size" type="int" />
- <argument index="2" name="glyph_pair" type="Vector2i" />
+ <param index="0" name="cache_index" type="int" />
+ <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="get_kerning_list" qualifiers="const">
- <return type="Array" />
- <argument index="0" name="cache_index" type="int" />
- <argument index="1" name="size" type="int" />
+ <return type="Vector2i[]" />
+ <param index="0" name="cache_index" type="int" />
+ <param index="1" name="size" type="int" />
<description>
Returns list of the kerning overrides.
</description>
</method>
<method name="get_language_support_override" qualifiers="const">
<return type="bool" />
- <argument index="0" name="language" type="String" />
+ <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">
@@ -180,19 +219,11 @@
Returns list of language support overrides.
</description>
</method>
- <method name="get_scale" qualifiers="const">
- <return type="float" />
- <argument index="0" name="cache_index" type="int" />
- <argument index="1" name="size" type="int" />
- <description>
- Returns scaling factor of the color bitmap font.
- </description>
- </method>
<method name="get_script_support_override" qualifiers="const">
<return type="bool" />
- <argument index="0" name="script" type="String" />
+ <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">
@@ -202,138 +233,80 @@
</description>
</method>
<method name="get_size_cache_list" qualifiers="const">
- <return type="Array" />
- <argument index="0" name="cache_index" type="int" />
+ <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.
</description>
</method>
- <method name="get_spacing" qualifiers="const">
- <return type="int" />
- <argument index="0" name="cache_index" type="int" />
- <argument index="1" name="size" type="int" />
- <argument index="2" name="spacing_type" type="int" enum="TextServer.SpacingType" />
- <description>
- Returns extra spacing added between glyphs in pixels.
- </description>
- </method>
- <method name="get_supported_chars" qualifiers="const">
- <return type="String" />
- <description>
- Returns a string containing all the characters available in the font.
- </description>
- </method>
- <method name="get_supported_feature_list" qualifiers="const">
- <return type="Dictionary" />
- <description>
- Returns list of OpenType features supported by font.
- </description>
- </method>
- <method name="get_supported_variation_list" qualifiers="const">
- <return type="Dictionary" />
- <description>
- Returns list of supported [url=https://docs.microsoft.com/en-us/typography/opentype/spec/dvaraxisreg]variation coordinates[/url], each coordinate is returned as [code]tag: Vector3i(min_value,max_value,default_value)[/code].
- Font variations allow for continuous change of glyph characteristics along some given design axis, such as weight, width or slant.
- </description>
- </method>
<method name="get_texture_count" qualifiers="const">
<return type="int" />
- <argument index="0" name="cache_index" type="int" />
- <argument index="1" name="size" type="Vector2i" />
+ <param index="0" name="cache_index" type="int" />
+ <param index="1" name="size" type="Vector2i" />
<description>
Returns number of textures used by font cache entry.
</description>
</method>
<method name="get_texture_image" qualifiers="const">
<return type="Image" />
- <argument index="0" name="cache_index" type="int" />
- <argument index="1" name="size" type="Vector2i" />
- <argument index="2" name="texture_index" type="int" />
+ <param index="0" name="cache_index" type="int" />
+ <param index="1" name="size" type="Vector2i" />
+ <param index="2" name="texture_index" type="int" />
<description>
Returns a copy of the font cache texture image.
</description>
</method>
<method name="get_texture_offsets" qualifiers="const">
<return type="PackedInt32Array" />
- <argument index="0" name="cache_index" type="int" />
- <argument index="1" name="size" type="Vector2i" />
- <argument index="2" name="texture_index" type="int" />
+ <param index="0" name="cache_index" type="int" />
+ <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.
</description>
</method>
- <method name="get_underline_position" qualifiers="const">
- <return type="float" />
- <argument index="0" name="cache_index" type="int" />
- <argument index="1" name="size" type="int" />
- <description>
- Returns pixel offset of the underline below the baseline.
- </description>
- </method>
- <method name="get_underline_thickness" qualifiers="const">
- <return type="float" />
- <argument index="0" name="cache_index" type="int" />
- <argument index="1" name="size" type="int" />
+ <method name="get_transform" qualifiers="const">
+ <return type="Transform2D" />
+ <param index="0" name="cache_index" type="int" />
<description>
- Returns thickness of the underline in pixels.
+ Returns 2D transform, applied to the font outlines, can be used for slanting, flipping and rotating glyphs.
</description>
</method>
<method name="get_variation_coordinates" qualifiers="const">
<return type="Dictionary" />
- <argument index="0" name="cache_index" type="int" />
- <description>
- Returns variation coordinates for the specified font cache entry. See [method get_supported_variation_list] for more info.
- </description>
- </method>
- <method name="has_char" qualifiers="const">
- <return type="bool" />
- <argument index="0" name="char" type="int" />
- <description>
- Returns [code]true[/code] if a Unicode [code]char[/code] is available in the font.
- </description>
- </method>
- <method name="is_language_supported" qualifiers="const">
- <return type="bool" />
- <argument index="0" 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="is_script_supported" qualifiers="const">
- <return type="bool" />
- <argument index="0" name="script" type="String" />
+ <param index="0" name="cache_index" type="int" />
<description>
- Returns [code]true[/code], if font supports given script ([url=https://en.wikipedia.org/wiki/ISO_15924]ISO 15924[/url] code).
+ Returns variation coordinates for the specified font cache entry. See [method Font.get_supported_variation_list] for more info.
</description>
</method>
<method name="load_bitmap_font">
<return type="int" enum="Error" />
- <argument index="0" name="path" type="String" />
+ <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>
<method name="load_dynamic_font">
<return type="int" enum="Error" />
- <argument index="0" name="path" type="String" />
+ <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>
<method name="remove_cache">
<return type="void" />
- <argument index="0" name="cache_index" type="int" />
+ <param index="0" name="cache_index" type="int" />
<description>
Removes specified font cache entry.
</description>
</method>
<method name="remove_glyph">
<return type="void" />
- <argument index="0" name="cache_index" type="int" />
- <argument index="1" name="size" type="Vector2i" />
- <argument index="2" name="glyph" type="int" />
+ <param index="0" name="cache_index" type="int" />
+ <param index="1" name="size" type="Vector2i" />
+ <param index="2" name="glyph" type="int" />
<description>
Removes specified rendered glyph information from the cache entry.
[b]Note:[/b] This function will not remove textures associated with the glyphs, use [method remove_texture] to remove them manually.
@@ -341,88 +314,126 @@
</method>
<method name="remove_kerning">
<return type="void" />
- <argument index="0" name="cache_index" type="int" />
- <argument index="1" name="size" type="int" />
- <argument index="2" name="glyph_pair" type="Vector2i" />
+ <param index="0" name="cache_index" type="int" />
+ <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="remove_language_support_override">
<return type="void" />
- <argument index="0" name="language" type="String" />
+ <param index="0" name="language" type="String" />
<description>
Remove language support override.
</description>
</method>
<method name="remove_script_support_override">
<return type="void" />
- <argument index="0" name="script" type="String" />
+ <param index="0" name="script" type="String" />
<description>
Removes script support override.
</description>
</method>
<method name="remove_size_cache">
<return type="void" />
- <argument index="0" name="cache_index" type="int" />
- <argument index="1" name="size" type="Vector2i" />
+ <param index="0" name="cache_index" type="int" />
+ <param index="1" name="size" type="Vector2i" />
<description>
Removes specified font size from the cache entry.
</description>
</method>
<method name="remove_texture">
<return type="void" />
- <argument index="0" name="cache_index" type="int" />
- <argument index="1" name="size" type="Vector2i" />
- <argument index="2" name="texture_index" type="int" />
+ <param index="0" name="cache_index" type="int" />
+ <param index="1" name="size" type="Vector2i" />
+ <param index="2" name="texture_index" type="int" />
<description>
- Removes specified texture from font cache entry.
- [b]Note:[/b] This function will not remove glyphs associated with the texture, remove them manually, using [method remove_glyph].
+ Removes specified texture from the cache entry.
+ [b]Note:[/b] This function will not remove glyphs associated with the texture. Remove them manually using [method remove_glyph].
</description>
</method>
<method name="render_glyph">
<return type="void" />
- <argument index="0" name="cache_index" type="int" />
- <argument index="1" name="size" type="Vector2i" />
- <argument index="2" name="index" type="int" />
+ <param index="0" name="cache_index" type="int" />
+ <param index="1" name="size" type="Vector2i" />
+ <param index="2" name="index" type="int" />
<description>
- Renders specified glyph the the font cache texture.
+ Renders specified glyph to the font cache texture.
</description>
</method>
<method name="render_range">
<return type="void" />
- <argument index="0" name="cache_index" type="int" />
- <argument index="1" name="size" type="Vector2i" />
- <argument index="2" name="start" type="int" />
- <argument index="3" name="end" type="int" />
+ <param index="0" name="cache_index" type="int" />
+ <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="set_ascent">
+ <method name="set_cache_ascent">
+ <return type="void" />
+ <param index="0" name="cache_index" type="int" />
+ <param index="1" name="size" type="int" />
+ <param index="2" name="ascent" type="float" />
+ <description>
+ </description>
+ </method>
+ <method name="set_cache_descent">
<return type="void" />
- <argument index="0" name="cache_index" type="int" />
- <argument index="1" name="size" type="int" />
- <argument index="2" name="ascent" type="float" />
+ <param index="0" name="cache_index" type="int" />
+ <param index="1" name="size" type="int" />
+ <param index="2" name="descent" type="float" />
<description>
- Sets the font ascent (number of pixels above the baseline).
</description>
</method>
- <method name="set_descent">
+ <method name="set_cache_scale">
<return type="void" />
- <argument index="0" name="cache_index" type="int" />
- <argument index="1" name="size" type="int" />
- <argument index="2" name="descent" type="float" />
+ <param index="0" name="cache_index" type="int" />
+ <param index="1" name="size" type="int" />
+ <param index="2" name="scale" type="float" />
<description>
- Sets the font descent (number of pixels below the baseline).
+ </description>
+ </method>
+ <method name="set_cache_underline_position">
+ <return type="void" />
+ <param index="0" name="cache_index" type="int" />
+ <param index="1" name="size" type="int" />
+ <param index="2" name="underline_position" type="float" />
+ <description>
+ </description>
+ </method>
+ <method name="set_cache_underline_thickness">
+ <return type="void" />
+ <param index="0" name="cache_index" type="int" />
+ <param index="1" name="size" type="int" />
+ <param index="2" name="underline_thickness" type="float" />
+ <description>
+ </description>
+ </method>
+ <method name="set_embolden">
+ <return type="void" />
+ <param index="0" name="cache_index" type="int" />
+ <param index="1" name="strength" type="float" />
+ <description>
+ Sets embolden strength, if is not equal to zero, emboldens the font outlines. Negative values reduce the outline thickness.
+ </description>
+ </method>
+ <method name="set_face_index">
+ <return type="void" />
+ <param index="0" name="cache_index" type="int" />
+ <param index="1" name="face_index" type="int" />
+ <description>
+ Sets an active face index in the TrueType / OpenType collection.
</description>
</method>
<method name="set_glyph_advance">
<return type="void" />
- <argument index="0" name="cache_index" type="int" />
- <argument index="1" name="size" type="int" />
- <argument index="2" name="glyph" type="int" />
- <argument index="3" name="advance" type="Vector2" />
+ <param index="0" name="cache_index" type="int" />
+ <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).
[b]Note:[/b] Advance for glyphs outlines is the same as the base glyph advance and is not saved.
@@ -430,133 +441,104 @@
</method>
<method name="set_glyph_offset">
<return type="void" />
- <argument index="0" name="cache_index" type="int" />
- <argument index="1" name="size" type="Vector2i" />
- <argument index="2" name="glyph" type="int" />
- <argument index="3" name="offset" type="Vector2" />
+ <param index="0" name="cache_index" type="int" />
+ <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="set_glyph_size">
<return type="void" />
- <argument index="0" name="cache_index" type="int" />
- <argument index="1" name="size" type="Vector2i" />
- <argument index="2" name="glyph" type="int" />
- <argument index="3" name="gl_size" type="Vector2" />
+ <param index="0" name="cache_index" type="int" />
+ <param index="1" name="size" type="Vector2i" />
+ <param index="2" name="glyph" type="int" />
+ <param index="3" name="gl_size" type="Vector2" />
<description>
Sets glyph size.
</description>
</method>
<method name="set_glyph_texture_idx">
<return type="void" />
- <argument index="0" name="cache_index" type="int" />
- <argument index="1" name="size" type="Vector2i" />
- <argument index="2" name="glyph" type="int" />
- <argument index="3" name="texture_idx" type="int" />
+ <param index="0" name="cache_index" type="int" />
+ <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="set_glyph_uv_rect">
<return type="void" />
- <argument index="0" name="cache_index" type="int" />
- <argument index="1" name="size" type="Vector2i" />
- <argument index="2" name="glyph" type="int" />
- <argument index="3" name="uv_rect" type="Rect2" />
+ <param index="0" name="cache_index" type="int" />
+ <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="set_kerning">
<return type="void" />
- <argument index="0" name="cache_index" type="int" />
- <argument index="1" name="size" type="int" />
- <argument index="2" name="glyph_pair" type="Vector2i" />
- <argument index="3" name="kerning" type="Vector2" />
+ <param index="0" name="cache_index" type="int" />
+ <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="set_language_support_override">
<return type="void" />
- <argument index="0" name="language" type="String" />
- <argument index="1" name="supported" type="bool" />
+ <param index="0" name="language" type="String" />
+ <param index="1" name="supported" type="bool" />
<description>
- Adds override for [method is_language_supported].
- </description>
- </method>
- <method name="set_scale">
- <return type="void" />
- <argument index="0" name="cache_index" type="int" />
- <argument index="1" name="size" type="int" />
- <argument index="2" name="scale" type="float" />
- <description>
- Sets scaling factor of the color bitmap font.
+ Adds override for [method Font.is_language_supported].
</description>
</method>
<method name="set_script_support_override">
<return type="void" />
- <argument index="0" name="script" type="String" />
- <argument index="1" name="supported" type="bool" />
- <description>
- Adds override for [method is_script_supported].
- </description>
- </method>
- <method name="set_spacing">
- <return type="void" />
- <argument index="0" name="cache_index" type="int" />
- <argument index="1" name="size" type="int" />
- <argument index="2" name="spacing_type" type="int" enum="TextServer.SpacingType" />
- <argument index="3" name="value" type="int" />
+ <param index="0" name="script" type="String" />
+ <param index="1" name="supported" type="bool" />
<description>
- Sets extra spacing added between glyphs in pixels.
+ Adds override for [method Font.is_script_supported].
</description>
</method>
<method name="set_texture_image">
<return type="void" />
- <argument index="0" name="cache_index" type="int" />
- <argument index="1" name="size" type="Vector2i" />
- <argument index="2" name="texture_index" type="int" />
- <argument index="3" name="image" type="Image" />
+ <param index="0" name="cache_index" type="int" />
+ <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.
</description>
</method>
<method name="set_texture_offsets">
<return type="void" />
- <argument index="0" name="cache_index" type="int" />
- <argument index="1" name="size" type="Vector2i" />
- <argument index="2" name="texture_index" type="int" />
- <argument index="3" name="offset" type="PackedInt32Array" />
+ <param index="0" name="cache_index" type="int" />
+ <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 (for the fonts without dynamic glyph generation support).
</description>
</method>
- <method name="set_underline_position">
+ <method name="set_transform">
<return type="void" />
- <argument index="0" name="cache_index" type="int" />
- <argument index="1" name="size" type="int" />
- <argument index="2" name="underline_position" type="float" />
+ <param index="0" name="cache_index" type="int" />
+ <param index="1" name="transform" type="Transform2D" />
<description>
- Sets pixel offset of the underline below the baseline.
- </description>
- </method>
- <method name="set_underline_thickness">
- <return type="void" />
- <argument index="0" name="cache_index" type="int" />
- <argument index="1" name="size" type="int" />
- <argument index="2" name="underline_thickness" type="float" />
- <description>
- Sets thickness of the underline in pixels.
+ Sets 2D transform, applied to the font outlines, can be used for slanting, flipping and rotating glyphs.
</description>
</method>
<method name="set_variation_coordinates">
<return type="void" />
- <argument index="0" name="cache_index" type="int" />
- <argument index="1" name="variation_coordinates" type="Dictionary" />
+ <param index="0" name="cache_index" type="int" />
+ <param index="1" name="variation_coordinates" type="Dictionary" />
<description>
- Sets variation coordinates for the specified font cache entry. See [method get_supported_variation_list] for more info.
+ Sets variation coordinates for the specified font cache entry. See [method Font.get_supported_variation_list] for more info.
</description>
</method>
</methods>
@@ -567,8 +549,8 @@
<member name="data" type="PackedByteArray" setter="set_data" getter="get_data" default="PackedByteArray()">
Contents of the dynamic font source file.
</member>
- <member name="embolden" type="float" setter="set_embolden" getter="get_embolden" default="0.0">
- If is not equal to zero, emboldens the font outlines. Negative values reduce the outline thickness.
+ <member name="fallbacks" type="Font[]" setter="set_fallbacks" getter="get_fallbacks" default="[]">
+ Array of fallback [Font]s.
</member>
<member name="fixed_size" type="int" setter="set_fixed_size" getter="get_fixed_size" default="0">
Font size, used only for the bitmap fonts.
@@ -576,7 +558,7 @@
<member name="font_name" type="String" setter="set_font_name" getter="get_font_name" default="&quot;&quot;">
Font family name.
</member>
- <member name="font_style" type="int" setter="set_font_style" getter="get_font_style" default="0">
+ <member name="font_style" type="int" setter="set_font_style" getter="get_font_style" enum="TextServer.FontStyle" default="0">
Font style flags, see [enum TextServer.FontStyle].
</member>
<member name="force_autohinter" type="bool" setter="set_force_autohinter" getter="is_force_autohinter" default="false">
@@ -609,9 +591,5 @@
<member name="subpixel_positioning" type="int" setter="set_subpixel_positioning" getter="get_subpixel_positioning" enum="TextServer.SubpixelPositioning" default="1">
Font glyph sub-pixel positioning mode. Subpixel positioning provides shaper text and better kerning for smaller font sizes, at the cost of memory usage and font rasterization speed. Use [constant TextServer.SUBPIXEL_POSITIONING_AUTO] to automatically enable it based on the font size.
</member>
- <member name="transform" type="Transform2D" setter="set_transform" getter="get_transform" default="Transform2D(1, 0, 0, 1, 0, 0)">
- 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].
- </member>
</members>
</class>
diff --git a/doc/classes/FontVariation.xml b/doc/classes/FontVariation.xml
new file mode 100644
index 0000000000..6aa381c2de
--- /dev/null
+++ b/doc/classes/FontVariation.xml
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="FontVariation" inherits="Font" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ Variation of the [Font].
+ </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]
+ var fv = FontVariation.new()
+ fv.set_base_font(load("res://BarlowCondensed-Regular.ttf"))
+ fv.set_variation_embolden(1.2);
+ $"Label".set("custom_fonts/font", fv)
+ $"Label".set("custom_fonts/font_size", 64)
+ [/gdscript]
+ [csharp]
+ var fv = new FontVariation();
+ fv.SetBaseFont(ResourceLoader.Load&lt;FontFile&gt;("res://BarlowCondensed-Regular.ttf"));
+ fv.SetVariationEmbolden(1.2);
+ GetNode("Label").Set("custom_fonts/font", fv);
+ GetNode("Label").Set("custom_font_sizes/font_size", 64);
+ [/csharp]
+ [/codeblocks]
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="set_spacing">
+ <return type="void" />
+ <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 [param value] in pixels (not relative to the font size).
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="base_font" type="Font" setter="set_base_font" getter="get_base_font">
+ Base font used to create a variation. If not set, default [Theme] font is used.
+ </member>
+ <member name="fallbacks" type="Font[]" setter="set_fallbacks" getter="get_fallbacks" default="[]">
+ Array of fallback [Font]s. If not set [member base_font] fallback are ussed.
+ </member>
+ <member name="opentype_features" type="Dictionary" setter="set_opentype_features" getter="get_opentype_features" default="{}">
+ A set of OpenType feature tags. More info: [url=https://docs.microsoft.com/en-us/typography/opentype/spec/featuretags]OpenType feature tags[/url].
+ </member>
+ <member name="spacing_bottom" type="int" setter="set_spacing" getter="get_spacing" default="0">
+ Extra spacing at the bottom of the line in pixels.
+ </member>
+ <member name="spacing_glyph" type="int" setter="set_spacing" getter="get_spacing" default="0">
+ Extra spacing between graphical glyphs
+ </member>
+ <member name="spacing_space" type="int" setter="set_spacing" getter="get_spacing" default="0">
+ Extra width of the space glyphs.
+ </member>
+ <member name="spacing_top" type="int" setter="set_spacing" getter="get_spacing" default="0">
+ Extra spacing at the top of the line in pixels.
+ </member>
+ <member name="variation_embolden" type="float" setter="set_variation_embolden" getter="get_variation_embolden" default="0.0">
+ If is not equal to zero, emboldens the font outlines. Negative values reduce the outline thickness.
+ [b]Note:[/b] Emboldened fonts might have self-intersecting outlines, which will prevent MSDF fonts and [TextMesh] from working correctly.
+ </member>
+ <member name="variation_face_index" type="int" setter="set_variation_face_index" getter="get_variation_face_index" default="0">
+ Active face index in the TrueType / OpenType collection file.
+ </member>
+ <member name="variation_opentype" type="Dictionary" setter="set_variation_opentype" getter="get_variation_opentype" default="{}">
+ Font OpenType variation coordinates. More info: [url=https://docs.microsoft.com/en-us/typography/opentype/spec/dvaraxisreg]OpenType variation tags[/url].
+ </member>
+ <member name="variation_transform" type="Transform2D" setter="set_variation_transform" getter="get_variation_transform" default="Transform2D(1, 0, 0, 1, 0, 0)">
+ 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].
+ </member>
+ </members>
+</class>
diff --git a/doc/classes/GPUParticles2D.xml b/doc/classes/GPUParticles2D.xml
index 53894bad87..606d2456c5 100644
--- a/doc/classes/GPUParticles2D.xml
+++ b/doc/classes/GPUParticles2D.xml
@@ -20,13 +20,13 @@
</method>
<method name="emit_particle">
<return type="void" />
- <argument index="0" name="xform" type="Transform2D" />
- <argument index="1" name="velocity" type="Vector2" />
- <argument index="2" name="color" type="Color" />
- <argument index="3" name="custom" type="Color" />
- <argument index="4" name="flags" type="int" />
+ <param index="0" name="xform" type="Transform2D" />
+ <param index="1" name="velocity" type="Vector2" />
+ <param index="2" name="color" type="Color" />
+ <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">
@@ -63,8 +63,8 @@
<member name="lifetime" type="float" setter="set_lifetime" getter="get_lifetime" default="1.0">
Amount of time each particle will exist.
</member>
- <member name="local_coords" type="bool" setter="set_use_local_coordinates" getter="get_use_local_coordinates" default="true">
- If [code]true[/code], particles use the parent node's coordinate space. If [code]false[/code], they use global coordinates.
+ <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 [GPUParticles2D] 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 [GPUParticles2D] node (and its parents) when it is moved or rotated.
</member>
<member name="one_shot" type="bool" setter="set_one_shot" getter="get_one_shot" default="false">
If [code]true[/code], only one emission cycle occurs. If set [code]true[/code] during a cycle, emission will stop at the cycle's end.
diff --git a/doc/classes/GPUParticles3D.xml b/doc/classes/GPUParticles3D.xml
index c4bd18db69..fc7b12e64f 100644
--- a/doc/classes/GPUParticles3D.xml
+++ b/doc/classes/GPUParticles3D.xml
@@ -20,20 +20,20 @@
</method>
<method name="emit_particle">
<return type="void" />
- <argument index="0" name="xform" type="Transform3D" />
- <argument index="1" name="velocity" type="Vector3" />
- <argument index="2" name="color" type="Color" />
- <argument index="3" name="custom" type="Color" />
- <argument index="4" name="flags" type="int" />
+ <param index="0" name="xform" type="Transform3D" />
+ <param index="1" name="velocity" type="Vector3" />
+ <param index="2" name="color" type="Color" />
+ <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" />
- <argument index="0" name="pass" type="int" />
+ <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">
@@ -44,10 +44,10 @@
</method>
<method name="set_draw_pass_mesh">
<return type="void" />
- <argument index="0" name="pass" type="int" />
- <argument index="1" name="mesh" type="Mesh" />
+ <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>
@@ -95,8 +95,8 @@
<member name="lifetime" type="float" setter="set_lifetime" getter="get_lifetime" default="1.0">
Amount of time each particle will exist.
</member>
- <member name="local_coords" type="bool" setter="set_use_local_coordinates" getter="get_use_local_coordinates" default="true">
- If [code]true[/code], particles use the parent node's coordinate space. If [code]false[/code], they use global coordinates.
+ <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 [GPUParticles3D] 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 [GPUParticles3D] node (and its parents) when it is moved or rotated.
</member>
<member name="one_shot" type="bool" setter="set_one_shot" getter="get_one_shot" default="false">
If [code]true[/code], only [code]amount[/code] particles will be emitted.
diff --git a/doc/classes/GPUParticlesAttractor3D.xml b/doc/classes/GPUParticlesAttractor3D.xml
index 5577b47c89..e69255cc31 100644
--- a/doc/classes/GPUParticlesAttractor3D.xml
+++ b/doc/classes/GPUParticlesAttractor3D.xml
@@ -1,19 +1,31 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="GPUParticlesAttractor3D" inherits="VisualInstance3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
+ Abstract class for 3D particle attractors affecting [GPUParticles3D] nodes.
</brief_description>
<description>
+ Particle attractors can be used to attract particles towards the attractor's origin, or to push them away from the attractor's origin.
+ Particle attractors work in real-time and can be moved, rotated and scaled during gameplay. Unlike collision shapes, non-uniform scaling of attractors is also supported.
+ Attractors can be temporarily disabled by hiding them, or by setting their [member strength] to [code]0.0[/code].
+ [b]Note:[/b] Particle attractors only affect [GPUParticles3D], not [CPUParticles3D].
</description>
<tutorials>
</tutorials>
<members>
<member name="attenuation" type="float" setter="set_attenuation" getter="get_attenuation" default="1.0">
+ The particle attractor's attenuation. Higher values result in more gradual pushing of particles as they come closer to the attractor's origin. Zero or negative values will cause particles to be pushed very fast as soon as the touch the attractor's edges.
</member>
<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.
</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).
+ [b]Note:[/b] If [member directionality] is greater than [code]0.0[/code], the direction in which particles are pushed can be changed by rotating the [GPUParticlesAttractor3D] node.
</member>
<member name="strength" type="float" setter="set_strength" getter="get_strength" default="1.0">
+ If [member strength] is negative, particles will be pushed in the reverse direction. Particles will be pushed [i]away[/i] from the attractor's origin if [member directionality] is [code]0.0[/code], or towards local +Z if [member directionality] is greater than [code]0.0[/code].
</member>
</members>
</class>
diff --git a/doc/classes/GPUParticlesAttractorBox3D.xml b/doc/classes/GPUParticlesAttractorBox3D.xml
index 3fa8276579..6595428cc2 100644
--- a/doc/classes/GPUParticlesAttractorBox3D.xml
+++ b/doc/classes/GPUParticlesAttractorBox3D.xml
@@ -1,13 +1,17 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="GPUParticlesAttractorBox3D" inherits="GPUParticlesAttractor3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
+ Box-shaped 3D particle attractor affecting [GPUParticles3D] nodes.
</brief_description>
<description>
+ Box-shaped 3D particle attractor affecting [GPUParticles3D] nodes.
+ [b]Note:[/b] Particle attractors only affect [GPUParticles3D], not [CPUParticles3D].
</description>
<tutorials>
</tutorials>
<members>
<member name="extents" type="Vector3" setter="set_extents" getter="get_extents" default="Vector3(1, 1, 1)">
+ The attractor box's extents in 3D units.
</member>
</members>
</class>
diff --git a/doc/classes/GPUParticlesAttractorSphere3D.xml b/doc/classes/GPUParticlesAttractorSphere3D.xml
index 2b68637b38..4077937ef3 100644
--- a/doc/classes/GPUParticlesAttractorSphere3D.xml
+++ b/doc/classes/GPUParticlesAttractorSphere3D.xml
@@ -1,13 +1,18 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="GPUParticlesAttractorSphere3D" inherits="GPUParticlesAttractor3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
+ Ellipse-shaped 3D particle attractor affecting [GPUParticles3D] nodes.
</brief_description>
<description>
+ Ellipse-shaped 3D particle attractor affecting [GPUParticles3D] nodes.
+ [b]Note:[/b] Particle attractors only affect [GPUParticles3D], not [CPUParticles3D].
</description>
<tutorials>
</tutorials>
<members>
<member name="radius" type="float" setter="set_radius" getter="get_radius" default="1.0">
+ The attractor sphere's radius in 3D units.
+ [b]Note:[/b] Stretched ellipses can be obtained by using non-uniform scaling on the [GPUParticlesAttractorSphere3D] node.
</member>
</members>
</class>
diff --git a/doc/classes/GPUParticlesAttractorVectorField3D.xml b/doc/classes/GPUParticlesAttractorVectorField3D.xml
index cbf817f407..aeadfaf4ab 100644
--- a/doc/classes/GPUParticlesAttractorVectorField3D.xml
+++ b/doc/classes/GPUParticlesAttractorVectorField3D.xml
@@ -1,15 +1,22 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="GPUParticlesAttractorVectorField3D" inherits="GPUParticlesAttractor3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
+ Box-shaped 3D particle attractor with strength varying within the box, affecting [GPUParticles3D] nodes.
</brief_description>
<description>
+ Box-shaped 3D particle attractor with strength varying within the box, affecting [GPUParticles3D] nodes.
+ Unlike [GPUParticlesAttractorBox3D], [GPUParticlesAttractorVectorField3D] uses a [member texture] to affect attraction strength within the box. This can be used to create complex attraction scenarios where particles travel in different directions depending on their location. This can be useful for weather effects such as sandstorms.
+ [b]Note:[/b] Particle attractors only affect [GPUParticles3D], not [CPUParticles3D].
</description>
<tutorials>
</tutorials>
<members>
<member name="extents" type="Vector3" setter="set_extents" getter="get_extents" default="Vector3(1, 1, 1)">
+ The extents of the vector field box in 3D units.
</member>
<member name="texture" type="Texture3D" setter="set_texture" getter="get_texture">
+ The 3D texture to be used. Values are linearly interpolated between the texture's pixels.
+ [b]Note:[/b] To get better performance, the 3D texture's resolution should reflect the [member extents] of the attractor. Since particle attraction is usually low-frequency data, the texture can be kept at a low resolution such as 64×64×64.
</member>
</members>
</class>
diff --git a/doc/classes/GPUParticlesCollision3D.xml b/doc/classes/GPUParticlesCollision3D.xml
index 45bc9b402b..27e3590e75 100644
--- a/doc/classes/GPUParticlesCollision3D.xml
+++ b/doc/classes/GPUParticlesCollision3D.xml
@@ -1,13 +1,23 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="GPUParticlesCollision3D" inherits="VisualInstance3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
+ Abstract class for 3D particle collision shapes affecting [GPUParticles3D] nodes.
</brief_description>
<description>
+ 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_mode] must be [constant ParticlesMaterial.COLLISION_RIGID] or [constant ParticlesMaterial.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>
<tutorials>
</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_mode] set to [constant ParticlesMaterial.COLLISION_RIGID] or [constant ParticlesMaterial.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.
</member>
</members>
</class>
diff --git a/doc/classes/GPUParticlesCollisionBox3D.xml b/doc/classes/GPUParticlesCollisionBox3D.xml
index 091b4ca730..65b69c0098 100644
--- a/doc/classes/GPUParticlesCollisionBox3D.xml
+++ b/doc/classes/GPUParticlesCollisionBox3D.xml
@@ -1,13 +1,18 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="GPUParticlesCollisionBox3D" inherits="GPUParticlesCollision3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
+ Box-shaped 3D particle collision shape affecting [GPUParticles3D] nodes.
</brief_description>
<description>
+ Box-shaped 3D particle collision shape affecting [GPUParticles3D] nodes.
+ [b]Note:[/b] [member ParticlesMaterial.collision_mode] must be [constant ParticlesMaterial.COLLISION_RIGID] or [constant ParticlesMaterial.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>
</tutorials>
<members>
<member name="extents" type="Vector3" setter="set_extents" getter="get_extents" default="Vector3(1, 1, 1)">
+ The collision box's extents in 3D units.
</member>
</members>
</class>
diff --git a/doc/classes/GPUParticlesCollisionHeightField3D.xml b/doc/classes/GPUParticlesCollisionHeightField3D.xml
index e7e14375d9..72d273112e 100644
--- a/doc/classes/GPUParticlesCollisionHeightField3D.xml
+++ b/doc/classes/GPUParticlesCollisionHeightField3D.xml
@@ -1,41 +1,59 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="GPUParticlesCollisionHeightField3D" inherits="GPUParticlesCollision3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
+ Real-time heightmap-shaped 3D particle attractor affecting [GPUParticles3D] nodes.
</brief_description>
<description>
+ 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_mode] must be [constant ParticlesMaterial.COLLISION_RIGID] or [constant ParticlesMaterial.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>
</tutorials>
<members>
<member name="extents" type="Vector3" setter="set_extents" getter="get_extents" default="Vector3(1, 1, 1)">
+ The collision heightmap's extents in 3D units. To improve heightmap quality, [member extents] should be set as small as possible while covering the parts of the scene you need.
</member>
- <member name="follow_camera_enabled" type="bool" setter="set_follow_camera_mode" getter="is_follow_camera_mode_enabled" default="false">
- </member>
- <member name="follow_camera_push_ratio" type="float" setter="set_follow_camera_push_ratio" getter="get_follow_camera_push_ratio" default="0.1">
+ <member name="follow_camera_enabled" type="bool" setter="set_follow_camera_enabled" getter="is_follow_camera_enabled" default="false">
+ If [code]true[/code], the [GPUParticlesCollisionHeightField3D] will follow the current camera in global space. The [GPUParticlesCollisionHeightField3D] does not need to be a child of the [Camera3D] node for this to work.
+ Following the camera has a performance cost, as it will force the heightmap to update whenever the camera moves. Consider lowering [member resolution] to improve performance if [member follow_camera_enabled] is [code]true[/code].
</member>
<member name="resolution" type="int" setter="set_resolution" getter="get_resolution" enum="GPUParticlesCollisionHeightField3D.Resolution" default="2">
+ Higher resolutions can represent small details more accurately in large scenes, at the cost of lower performance. If [member update_mode] is [constant UPDATE_MODE_ALWAYS], consider using the lowest resolution possible.
</member>
<member name="update_mode" type="int" setter="set_update_mode" getter="get_update_mode" enum="GPUParticlesCollisionHeightField3D.UpdateMode" default="0">
+ The update policy to use for the generated heightmap.
</member>
</members>
<constants>
<constant name="RESOLUTION_256" value="0" enum="Resolution">
+ Generate a 256×256 heightmap. Intended for small-scale scenes, or larger scenes with no distant particles.
</constant>
<constant name="RESOLUTION_512" value="1" enum="Resolution">
+ Generate a 512×512 heightmap. Intended for medium-scale scenes, or larger scenes with no distant particles.
</constant>
<constant name="RESOLUTION_1024" value="2" enum="Resolution">
+ Generate a 1024×1024 heightmap. Intended for large scenes with distant particles.
</constant>
<constant name="RESOLUTION_2048" value="3" enum="Resolution">
+ Generate a 2048×2048 heightmap. Intended for very large scenes with distant particles.
</constant>
<constant name="RESOLUTION_4096" value="4" enum="Resolution">
+ Generate a 4096×4096 heightmap. Intended for huge scenes with distant particles.
</constant>
<constant name="RESOLUTION_8192" value="5" enum="Resolution">
+ Generate a 8192×8192 heightmap. Intended for gigantic scenes with distant particles.
</constant>
<constant name="RESOLUTION_MAX" value="6" enum="Resolution">
+ Represents the size of the [enum Resolution] enum.
</constant>
<constant name="UPDATE_MODE_WHEN_MOVED" value="0" enum="UpdateMode">
+ Only update the heightmap when the [GPUParticlesCollisionHeightField3D] node is moved, or when the camera moves if [member follow_camera_enabled] is [code]true[/code]. An update can be forced by slightly moving the [GPUParticlesCollisionHeightField3D] in any direction.
</constant>
<constant name="UPDATE_MODE_ALWAYS" value="1" enum="UpdateMode">
+ Update the heightmap every frame. This has a significant performance cost. This update should only be used when geometry that particles can collide with changes significantly during gameplay.
</constant>
</constants>
</class>
diff --git a/doc/classes/GPUParticlesCollisionSDF3D.xml b/doc/classes/GPUParticlesCollisionSDF3D.xml
index 6f59a18eb5..0e7640ba89 100644
--- a/doc/classes/GPUParticlesCollisionSDF3D.xml
+++ b/doc/classes/GPUParticlesCollisionSDF3D.xml
@@ -1,35 +1,73 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="GPUParticlesCollisionSDF3D" inherits="GPUParticlesCollision3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
+ Baked signed distance field 3D particle attractor affecting [GPUParticles3D] nodes.
</brief_description>
<description>
+ Baked signed distance field 3D particle attractor affecting [GPUParticles3D] nodes.
+ 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_mode] must be [constant ParticlesMaterial.COLLISION_RIGID] or [constant ParticlesMaterial.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>
</tutorials>
+ <methods>
+ <method name="get_bake_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 bake_mask] is enabled, given a [param layer_number] between 1 and 32.
+ </description>
+ </method>
+ <method name="set_bake_mask_value">
+ <return type="void" />
+ <param index="0" name="layer_number" type="int" />
+ <param index="1" name="value" type="bool" />
+ <description>
+ 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>
<members>
+ <member name="bake_mask" type="int" setter="set_bake_mask" getter="get_bake_mask" default="4294967295">
+ The visual layers to account for when baking the particle collision SDF. Only [MeshInstance3D]s whose [member VisualInstance3D.layers] match with this [member bake_mask] will be included in the generated particle collision SDF. By default, all objects are taken into account for the particle collision SDF baking.
+ </member>
<member name="extents" type="Vector3" setter="set_extents" getter="get_extents" default="Vector3(1, 1, 1)">
+ The collision SDF's extents in 3D units. To improve SDF quality, the [member extents] should be set as small as possible while covering the parts of the scene you need.
</member>
<member name="resolution" type="int" setter="set_resolution" getter="get_resolution" enum="GPUParticlesCollisionSDF3D.Resolution" default="2">
+ The bake resolution to use for the signed distance field [member texture]. The texture must be baked again for changes to the [member resolution] property to be effective. Higher resolutions have a greater performance cost and take more time to bake. Higher resolutions also result in larger baked textures, leading to increased VRAM and storage space requirements. To improve performance and reduce bake times, use the lowest resolution possible for the object you're representing the collision of.
</member>
<member name="texture" type="Texture3D" setter="set_texture" getter="get_texture">
+ The 3D texture representing the signed distance field.
</member>
<member name="thickness" type="float" setter="set_thickness" getter="get_thickness" default="1.0">
+ The collision shape's thickness. Unlike other particle colliders, [GPUParticlesCollisionSDF3D] is actually hollow on the inside. [member thickness] can be increased to prevent particles from tunneling through the collision shape at high speeds, or when the [GPUParticlesCollisionSDF3D] is moved.
</member>
</members>
<constants>
<constant name="RESOLUTION_16" value="0" enum="Resolution">
+ Bake a 16×16×16 signed distance field. This is the fastest option, but also the least precise.
</constant>
<constant name="RESOLUTION_32" value="1" enum="Resolution">
+ Bake a 32×32×32 signed distance field.
</constant>
<constant name="RESOLUTION_64" value="2" enum="Resolution">
+ Bake a 64×64×64 signed distance field.
</constant>
<constant name="RESOLUTION_128" value="3" enum="Resolution">
+ Bake a 128×128×128 signed distance field.
</constant>
<constant name="RESOLUTION_256" value="4" enum="Resolution">
+ Bake a 256×256×256 signed distance field.
</constant>
<constant name="RESOLUTION_512" value="5" enum="Resolution">
+ Bake a 512×512×512 signed distance field. This is the slowest option, but also the most precise.
</constant>
<constant name="RESOLUTION_MAX" value="6" enum="Resolution">
+ Represents the size of the [enum Resolution] enum.
</constant>
</constants>
</class>
diff --git a/doc/classes/GPUParticlesCollisionSphere3D.xml b/doc/classes/GPUParticlesCollisionSphere3D.xml
index b78e114d09..bfebe05005 100644
--- a/doc/classes/GPUParticlesCollisionSphere3D.xml
+++ b/doc/classes/GPUParticlesCollisionSphere3D.xml
@@ -1,13 +1,18 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="GPUParticlesCollisionSphere3D" inherits="GPUParticlesCollision3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
+ Sphere-shaped 3D particle collision shape affecting [GPUParticles3D] nodes.
</brief_description>
<description>
+ Sphere-shaped 3D particle collision shape affecting [GPUParticles3D] nodes.
+ [b]Note:[/b] [member ParticlesMaterial.collision_mode] must be [constant ParticlesMaterial.COLLISION_RIGID] or [constant ParticlesMaterial.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>
</tutorials>
<members>
<member name="radius" type="float" setter="set_radius" getter="get_radius" default="1.0">
+ The collision sphere's radius in 3D units.
</member>
</members>
</class>
diff --git a/doc/classes/Generic6DOFJoint3D.xml b/doc/classes/Generic6DOFJoint3D.xml
index b1bc411a21..e6058b1bf9 100644
--- a/doc/classes/Generic6DOFJoint3D.xml
+++ b/doc/classes/Generic6DOFJoint3D.xml
@@ -11,79 +11,79 @@
<methods>
<method name="get_flag_x" qualifiers="const">
<return type="bool" />
- <argument index="0" name="flag" type="int" enum="Generic6DOFJoint3D.Flag" />
+ <param index="0" name="flag" type="int" enum="Generic6DOFJoint3D.Flag" />
<description>
</description>
</method>
<method name="get_flag_y" qualifiers="const">
<return type="bool" />
- <argument index="0" name="flag" type="int" enum="Generic6DOFJoint3D.Flag" />
+ <param index="0" name="flag" type="int" enum="Generic6DOFJoint3D.Flag" />
<description>
</description>
</method>
<method name="get_flag_z" qualifiers="const">
<return type="bool" />
- <argument index="0" name="flag" type="int" enum="Generic6DOFJoint3D.Flag" />
+ <param index="0" name="flag" type="int" enum="Generic6DOFJoint3D.Flag" />
<description>
</description>
</method>
<method name="get_param_x" qualifiers="const">
<return type="float" />
- <argument index="0" name="param" type="int" enum="Generic6DOFJoint3D.Param" />
+ <param index="0" name="param" type="int" enum="Generic6DOFJoint3D.Param" />
<description>
</description>
</method>
<method name="get_param_y" qualifiers="const">
<return type="float" />
- <argument index="0" name="param" type="int" enum="Generic6DOFJoint3D.Param" />
+ <param index="0" name="param" type="int" enum="Generic6DOFJoint3D.Param" />
<description>
</description>
</method>
<method name="get_param_z" qualifiers="const">
<return type="float" />
- <argument index="0" name="param" type="int" enum="Generic6DOFJoint3D.Param" />
+ <param index="0" name="param" type="int" enum="Generic6DOFJoint3D.Param" />
<description>
</description>
</method>
<method name="set_flag_x">
<return type="void" />
- <argument index="0" name="flag" type="int" enum="Generic6DOFJoint3D.Flag" />
- <argument index="1" name="value" type="bool" />
+ <param index="0" name="flag" type="int" enum="Generic6DOFJoint3D.Flag" />
+ <param index="1" name="value" type="bool" />
<description>
</description>
</method>
<method name="set_flag_y">
<return type="void" />
- <argument index="0" name="flag" type="int" enum="Generic6DOFJoint3D.Flag" />
- <argument index="1" name="value" type="bool" />
+ <param index="0" name="flag" type="int" enum="Generic6DOFJoint3D.Flag" />
+ <param index="1" name="value" type="bool" />
<description>
</description>
</method>
<method name="set_flag_z">
<return type="void" />
- <argument index="0" name="flag" type="int" enum="Generic6DOFJoint3D.Flag" />
- <argument index="1" name="value" type="bool" />
+ <param index="0" name="flag" type="int" enum="Generic6DOFJoint3D.Flag" />
+ <param index="1" name="value" type="bool" />
<description>
</description>
</method>
<method name="set_param_x">
<return type="void" />
- <argument index="0" name="param" type="int" enum="Generic6DOFJoint3D.Param" />
- <argument index="1" name="value" type="float" />
+ <param index="0" name="param" type="int" enum="Generic6DOFJoint3D.Param" />
+ <param index="1" name="value" type="float" />
<description>
</description>
</method>
<method name="set_param_y">
<return type="void" />
- <argument index="0" name="param" type="int" enum="Generic6DOFJoint3D.Param" />
- <argument index="1" name="value" type="float" />
+ <param index="0" name="param" type="int" enum="Generic6DOFJoint3D.Param" />
+ <param index="1" name="value" type="float" />
<description>
</description>
</method>
<method name="set_param_z">
<return type="void" />
- <argument index="0" name="param" type="int" enum="Generic6DOFJoint3D.Param" />
- <argument index="1" name="value" type="float" />
+ <param index="0" name="param" type="int" enum="Generic6DOFJoint3D.Param" />
+ <param index="1" name="value" type="float" />
<description>
</description>
</method>
@@ -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 cbd83e8d7d..392ca2cabb 100644
--- a/doc/classes/Geometry2D.xml
+++ b/doc/classes/Geometry2D.xml
@@ -10,142 +10,142 @@
</tutorials>
<methods>
<method name="clip_polygons">
- <return type="Array" />
- <argument index="0" name="polygon_a" type="PackedVector2Array" />
- <argument index="1" name="polygon_b" type="PackedVector2Array" />
+ <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" />
- <argument index="0" name="polyline" type="PackedVector2Array" />
- <argument index="1" name="polygon" type="PackedVector2Array" />
+ <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">
<return type="PackedVector2Array" />
- <argument index="0" name="points" type="PackedVector2Array" />
+ <param index="0" name="points" type="PackedVector2Array" />
<description>
Given an array of [Vector2]s, returns the convex hull as a list of points in counterclockwise order. The last point is the same as the first one.
</description>
</method>
<method name="exclude_polygons">
- <return type="Array" />
- <argument index="0" name="polygon_a" type="PackedVector2Array" />
- <argument index="1" name="polygon_b" type="PackedVector2Array" />
+ <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>
<method name="get_closest_point_to_segment">
<return type="Vector2" />
- <argument index="0" name="point" type="Vector2" />
- <argument index="1" name="s1" type="Vector2" />
- <argument index="2" name="s2" type="Vector2" />
+ <param index="0" name="point" type="Vector2" />
+ <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">
<return type="Vector2" />
- <argument index="0" name="point" type="Vector2" />
- <argument index="1" name="s1" type="Vector2" />
- <argument index="2" name="s2" type="Vector2" />
+ <param index="0" name="point" type="Vector2" />
+ <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">
<return type="PackedVector2Array" />
- <argument index="0" name="p1" type="Vector2" />
- <argument index="1" name="q1" type="Vector2" />
- <argument index="2" name="p2" type="Vector2" />
- <argument index="3" name="q2" type="Vector2" />
+ <param index="0" name="p1" type="Vector2" />
+ <param index="1" name="q1" type="Vector2" />
+ <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" />
- <argument index="0" name="polygon_a" type="PackedVector2Array" />
- <argument index="1" name="polygon_b" type="PackedVector2Array" />
+ <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" />
- <argument index="0" name="polyline" type="PackedVector2Array" />
- <argument index="1" name="polygon" type="PackedVector2Array" />
+ <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">
<return type="bool" />
- <argument index="0" name="point" type="Vector2" />
- <argument index="1" name="circle_position" type="Vector2" />
- <argument index="2" name="circle_radius" type="float" />
+ <param index="0" name="point" type="Vector2" />
+ <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">
<return type="bool" />
- <argument index="0" name="point" type="Vector2" />
- <argument index="1" name="polygon" type="PackedVector2Array" />
+ <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" />
- <argument index="0" name="polygon" type="PackedVector2Array" />
+ <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">
<return type="Variant" />
- <argument index="0" name="from_a" type="Vector2" />
- <argument index="1" name="dir_a" type="Vector2" />
- <argument index="2" name="from_b" type="Vector2" />
- <argument index="3" name="dir_b" type="Vector2" />
+ <param index="0" name="from_a" type="Vector2" />
+ <param index="1" name="dir_a" type="Vector2" />
+ <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 an empty [Variant].
+ 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>
<method name="make_atlas">
<return type="Dictionary" />
- <argument index="0" name="sizes" type="PackedVector2Array" />
+ <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 a vector of [Vector2] that specifies the positions of each tile, [code]size[/code] contains the overall size of the whole atlas as [Vector2].
+ Given an array of [Vector2]s representing tiles, builds an atlas. The returned dictionary has two keys: [code]points[/code] is an array of [Vector2] that specifies the positions of each tile, [code]size[/code] contains the overall size of the whole atlas as [Vector2].
</description>
</method>
<method name="merge_polygons">
- <return type="Array" />
- <argument index="0" name="polygon_a" type="PackedVector2Array" />
- <argument index="1" name="polygon_b" type="PackedVector2Array" />
+ <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" />
- <argument index="0" name="polygon" type="PackedVector2Array" />
- <argument index="1" name="delta" type="float" />
- <argument index="2" name="join_type" type="int" enum="Geometry2D.PolyJoinType" default="0" />
+ <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,50 +166,60 @@
</description>
</method>
<method name="offset_polyline">
- <return type="Array" />
- <argument index="0" name="polyline" type="PackedVector2Array" />
- <argument index="1" name="delta" type="float" />
- <argument index="2" name="join_type" type="int" enum="Geometry2D.PolyJoinType" default="0" />
- <argument 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].
+ <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 [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>
<method name="point_is_inside_triangle" qualifiers="const">
<return type="bool" />
- <argument index="0" name="point" type="Vector2" />
- <argument index="1" name="a" type="Vector2" />
- <argument index="2" name="b" type="Vector2" />
- <argument index="3" name="c" type="Vector2" />
+ <param index="0" name="point" type="Vector2" />
+ <param index="1" name="a" type="Vector2" />
+ <param index="2" name="b" type="Vector2" />
+ <param index="3" name="c" type="Vector2" />
+ <description>
+ Returns if [param point] is inside the triangle specified by [param a], [param b] and [param c].
+ </description>
+ </method>
+ <method name="segment_intersects_circle">
+ <return type="float" />
+ <param index="0" name="segment_from" type="Vector2" />
+ <param index="1" name="segment_to" type="Vector2" />
+ <param index="2" name="circle_position" type="Vector2" />
+ <param index="3" name="circle_radius" type="float" />
<description>
- Returns if [code]point[/code] is inside the triangle specified by [code]a[/code], [code]b[/code] and [code]c[/code].
+ 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">
<return type="Variant" />
- <argument index="0" name="from_a" type="Vector2" />
- <argument index="1" name="to_a" type="Vector2" />
- <argument index="2" name="from_b" type="Vector2" />
- <argument index="3" name="to_b" type="Vector2" />
+ <param index="0" name="from_a" type="Vector2" />
+ <param index="1" name="to_a" type="Vector2" />
+ <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 an empty [Variant].
+ 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" />
- <argument index="0" name="points" type="PackedVector2Array" />
+ <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" />
- <argument index="0" name="polygon" type="PackedVector2Array" />
+ <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 0bf6f880c2..d37b0b7b81 100644
--- a/doc/classes/Geometry3D.xml
+++ b/doc/classes/Geometry3D.xml
@@ -10,118 +10,118 @@
</tutorials>
<methods>
<method name="build_box_planes">
- <return type="Array" />
- <argument index="0" name="extents" type="Vector3" />
+ <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" />
- <argument index="0" name="radius" type="float" />
- <argument index="1" name="height" type="float" />
- <argument index="2" name="sides" type="int" />
- <argument index="3" name="lats" type="int" />
- <argument index="4" name="axis" type="int" enum="Vector3.Axis" default="2" />
+ <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" />
- <argument index="0" name="radius" type="float" />
- <argument index="1" name="height" type="float" />
- <argument index="2" name="sides" type="int" />
- <argument index="3" name="axis" type="int" enum="Vector3.Axis" default="2" />
+ <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">
<return type="PackedVector3Array" />
- <argument index="0" name="points" type="PackedVector3Array" />
- <argument index="1" name="plane" type="Plane" />
+ <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">
<return type="Vector3" />
- <argument index="0" name="point" type="Vector3" />
- <argument index="1" name="s1" type="Vector3" />
- <argument index="2" name="s2" type="Vector3" />
+ <param index="0" name="point" type="Vector3" />
+ <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">
<return type="Vector3" />
- <argument index="0" name="point" type="Vector3" />
- <argument index="1" name="s1" type="Vector3" />
- <argument index="2" name="s2" type="Vector3" />
+ <param index="0" name="point" type="Vector3" />
+ <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">
<return type="PackedVector3Array" />
- <argument index="0" name="p1" type="Vector3" />
- <argument index="1" name="p2" type="Vector3" />
- <argument index="2" name="q1" type="Vector3" />
- <argument index="3" name="q2" type="Vector3" />
+ <param index="0" name="p1" type="Vector3" />
+ <param index="1" name="p2" type="Vector3" />
+ <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">
<return type="Variant" />
- <argument index="0" name="from" type="Vector3" />
- <argument index="1" name="dir" type="Vector3" />
- <argument index="2" name="a" type="Vector3" />
- <argument index="3" name="b" type="Vector3" />
- <argument index="4" name="c" type="Vector3" />
+ <param index="0" name="from" type="Vector3" />
+ <param index="1" name="dir" type="Vector3" />
+ <param index="2" name="a" type="Vector3" />
+ <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, an empty [Variant] is returned.
+ 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">
<return type="PackedVector3Array" />
- <argument index="0" name="from" type="Vector3" />
- <argument index="1" name="to" type="Vector3" />
- <argument index="2" name="planes" type="Array" />
+ <param index="0" name="from" type="Vector3" />
+ <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">
<return type="PackedVector3Array" />
- <argument index="0" name="from" type="Vector3" />
- <argument index="1" name="to" type="Vector3" />
- <argument index="2" name="height" type="float" />
- <argument index="3" name="radius" type="float" />
+ <param index="0" name="from" type="Vector3" />
+ <param index="1" name="to" type="Vector3" />
+ <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">
<return type="PackedVector3Array" />
- <argument index="0" name="from" type="Vector3" />
- <argument index="1" name="to" type="Vector3" />
- <argument index="2" name="sphere_position" type="Vector3" />
- <argument index="3" name="sphere_radius" type="float" />
+ <param index="0" name="from" type="Vector3" />
+ <param index="1" name="to" type="Vector3" />
+ <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">
<return type="Variant" />
- <argument index="0" name="from" type="Vector3" />
- <argument index="1" name="to" type="Vector3" />
- <argument index="2" name="a" type="Vector3" />
- <argument index="3" name="b" type="Vector3" />
- <argument index="4" name="c" type="Vector3" />
+ <param index="0" name="from" type="Vector3" />
+ <param index="1" name="to" type="Vector3" />
+ <param index="2" name="a" type="Vector3" />
+ <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, an empty [Variant] is returned.
+ 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 c803f43fb0..79a60a9e62 100644
--- a/doc/classes/GeometryInstance3D.xml
+++ b/doc/classes/GeometryInstance3D.xml
@@ -9,23 +9,23 @@
<tutorials>
</tutorials>
<methods>
- <method name="get_shader_instance_uniform" qualifiers="const">
+ <method name="get_instance_shader_uniform" qualifiers="const">
<return type="Variant" />
- <argument index="0" name="uniform" type="StringName" />
+ <param index="0" name="uniform" type="StringName" />
<description>
</description>
</method>
<method name="set_custom_aabb">
<return type="void" />
- <argument index="0" name="aabb" type="AABB" />
+ <param index="0" name="aabb" type="AABB" />
<description>
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_shader_instance_uniform">
+ <method name="set_instance_shader_uniform">
<return type="void" />
- <argument index="0" name="uniform" type="StringName" />
- <argument index="1" name="value" type="Variant" />
+ <param index="0" name="uniform" type="StringName" />
+ <param index="1" name="value" type="Variant" />
<description>
</description>
</method>
diff --git a/doc/classes/Gradient.xml b/doc/classes/Gradient.xml
index 89c968cc9e..f081174b67 100644
--- a/doc/classes/Gradient.xml
+++ b/doc/classes/Gradient.xml
@@ -5,30 +5,31 @@
</brief_description>
<description>
Given a set of colors, this resource will interpolate them in order. This means that if you have color 1, color 2 and color 3, the gradient will interpolate from color 1 to color 2 and from color 2 to color 3. The gradient will initially have 2 colors (black and white), one (black) at gradient lower offset 0 and the other (white) at the gradient higher offset 1.
+ See also [Curve] which supports more complex easing methods, but does not support colors.
</description>
<tutorials>
</tutorials>
<methods>
<method name="add_point">
<return type="void" />
- <argument index="0" name="offset" type="float" />
- <argument index="1" name="color" type="Color" />
+ <param index="0" name="offset" type="float" />
+ <param index="1" name="color" type="Color" />
<description>
Adds the specified color to the end of the gradient, with the specified offset.
</description>
</method>
<method name="get_color">
<return type="Color" />
- <argument index="0" name="point" type="int" />
+ <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" />
- <argument index="0" name="point" type="int" />
+ <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">
@@ -39,16 +40,16 @@
</method>
<method name="interpolate">
<return type="Color" />
- <argument index="0" name="offset" type="float" />
+ <param index="0" name="offset" type="float" />
<description>
- Returns the interpolated color specified by [code]offset[/code].
+ Returns the interpolated color specified by [param offset].
</description>
</method>
<method name="remove_point">
<return type="void" />
- <argument index="0" name="point" type="int" />
+ <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">
@@ -59,18 +60,18 @@
</method>
<method name="set_color">
<return type="void" />
- <argument index="0" name="point" type="int" />
- <argument index="1" name="color" type="Color" />
+ <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">
<return type="void" />
- <argument index="0" name="point" type="int" />
- <argument index="1" name="offset" type="float" />
+ <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 a124753a9f..3254754ac1 100644
--- a/doc/classes/GradientTexture1D.xml
+++ b/doc/classes/GradientTexture1D.xml
@@ -4,7 +4,7 @@
Gradient-filled texture.
</brief_description>
<description>
- GradientTexture1D uses a [Gradient] to fill the texture data. The gradient will be filled from left to right using colors obtained from the gradient. This means the texture does not necessarily represent an exact copy of the gradient, but instead an interpolation of samples obtained from the gradient at fixed steps (see [member width]).
+ GradientTexture1D uses a [Gradient] to fill the texture data. The gradient will be filled from left to right using colors obtained from the gradient. This means the texture does not necessarily represent an exact copy of the gradient, but instead an interpolation of samples obtained from the gradient at fixed steps (see [member width]). See also [GradientTexture2D], [CurveTexture] and [CurveXYZTexture].
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/GradientTexture2D.xml b/doc/classes/GradientTexture2D.xml
index 4362578932..7561f1b947 100644
--- a/doc/classes/GradientTexture2D.xml
+++ b/doc/classes/GradientTexture2D.xml
@@ -4,7 +4,7 @@
Gradient-filled 2D texture.
</brief_description>
<description>
- The texture uses a [Gradient] to fill the texture data in 2D space. The gradient is filled according to the specified [member fill] and [member repeat] types using colors obtained from the gradient. The texture does not necessarily represent an exact copy of the gradient, but instead an interpolation of samples obtained from the gradient at fixed steps (see [member width] and [member height]).
+ The texture uses a [Gradient] to fill the texture data in 2D space. The gradient is filled according to the specified [member fill] and [member repeat] types using colors obtained from the gradient. The texture does not necessarily represent an exact copy of the gradient, but instead an interpolation of samples obtained from the gradient at fixed steps (see [member width] and [member height]). See also [GradientTexture1D], [CurveTexture] and [CurveXYZTexture].
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/GraphEdit.xml b/doc/classes/GraphEdit.xml
index e699a40ea0..e5aa78971e 100644
--- a/doc/classes/GraphEdit.xml
+++ b/doc/classes/GraphEdit.xml
@@ -12,20 +12,20 @@
<methods>
<method name="_get_connection_line" qualifiers="virtual const">
<return type="PackedVector2Array" />
- <argument index="0" name="from" type="Vector2" />
- <argument index="1" name="to" type="Vector2" />
+ <param index="0" name="from" type="Vector2" />
+ <param index="1" name="to" 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" />
- <argument index="0" name="graph_node" type="Object" />
- <argument index="1" name="slot_index" type="int" />
- <argument index="2" name="mouse_position" type="Vector2" />
+ <param index="0" name="graph_node" type="Object" />
+ <param index="1" name="slot_index" 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 graph_node].[method GraphNode.get_connection_input_position]([param slot_index]) (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):
@@ -39,11 +39,11 @@
</method>
<method name="_is_in_output_hotzone" qualifiers="virtual">
<return type="bool" />
- <argument index="0" name="graph_node" type="Object" />
- <argument index="1" name="slot_index" type="int" />
- <argument index="2" name="mouse_position" type="Vector2" />
+ <param index="0" name="graph_node" type="Object" />
+ <param index="1" name="slot_index" 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):
@@ -55,24 +55,47 @@
[/codeblock]
</description>
</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" />
+ <description>
+ This virtual method can be used to insert additional error detection while the user is dragging a connection over a valid port.
+ Return [code]true[/code] if the connection is indeed valid or return [code]false[/code] if the connection is impossible. If the connection is impossible, no snapping to the port and thus no connection request to that port will happen.
+ In this example a connection to same node is suppressed:
+ [codeblocks]
+ [gdscript]
+ func _is_node_hover_valid(from, from_slot, to, to_slot):
+ return from != to
+ [/gdscript]
+ [csharp]
+ public override bool _IsNodeHoverValid(String from, int fromSlot, String to, int toSlot) {
+ return from != to;
+ }
+ [/csharp]
+ [/codeblocks]
+ </description>
+ </method>
<method name="add_valid_connection_type">
<return type="void" />
- <argument index="0" name="from_type" type="int" />
- <argument index="1" name="to_type" type="int" />
+ <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.
</description>
</method>
<method name="add_valid_left_disconnect_type">
<return type="void" />
- <argument index="0" name="type" type="int" />
+ <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.
</description>
</method>
<method name="add_valid_right_disconnect_type">
<return type="void" />
- <argument index="0" name="type" type="int" />
+ <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.
</description>
@@ -91,22 +114,22 @@
</method>
<method name="connect_node">
<return type="int" enum="Error" />
- <argument index="0" name="from" type="StringName" />
- <argument index="1" name="from_port" type="int" />
- <argument index="2" name="to" type="StringName" />
- <argument index="3" name="to_port" type="int" />
+ <param index="0" name="from" type="StringName" />
+ <param index="1" name="from_port" type="int" />
+ <param index="2" name="to" 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] slot of the [param from] GraphNode and the [param to_port] slot of the [param to] GraphNode. If the connection already exists, no connection is created.
</description>
</method>
<method name="disconnect_node">
<return type="void" />
- <argument index="0" name="from" type="StringName" />
- <argument index="1" name="from_port" type="int" />
- <argument index="2" name="to" type="StringName" />
- <argument index="3" name="to_port" type="int" />
+ <param index="0" name="from" type="StringName" />
+ <param index="1" name="from_port" type="int" />
+ <param index="2" name="to" 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] slot of the [param from] GraphNode and the [param to_port] slot of the [param to] GraphNode. If the connection does not exist, no connection is removed.
</description>
</method>
<method name="force_connection_drag_end">
@@ -119,14 +142,14 @@
</method>
<method name="get_connection_line">
<return type="PackedVector2Array" />
- <argument index="0" name="from" type="Vector2" />
- <argument index="1" name="to" type="Vector2" />
+ <param index="0" name="from" type="Vector2" />
+ <param index="1" name="to" 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] and [param to].
</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>
@@ -140,60 +163,60 @@
</method>
<method name="is_node_connected">
<return type="bool" />
- <argument index="0" name="from" type="StringName" />
- <argument index="1" name="from_port" type="int" />
- <argument index="2" name="to" type="StringName" />
- <argument index="3" name="to_port" type="int" />
+ <param index="0" name="from" type="StringName" />
+ <param index="1" name="from_port" type="int" />
+ <param index="2" name="to" 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] slot of the [param from] GraphNode is connected to the [param to_port] slot of the [param to] GraphNode.
</description>
</method>
<method name="is_valid_connection_type" qualifiers="const">
<return type="bool" />
- <argument index="0" name="from_type" type="int" />
- <argument index="1" name="to_type" type="int" />
+ <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.
</description>
</method>
<method name="remove_valid_connection_type">
<return type="void" />
- <argument index="0" name="from_type" type="int" />
- <argument index="1" name="to_type" type="int" />
+ <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.
</description>
</method>
<method name="remove_valid_left_disconnect_type">
<return type="void" />
- <argument index="0" name="type" type="int" />
+ <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.
</description>
</method>
<method name="remove_valid_right_disconnect_type">
<return type="void" />
- <argument index="0" name="type" type="int" />
+ <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.
</description>
</method>
<method name="set_connection_activity">
<return type="void" />
- <argument index="0" name="from" type="StringName" />
- <argument index="1" name="from_port" type="int" />
- <argument index="2" name="to" type="StringName" />
- <argument index="3" name="to_port" type="int" />
- <argument index="4" name="amount" type="float" />
+ <param index="0" name="from" type="StringName" />
+ <param index="1" name="from_port" type="int" />
+ <param index="2" name="to" 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]'s [param from_port] and [param to]'s [param to_port] with the color provided in the [theme_item activity] theme property.
</description>
</method>
<method name="set_selected">
<return type="void" />
- <argument index="0" name="node" type="Node" />
+ <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>
@@ -202,6 +225,9 @@
<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.
</member>
+ <member name="connection_lines_curvature" type="float" setter="set_connection_lines_curvature" getter="get_connection_lines_curvature" default="0.5">
+ The curvature of the lines between the nodes. 0 results in straight lines.
+ </member>
<member name="connection_lines_thickness" type="float" setter="set_connection_lines_thickness" getter="get_connection_lines_thickness" default="2.0">
The thickness of the lines between the nodes.
</member>
@@ -258,34 +284,34 @@
</description>
</signal>
<signal name="connection_drag_started">
- <argument index="0" name="from" type="String" />
- <argument index="1" name="slot" type="String" />
- <argument index="2" name="is_output" type="bool" />
+ <param index="0" name="from" type="String" />
+ <param index="1" name="slot" 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">
- <argument index="0" name="to" type="StringName" />
- <argument index="1" name="to_slot" type="int" />
- <argument index="2" name="release_position" type="Vector2" />
+ <param index="0" name="to" type="StringName" />
+ <param index="1" name="to_slot" 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.
</description>
</signal>
<signal name="connection_request">
- <argument index="0" name="from" type="StringName" />
- <argument index="1" name="from_slot" type="int" />
- <argument index="2" name="to" type="StringName" />
- <argument index="3" name="to_slot" type="int" />
+ <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" />
<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_slot] slot of the [param from] GraphNode and the [param to_slot] slot of the [param to] GraphNode is attempted to be created.
</description>
</signal>
<signal name="connection_to_empty">
- <argument index="0" name="from" type="StringName" />
- <argument index="1" name="from_slot" type="int" />
- <argument index="2" name="release_position" type="Vector2" />
+ <param index="0" name="from" type="StringName" />
+ <param index="1" name="from_slot" 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.
</description>
@@ -296,17 +322,18 @@
</description>
</signal>
<signal name="delete_nodes_request">
+ <param index="0" name="nodes" type="StringName[]" />
<description>
- Emitted when a GraphNode is attempted to be removed from the GraphEdit.
+ Emitted when a GraphNode is attempted to be removed from the GraphEdit. Provides a list of node names to be removed (all selected nodes, excluding nodes without closing button).
</description>
</signal>
<signal name="disconnection_request">
- <argument index="0" name="from" type="StringName" />
- <argument index="1" name="from_slot" type="int" />
- <argument index="2" name="to" type="StringName" />
- <argument index="3" name="to_slot" type="int" />
+ <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" />
<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_slot] slot of [param from] GraphNode and [param to_slot] slot of [param to] GraphNode is attempted to be removed.
</description>
</signal>
<signal name="duplicate_nodes_request">
@@ -320,12 +347,12 @@
</description>
</signal>
<signal name="node_deselected">
- <argument index="0" name="node" type="Node" />
+ <param index="0" name="node" type="Node" />
<description>
</description>
</signal>
<signal name="node_selected">
- <argument index="0" name="node" type="Node" />
+ <param index="0" name="node" type="Node" />
<description>
Emitted when a GraphNode is selected.
</description>
@@ -336,13 +363,13 @@
</description>
</signal>
<signal name="popup_request">
- <argument index="0" name="position" type="Vector2" />
+ <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">
- <argument index="0" name="offset" type="Vector2" />
+ <param index="0" name="offset" type="Vector2" />
<description>
Emitted when the scroll offset is changed by the user. It will not be emitted when changed in code.
</description>
@@ -371,15 +398,11 @@
<theme_item name="selection_stroke" data_type="color" type="Color" default="Color(1, 1, 1, 0.8)">
The outline color of the selection rectangle.
</theme_item>
- <theme_item name="bezier_len_neg" data_type="constant" type="int" default="160">
- </theme_item>
- <theme_item name="bezier_len_pos" data_type="constant" type="int" default="80">
- </theme_item>
- <theme_item name="port_grab_distance_horizontal" data_type="constant" type="int" default="24">
- The horizontal range within which a port can be grabbed (on both sides).
+ <theme_item name="port_hotzone_inner_extent" data_type="constant" type="int" default="22">
+ The horizontal range within which a port can be grabbed (inner side).
</theme_item>
- <theme_item name="port_grab_distance_vertical" data_type="constant" type="int" default="26">
- The vertical range within which a port can be grabbed (on both sides).
+ <theme_item name="port_hotzone_outer_extent" data_type="constant" type="int" default="26">
+ The horizontal range within which a port can be grabbed (outer side).
</theme_item>
<theme_item name="layout" data_type="icon" type="Texture2D">
</theme_item>
diff --git a/doc/classes/GraphNode.xml b/doc/classes/GraphNode.xml
index 173da63a15..009c329ee2 100644
--- a/doc/classes/GraphNode.xml
+++ b/doc/classes/GraphNode.xml
@@ -17,24 +17,18 @@
Disables all input and output slots of the GraphNode.
</description>
</method>
- <method name="clear_opentype_features">
- <return type="void" />
- <description>
- Removes all OpenType features.
- </description>
- </method>
<method name="clear_slot">
<return type="void" />
- <argument index="0" name="idx" type="int" />
+ <param index="0" name="idx" type="int" />
<description>
- Disables input and output slot whose index is [code]idx[/code].
+ Disables input and output slot whose index is [param idx].
</description>
</method>
<method name="get_connection_input_color">
<return type="Color" />
- <argument index="0" name="idx" type="int" />
+ <param index="0" name="idx" type="int" />
<description>
- Returns the [Color] of the input connection [code]idx[/code].
+ Returns the [Color] of the input connection [param idx].
</description>
</method>
<method name="get_connection_input_count">
@@ -43,25 +37,32 @@
Returns the number of enabled input slots (connections) to the GraphNode.
</description>
</method>
+ <method name="get_connection_input_height">
+ <return type="int" />
+ <param index="0" name="idx" type="int" />
+ <description>
+ Returns the height of the input connection [param idx].
+ </description>
+ </method>
<method name="get_connection_input_position">
<return type="Vector2" />
- <argument index="0" name="idx" type="int" />
+ <param index="0" name="idx" type="int" />
<description>
- Returns the position of the input connection [code]idx[/code].
+ Returns the position of the input connection [param idx].
</description>
</method>
<method name="get_connection_input_type">
<return type="int" />
- <argument index="0" name="idx" type="int" />
+ <param index="0" name="idx" type="int" />
<description>
- Returns the type of the input connection [code]idx[/code].
+ Returns the type of the input connection [param idx].
</description>
</method>
<method name="get_connection_output_color">
<return type="Color" />
- <argument index="0" name="idx" type="int" />
+ <param index="0" name="idx" type="int" />
<description>
- Returns the [Color] of the output connection [code]idx[/code].
+ Returns the [Color] of the output connection [param idx].
</description>
</method>
<method name="get_connection_output_count">
@@ -70,144 +71,152 @@
Returns the number of enabled output slots (connections) of the GraphNode.
</description>
</method>
- <method name="get_connection_output_position">
- <return type="Vector2" />
- <argument index="0" name="idx" type="int" />
+ <method name="get_connection_output_height">
+ <return type="int" />
+ <param index="0" name="idx" type="int" />
<description>
- Returns the position of the output connection [code]idx[/code].
+ Returns the height of the output connection [param idx].
</description>
</method>
- <method name="get_connection_output_type">
- <return type="int" />
- <argument index="0" name="idx" type="int" />
+ <method name="get_connection_output_position">
+ <return type="Vector2" />
+ <param index="0" name="idx" type="int" />
<description>
- Returns the type of the output connection [code]idx[/code].
+ Returns the position of the output connection [param idx].
</description>
</method>
- <method name="get_opentype_feature" qualifiers="const">
+ <method name="get_connection_output_type">
<return type="int" />
- <argument index="0" name="tag" type="String" />
+ <param index="0" name="idx" type="int" />
<description>
- Returns OpenType feature [code]tag[/code].
+ Returns the type of the output connection [param idx].
</description>
</method>
<method name="get_slot_color_left" qualifiers="const">
<return type="Color" />
- <argument index="0" name="idx" type="int" />
+ <param index="0" name="idx" type="int" />
<description>
- Returns the left (input) [Color] of the slot [code]idx[/code].
+ Returns the left (input) [Color] of the slot [param idx].
</description>
</method>
<method name="get_slot_color_right" qualifiers="const">
<return type="Color" />
- <argument index="0" name="idx" type="int" />
+ <param index="0" name="idx" type="int" />
<description>
- Returns the right (output) [Color] of the slot [code]idx[/code].
+ Returns the right (output) [Color] of the slot [param idx].
</description>
</method>
<method name="get_slot_type_left" qualifiers="const">
<return type="int" />
- <argument index="0" name="idx" type="int" />
+ <param index="0" name="idx" type="int" />
<description>
- Returns the left (input) type of the slot [code]idx[/code].
+ Returns the left (input) type of the slot [param idx].
</description>
</method>
<method name="get_slot_type_right" qualifiers="const">
<return type="int" />
- <argument index="0" name="idx" type="int" />
+ <param index="0" name="idx" type="int" />
<description>
- Returns the right (output) type of the slot [code]idx[/code].
+ Returns the right (output) type of the slot [param idx].
</description>
</method>
- <method name="is_slot_enabled_left" qualifiers="const">
+ <method name="is_slot_draw_stylebox" qualifiers="const">
<return type="bool" />
- <argument index="0" name="idx" type="int" />
+ <param index="0" name="idx" type="int" />
<description>
- Returns [code]true[/code] if left (input) side of the slot [code]idx[/code] is enabled.
+ Returns true if the background [StyleBox] of the slot [param idx] is drawn.
</description>
</method>
- <method name="is_slot_enabled_right" qualifiers="const">
+ <method name="is_slot_enabled_left" qualifiers="const">
<return type="bool" />
- <argument index="0" name="idx" type="int" />
+ <param index="0" name="idx" type="int" />
<description>
- Returns [code]true[/code] if right (output) side of the slot [code]idx[/code] is enabled.
+ Returns [code]true[/code] if left (input) side of the slot [param idx] is enabled.
</description>
</method>
- <method name="set_opentype_feature">
- <return type="void" />
- <argument index="0" name="tag" type="String" />
- <argument index="1" name="value" type="int" />
+ <method name="is_slot_enabled_right" qualifiers="const">
+ <return type="bool" />
+ <param index="0" name="idx" type="int" />
<description>
- Sets OpenType feature [code]tag[/code]. More info: [url=https://docs.microsoft.com/en-us/typography/opentype/spec/featuretags]OpenType feature tags[/url].
+ Returns [code]true[/code] if right (output) side of the slot [param idx] is enabled.
</description>
</method>
<method name="set_slot">
<return type="void" />
- <argument index="0" name="idx" type="int" />
- <argument index="1" name="enable_left" type="bool" />
- <argument index="2" name="type_left" type="int" />
- <argument index="3" name="color_left" type="Color" />
- <argument index="4" name="enable_right" type="bool" />
- <argument index="5" name="type_right" type="int" />
- <argument index="6" name="color_right" type="Color" />
- <argument index="7" name="custom_left" type="Texture2D" default="null" />
- <argument index="8" name="custom_right" type="Texture2D" default="null" />
- <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.
+ <param index="0" name="idx" type="int" />
+ <param index="1" name="enable_left" 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="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 [param idx].
+ If [param enable_left]/[param enable_right], a port will appear and the slot will be able to be connected from this side.
+ [param type_left]/[param type_right] is an arbitrary type of the port. Only ports with the same type values can be connected.
+ [param color_left]/[param color_right] is the tint of the port's icon on this side.
+ [param custom_left]/[param custom_right] is a custom texture for this side's port.
[b]Note:[/b] This method only sets properties of the slot. To create the slot, add a [Control]-derived child to the GraphNode.
Individual properties can be set using one of the [code]set_slot_*[/code] methods. You must enable at least one side of the slot to do so.
</description>
</method>
<method name="set_slot_color_left">
<return type="void" />
- <argument index="0" name="idx" type="int" />
- <argument index="1" name="color_left" type="Color" />
+ <param index="0" name="idx" type="int" />
+ <param index="1" name="color_left" 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 idx] to [param color_left].
</description>
</method>
<method name="set_slot_color_right">
<return type="void" />
- <argument index="0" name="idx" type="int" />
- <argument index="1" name="color_right" type="Color" />
+ <param index="0" name="idx" type="int" />
+ <param index="1" name="color_right" 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 idx] to [param color_right].
+ </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" />
+ <description>
+ Toggles the background [StyleBox] of the slot [param idx].
</description>
</method>
<method name="set_slot_enabled_left">
<return type="void" />
- <argument index="0" name="idx" type="int" />
- <argument index="1" name="enable_left" type="bool" />
+ <param index="0" name="idx" type="int" />
+ <param index="1" name="enable_left" 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 idx]. If [param enable_left] 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" />
- <argument index="0" name="idx" type="int" />
- <argument index="1" name="enable_right" type="bool" />
+ <param index="0" name="idx" type="int" />
+ <param index="1" name="enable_right" 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 idx]. If [param enable_right] 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" />
- <argument index="0" name="idx" type="int" />
- <argument index="1" name="type_left" type="int" />
+ <param index="0" name="idx" type="int" />
+ <param index="1" name="type_left" 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 idx] to [param type_left].
</description>
</method>
<method name="set_slot_type_right">
<return type="void" />
- <argument index="0" name="idx" type="int" />
- <argument index="1" name="type_right" type="int" />
+ <param index="0" name="idx" type="int" />
+ <param index="1" name="type_right" 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 idx] to [param type_right].
</description>
</method>
</methods>
@@ -251,8 +260,8 @@
</description>
</signal>
<signal name="dragged">
- <argument index="0" name="from" type="Vector2" />
- <argument index="1" name="to" type="Vector2" />
+ <param index="0" name="from" type="Vector2" />
+ <param index="1" name="to" type="Vector2" />
<description>
Emitted when the GraphNode is dragged.
</description>
@@ -268,13 +277,13 @@
</description>
</signal>
<signal name="resize_request">
- <argument index="0" name="new_minsize" type="Vector2" />
+ <param index="0" name="new_minsize" type="Vector2" />
<description>
Emitted when the GraphNode is requested to be resized. Happens on dragging the resizer handle (see [member resizable]).
</description>
</signal>
<signal name="slot_updated">
- <argument index="0" name="idx" type="int" />
+ <param index="0" name="idx" type="int" />
<description>
Emitted when any GraphNode's slot is updated.
</description>
@@ -301,6 +310,8 @@
<theme_item name="title_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 1)">
Color of the title text.
</theme_item>
+ <theme_item name="close_h_offset" data_type="constant" type="int" default="22">
+ </theme_item>
<theme_item name="close_offset" data_type="constant" type="int" default="22">
The vertical offset of the close button.
</theme_item>
@@ -310,6 +321,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>
@@ -343,5 +357,8 @@
<theme_item name="selected_frame" data_type="style" type="StyleBox">
The background used when the [GraphNode] is selected.
</theme_item>
+ <theme_item name="slot" data_type="style" type="StyleBox">
+ The [StyleBox] used for each slot of the [GraphNode].
+ </theme_item>
</theme_items>
</class>
diff --git a/doc/classes/HMACContext.xml b/doc/classes/HMACContext.xml
index fa60a7eb58..52d4fce28f 100644
--- a/doc/classes/HMACContext.xml
+++ b/doc/classes/HMACContext.xml
@@ -50,7 +50,6 @@
[/csharp]
[/codeblocks]
- [b]Note:[/b] Not available in HTML5 exports.
</description>
<tutorials>
</tutorials>
@@ -63,17 +62,17 @@
</method>
<method name="start">
<return type="int" enum="Error" />
- <argument index="0" name="hash_type" type="int" enum="HashingContext.HashType" />
- <argument index="1" name="key" type="PackedByteArray" />
+ <param index="0" name="hash_type" type="int" enum="HashingContext.HashType" />
+ <param index="1" name="key" type="PackedByteArray" />
<description>
Initializes the HMACContext. This method cannot be called again on the same HMACContext until [method finish] has been called.
</description>
</method>
<method name="update">
<return type="int" enum="Error" />
- <argument index="0" name="data" type="PackedByteArray" />
+ <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/HTTPClient.xml b/doc/classes/HTTPClient.xml
index 5a9d12d01b..97178bc94d 100644
--- a/doc/classes/HTTPClient.xml
+++ b/doc/classes/HTTPClient.xml
@@ -4,7 +4,8 @@
Low-level hyper-text transfer protocol client.
</brief_description>
<description>
- 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. [b]See the [HTTPRequest] node for a higher-level alternative.[/b]
+ 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.
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).
@@ -27,15 +28,15 @@
</method>
<method name="connect_to_host">
<return type="int" enum="Error" />
- <argument index="0" name="host" type="String" />
- <argument index="1" name="port" type="int" default="-1" />
- <argument index="2" name="use_ssl" type="bool" default="false" />
- <argument index="3" name="verify_host" type="bool" default="true" />
+ <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="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_ssl] is enabled).
+ [param verify_host] will check the SSL identity of the host if set to [code]true[/code].
</description>
</method>
<method name="get_response_body_length" qualifiers="const">
@@ -96,7 +97,7 @@
</method>
<method name="query_string_from_dict">
<return type="String" />
- <argument index="0" name="fields" type="Dictionary" />
+ <param index="0" name="fields" type="Dictionary" />
<description>
Generates a GET/POST application/x-www-form-urlencoded style query string from a provided dictionary, e.g.:
[codeblocks]
@@ -134,10 +135,10 @@
</method>
<method name="request">
<return type="int" enum="Error" />
- <argument index="0" name="method" type="int" enum="HTTPClient.Method" />
- <argument index="1" name="url" type="String" />
- <argument index="2" name="headers" type="PackedStringArray" />
- <argument index="3" name="body" type="String" default="&quot;&quot;" />
+ <param index="0" name="method" type="int" enum="HTTPClient.Method" />
+ <param index="1" name="url" type="String" />
+ <param index="2" name="headers" type="PackedStringArray" />
+ <param index="3" name="body" type="String" default="&quot;&quot;" />
<description>
Sends a request to the connected host.
The URL parameter is usually just the part after the host, so for [code]https://somehost.com/index.php[/code], it is [code]/index.php[/code]. When sending requests to an HTTP proxy server, it should be an absolute URL. For [constant HTTPClient.METHOD_OPTIONS] requests, [code]*[/code] is also allowed. For [constant HTTPClient.METHOD_CONNECT] requests, it should be the authority component ([code]host:port[/code]).
@@ -157,15 +158,15 @@
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">
<return type="int" enum="Error" />
- <argument index="0" name="method" type="int" enum="HTTPClient.Method" />
- <argument index="1" name="url" type="String" />
- <argument index="2" name="headers" type="PackedStringArray" />
- <argument index="3" name="body" type="PackedByteArray" />
+ <param index="0" name="method" type="int" enum="HTTPClient.Method" />
+ <param index="1" name="url" type="String" />
+ <param index="2" name="headers" type="PackedStringArray" />
+ <param index="3" name="body" type="PackedByteArray" />
<description>
Sends a raw request to the connected host.
The URL parameter is usually just the part after the host, so for [code]https://somehost.com/index.php[/code], it is [code]/index.php[/code]. When sending requests to an HTTP proxy server, it should be an absolute URL. For [constant HTTPClient.METHOD_OPTIONS] requests, [code]*[/code] is also allowed. For [constant HTTPClient.METHOD_CONNECT] requests, it should be the authority component ([code]host:port[/code]).
@@ -175,20 +176,20 @@
</method>
<method name="set_http_proxy">
<return type="void" />
- <argument index="0" name="host" type="String" />
- <argument index="1" name="port" type="int" />
+ <param index="0" name="host" type="String" />
+ <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">
<return type="void" />
- <argument index="0" name="host" type="String" />
- <argument index="1" name="port" type="int" />
+ <param index="0" name="host" type="String" />
+ <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>
diff --git a/doc/classes/HTTPRequest.xml b/doc/classes/HTTPRequest.xml
index 641d73e333..4b098bf585 100644
--- a/doc/classes/HTTPRequest.xml
+++ b/doc/classes/HTTPRequest.xml
@@ -15,7 +15,7 @@
# Create an HTTP request node and connect its completion signal.
var http_request = HTTPRequest.new()
add_child(http_request)
- http_request.connect("request_completed", self, "_http_request_completed")
+ http_request.request_completed.connect(self._http_request_completed)
# Perform a GET request. The URL below returns JSON as of writing.
var error = http_request.request("https://httpbin.org/get")
@@ -25,7 +25,7 @@
# Perform a POST request. The URL below returns JSON as of writing.
# Note: Don't make simultaneous requests using a single HTTPRequest node.
# The snippet below is provided for reference only.
- var body = {"name": "Godette"}
+ var body = JSON.new().stringify({"name": "Godette"})
error = http_request.request("https://httpbin.org/post", [], true, HTTPClient.METHOD_POST, body)
if error != OK:
push_error("An error occurred in the HTTP request.")
@@ -33,7 +33,9 @@
# Called when the HTTP request is completed.
func _http_request_completed(result, response_code, headers, body):
- var response = parse_json(body.get_string_from_utf8())
+ var json = JSON.new()
+ json.parse(body.get_string_from_utf8())
+ var response = json.get_data()
# Will print the user agent string used by the HTTPRequest node (as recognized by httpbin.org).
print(response.headers["User-Agent"])
@@ -44,7 +46,7 @@
// Create an HTTP request node and connect its completion signal.
var httpRequest = new HTTPRequest();
AddChild(httpRequest);
- httpRequest.Connect("request_completed", this, nameof(HttpRequestCompleted));
+ httpRequest.RequestCompleted += HttpRequestCompleted;
// Perform a GET request. The URL below returns JSON as of writing.
Error error = httpRequest.Request("https://httpbin.org/get");
@@ -56,21 +58,24 @@
// Perform a POST request. The URL below returns JSON as of writing.
// Note: Don't make simultaneous requests using a single HTTPRequest node.
// The snippet below is provided for reference only.
- string[] body = { "name", "Godette" };
- // GDScript to_json is non existent, so we use JSON.Print() here.
- error = httpRequest.Request("https://httpbin.org/post", null, true, HTTPClient.Method.Post, JSON.Print(body));
+ string body = new JSON().Stringify(new Godot.Collections.Dictionary
+ {
+ { "name", "Godette" }
+ });
+ error = httpRequest.Request("https://httpbin.org/post", null, true, HTTPClient.Method.Post, body);
if (error != Error.Ok)
{
GD.PushError("An error occurred in the HTTP request.");
}
}
-
// Called when the HTTP request is completed.
private void HttpRequestCompleted(int result, int response_code, string[] headers, byte[] body)
{
- // GDScript parse_json is non existent so we have to use JSON.parse, which has a slightly different syntax.
- var response = JSON.Parse(body.GetStringFromUTF8()).Result as Godot.Collections.Dictionary;
+ var json = new JSON();
+ json.Parse(body.GetStringFromUTF8());
+ var response = json.GetData() as Godot.Collections.Dictionary;
+
// Will print the user agent string used by the HTTPRequest node (as recognized by httpbin.org).
GD.Print((response["headers"] as Godot.Collections.Dictionary)["User-Agent"]);
}
@@ -83,7 +88,7 @@
# Create an HTTP request node and connect its completion signal.
var http_request = HTTPRequest.new()
add_child(http_request)
- http_request.connect("request_completed", self, "_http_request_completed")
+ http_request.request_completed.connect(self._http_request_completed)
# Perform the HTTP request. The URL below returns a PNG image as of writing.
var error = http_request.request("https://via.placeholder.com/512")
@@ -101,8 +106,7 @@
if error != OK:
push_error("Couldn't load the image.")
- var texture = ImageTexture.new()
- texture.create_from_image(image)
+ var texture = ImageTexture.create_from_image(image)
# Display the image in a TextureRect node.
var texture_rect = TextureRect.new()
@@ -115,7 +119,7 @@
// Create an HTTP request node and connect its completion signal.
var httpRequest = new HTTPRequest();
AddChild(httpRequest);
- httpRequest.Connect("request_completed", this, nameof(HttpRequestCompleted));
+ httpRequest.RequestCompleted += HttpRequestCompleted;
// Perform the HTTP request. The URL below returns a PNG image as of writing.
Error error = httpRequest.Request("https://via.placeholder.com/512");
@@ -125,7 +129,6 @@
}
}
-
// Called when the HTTP request is completed.
private void HttpRequestCompleted(int result, int response_code, string[] headers, byte[] body)
{
@@ -173,7 +176,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">
@@ -184,25 +187,25 @@
</method>
<method name="request">
<return type="int" enum="Error" />
- <argument index="0" name="url" type="String" />
- <argument index="1" name="custom_headers" type="PackedStringArray" default="PackedStringArray()" />
- <argument index="2" name="ssl_validate_domain" type="bool" default="true" />
- <argument index="3" name="method" type="int" enum="HTTPClient.Method" default="0" />
- <argument index="4" name="request_data" type="String" default="&quot;&quot;" />
+ <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="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] 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 (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.
</description>
</method>
<method name="request_raw">
<return type="int" enum="Error" />
- <argument index="0" name="url" type="String" />
- <argument index="1" name="custom_headers" type="PackedStringArray" default="PackedStringArray()" />
- <argument index="2" name="ssl_validate_domain" type="bool" default="true" />
- <argument index="3" name="method" type="int" enum="HTTPClient.Method" default="0" />
- <argument index="4" name="request_data_raw" type="PackedByteArray" default="PackedByteArray()" />
+ <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="3" name="method" type="int" enum="HTTPClient.Method" default="0" />
+ <param index="4" name="request_data_raw" type="PackedByteArray" default="PackedByteArray()" />
<description>
Creates request on the underlying [HTTPClient] using a raw array of bytes for the request body. If there is no configuration errors, it tries to connect using [method HTTPClient.connect_to_host] and passes parameters onto [method HTTPClient.request].
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.
@@ -210,20 +213,20 @@
</method>
<method name="set_http_proxy">
<return type="void" />
- <argument index="0" name="host" type="String" />
- <argument index="1" name="port" type="int" />
+ <param index="0" name="host" type="String" />
+ <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">
<return type="void" />
- <argument index="0" name="host" type="String" />
- <argument index="1" name="port" type="int" />
+ <param index="0" name="host" type="String" />
+ <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>
@@ -248,6 +251,7 @@
Maximum number of allowed redirects.
</member>
<member name="timeout" type="float" setter="set_timeout" getter="get_timeout" default="0.0">
+ If set to a value greater than [code]0.0[/code] before the request starts, the HTTP request will time out after [code]timeout[/code] seconds have passed and the request is not [i]completed[/i] yet. For small HTTP requests such as REST API usage, set [member timeout] to a value between [code]10.0[/code] and [code]30.0[/code] to prevent the application from getting stuck if the request fails to get a response in a timely manner. For file downloads, leave this to [code]0.0[/code] to prevent the download from failing if it takes too much time.
</member>
<member name="use_threads" type="bool" setter="set_use_threads" getter="is_using_threads" default="false">
If [code]true[/code], multithreading is used to improve performance.
@@ -255,10 +259,10 @@
</members>
<signals>
<signal name="request_completed">
- <argument index="0" name="result" type="int" />
- <argument index="1" name="response_code" type="int" />
- <argument index="2" name="headers" type="PackedStringArray" />
- <argument index="3" name="body" type="PackedByteArray" />
+ <param index="0" name="result" type="int" />
+ <param index="1" name="response_code" type="int" />
+ <param index="2" name="headers" type="PackedStringArray" />
+ <param index="3" name="body" type="PackedByteArray" />
<description>
Emitted when a request is completed.
</description>
diff --git a/doc/classes/HashingContext.xml b/doc/classes/HashingContext.xml
index 9ecf2872f3..6e3092e618 100644
--- a/doc/classes/HashingContext.xml
+++ b/doc/classes/HashingContext.xml
@@ -57,7 +57,6 @@
}
[/csharp]
[/codeblocks]
- [b]Note:[/b] Not available in HTML5 exports.
</description>
<tutorials>
</tutorials>
@@ -70,16 +69,16 @@
</method>
<method name="start">
<return type="int" enum="Error" />
- <argument index="0" name="type" type="int" enum="HashingContext.HashType" />
+ <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" />
- <argument index="0" name="chunk" type="PackedByteArray" />
+ <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 eb1d1d5eca..99524795f9 100644
--- a/doc/classes/HingeJoint3D.xml
+++ b/doc/classes/HingeJoint3D.xml
@@ -11,30 +11,30 @@
<methods>
<method name="get_flag" qualifiers="const">
<return type="bool" />
- <argument index="0" name="flag" type="int" enum="HingeJoint3D.Flag" />
+ <param index="0" name="flag" type="int" enum="HingeJoint3D.Flag" />
<description>
Returns the value of the specified flag.
</description>
</method>
<method name="get_param" qualifiers="const">
<return type="float" />
- <argument index="0" name="param" type="int" enum="HingeJoint3D.Param" />
+ <param index="0" name="param" type="int" enum="HingeJoint3D.Param" />
<description>
Returns the value of the specified parameter.
</description>
</method>
<method name="set_flag">
<return type="void" />
- <argument index="0" name="flag" type="int" enum="HingeJoint3D.Flag" />
- <argument index="1" name="enabled" type="bool" />
+ <param index="0" name="flag" type="int" enum="HingeJoint3D.Flag" />
+ <param index="1" name="enabled" type="bool" />
<description>
If [code]true[/code], enables the specified flag.
</description>
</method>
<method name="set_param">
<return type="void" />
- <argument index="0" name="param" type="int" enum="HingeJoint3D.Param" />
- <argument index="1" name="value" type="float" />
+ <param index="0" name="param" type="int" enum="HingeJoint3D.Param" />
+ <param index="1" name="value" type="float" />
<description>
Sets the value of the specified parameter.
</description>
@@ -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 569f7fe570..1e5e6da513 100644
--- a/doc/classes/IP.xml
+++ b/doc/classes/IP.xml
@@ -11,26 +11,26 @@
<methods>
<method name="clear_cache">
<return type="void" />
- <argument index="0" name="hostname" type="String" default="&quot;&quot;" />
+ <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" />
- <argument index="0" name="id" type="int" />
+ <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:
@@ -46,47 +46,47 @@
</method>
<method name="get_resolve_item_address" qualifiers="const">
<return type="String" />
- <argument index="0" name="id" type="int" />
+ <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">
<return type="Array" />
- <argument index="0" name="id" type="int" />
+ <param index="0" name="id" type="int" />
<description>
Returns resolved addresses, or an empty array if an error happened or resolution didn't happen yet (see [method get_resolve_item_status]).
</description>
</method>
<method name="get_resolve_item_status" qualifiers="const">
<return type="int" enum="IP.ResolverStatus" />
- <argument index="0" name="id" type="int" />
+ <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">
<return type="String" />
- <argument index="0" name="host" type="String" />
- <argument index="1" name="ip_type" type="int" enum="IP.Type" default="3" />
+ <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" />
- <argument index="0" name="host" type="String" />
- <argument index="1" name="ip_type" type="int" enum="IP.Type" default="3" />
+ <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">
<return type="int" />
- <argument index="0" name="host" type="String" />
- <argument index="1" name="ip_type" type="int" enum="IP.Type" default="3" />
+ <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 da5b907fab..b138a55ea3 100644
--- a/doc/classes/Image.xml
+++ b/doc/classes/Image.xml
@@ -14,53 +14,53 @@
<methods>
<method name="adjust_bcs">
<return type="void" />
- <argument index="0" name="brightness" type="float" />
- <argument index="1" name="contrast" type="float" />
- <argument index="2" name="saturation" type="float" />
+ <param index="0" name="brightness" type="float" />
+ <param index="1" name="contrast" type="float" />
+ <param index="2" name="saturation" type="float" />
<description>
</description>
</method>
<method name="blend_rect">
<return type="void" />
- <argument index="0" name="src" type="Image" />
- <argument index="1" name="src_rect" type="Rect2" />
- <argument index="2" name="dst" type="Vector2" />
+ <param index="0" name="src" type="Image" />
+ <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 not positive size is treated as empty.
</description>
</method>
<method name="blend_rect_mask">
<return type="void" />
- <argument index="0" name="src" type="Image" />
- <argument index="1" name="mask" type="Image" />
- <argument index="2" name="src_rect" type="Rect2" />
- <argument index="3" name="dst" type="Vector2" />
+ <param index="0" name="src" type="Image" />
+ <param index="1" name="mask" type="Image" />
+ <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 not positive size is treated as empty.
</description>
</method>
<method name="blit_rect">
<return type="void" />
- <argument index="0" name="src" type="Image" />
- <argument index="1" name="src_rect" type="Rect2" />
- <argument index="2" name="dst" type="Vector2" />
+ <param index="0" name="src" type="Image" />
+ <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 not positive size is treated as empty.
</description>
</method>
<method name="blit_rect_mask">
<return type="void" />
- <argument index="0" name="src" type="Image" />
- <argument index="1" name="mask" type="Image" />
- <argument index="2" name="src_rect" type="Rect2" />
- <argument index="3" name="dst" type="Vector2" />
+ <param index="0" name="src" type="Image" />
+ <param index="1" name="mask" type="Image" />
+ <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 not positive size is treated as empty.
</description>
</method>
<method name="bump_map_to_normal_map">
<return type="void" />
- <argument index="0" name="bump_scale" type="float" default="1.0" />
+ <param index="0" name="bump_scale" type="float" default="1.0" />
<description>
Converts a bump map to a normal map. A bump map provides a height offset per-pixel, while a normal map provides a normal direction per pixel.
</description>
@@ -73,25 +73,25 @@
</method>
<method name="compress">
<return type="int" enum="Error" />
- <argument index="0" name="mode" type="int" enum="Image.CompressMode" />
- <argument index="1" name="source" type="int" enum="Image.CompressSource" default="0" />
- <argument index="2" name="lossy_quality" type="float" default="0.7" />
+ <param index="0" name="mode" type="int" enum="Image.CompressMode" />
+ <param index="1" name="source" type="int" enum="Image.CompressSource" default="0" />
+ <param index="2" name="lossy_quality" type="float" default="0.7" />
<description>
Compresses the image to use less memory. Can not directly access pixel data while the image is compressed. Returns error if the chosen compression mode is not available. See [enum CompressMode] and [enum CompressSource] constants.
</description>
</method>
<method name="compress_from_channels">
<return type="int" enum="Error" />
- <argument index="0" name="mode" type="int" enum="Image.CompressMode" />
- <argument index="1" name="channels" type="int" enum="Image.UsedChannels" />
- <argument index="2" name="lossy_quality" type="float" default="0.7" />
+ <param index="0" name="mode" type="int" enum="Image.CompressMode" />
+ <param index="1" name="channels" type="int" enum="Image.UsedChannels" />
+ <param index="2" name="lossy_quality" type="float" default="0.7" />
<description>
</description>
</method>
<method name="compute_image_metrics">
<return type="Dictionary" />
- <argument index="0" name="compared_image" type="Image" />
- <argument index="1" name="use_luma" type="bool" />
+ <param index="0" name="compared_image" type="Image" />
+ <param index="1" name="use_luma" type="bool" />
<description>
Compute image metrics on the current image and the compared image.
The dictionary contains [code]max[/code], [code]mean[/code], [code]mean_squared[/code], [code]root_mean_squared[/code] and [code]peak_snr[/code].
@@ -99,45 +99,45 @@
</method>
<method name="convert">
<return type="void" />
- <argument index="0" name="format" type="int" enum="Image.Format" />
+ <param index="0" name="format" type="int" enum="Image.Format" />
<description>
Converts the image's format. See [enum Format] constants.
</description>
</method>
<method name="copy_from">
<return type="void" />
- <argument index="0" name="src" type="Image" />
+ <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" />
- <argument index="0" name="width" type="int" />
- <argument index="1" name="height" type="int" />
- <argument index="2" name="use_mipmaps" type="bool" />
- <argument index="3" name="format" type="int" enum="Image.Format" />
+ <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" />
- <argument index="0" name="width" type="int" />
- <argument index="1" name="height" type="int" />
- <argument index="2" name="use_mipmaps" type="bool" />
- <argument index="3" name="format" type="int" enum="Image.Format" />
- <argument index="4" name="data" type="PackedByteArray" />
+ <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">
<return type="void" />
- <argument index="0" name="width" type="int" />
- <argument index="1" name="height" type="int" />
+ <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">
@@ -155,23 +155,23 @@
</method>
<method name="detect_used_channels" qualifiers="const">
<return type="int" enum="Image.UsedChannels" />
- <argument index="0" name="source" type="int" enum="Image.CompressSource" default="0" />
+ <param index="0" name="source" type="int" enum="Image.CompressSource" default="0" />
<description>
</description>
</method>
<method name="fill">
<return type="void" />
- <argument index="0" name="color" type="Color" />
+ <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">
<return type="void" />
- <argument index="0" name="rect" type="Rect2" />
- <argument index="1" name="color" type="Color" />
+ <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">
@@ -194,7 +194,7 @@
</method>
<method name="generate_mipmaps">
<return type="int" enum="Error" />
- <argument index="0" name="renormalize" type="bool" default="false" />
+ <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].
@@ -220,15 +220,15 @@
</method>
<method name="get_mipmap_offset" qualifiers="const">
<return type="int" />
- <argument index="0" name="mipmap" 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">
<return type="Color" />
- <argument index="0" name="x" type="int" />
- <argument index="1" name="y" type="int" />
+ <param index="0" name="x" type="int" />
+ <param index="1" name="y" type="int" />
<description>
Returns the color of the pixel at [code](x, y)[/code].
This is the same as [method get_pixelv], but with two integer arguments instead of a [Vector2i] argument.
@@ -236,29 +236,29 @@
</method>
<method name="get_pixelv" qualifiers="const">
<return type="Color" />
- <argument index="0" name="point" type="Vector2i" />
+ <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">
<return type="Image" />
- <argument index="0" name="rect" type="Rect2" />
+ <param index="0" name="rect" 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 the image's area specified with [param rect].
</description>
</method>
<method name="get_size" qualifiers="const">
- <return type="Vector2" />
+ <return type="Vector2i" />
<description>
Returns the image's size (width and height).
</description>
</method>
<method name="get_used_rect" qualifiers="const">
- <return type="Rect2" />
+ <return type="Rect2i" />
<description>
- Returns a [Rect2] enclosing the visible portion of the image, considering each pixel with a non-zero alpha channel as visible.
+ Returns a [Rect2i] enclosing the visible portion of the image, considering each pixel with a non-zero alpha channel as visible.
</description>
</method>
<method name="get_width" qualifiers="const">
@@ -293,45 +293,52 @@
</method>
<method name="load">
<return type="int" enum="Error" />
- <argument index="0" name="path" type="String" />
+ <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>
</method>
<method name="load_bmp_from_buffer">
<return type="int" enum="Error" />
- <argument index="0" name="buffer" type="PackedByteArray" />
+ <param index="0" name="buffer" type="PackedByteArray" />
<description>
Loads an image from the binary contents of a BMP file.
[b]Note:[/b] Godot's BMP module doesn't support 16-bit per pixel images. Only 1-bit, 4-bit, 8-bit, 24-bit, and 32-bit per pixel images are supported.
</description>
</method>
+ <method name="load_from_file" qualifiers="static">
+ <return type="Image" />
+ <param index="0" name="path" type="String" />
+ <description>
+ Creates a new [Image] and loads data from the specified file.
+ </description>
+ </method>
<method name="load_jpg_from_buffer">
<return type="int" enum="Error" />
- <argument index="0" name="buffer" type="PackedByteArray" />
+ <param index="0" name="buffer" type="PackedByteArray" />
<description>
Loads an image from the binary contents of a JPEG file.
</description>
</method>
<method name="load_png_from_buffer">
<return type="int" enum="Error" />
- <argument index="0" name="buffer" type="PackedByteArray" />
+ <param index="0" name="buffer" type="PackedByteArray" />
<description>
Loads an image from the binary contents of a PNG file.
</description>
</method>
<method name="load_tga_from_buffer">
<return type="int" enum="Error" />
- <argument index="0" name="buffer" type="PackedByteArray" />
+ <param index="0" name="buffer" type="PackedByteArray" />
<description>
Loads an image from the binary contents of a TGA file.
</description>
</method>
<method name="load_webp_from_buffer">
<return type="int" enum="Error" />
- <argument index="0" name="buffer" type="PackedByteArray" />
+ <param index="0" name="buffer" type="PackedByteArray" />
<description>
Loads an image from the binary contents of a WebP file.
</description>
@@ -350,19 +357,19 @@
</method>
<method name="resize">
<return type="void" />
- <argument index="0" name="width" type="int" />
- <argument index="1" name="height" type="int" />
- <argument index="2" name="interpolation" type="int" enum="Image.Interpolation" default="1" />
+ <param index="0" name="width" type="int" />
+ <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">
<return type="void" />
- <argument index="0" name="square" type="bool" default="false" />
- <argument index="1" name="interpolation" type="int" enum="Image.Interpolation" default="1" />
+ <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">
@@ -371,34 +378,90 @@
Converts a standard RGBE (Red Green Blue Exponent) image to an sRGB image.
</description>
</method>
+ <method name="rotate_180">
+ <return type="void" />
+ <description>
+ Rotates the image by [code]180[/code] degrees. The width and height of the image must be greater than [code]1[/code].
+ </description>
+ </method>
+ <method name="rotate_90">
+ <return type="void" />
+ <param index="0" name="direction" type="int" enum="ClockDirection" />
+ <description>
+ 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">
<return type="int" enum="Error" />
- <argument index="0" name="path" type="String" />
- <argument index="1" name="grayscale" type="bool" default="false" />
+ <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>
+ <method name="save_exr_to_buffer" qualifiers="const">
+ <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 [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>
+ <method name="save_jpg" qualifiers="const">
+ <return type="int" enum="Error" />
+ <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 [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>
+ <method name="save_jpg_to_buffer" qualifiers="const">
+ <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 [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>
<method name="save_png" qualifiers="const">
<return type="int" enum="Error" />
- <argument index="0" name="path" type="String" />
+ <param index="0" name="path" type="String" />
<description>
- Saves the image as a PNG file to [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">
<return type="PackedByteArray" />
<description>
+ Saves the image as a PNG file to a byte array.
+ </description>
+ </method>
+ <method name="save_webp" qualifiers="const">
+ <return type="int" enum="Error" />
+ <param index="0" name="path" type="String" />
+ <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 [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">
+ <return type="PackedByteArray" />
+ <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 [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_pixel">
<return type="void" />
- <argument index="0" name="x" type="int" />
- <argument index="1" name="y" type="int" />
- <argument index="2" name="color" type="Color" />
+ <param index="0" name="x" type="int" />
+ <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]. Example:
[codeblocks]
[gdscript]
var img_width = 10
@@ -422,10 +485,10 @@
</method>
<method name="set_pixelv">
<return type="void" />
- <argument index="0" name="point" type="Vector2i" />
- <argument index="1" name="color" type="Color" />
+ <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]. Example:
[codeblocks]
[gdscript]
var img_width = 10
diff --git a/doc/classes/ImageTexture.xml b/doc/classes/ImageTexture.xml
index aecb4fc4b6..45cbd7ac87 100644
--- a/doc/classes/ImageTexture.xml
+++ b/doc/classes/ImageTexture.xml
@@ -6,22 +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 texture = ImageTexture.new()
- var image = Image.new()
- image.load("res://icon.png")
- texture.create_from_image(image)
+ 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].
@@ -31,11 +29,11 @@
<link title="Importing images">$DOCS_URL/tutorials/assets_pipeline/importing_images.html</link>
</tutorials>
<methods>
- <method name="create_from_image">
- <return type="void" />
- <argument index="0" name="image" type="Image" />
+ <method name="create_from_image" qualifiers="static">
+ <return type="ImageTexture" />
+ <param index="0" name="image" type="Image" />
<description>
- Initializes the texture by allocating and setting the data from an [Image].
+ Creates a new [ImageTexture] and initializes it by allocating and setting the data from an [Image].
</description>
</method>
<method name="get_format" qualifiers="const">
@@ -44,20 +42,28 @@
Returns the format of the texture, one of [enum Image.Format].
</description>
</method>
+ <method name="set_image">
+ <return type="void" />
+ <param index="0" name="image" type="Image" />
+ <description>
+ Replaces the texture's data with a new [Image]. This will re-allocate new memory for the texture.
+ If you want to update the image, but don't need to change its parameters (format, size), use [method update] instead for better performance.
+ </description>
+ </method>
<method name="set_size_override">
<return type="void" />
- <argument index="0" name="size" type="Vector2" />
+ <param index="0" name="size" type="Vector2i" />
<description>
Resizes the texture to the specified dimensions.
</description>
</method>
<method name="update">
<return type="void" />
- <argument index="0" name="image" type="Image" />
+ <param index="0" name="image" type="Image" />
<description>
Replaces the texture's data with a new [Image].
- [b]Note:[/b] The texture has to be initialized first with the [method create_from_image] method before it can be updated. The new image dimensions, format, and mipmaps configuration should match the existing texture's image configuration, otherwise it has to be re-created with the [method create_from_image] method.
- Use this method over [method create_from_image] if you need to update the texture frequently, which is faster than allocating additional memory for a new texture each time.
+ [b]Note:[/b] The texture has to be created using [method create_from_image] or initialized first with the [method set_image] method before it can be updated. The new image dimensions, format, and mipmaps configuration should match the existing texture's image configuration.
+ Use this method over [method set_image] if you need to update the texture frequently, which is faster than allocating additional memory for a new texture each time.
</description>
</method>
</methods>
diff --git a/doc/classes/ImageTexture3D.xml b/doc/classes/ImageTexture3D.xml
index b2068504eb..958c5f90f1 100644
--- a/doc/classes/ImageTexture3D.xml
+++ b/doc/classes/ImageTexture3D.xml
@@ -9,18 +9,18 @@
<methods>
<method name="create">
<return type="int" enum="Error" />
- <argument index="0" name="format" type="int" enum="Image.Format" />
- <argument index="1" name="width" type="int" />
- <argument index="2" name="height" type="int" />
- <argument index="3" name="depth" type="int" />
- <argument index="4" name="use_mipmaps" type="bool" />
- <argument index="5" name="data" type="Image[]" />
+ <param index="0" name="format" type="int" enum="Image.Format" />
+ <param index="1" name="width" type="int" />
+ <param index="2" name="height" type="int" />
+ <param index="3" name="depth" type="int" />
+ <param index="4" name="use_mipmaps" type="bool" />
+ <param index="5" name="data" type="Image[]" />
<description>
</description>
</method>
<method name="update">
<return type="void" />
- <argument index="0" name="data" type="Image[]" />
+ <param index="0" name="data" type="Image[]" />
<description>
</description>
</method>
diff --git a/doc/classes/ImageTextureLayered.xml b/doc/classes/ImageTextureLayered.xml
index c574e5c9c1..c0ad19ddd7 100644
--- a/doc/classes/ImageTextureLayered.xml
+++ b/doc/classes/ImageTextureLayered.xml
@@ -9,14 +9,14 @@
<methods>
<method name="create_from_images">
<return type="int" enum="Error" />
- <argument index="0" name="images" type="Array" />
+ <param index="0" name="images" type="Array" />
<description>
</description>
</method>
<method name="update_layer">
<return type="void" />
- <argument index="0" name="image" type="Image" />
- <argument index="1" name="layer" type="int" />
+ <param index="0" name="image" type="Image" />
+ <param index="1" name="layer" type="int" />
<description>
</description>
</method>
diff --git a/doc/classes/ImmediateMesh.xml b/doc/classes/ImmediateMesh.xml
index d12d5de184..a6d2e3e249 100644
--- a/doc/classes/ImmediateMesh.xml
+++ b/doc/classes/ImmediateMesh.xml
@@ -17,22 +17,22 @@
</method>
<method name="surface_add_vertex">
<return type="void" />
- <argument index="0" name="vertex" type="Vector3" />
+ <param index="0" name="vertex" type="Vector3" />
<description>
Add a 3D vertex using the current attributes previously set.
</description>
</method>
<method name="surface_add_vertex_2d">
<return type="void" />
- <argument index="0" name="vertex" type="Vector2" />
+ <param index="0" name="vertex" type="Vector2" />
<description>
Add a 2D vertex using the current attributes previously set.
</description>
</method>
<method name="surface_begin">
<return type="void" />
- <argument index="0" name="primitive" type="int" enum="Mesh.PrimitiveType" />
- <argument index="1" name="material" type="Material" default="null" />
+ <param index="0" name="primitive" type="int" enum="Mesh.PrimitiveType" />
+ <param index="1" name="material" type="Material" default="null" />
<description>
Begin a new surface.
</description>
@@ -45,35 +45,35 @@
</method>
<method name="surface_set_color">
<return type="void" />
- <argument index="0" name="color" type="Color" />
+ <param index="0" name="color" type="Color" />
<description>
Set the color attribute that will be pushed with the next vertex.
</description>
</method>
<method name="surface_set_normal">
<return type="void" />
- <argument index="0" name="normal" type="Vector3" />
+ <param index="0" name="normal" type="Vector3" />
<description>
Set the normal attribute that will be pushed with the next vertex.
</description>
</method>
<method name="surface_set_tangent">
<return type="void" />
- <argument index="0" name="tangent" type="Plane" />
+ <param index="0" name="tangent" type="Plane" />
<description>
Set the tangent attribute that will be pushed with the next vertex.
</description>
</method>
<method name="surface_set_uv">
<return type="void" />
- <argument index="0" name="uv" type="Vector2" />
+ <param index="0" name="uv" type="Vector2" />
<description>
Set the UV attribute that will be pushed with the next vertex.
</description>
</method>
<method name="surface_set_uv2">
<return type="void" />
- <argument index="0" name="uv2" type="Vector2" />
+ <param index="0" name="uv2" type="Vector2" />
<description>
Set the UV2 attribute that will be pushed with the next vertex.
</description>
diff --git a/doc/classes/ImporterMesh.xml b/doc/classes/ImporterMesh.xml
index 90e7df4421..e15cfcd2c0 100644
--- a/doc/classes/ImporterMesh.xml
+++ b/doc/classes/ImporterMesh.xml
@@ -13,24 +13,24 @@
<methods>
<method name="add_blend_shape">
<return type="void" />
- <argument index="0" name="name" type="String" />
+ <param index="0" name="name" type="String" />
<description>
Adds name for a blend shape that will be added with [method add_surface]. Must be called before surface is added.
</description>
</method>
<method name="add_surface">
<return type="void" />
- <argument index="0" name="primitive" type="int" enum="Mesh.PrimitiveType" />
- <argument index="1" name="arrays" type="Array" />
- <argument index="2" name="blend_shapes" type="Array" default="[]" />
- <argument index="3" name="lods" type="Dictionary" default="{}" />
- <argument index="4" name="material" type="Material" default="null" />
- <argument index="5" name="name" type="String" default="&quot;&quot;" />
- <argument index="6" name="flags" type="int" default="0" />
+ <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="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 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">
@@ -39,6 +39,16 @@
Removes all surfaces and blend shapes from this [ImporterMesh].
</description>
</method>
+ <method name="generate_lods">
+ <return type="void" />
+ <param index="0" name="normal_merge_angle" type="float" />
+ <param index="1" name="normal_split_angle" type="float" />
+ <description>
+ Generates all lods for this ImporterMesh.
+ [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].
+ </description>
+ </method>
<method name="get_blend_shape_count" qualifiers="const">
<return type="int" />
<description>
@@ -53,7 +63,7 @@
</method>
<method name="get_blend_shape_name" qualifiers="const">
<return type="String" />
- <argument index="0" name="blend_shape_idx" type="int" />
+ <param index="0" name="blend_shape_idx" type="int" />
<description>
Returns the name of the blend shape at this index.
</description>
@@ -66,24 +76,24 @@
</method>
<method name="get_mesh">
<return type="ArrayMesh" />
- <argument index="0" name="base_mesh" type="ArrayMesh" default="null" />
+ <param index="0" name="base_mesh" type="ArrayMesh" default="null" />
<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">
<return type="Array" />
- <argument index="0" name="surface_idx" type="int" />
+ <param index="0" name="surface_idx" type="int" />
<description>
Returns the arrays for the vertices, normals, uvs, etc. that make up the requested surface. See [method add_surface].
</description>
</method>
<method name="get_surface_blend_shape_arrays" qualifiers="const">
<return type="Array" />
- <argument index="0" name="surface_idx" type="int" />
- <argument index="1" name="blend_shape_idx" type="int" />
+ <param index="0" name="surface_idx" type="int" />
+ <param index="1" name="blend_shape_idx" type="int" />
<description>
Returns a single set of blend shape arrays for the requested blend shape index for a surface.
</description>
@@ -91,86 +101,86 @@
<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">
<return type="int" />
- <argument index="0" name="surface_idx" type="int" />
+ <param index="0" name="surface_idx" type="int" />
<description>
Returns the format of the surface that the mesh holds.
</description>
</method>
<method name="get_surface_lod_count" qualifiers="const">
<return type="int" />
- <argument index="0" name="surface_idx" 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">
<return type="PackedInt32Array" />
- <argument index="0" name="surface_idx" type="int" />
- <argument index="1" name="lod_idx" type="int" />
+ <param index="0" name="surface_idx" type="int" />
+ <param index="1" name="lod_idx" type="int" />
<description>
Returns the index buffer of a lod for a surface.
</description>
</method>
<method name="get_surface_lod_size" qualifiers="const">
<return type="float" />
- <argument index="0" name="surface_idx" type="int" />
- <argument index="1" name="lod_idx" type="int" />
+ <param index="0" name="surface_idx" type="int" />
+ <param index="1" name="lod_idx" type="int" />
<description>
Returns the screen ratio which activates a lod for a surface.
</description>
</method>
<method name="get_surface_material" qualifiers="const">
<return type="Material" />
- <argument index="0" name="surface_idx" type="int" />
+ <param index="0" name="surface_idx" type="int" />
<description>
Returns a [Material] in a given surface. Surface is rendered using this material.
</description>
</method>
<method name="get_surface_name" qualifiers="const">
<return type="String" />
- <argument index="0" name="surface_idx" type="int" />
+ <param index="0" name="surface_idx" type="int" />
<description>
Gets the name assigned to this surface.
</description>
</method>
<method name="get_surface_primitive_type">
<return type="int" enum="Mesh.PrimitiveType" />
- <argument index="0" name="surface_idx" type="int" />
+ <param index="0" name="surface_idx" type="int" />
<description>
Returns the primitive type of the requested surface (see [method add_surface]).
</description>
</method>
<method name="set_blend_shape_mode">
<return type="void" />
- <argument index="0" name="mode" type="int" enum="Mesh.BlendShapeMode" />
+ <param index="0" name="mode" type="int" enum="Mesh.BlendShapeMode" />
<description>
Sets the blend shape mode to one of [enum Mesh.BlendShapeMode].
</description>
</method>
<method name="set_lightmap_size_hint">
<return type="void" />
- <argument index="0" name="size" type="Vector2i" />
+ <param index="0" name="size" type="Vector2i" />
<description>
Sets the size hint of this mesh for lightmap-unwrapping in UV-space.
</description>
</method>
<method name="set_surface_material">
<return type="void" />
- <argument index="0" name="surface_idx" type="int" />
- <argument index="1" name="material" type="Material" />
+ <param index="0" name="surface_idx" type="int" />
+ <param index="1" name="material" type="Material" />
<description>
Sets a [Material] for a given surface. Surface will be rendered using this material.
</description>
</method>
<method name="set_surface_name">
<return type="void" />
- <argument index="0" name="surface_idx" type="int" />
- <argument index="1" name="name" type="String" />
+ <param index="0" name="surface_idx" type="int" />
+ <param index="1" name="name" type="String" />
<description>
Sets a name for a given surface.
</description>
diff --git a/doc/classes/Input.xml b/doc/classes/Input.xml
index 948c4b253f..90da000586 100644
--- a/doc/classes/Input.xml
+++ b/doc/classes/Input.xml
@@ -14,8 +14,8 @@
<methods>
<method name="action_press">
<return type="void" />
- <argument index="0" name="action" type="StringName" />
- <argument index="1" name="strength" type="float" default="1.0" />
+ <param index="0" name="action" type="StringName" />
+ <param index="1" name="strength" type="float" default="1.0" />
<description>
This will simulate pressing the specified action.
The strength can be used for non-boolean actions, it's ranged between 0 and 1 representing the intensity of the given action.
@@ -24,15 +24,15 @@
</method>
<method name="action_release">
<return type="void" />
- <argument index="0" name="action" type="StringName" />
+ <param index="0" name="action" type="StringName" />
<description>
If the specified action is already pressed, this will release it.
</description>
</method>
<method name="add_joy_mapping">
<return type="void" />
- <argument index="0" name="mapping" type="String" />
- <argument index="1" name="update_existing" type="bool" default="false" />
+ <param index="0" name="mapping" type="String" />
+ <param index="1" name="update_existing" type="bool" default="false" />
<description>
Adds a new mapping entry (in SDL2 format) to the mapping database. Optionally update already connected devices.
</description>
@@ -40,7 +40,7 @@
<method name="flush_buffered_events">
<return type="void" />
<description>
- Sends all input events which are in the current buffer to the game loop. These events may have been buffered as a result of accumulated input ([method set_use_accumulated_input]) or agile input flushing ([member ProjectSettings.input_devices/buffering/agile_event_flushing]).
+ Sends all input events which are in the current buffer to the game loop. These events may have been buffered as a result of accumulated input ([member use_accumulated_input]) or agile input flushing ([member ProjectSettings.input_devices/buffering/agile_event_flushing]).
The engine will already do this itself at key execution points (at least once per frame). However, this can be useful in advanced cases where you want precise control over the timing of event handling.
</description>
</method>
@@ -54,33 +54,33 @@
</method>
<method name="get_action_raw_strength" qualifiers="const">
<return type="float" />
- <argument index="0" name="action" type="StringName" />
- <argument index="1" name="exact_match" type="bool" default="false" />
+ <param index="0" name="action" type="StringName" />
+ <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">
<return type="float" />
- <argument index="0" name="action" type="StringName" />
- <argument index="1" name="exact_match" type="bool" default="false" />
+ <param index="0" name="action" type="StringName" />
+ <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">
<return type="float" />
- <argument index="0" name="negative_action" type="StringName" />
- <argument index="1" name="positive_action" type="StringName" />
+ <param index="0" name="negative_action" type="StringName" />
+ <param index="1" name="positive_action" type="StringName" />
<description>
Get axis input by specifying two actions, one negative and one positive.
This is a shorthand for writing [code]Input.get_action_strength("positive_action") - Input.get_action_strength("negative_action")[/code].
</description>
</method>
<method name="get_connected_joypads">
- <return type="Array" />
+ <return type="int[]" />
<description>
Returns an [Array] containing the device IDs of all currently connected joypads.
</description>
@@ -107,36 +107,36 @@
</method>
<method name="get_joy_axis" qualifiers="const">
<return type="float" />
- <argument index="0" name="device" type="int" />
- <argument index="1" name="axis" type="int" enum="JoyAxis" />
+ <param index="0" name="device" type="int" />
+ <param index="1" name="axis" type="int" enum="JoyAxis" />
<description>
Returns the current value of the joypad axis at given index (see [enum JoyAxis]).
</description>
</method>
<method name="get_joy_guid" qualifiers="const">
<return type="String" />
- <argument index="0" name="device" type="int" />
+ <param index="0" name="device" type="int" />
<description>
Returns a SDL2-compatible device GUID on platforms that use gamepad remapping. Returns [code]"Default Gamepad"[/code] otherwise.
</description>
</method>
<method name="get_joy_name">
<return type="String" />
- <argument index="0" name="device" type="int" />
+ <param index="0" name="device" type="int" />
<description>
Returns the name of the joypad at the specified device index.
</description>
</method>
<method name="get_joy_vibration_duration">
<return type="float" />
- <argument index="0" name="device" type="int" />
+ <param index="0" name="device" type="int" />
<description>
Returns the duration of the current vibration effect in seconds.
</description>
</method>
<method name="get_joy_vibration_strength">
<return type="Vector2" />
- <argument index="0" name="device" type="int" />
+ <param index="0" name="device" type="int" />
<description>
Returns the strength of the joypad vibration: x is the strength of the weak motor, and y is the strength of the strong motor.
</description>
@@ -160,19 +160,13 @@
Returns mouse buttons as a bitmask. If multiple mouse buttons are pressed at the same time, the bits are added together.
</description>
</method>
- <method name="get_mouse_mode" qualifiers="const">
- <return type="int" enum="Input.MouseMode" />
- <description>
- Returns the mouse mode. See the constants for more information.
- </description>
- </method>
<method name="get_vector" qualifiers="const">
<return type="Vector2" />
- <argument index="0" name="negative_x" type="StringName" />
- <argument index="1" name="positive_x" type="StringName" />
- <argument index="2" name="negative_y" type="StringName" />
- <argument index="3" name="positive_y" type="StringName" />
- <argument index="4" name="deadzone" type="float" default="-1.0" />
+ <param index="0" name="negative_x" type="StringName" />
+ <param index="1" name="positive_x" type="StringName" />
+ <param index="2" name="negative_y" type="StringName" />
+ <param index="3" name="positive_y" type="StringName" />
+ <param index="4" name="deadzone" type="float" default="-1.0" />
<description>
Gets an input vector by specifying four actions for the positive and negative X and Y axes.
This method is useful when getting vector input, such as from a joystick, directional pad, arrows, or WASD. The vector has its length limited to 1 and has a circular deadzone, which is useful for using vector input as movement.
@@ -181,31 +175,31 @@
</method>
<method name="is_action_just_pressed" qualifiers="const">
<return type="bool" />
- <argument index="0" name="action" type="StringName" />
- <argument index="1" name="exact_match" type="bool" default="false" />
+ <param index="0" name="action" type="StringName" />
+ <param index="1" name="exact_match" type="bool" default="false" />
<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>
<method name="is_action_just_released" qualifiers="const">
<return type="bool" />
- <argument index="0" name="action" type="StringName" />
- <argument index="1" name="exact_match" type="bool" default="false" />
+ <param index="0" name="action" type="StringName" />
+ <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">
<return type="bool" />
- <argument index="0" name="action" type="StringName" />
- <argument index="1" name="exact_match" type="bool" default="false" />
+ <param index="0" name="action" type="StringName" />
+ <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>
@@ -217,22 +211,22 @@
</method>
<method name="is_joy_button_pressed" qualifiers="const">
<return type="bool" />
- <argument index="0" name="device" type="int" />
- <argument index="1" name="button" type="int" enum="JoyButton" />
+ <param index="0" name="device" type="int" />
+ <param index="1" name="button" type="int" enum="JoyButton" />
<description>
Returns [code]true[/code] if you are pressing the joypad button (see [enum JoyButton]).
</description>
</method>
<method name="is_joy_known">
<return type="bool" />
- <argument index="0" name="device" type="int" />
+ <param index="0" name="device" type="int" />
<description>
Returns [code]true[/code] if the system knows the specified device. This means that it sets all button and axis indices. Unknown joypads are not expected to match these constants, but you can still retrieve events from them.
</description>
</method>
<method name="is_key_pressed" qualifiers="const">
<return type="bool" />
- <argument index="0" name="keycode" type="int" enum="Key" />
+ <param index="0" name="keycode" type="int" enum="Key" />
<description>
Returns [code]true[/code] if you are pressing the key in the current keyboard layout. You can pass a [enum Key] constant.
[method is_key_pressed] is only recommended over [method is_physical_key_pressed] in non-game applications. This ensures that shortcut keys behave as expected depending on the user's keyboard layout, as keyboard shortcuts are generally dependent on the keyboard layout in non-game applications. If in doubt, use [method is_physical_key_pressed].
@@ -241,14 +235,14 @@
</method>
<method name="is_mouse_button_pressed" qualifiers="const">
<return type="bool" />
- <argument index="0" name="button" type="int" enum="MouseButton" />
+ <param index="0" name="button" type="int" enum="MouseButton" />
<description>
Returns [code]true[/code] if you are pressing the mouse button specified with [enum MouseButton].
</description>
</method>
<method name="is_physical_key_pressed" qualifiers="const">
<return type="bool" />
- <argument index="0" name="keycode" type="int" enum="Key" />
+ <param index="0" name="keycode" type="int" enum="Key" />
<description>
Returns [code]true[/code] if you are pressing the key in the physical location on the 101/102-key US QWERTY keyboard. You can pass a [enum Key] constant.
[method is_physical_key_pressed] is recommended over [method is_key_pressed] for in-game actions, as it will make [kbd]W[/kbd]/[kbd]A[/kbd]/[kbd]S[/kbd]/[kbd]D[/kbd] layouts work regardless of the user's keyboard layout. [method is_physical_key_pressed] will also ensure that the top row number keys work on any keyboard layout. If in doubt, use [method is_physical_key_pressed].
@@ -257,7 +251,7 @@
</method>
<method name="parse_input_event">
<return type="void" />
- <argument index="0" name="event" type="InputEvent" />
+ <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:
@@ -279,14 +273,14 @@
</method>
<method name="remove_joy_mapping">
<return type="void" />
- <argument index="0" name="guid" type="String" />
+ <param index="0" name="guid" type="String" />
<description>
Removes all mappings from the internal database that match the given GUID.
</description>
</method>
<method name="set_accelerometer">
<return type="void" />
- <argument index="0" name="value" type="Vector3" />
+ <param index="0" name="value" type="Vector3" />
<description>
Sets the acceleration value of the accelerometer sensor. Can be used for debugging on devices without a hardware sensor, for example in an editor on a PC.
[b]Note:[/b] This value can be immediately overwritten by the hardware sensor value on Android and iOS.
@@ -294,20 +288,20 @@
</method>
<method name="set_custom_mouse_cursor">
<return type="void" />
- <argument index="0" name="image" type="Resource" />
- <argument index="1" name="shape" type="int" enum="Input.CursorShape" default="0" />
- <argument index="2" name="hotspot" type="Vector2" default="Vector2(0, 0)" />
+ <param index="0" name="image" type="Resource" />
+ <param index="1" name="shape" type="int" enum="Input.CursorShape" default="0" />
+ <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>
</method>
<method name="set_default_cursor_shape">
<return type="void" />
- <argument index="0" name="shape" type="int" enum="Input.CursorShape" default="0" />
+ <param index="0" name="shape" type="int" enum="Input.CursorShape" default="0" />
<description>
Sets the default cursor shape to be used in the viewport instead of [constant CURSOR_ARROW].
[b]Note:[/b] If you want to change the default cursor shape for [Control]'s nodes, use [member Control.mouse_default_cursor_shape] instead.
@@ -316,7 +310,7 @@
</method>
<method name="set_gravity">
<return type="void" />
- <argument index="0" name="value" type="Vector3" />
+ <param index="0" name="value" type="Vector3" />
<description>
Sets the gravity value of the accelerometer sensor. Can be used for debugging on devices without a hardware sensor, for example in an editor on a PC.
[b]Note:[/b] This value can be immediately overwritten by the hardware sensor value on Android and iOS.
@@ -324,7 +318,7 @@
</method>
<method name="set_gyroscope">
<return type="void" />
- <argument index="0" name="value" type="Vector3" />
+ <param index="0" name="value" type="Vector3" />
<description>
Sets the value of the rotation rate of the gyroscope sensor. Can be used for debugging on devices without a hardware sensor, for example in an editor on a PC.
[b]Note:[/b] This value can be immediately overwritten by the hardware sensor value on Android and iOS.
@@ -332,67 +326,64 @@
</method>
<method name="set_magnetometer">
<return type="void" />
- <argument index="0" name="value" type="Vector3" />
+ <param index="0" name="value" type="Vector3" />
<description>
Sets the value of the magnetic field of the magnetometer sensor. Can be used for debugging on devices without a hardware sensor, for example in an editor on a PC.
[b]Note:[/b] This value can be immediately overwritten by the hardware sensor value on Android and iOS.
</description>
</method>
- <method name="set_mouse_mode">
- <return type="void" />
- <argument index="0" name="mode" type="int" enum="Input.MouseMode" />
- <description>
- Sets the mouse mode. See the constants for more information.
- </description>
- </method>
- <method name="set_use_accumulated_input">
- <return type="void" />
- <argument index="0" name="enable" type="bool" />
- <description>
- Enables or disables the accumulation of similar input events sent by the operating system. When input accumulation is enabled, all input events generated during a frame will be merged and emitted when the frame is done rendering. Therefore, this limits the number of input method calls per second to the rendering FPS.
- Input accumulation is enabled by default. It can be disabled to get slightly more precise/reactive input at the cost of increased CPU usage. In applications where drawing freehand lines is required, input accumulation should generally be disabled while the user is drawing the line to get results that closely follow the actual input.
- </description>
- </method>
<method name="start_joy_vibration">
<return type="void" />
- <argument index="0" name="device" type="int" />
- <argument index="1" name="weak_magnitude" type="float" />
- <argument index="2" name="strong_magnitude" type="float" />
- <argument index="3" name="duration" type="float" default="0" />
+ <param index="0" name="device" type="int" />
+ <param index="1" name="weak_magnitude" type="float" />
+ <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>
<method name="stop_joy_vibration">
<return type="void" />
- <argument index="0" name="device" type="int" />
+ <param index="0" name="device" type="int" />
<description>
Stops the vibration of the joypad.
</description>
</method>
<method name="vibrate_handheld">
<return type="void" />
- <argument index="0" name="duration_ms" type="int" default="500" />
+ <param index="0" name="duration_ms" type="int" default="500" />
<description>
- Vibrate Android and iOS devices.
+ Vibrate handheld devices.
+ [b]Note:[/b] This method is implemented on Android, iOS, and HTML5.
[b]Note:[/b] For Android, it requires enabling the [code]VIBRATE[/code] permission in the export preset.
[b]Note:[/b] For iOS, specifying the duration is supported in iOS 13 and later.
+ [b]Note:[/b] Some web browsers such as Safari and Firefox for Android do not support this method.
</description>
</method>
<method name="warp_mouse">
<return type="void" />
- <argument index="0" name="position" type="Vector2" />
+ <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].
</description>
</method>
</methods>
+ <members>
+ <member name="mouse_mode" type="int" setter="set_mouse_mode" getter="get_mouse_mode" enum="Input.MouseMode">
+ Controls the mouse mode. See [enum MouseMode] for more information.
+ </member>
+ <member name="use_accumulated_input" type="bool" setter="set_use_accumulated_input" getter="is_using_accumulated_input">
+ If [code]true[/code], similar input events sent by the operating system are accumulated. When input accumulation is enabled, all input events generated during a frame will be merged and emitted when the frame is done rendering. Therefore, this limits the number of input method calls per second to the rendering FPS.
+ Input accumulation can be disabled to get slightly more precise/reactive input at the cost of increased CPU usage. In applications where drawing freehand lines is required, input accumulation should generally be disabled while the user is drawing the line to get results that closely follow the actual input.
+ [b]Note:[/b] Input accumulation is [i]enabled[/i] by default.
+ </member>
+ </members>
<signals>
<signal name="joy_connection_changed">
- <argument index="0" name="device" type="int" />
- <argument index="1" name="connected" type="bool" />
+ <param index="0" name="device" type="int" />
+ <param index="1" name="connected" type="bool" />
<description>
Emitted when a joypad device has been connected or disconnected.
</description>
@@ -428,10 +419,10 @@
Cross cursor. Typically appears over regions in which a drawing operation can be performed or for selections.
</constant>
<constant name="CURSOR_WAIT" value="4" enum="CursorShape">
- Wait cursor. Indicates that the application is busy performing an operation. This cursor shape denotes that the application is still usable during the operation.
+ Wait cursor. Indicates that the application is busy performing an operation. This cursor shape denotes that the application isn't usable during the operation (e.g. something is blocking its main thread).
</constant>
<constant name="CURSOR_BUSY" value="5" enum="CursorShape">
- Busy cursor. Indicates that the application is busy performing an operation. This cursor shape denotes that the application isn't usable during the operation (e.g. something is blocking its main thread).
+ Busy cursor. Indicates that the application is busy performing an operation. This cursor shape denotes that the application is still usable during the operation.
</constant>
<constant name="CURSOR_DRAG" value="6" enum="CursorShape">
Drag cursor. Usually displayed when dragging something.
diff --git a/doc/classes/InputEvent.xml b/doc/classes/InputEvent.xml
index 230ad04b33..043ccdca36 100644
--- a/doc/classes/InputEvent.xml
+++ b/doc/classes/InputEvent.xml
@@ -15,7 +15,7 @@
<methods>
<method name="accumulate">
<return type="bool" />
- <argument index="0" name="with_event" type="InputEvent" />
+ <param index="0" name="with_event" type="InputEvent" />
<description>
Returns [code]true[/code] if the given input event and this input event can be added together (only for events of type [InputEventMouseMotion]).
The given input event's position, global position and speed will be copied. The resulting [code]relative[/code] is a sum of both events. Both events' modifiers have to be identical.
@@ -29,40 +29,40 @@
</method>
<method name="get_action_strength" qualifiers="const">
<return type="float" />
- <argument index="0" name="action" type="StringName" />
- <argument index="1" name="exact_match" type="bool" default="false" />
+ <param index="0" name="action" type="StringName" />
+ <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">
<return type="bool" />
- <argument index="0" name="action" type="StringName" />
- <argument index="1" name="exact_match" type="bool" default="false" />
+ <param index="0" name="action" type="StringName" />
+ <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">
<return type="bool" />
- <argument index="0" name="action" type="StringName" />
- <argument index="1" name="allow_echo" type="bool" default="false" />
- <argument index="2" name="exact_match" type="bool" default="false" />
+ <param index="0" name="action" type="StringName" />
+ <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>
<method name="is_action_released" qualifiers="const">
<return type="bool" />
- <argument index="0" name="action" type="StringName" />
- <argument index="1" name="exact_match" type="bool" default="false" />
+ <param index="0" name="action" type="StringName" />
+ <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">
@@ -79,11 +79,11 @@
</method>
<method name="is_match" qualifiers="const">
<return type="bool" />
- <argument index="0" name="event" type="InputEvent" />
- <argument index="1" name="exact_match" type="bool" default="true" />
+ <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">
@@ -95,10 +95,10 @@
</method>
<method name="xformed_by" qualifiers="const">
<return type="InputEvent" />
- <argument index="0" name="xform" type="Transform2D" />
- <argument index="1" name="local_ofs" type="Vector2" default="Vector2(0, 0)" />
+ <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/InputEventMouseMotion.xml b/doc/classes/InputEventMouseMotion.xml
index 7cc3de8fcb..83aad587a5 100644
--- a/doc/classes/InputEventMouseMotion.xml
+++ b/doc/classes/InputEventMouseMotion.xml
@@ -5,13 +5,17 @@
</brief_description>
<description>
Contains mouse and pen motion information. Supports relative, absolute positions and velocity. See [method Node._input].
- [b]Note:[/b] By default, this event is only emitted once per frame rendered at most. If you need more precise input reporting, call [method Input.set_use_accumulated_input] with [code]false[/code] to make events emitted as often as possible. If you use InputEventMouseMotion to draw lines, consider implementing [url=https://en.wikipedia.org/wiki/Bresenham%27s_line_algorithm]Bresenham's line algorithm[/url] as well to avoid visible gaps in lines if the user is moving the mouse quickly.
+ [b]Note:[/b] By default, this event is only emitted once per frame rendered at most. If you need more precise input reporting, set [member Input.use_accumulated_input] to [code]false[/code] to make events emitted as often as possible. If you use InputEventMouseMotion to draw lines, consider implementing [url=https://en.wikipedia.org/wiki/Bresenham%27s_line_algorithm]Bresenham's line algorithm[/url] as well to avoid visible gaps in lines if the user is moving the mouse quickly.
</description>
<tutorials>
<link title="Mouse and input coordinates">$DOCS_URL/tutorials/inputs/mouse_and_input_coordinates.html</link>
<link title="3D Voxel Demo">https://godotengine.org/asset-library/asset/676</link>
</tutorials>
<members>
+ <member name="pen_inverted" type="bool" setter="set_pen_inverted" getter="get_pen_inverted" default="false">
+ Returns [code]true[/code] when using the eraser end of a stylus pen.
+ [b]Note:[/b] This property is implemented on Linux, macOS and Windows.
+ </member>
<member name="pressure" type="float" setter="set_pressure" getter="get_pressure" default="0.0">
Represents the pressure the user puts on the pen. Ranges from [code]0.0[/code] to [code]1.0[/code].
</member>
diff --git a/doc/classes/InputMap.xml b/doc/classes/InputMap.xml
index 61d54e85f8..1d7d54f681 100644
--- a/doc/classes/InputMap.xml
+++ b/doc/classes/InputMap.xml
@@ -12,92 +12,93 @@
<methods>
<method name="action_add_event">
<return type="void" />
- <argument index="0" name="action" type="StringName" />
- <argument index="1" name="event" type="InputEvent" />
+ <param index="0" name="action" type="StringName" />
+ <param index="1" name="event" type="InputEvent" />
<description>
Adds an [InputEvent] to an action. This [InputEvent] will trigger the action.
</description>
</method>
<method name="action_erase_event">
<return type="void" />
- <argument index="0" name="action" type="StringName" />
- <argument index="1" name="event" type="InputEvent" />
+ <param index="0" name="action" type="StringName" />
+ <param index="1" name="event" type="InputEvent" />
<description>
Removes an [InputEvent] from an action.
</description>
</method>
<method name="action_erase_events">
<return type="void" />
- <argument index="0" name="action" type="StringName" />
+ <param index="0" name="action" type="StringName" />
<description>
Removes all events from an action.
</description>
</method>
<method name="action_get_deadzone">
<return type="float" />
- <argument index="0" name="action" type="StringName" />
+ <param index="0" name="action" type="StringName" />
<description>
Returns a deadzone value for the action.
</description>
</method>
<method name="action_get_events">
- <return type="Array" />
- <argument index="0" name="action" type="StringName" />
+ <return type="InputEvent[]" />
+ <param index="0" name="action" type="StringName" />
<description>
Returns an array of [InputEvent]s associated with a given action.
+ [b]Note:[/b] When used in the editor (e.g. a tool script or [EditorPlugin]), this method will return events for the editor action. If you want to access your project's input binds from the editor, read the [code]input/*[/code] settings from [ProjectSettings].
</description>
</method>
<method name="action_has_event">
<return type="bool" />
- <argument index="0" name="action" type="StringName" />
- <argument index="1" name="event" type="InputEvent" />
+ <param index="0" name="action" type="StringName" />
+ <param index="1" name="event" type="InputEvent" />
<description>
Returns [code]true[/code] if the action has the given [InputEvent] associated with it.
</description>
</method>
<method name="action_set_deadzone">
<return type="void" />
- <argument index="0" name="action" type="StringName" />
- <argument index="1" name="deadzone" type="float" />
+ <param index="0" name="action" type="StringName" />
+ <param index="1" name="deadzone" type="float" />
<description>
Sets a deadzone value for the action.
</description>
</method>
<method name="add_action">
<return type="void" />
- <argument index="0" name="action" type="StringName" />
- <argument index="1" name="deadzone" type="float" default="0.5" />
+ <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>
<method name="erase_action">
<return type="void" />
- <argument index="0" name="action" type="StringName" />
+ <param index="0" name="action" type="StringName" />
<description>
Removes an action from the [InputMap].
</description>
</method>
<method name="event_is_action" qualifiers="const">
<return type="bool" />
- <argument index="0" name="event" type="InputEvent" />
- <argument index="1" name="action" type="StringName" />
- <argument index="2" name="exact_match" type="bool" default="false" />
+ <param index="0" name="event" type="InputEvent" />
+ <param index="1" name="action" type="StringName" />
+ <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>
</method>
<method name="has_action" qualifiers="const">
<return type="bool" />
- <argument index="0" name="action" type="StringName" />
+ <param index="0" name="action" type="StringName" />
<description>
Returns [code]true[/code] if the [InputMap] has a registered action with the given name.
</description>
diff --git a/doc/classes/InstancePlaceholder.xml b/doc/classes/InstancePlaceholder.xml
index d22028d478..c62d786d8f 100644
--- a/doc/classes/InstancePlaceholder.xml
+++ b/doc/classes/InstancePlaceholder.xml
@@ -12,10 +12,11 @@
<methods>
<method name="create_instance">
<return type="Node" />
- <argument index="0" name="replace" type="bool" default="false" />
- <argument index="1" name="custom_scene" type="PackedScene" default="null" />
+ <param index="0" name="replace" type="bool" default="false" />
+ <param index="1" name="custom_scene" type="PackedScene" default="null" />
<description>
- Not thread-safe. Use [method Object.call_deferred] if calling from a thread.
+ Call this method to actually load in the node. The created node will be placed as a sibling [i]above[/i] the [InstancePlaceholder] in the scene tree. The [Node]'s reference is also returned for convenience.
+ [b]Note:[/b] [method create_instance] is not thread-safe. Use [method Object.call_deferred] if calling from a thread.
</description>
</method>
<method name="get_instance_path" qualifiers="const">
@@ -26,8 +27,10 @@
</method>
<method name="get_stored_values">
<return type="Dictionary" />
- <argument index="0" name="with_order" type="bool" default="false" />
+ <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 [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 edfd8daec1..75a0e1cef7 100644
--- a/doc/classes/ItemList.xml
+++ b/doc/classes/ItemList.xml
@@ -8,26 +8,27 @@
Selectable items in the list may be selected or deselected and multiple selection may be enabled. Selection with right mouse button may also be enabled to allow use of popup context menus. Items may also be "activated" by double-clicking them or by pressing [kbd]Enter[/kbd].
Item text only supports single-line strings, newline characters (e.g. [code]\n[/code]) in the string won't produce a newline. Text wrapping is enabled in [constant ICON_MODE_TOP] mode, but column's width is adjusted to fully fit its content by default. You need to set [member fixed_column_width] greater than zero to wrap the text.
All [code]set_*[/code] methods allow negative item index, which makes the item accessed from the last one.
+ [b]Incremental search:[/b] Like [PopupMenu] and [Tree], [ItemList] supports searching within the list while the control is focused. Press a key that matches the first letter of an item's name to select the first item starting with the given letter. After that point, there are two ways to perform incremental search: 1) Press the same key again before the timeout duration to select the next item starting with the same letter. 2) Press letter keys that match the rest of the word before the timeout duration to match to select the item in question directly. Both of these actions will be reset to the beginning of the list if the timeout duration has passed since the last keystroke was registered. You can adjust the timeout duration by changing [member ProjectSettings.gui/timers/incremental_search_max_interval_msec].
</description>
<tutorials>
</tutorials>
<methods>
<method name="add_icon_item">
<return type="int" />
- <argument index="0" name="icon" type="Texture2D" />
- <argument index="1" name="selectable" type="bool" default="true" />
+ <param index="0" name="icon" type="Texture2D" />
+ <param index="1" name="selectable" type="bool" default="true" />
<description>
Adds an item to the item list with no text, only an icon. Returns the index of an added item.
</description>
</method>
<method name="add_item">
<return type="int" />
- <argument index="0" name="text" type="String" />
- <argument index="1" name="icon" type="Texture2D" default="null" />
- <argument index="2" name="selectable" type="bool" default="true" />
+ <param index="0" name="text" type="String" />
+ <param index="1" name="icon" type="Texture2D" default="null" />
+ <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>
@@ -37,16 +38,9 @@
Removes all items from the list.
</description>
</method>
- <method name="clear_item_opentype_features">
- <return type="void" />
- <argument index="0" name="idx" type="int" />
- <description>
- Removes all OpenType features from the item's text.
- </description>
- </method>
<method name="deselect">
<return type="void" />
- <argument index="0" name="idx" type="int" />
+ <param index="0" name="idx" type="int" />
<description>
Ensures the item associated with the specified index is not selected.
</description>
@@ -65,87 +59,79 @@
</method>
<method name="get_item_at_position" qualifiers="const">
<return type="int" />
- <argument index="0" name="position" type="Vector2" />
- <argument index="1" name="exact" type="bool" default="false" />
+ <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" />
- <argument index="0" name="idx" type="int" />
+ <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" />
- <argument index="0" name="idx" type="int" />
+ <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">
<return type="Texture2D" />
- <argument index="0" name="idx" type="int" />
+ <param index="0" name="idx" type="int" />
<description>
Returns the icon associated with the specified index.
</description>
</method>
<method name="get_item_icon_modulate" qualifiers="const">
<return type="Color" />
- <argument index="0" name="idx" type="int" />
+ <param index="0" name="idx" type="int" />
<description>
Returns a [Color] modulating item's icon at the specified index.
</description>
</method>
<method name="get_item_icon_region" qualifiers="const">
<return type="Rect2" />
- <argument index="0" name="idx" type="int" />
+ <param index="0" name="idx" type="int" />
<description>
Returns the region of item's icon used. The whole icon will be used if the region has no area.
</description>
</method>
<method name="get_item_language" qualifiers="const">
<return type="String" />
- <argument index="0" name="idx" type="int" />
+ <param index="0" name="idx" type="int" />
<description>
Returns item's text language code.
</description>
</method>
<method name="get_item_metadata" qualifiers="const">
<return type="Variant" />
- <argument index="0" name="idx" type="int" />
+ <param index="0" name="idx" type="int" />
<description>
Returns the metadata value of the specified index.
</description>
</method>
- <method name="get_item_opentype_feature" qualifiers="const">
- <return type="int" />
- <argument index="0" name="idx" type="int" />
- <argument index="1" name="tag" type="String" />
- <description>
- Returns OpenType feature [code]tag[/code] of the item's text.
- </description>
- </method>
<method name="get_item_text" qualifiers="const">
<return type="String" />
- <argument index="0" name="idx" type="int" />
+ <param index="0" name="idx" type="int" />
<description>
Returns the text associated with the specified index.
</description>
</method>
<method name="get_item_text_direction" qualifiers="const">
<return type="int" enum="Control.TextDirection" />
- <argument index="0" name="idx" type="int" />
+ <param index="0" name="idx" type="int" />
<description>
Returns item's text base writing direction.
</description>
</method>
<method name="get_item_tooltip" qualifiers="const">
<return type="String" />
- <argument index="0" name="idx" type="int" />
+ <param index="0" name="idx" type="int" />
<description>
Returns the tooltip hint associated with the specified index.
</description>
@@ -171,58 +157,58 @@
</method>
<method name="is_item_disabled" qualifiers="const">
<return type="bool" />
- <argument index="0" name="idx" type="int" />
+ <param index="0" name="idx" type="int" />
<description>
Returns [code]true[/code] if the item at the specified index is disabled.
</description>
</method>
<method name="is_item_icon_transposed" qualifiers="const">
<return type="bool" />
- <argument index="0" name="idx" type="int" />
+ <param index="0" name="idx" type="int" />
<description>
Returns [code]true[/code] if the item icon will be drawn transposed, i.e. the X and Y axes are swapped.
</description>
</method>
<method name="is_item_selectable" qualifiers="const">
<return type="bool" />
- <argument index="0" name="idx" type="int" />
+ <param index="0" name="idx" type="int" />
<description>
Returns [code]true[/code] if the item at the specified index is selectable.
</description>
</method>
<method name="is_item_tooltip_enabled" qualifiers="const">
<return type="bool" />
- <argument index="0" name="idx" type="int" />
+ <param index="0" name="idx" type="int" />
<description>
Returns [code]true[/code] if the tooltip is enabled for specified item index.
</description>
</method>
<method name="is_selected" qualifiers="const">
<return type="bool" />
- <argument index="0" name="idx" type="int" />
+ <param index="0" name="idx" type="int" />
<description>
Returns [code]true[/code] if the item at the specified index is currently selected.
</description>
</method>
<method name="move_item">
<return type="void" />
- <argument index="0" name="from_idx" type="int" />
- <argument index="1" name="to_idx" type="int" />
+ <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" />
- <argument index="0" name="idx" type="int" />
+ <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">
<return type="void" />
- <argument index="0" name="idx" type="int" />
- <argument index="1" name="single" type="bool" default="true" />
+ <param index="0" name="idx" type="int" />
+ <param index="1" name="single" type="bool" default="true" />
<description>
Select the item at the specified index.
[b]Note:[/b] This method does not trigger the item selection signal.
@@ -230,24 +216,24 @@
</method>
<method name="set_item_custom_bg_color">
<return type="void" />
- <argument index="0" name="idx" type="int" />
- <argument index="1" name="custom_bg_color" type="Color" />
+ <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">
<return type="void" />
- <argument index="0" name="idx" type="int" />
- <argument index="1" name="custom_fg_color" type="Color" />
+ <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">
<return type="void" />
- <argument index="0" name="idx" type="int" />
- <argument index="1" name="disabled" type="bool" />
+ <param index="0" name="idx" type="int" />
+ <param index="1" name="disabled" type="bool" />
<description>
Disables (or enables) the item at the specified index.
Disabled items cannot be selected and do not trigger activation signals (when double-clicking or pressing [kbd]Enter[/kbd]).
@@ -255,97 +241,88 @@
</method>
<method name="set_item_icon">
<return type="void" />
- <argument index="0" name="idx" type="int" />
- <argument index="1" name="icon" type="Texture2D" />
+ <param index="0" name="idx" type="int" />
+ <param index="1" name="icon" type="Texture2D" />
<description>
Sets (or replaces) the icon's [Texture2D] associated with the specified index.
</description>
</method>
<method name="set_item_icon_modulate">
<return type="void" />
- <argument index="0" name="idx" type="int" />
- <argument index="1" name="modulate" type="Color" />
+ <param index="0" name="idx" type="int" />
+ <param index="1" name="modulate" type="Color" />
<description>
Sets a modulating [Color] of the item associated with the specified index.
</description>
</method>
<method name="set_item_icon_region">
<return type="void" />
- <argument index="0" name="idx" type="int" />
- <argument index="1" name="rect" type="Rect2" />
+ <param index="0" name="idx" type="int" />
+ <param index="1" name="rect" type="Rect2" />
<description>
Sets the region of item's icon used. The whole icon will be used if the region has no area.
</description>
</method>
<method name="set_item_icon_transposed">
<return type="void" />
- <argument index="0" name="idx" type="int" />
- <argument index="1" name="transposed" type="bool" />
+ <param index="0" name="idx" type="int" />
+ <param index="1" name="transposed" type="bool" />
<description>
Sets whether the item icon will be drawn transposed.
</description>
</method>
<method name="set_item_language">
<return type="void" />
- <argument index="0" name="idx" type="int" />
- <argument index="1" name="language" type="String" />
+ <param index="0" name="idx" type="int" />
+ <param index="1" name="language" type="String" />
<description>
Sets language code of item's text used for line-breaking and text shaping algorithms, if left empty current locale is used instead.
</description>
</method>
<method name="set_item_metadata">
<return type="void" />
- <argument index="0" name="idx" type="int" />
- <argument index="1" name="metadata" type="Variant" />
+ <param index="0" name="idx" type="int" />
+ <param index="1" name="metadata" type="Variant" />
<description>
Sets a value (of any type) to be stored with the item associated with the specified index.
</description>
</method>
- <method name="set_item_opentype_feature">
- <return type="void" />
- <argument index="0" name="idx" type="int" />
- <argument index="1" name="tag" type="String" />
- <argument index="2" name="value" type="int" />
- <description>
- Sets OpenType feature [code]tag[/code] for the item's text. More info: [url=https://docs.microsoft.com/en-us/typography/opentype/spec/featuretags]OpenType feature tags[/url].
- </description>
- </method>
<method name="set_item_selectable">
<return type="void" />
- <argument index="0" name="idx" type="int" />
- <argument index="1" name="selectable" type="bool" />
+ <param index="0" name="idx" type="int" />
+ <param index="1" name="selectable" type="bool" />
<description>
Allows or disallows selection of the item associated with the specified index.
</description>
</method>
<method name="set_item_text">
<return type="void" />
- <argument index="0" name="idx" type="int" />
- <argument index="1" name="text" type="String" />
+ <param index="0" name="idx" type="int" />
+ <param index="1" name="text" type="String" />
<description>
Sets text of the item associated with the specified index.
</description>
</method>
<method name="set_item_text_direction">
<return type="void" />
- <argument index="0" name="idx" type="int" />
- <argument index="1" name="direction" type="int" enum="Control.TextDirection" />
+ <param index="0" name="idx" type="int" />
+ <param index="1" name="direction" type="int" enum="Control.TextDirection" />
<description>
Sets item's text base writing direction.
</description>
</method>
<method name="set_item_tooltip">
<return type="void" />
- <argument index="0" name="idx" type="int" />
- <argument index="1" name="tooltip" type="String" />
+ <param index="0" name="idx" type="int" />
+ <param index="1" name="tooltip" type="String" />
<description>
Sets the tooltip hint for the item associated with the specified index.
</description>
</method>
<method name="set_item_tooltip_enabled">
<return type="void" />
- <argument index="0" name="idx" type="int" />
- <argument index="1" name="enable" type="bool" />
+ <param index="0" name="idx" type="int" />
+ <param index="1" name="enable" type="bool" />
<description>
Sets whether the tooltip hint is enabled for specified item index.
</description>
@@ -402,52 +379,47 @@
<member name="select_mode" type="int" setter="set_select_mode" getter="get_select_mode" enum="ItemList.SelectMode" default="0">
Allows single or multiple item selection. See the [enum SelectMode] constants.
</member>
- <member name="text_overrun_behavior" type="int" setter="set_text_overrun_behavior" getter="get_text_overrun_behavior" enum="TextParagraph.OverrunBehavior" default="3">
- Sets the clipping behavior when the text exceeds an item's bounding rectangle. See [enum TextParagraph.OverrunBehavior] for a description of all modes.
+ <member name="text_overrun_behavior" type="int" setter="set_text_overrun_behavior" getter="get_text_overrun_behavior" enum="TextServer.OverrunBehavior" default="3">
+ Sets the clipping behavior when the text exceeds an item's bounding rectangle. See [enum TextServer.OverrunBehavior] for a description of all modes.
</member>
</members>
<signals>
+ <signal name="empty_clicked">
+ <param index="0" name="at_position" type="Vector2" />
+ <param index="1" name="mouse_button_index" type="int" />
+ <description>
+ Triggered when any mouse click is issued within the rect of the list but on empty space.
+ </description>
+ </signal>
<signal name="item_activated">
- <argument index="0" name="index" type="int" />
+ <param index="0" name="index" type="int" />
<description>
Triggered when specified list item is activated via double-clicking or by pressing [kbd]Enter[/kbd].
</description>
</signal>
- <signal name="item_rmb_selected">
- <argument index="0" name="index" type="int" />
- <argument index="1" name="at_position" type="Vector2" />
+ <signal name="item_clicked">
+ <param index="0" name="index" type="int" />
+ <param index="1" name="at_position" type="Vector2" />
+ <param index="2" name="mouse_button_index" type="int" />
<description>
- Triggered when specified list item has been selected via right mouse clicking.
+ Triggered when specified list item has been clicked with any mouse button.
The click position is also provided to allow appropriate popup of context menus at the correct location.
- [member allow_rmb_select] must be enabled.
</description>
</signal>
<signal name="item_selected">
- <argument index="0" name="index" type="int" />
+ <param index="0" name="index" type="int" />
<description>
Triggered when specified item has been selected.
[member allow_reselect] must be enabled to reselect an item.
</description>
</signal>
<signal name="multi_selected">
- <argument index="0" name="index" type="int" />
- <argument index="1" name="selected" type="bool" />
+ <param index="0" name="index" type="int" />
+ <param index="1" name="selected" type="bool" />
<description>
Triggered when a multiple selection is altered on a list allowing multiple selection.
</description>
</signal>
- <signal name="nothing_selected">
- <description>
- Triggered when a left mouse click is issued within the rect of the list but on empty space.
- </description>
- </signal>
- <signal name="rmb_clicked">
- <argument index="0" name="at_position" type="Vector2" />
- <description>
- Triggered when a right mouse click is issued within the rect of the list but on empty space.
- [member allow_rmb_select] must be enabled.
- </description>
- </signal>
</signals>
<constants>
<constant name="ICON_MODE_TOP" value="0" enum="IconMode">
@@ -473,7 +445,7 @@
<theme_item name="font_selected_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
Text [Color] used when the item is selected.
</theme_item>
- <theme_item name="guide_color" data_type="color" type="Color" default="Color(0, 0, 0, 0.1)">
+ <theme_item name="guide_color" data_type="color" type="Color" default="Color(0.7, 0.7, 0.7, 0.25)">
[Color] of the guideline. The guideline is a line drawn between each row of items.
</theme_item>
<theme_item name="h_separation" data_type="constant" type="int" default="4">
diff --git a/doc/classes/JSON.xml b/doc/classes/JSON.xml
index 9650701c49..46e46cc164 100644
--- a/doc/classes/JSON.xml
+++ b/doc/classes/JSON.xml
@@ -10,8 +10,7 @@
[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
@@ -25,6 +24,10 @@
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]
</description>
<tutorials>
</tutorials>
@@ -50,23 +53,31 @@
</method>
<method name="parse">
<return type="int" enum="Error" />
- <argument index="0" name="json_string" type="String" />
+ <param index="0" name="json_string" type="String" />
<description>
- Attempts to parse the [code]json_string[/code] provided.
+ Attempts to parse the [param json_string] 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.
+ 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" />
- <argument index="0" name="data" type="Variant" />
- <argument index="1" name="indent" type="String" default="&quot;&quot;" />
- <argument index="2" name="sort_keys" type="bool" default="true" />
- <argument index="3" name="full_precision" type="bool" default="false" />
+ <param index="0" name="data" type="Variant" />
+ <param index="1" name="indent" type="String" default="&quot;&quot;" />
+ <param index="2" name="sort_keys" type="bool" default="true" />
+ <param index="3" name="full_precision" type="bool" default="false" />
<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)
diff --git a/doc/classes/JSONRPC.xml b/doc/classes/JSONRPC.xml
index cfe39d38a7..8af4ed1f26 100644
--- a/doc/classes/JSONRPC.xml
+++ b/doc/classes/JSONRPC.xml
@@ -11,68 +11,68 @@
<methods>
<method name="make_notification">
<return type="Dictionary" />
- <argument index="0" name="method" type="String" />
- <argument index="1" name="params" type="Variant" />
+ <param index="0" name="method" type="String" />
+ <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">
<return type="Dictionary" />
- <argument index="0" name="method" type="String" />
- <argument index="1" name="params" type="Variant" />
- <argument index="2" name="id" type="Variant" />
+ <param index="0" name="method" type="String" />
+ <param index="1" name="params" type="Variant" />
+ <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">
<return type="Dictionary" />
- <argument index="0" name="result" type="Variant" />
- <argument index="1" name="id" type="Variant" />
+ <param index="0" name="result" type="Variant" />
+ <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">
<return type="Dictionary" />
- <argument index="0" name="code" type="int" />
- <argument index="1" name="message" type="String" />
- <argument index="2" name="id" type="Variant" default="null" />
+ <param index="0" name="code" type="int" />
+ <param index="1" name="message" type="String" />
+ <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">
<return type="Variant" />
- <argument index="0" name="action" type="Variant" />
- <argument index="1" name="recurse" type="bool" default="false" />
+ <param index="0" name="action" type="Variant" />
+ <param index="1" name="recurse" type="bool" default="false" />
<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">
<return type="String" />
- <argument index="0" name="action" type="String" />
+ <param index="0" name="action" type="String" />
<description>
</description>
</method>
<method name="set_scope">
<return type="void" />
- <argument index="0" name="scope" type="String" />
- <argument index="1" name="target" type="Object" />
+ <param index="0" name="scope" type="String" />
+ <param index="1" name="target" type="Object" />
<description>
</description>
</method>
diff --git a/doc/classes/JavaClassWrapper.xml b/doc/classes/JavaClassWrapper.xml
index fdfac2748b..d44a63938c 100644
--- a/doc/classes/JavaClassWrapper.xml
+++ b/doc/classes/JavaClassWrapper.xml
@@ -9,7 +9,7 @@
<methods>
<method name="wrap">
<return type="JavaClass" />
- <argument index="0" name="name" type="String" />
+ <param index="0" name="name" type="String" />
<description>
</description>
</method>
diff --git a/doc/classes/JavaScript.xml b/doc/classes/JavaScript.xml
index 864028f3a6..21eb80155e 100644
--- a/doc/classes/JavaScript.xml
+++ b/doc/classes/JavaScript.xml
@@ -13,44 +13,44 @@
<methods>
<method name="create_callback">
<return type="JavaScriptObject" />
- <argument index="0" name="callable" type="Callable" />
+ <param index="0" name="callable" type="Callable" />
<description>
Creates a reference to a [Callable] that can be used as a callback by JavaScript. The reference must be kept until the callback happens, or it won't be called at all. See [JavaScriptObject] for usage.
</description>
</method>
<method name="create_object" qualifiers="vararg">
<return type="Variant" />
- <argument index="0" name="object" type="String" />
+ <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">
<return type="void" />
- <argument index="0" name="buffer" type="PackedByteArray" />
- <argument index="1" name="name" type="String" />
- <argument index="2" name="mime" type="String" default="&quot;application/octet-stream&quot;" />
+ <param index="0" name="buffer" type="PackedByteArray" />
+ <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>
</method>
<method name="eval">
<return type="Variant" />
- <argument index="0" name="code" type="String" />
- <argument index="1" name="use_global_execution_context" type="bool" default="false" />
+ <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" />
- <argument index="0" name="interface" type="String" />
+ <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/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 1f3f0dbb6d..e991856de5 100644
--- a/doc/classes/KinematicCollision2D.xml
+++ b/doc/classes/KinematicCollision2D.xml
@@ -12,9 +12,9 @@
<methods>
<method name="get_angle" qualifiers="const">
<return type="float" />
- <argument index="0" name="up_direction" type="Vector2" default="Vector2(0, -1)" />
+ <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">
@@ -53,6 +53,12 @@
Returns the colliding body's velocity.
</description>
</method>
+ <method name="get_depth" qualifiers="const">
+ <return type="float" />
+ <description>
+ Returns the colliding body's length of overlap along the collision normal.
+ </description>
+ </method>
<method name="get_local_shape" qualifiers="const">
<return type="Object" />
<description>
diff --git a/doc/classes/KinematicCollision3D.xml b/doc/classes/KinematicCollision3D.xml
index 6327d48d38..6b0a806e5c 100644
--- a/doc/classes/KinematicCollision3D.xml
+++ b/doc/classes/KinematicCollision3D.xml
@@ -12,50 +12,50 @@
<methods>
<method name="get_angle" qualifiers="const">
<return type="float" />
- <argument index="0" name="collision_index" type="int" default="0" />
- <argument index="1" name="up_direction" type="Vector3" default="Vector3(0, 1, 0)" />
+ <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">
<return type="Object" />
- <argument index="0" name="collision_index" type="int" default="0" />
+ <param index="0" name="collision_index" type="int" default="0" />
<description>
Returns the colliding body's attached [Object] given a collision index (the deepest collision by default).
</description>
</method>
<method name="get_collider_id" qualifiers="const">
<return type="int" />
- <argument index="0" name="collision_index" type="int" default="0" />
+ <param index="0" name="collision_index" type="int" default="0" />
<description>
Returns the unique instance ID of the colliding body's attached [Object] given a collision index (the deepest collision by default). See [method Object.get_instance_id].
</description>
</method>
<method name="get_collider_rid" qualifiers="const">
<return type="RID" />
- <argument index="0" name="collision_index" type="int" default="0" />
+ <param index="0" name="collision_index" type="int" default="0" />
<description>
Returns the colliding body's [RID] used by the [PhysicsServer3D] given a collision index (the deepest collision by default).
</description>
</method>
<method name="get_collider_shape" qualifiers="const">
<return type="Object" />
- <argument index="0" name="collision_index" type="int" default="0" />
+ <param index="0" name="collision_index" type="int" default="0" />
<description>
Returns the colliding body's shape given a collision index (the deepest collision by default).
</description>
</method>
<method name="get_collider_shape_index" qualifiers="const">
<return type="int" />
- <argument index="0" name="collision_index" type="int" default="0" />
+ <param index="0" name="collision_index" type="int" default="0" />
<description>
Returns the colliding body's shape index given a collision index (the deepest collision by default). See [CollisionObject3D].
</description>
</method>
<method name="get_collider_velocity" qualifiers="const">
<return type="Vector3" />
- <argument index="0" name="collision_index" type="int" default="0" />
+ <param index="0" name="collision_index" type="int" default="0" />
<description>
Returns the colliding body's velocity given a collision index (the deepest collision by default).
</description>
@@ -66,23 +66,29 @@
Returns the number of detected collisions.
</description>
</method>
+ <method name="get_depth" qualifiers="const">
+ <return type="float" />
+ <description>
+ Returns the colliding body's length of overlap along the collision normal.
+ </description>
+ </method>
<method name="get_local_shape" qualifiers="const">
<return type="Object" />
- <argument index="0" name="collision_index" type="int" default="0" />
+ <param index="0" name="collision_index" type="int" default="0" />
<description>
Returns the moving object's colliding shape given a collision index (the deepest collision by default).
</description>
</method>
<method name="get_normal" qualifiers="const">
<return type="Vector3" />
- <argument index="0" name="collision_index" type="int" default="0" />
+ <param index="0" name="collision_index" type="int" default="0" />
<description>
Returns the colliding body's shape's normal at the point of collision given a collision index (the deepest collision by default).
</description>
</method>
<method name="get_position" qualifiers="const">
<return type="Vector3" />
- <argument index="0" name="collision_index" type="int" default="0" />
+ <param index="0" name="collision_index" type="int" default="0" />
<description>
Returns the point of collision in global coordinates given a collision index (the deepest collision by default).
</description>
diff --git a/doc/classes/Label.xml b/doc/classes/Label.xml
index d5744bbc42..52b2e9a729 100644
--- a/doc/classes/Label.xml
+++ b/doc/classes/Label.xml
@@ -11,32 +11,19 @@
<link title="2D Dodge The Creeps Demo">https://godotengine.org/asset-library/asset/515</link>
</tutorials>
<methods>
- <method name="clear_opentype_features">
- <return type="void" />
- <description>
- Removes all OpenType features.
- </description>
- </method>
<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" />
- <argument index="0" name="line" type="int" default="-1" />
+ <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.
- </description>
- </method>
- <method name="get_opentype_feature" qualifiers="const">
- <return type="int" />
- <argument index="0" name="tag" type="String" />
- <description>
- Returns OpenType feature [code]tag[/code].
+ 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">
@@ -51,18 +38,10 @@
Returns the number of lines shown. Useful if the [Label]'s height cannot currently display all lines.
</description>
</method>
- <method name="set_opentype_feature">
- <return type="void" />
- <argument index="0" name="tag" type="String" />
- <argument index="1" name="value" type="int" />
- <description>
- Returns OpenType feature [code]tag[/code]. More info: [url=https://docs.microsoft.com/en-us/typography/opentype/spec/featuretags]OpenType feature tags[/url].
- </description>
- </method>
</methods>
<members>
- <member name="autowrap_mode" type="int" setter="set_autowrap_mode" getter="get_autowrap_mode" enum="Label.AutowrapMode" default="0">
- If set to something other than [constant 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 AutowrapMode].
+ <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="clip_text" type="bool" setter="set_clip_text" getter="is_clipping_text" default="false">
If [code]true[/code], the Label only shows the text that fits inside its bounding rectangle and will clip text horizontally.
@@ -70,6 +49,8 @@
<member name="horizontal_alignment" type="int" setter="set_horizontal_alignment" getter="get_horizontal_alignment" enum="HorizontalAlignment" default="0">
Controls the text's horizontal alignment. Supports left, center, right, and fill, or justify. Set it to one of the [enum HorizontalAlignment] constants.
</member>
+ <member name="label_settings" type="LabelSettings" setter="set_label_settings" getter="get_label_settings">
+ </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>
@@ -81,8 +62,8 @@
</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].
+ 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>
<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">
@@ -97,8 +78,8 @@
<member name="text_direction" type="int" setter="set_text_direction" getter="get_text_direction" enum="Control.TextDirection" default="0">
Base text writing direction.
</member>
- <member name="text_overrun_behavior" type="int" setter="set_text_overrun_behavior" getter="get_text_overrun_behavior" enum="Label.OverrunBehavior" default="0">
- Sets the clipping behavior when the text exceeds the node's bounding rectangle. See [enum OverrunBehavior] for a description of all modes.
+ <member name="text_overrun_behavior" type="int" setter="set_text_overrun_behavior" getter="get_text_overrun_behavior" enum="TextServer.OverrunBehavior" default="0">
+ Sets the clipping behavior when the text exceeds the node's bounding rectangle. See [enum TextServer.OverrunBehavior] for a description of all modes.
</member>
<member name="uppercase" type="bool" setter="set_uppercase" getter="is_uppercase" default="false">
If [code]true[/code], all the text displays as UPPERCASE.
@@ -107,63 +88,19 @@
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 percent_visible] accordingly.
</member>
- <member name="visible_characters_behavior" type="int" setter="set_visible_characters_behavior" getter="get_visible_characters_behavior" enum="Label.VisibleCharactersBehavior" default="0">
- Sets the clipping behavior when [member visible_characters] or [member percent_visible] is set. See [enum VisibleCharactersBehavior] for more info.
+ <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.
</member>
</members>
- <constants>
- <constant name="AUTOWRAP_OFF" value="0" enum="AutowrapMode">
- Autowrap is disabled.
- </constant>
- <constant name="AUTOWRAP_ARBITRARY" value="1" enum="AutowrapMode">
- Wraps the text inside the node's bounding rectangle by allowing to break lines at arbitrary positions, which is useful when very limited space is available.
- </constant>
- <constant name="AUTOWRAP_WORD" value="2" enum="AutowrapMode">
- Wraps the text inside the node's bounding rectangle by soft-breaking between words.
- </constant>
- <constant name="AUTOWRAP_WORD_SMART" value="3" enum="AutowrapMode">
- Behaves similarly to [constant AUTOWRAP_WORD], but force-breaks a word if that single word does not fit in one line.
- </constant>
- <constant name="OVERRUN_NO_TRIMMING" value="0" enum="OverrunBehavior">
- No text trimming is performed.
- </constant>
- <constant name="OVERRUN_TRIM_CHAR" value="1" enum="OverrunBehavior">
- Trims the text per character.
- </constant>
- <constant name="OVERRUN_TRIM_WORD" value="2" enum="OverrunBehavior">
- Trims the text per word.
- </constant>
- <constant name="OVERRUN_TRIM_ELLIPSIS" value="3" enum="OverrunBehavior">
- Trims the text per character and adds an ellipsis to indicate that parts are hidden.
- </constant>
- <constant name="OVERRUN_TRIM_WORD_ELLIPSIS" value="4" enum="OverrunBehavior">
- Trims the text per word and adds an ellipsis to indicate that parts are hidden.
- </constant>
- <constant name="VC_CHARS_BEFORE_SHAPING" value="0" enum="VisibleCharactersBehavior">
- Trims text before the shaping. e.g, increasing [member visible_characters] value is visually identical to typing the text.
- </constant>
- <constant name="VC_CHARS_AFTER_SHAPING" value="1" enum="VisibleCharactersBehavior">
- Displays glyphs that are mapped to the first [member visible_characters] characters from the beginning of the text.
- </constant>
- <constant name="VC_GLYPHS_AUTO" value="2" enum="VisibleCharactersBehavior">
- Displays [member percent_visible] 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 percent_visible] glyphs, starting from the left.
- </constant>
- <constant name="VC_GLYPHS_RTL" value="4" enum="VisibleCharactersBehavior">
- Displays [member percent_visible] glyphs, starting from the right.
- </constant>
- </constants>
<theme_items>
<theme_item name="font_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
Default text [Color] of the [Label].
</theme_item>
<theme_item name="font_outline_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
- The tint of [Font]'s outline.
+ The tint of text outline.
</theme_item>
<theme_item name="font_shadow_color" data_type="color" type="Color" default="Color(0, 0, 0, 0)">
[Color] of the text's shadow effect.
diff --git a/doc/classes/Label3D.xml b/doc/classes/Label3D.xml
index fbb53715c4..b741dc6e64 100644
--- a/doc/classes/Label3D.xml
+++ b/doc/classes/Label3D.xml
@@ -9,12 +9,6 @@
<tutorials>
</tutorials>
<methods>
- <method name="clear_opentype_features">
- <return type="void" />
- <description>
- Removes all OpenType features.
- </description>
- </method>
<method name="generate_triangle_mesh" qualifiers="const">
<return type="TriangleMesh" />
<description>
@@ -23,34 +17,19 @@
</method>
<method name="get_draw_flag" qualifiers="const">
<return type="bool" />
- <argument index="0" name="flag" type="int" enum="Label3D.DrawFlags" />
+ <param index="0" name="flag" type="int" enum="Label3D.DrawFlags" />
<description>
Returns the value of the specified flag.
</description>
</method>
- <method name="get_opentype_feature" qualifiers="const">
- <return type="int" />
- <argument index="0" name="tag" type="String" />
- <description>
- Returns OpenType feature [code]tag[/code].
- </description>
- </method>
<method name="set_draw_flag">
<return type="void" />
- <argument index="0" name="flag" type="int" enum="Label3D.DrawFlags" />
- <argument index="1" name="enabled" type="bool" />
+ <param index="0" name="flag" type="int" enum="Label3D.DrawFlags" />
+ <param index="1" name="enabled" type="bool" />
<description>
If [code]true[/code], the specified flag will be enabled. See [enum Label3D.DrawFlags] for a list of flags.
</description>
</method>
- <method name="set_opentype_feature">
- <return type="void" />
- <argument index="0" name="tag" type="String" />
- <argument index="1" name="value" type="int" />
- <description>
- Returns OpenType feature [code]tag[/code]. More info: [url=https://docs.microsoft.com/en-us/typography/opentype/spec/featuretags]OpenType feature tags[/url].
- </description>
- </method>
</methods>
<members>
<member name="alpha_cut" type="int" setter="set_alpha_cut_mode" getter="get_alpha_cut_mode" enum="Label3D.AlphaCutMode" default="0">
@@ -59,8 +38,8 @@
<member name="alpha_scissor_threshold" type="float" setter="set_alpha_scissor_threshold" getter="get_alpha_scissor_threshold" default="0.5">
Threshold at which the alpha scissor will discard values.
</member>
- <member name="autowrap_mode" type="int" setter="set_autowrap_mode" getter="get_autowrap_mode" enum="Label3D.AutowrapMode" default="0">
- If set to something other than [constant 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 AutowrapMode].
+ <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="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.
@@ -72,13 +51,14 @@
If [code]true[/code], the label is rendered at the same size regardless of distance.
</member>
<member name="font" type="Font" setter="set_font" getter="get_font">
- [Font] used for the [Label3D]'s text.
+ Font configuration used to display text.
</member>
- <member name="font_size" type="int" setter="set_font_size" getter="get_font_size" default="16">
- Font size of the [Label3D]'s text.
+ <member name="font_size" type="int" setter="set_font_size" getter="get_font_size" default="32">
+ 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="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. Set it to one of the [enum HorizontalAlignment] constants.
+ Controls the text's horizontal alignment. Supports left, center, right, and fill, or justify. Set it to one of the [enum HorizontalAlignment] constants.
</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.
@@ -96,13 +76,23 @@
The text drawing offset (in pixels).
</member>
<member name="outline_modulate" type="Color" setter="set_outline_modulate" getter="get_outline_modulate" default="Color(0, 0, 0, 1)">
- The tint of [Font]'s outline.
+ The tint of text outline.
</member>
- <member name="outline_size" type="int" setter="set_outline_size" getter="get_outline_size" default="0">
+ <member name="outline_render_priority" type="int" setter="set_outline_render_priority" getter="get_outline_render_priority" default="-1">
+ Sets the render priority for the text outline. Higher priority objects will be sorted in front of lower priority objects.
+ [b]Note:[/b] This only applies if [member alpha_cut] is set to [constant ALPHA_CUT_DISABLED] (default value).
+ [b]Note:[/b] This only applies to sorting of transparent objects. This will not impact how transparent objects are sorted relative to opaque objects. This is because opaque objects are not sorted, while transparent objects are sorted from back to front (subject to priority).
+ </member>
+ <member name="outline_size" type="int" setter="set_outline_size" getter="get_outline_size" default="12">
Text outline size.
</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 label to scale it in 3D.
+ <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. 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.
+ [b]Note:[/b] This only applies if [member alpha_cut] is set to [constant ALPHA_CUT_DISABLED] (default value).
+ [b]Note:[/b] This only applies to sorting of transparent objects. This will not impact how transparent objects are sorted relative to opaque objects. This is because opaque objects are not sorted, while transparent objects are sorted from back to front (subject to priority).
</member>
<member name="shaded" type="bool" setter="set_draw_flag" getter="get_draw_flag" default="false">
If [code]true[/code], the [Light3D] in the [Environment] has effects on the label.
@@ -133,23 +123,11 @@
</member>
</members>
<constants>
- <constant name="AUTOWRAP_OFF" value="0" enum="AutowrapMode">
- Autowrap is disabled.
- </constant>
- <constant name="AUTOWRAP_ARBITRARY" value="1" enum="AutowrapMode">
- Wraps the text inside the node's bounding rectangle by allowing to break lines at arbitrary positions, which is useful when very limited space is available.
- </constant>
- <constant name="AUTOWRAP_WORD" value="2" enum="AutowrapMode">
- Wraps the text inside the node's bounding rectangle by soft-breaking between words.
- </constant>
- <constant name="AUTOWRAP_WORD_SMART" value="3" enum="AutowrapMode">
- Behaves similarly to [constant AUTOWRAP_WORD], but force-breaks a word if that single word does not fit in one line.
- </constant>
<constant name="FLAG_SHADED" value="0" enum="DrawFlags">
If set, lights in the environment affect the label.
</constant>
<constant name="FLAG_DOUBLE_SIDED" value="1" enum="DrawFlags">
- If set, text can be seen from the back as well. If not, the texture is invisible when looking at it from behind.
+ If set, text can be seen from the back as well. If not, the text is invisible when looking at it from behind.
</constant>
<constant name="FLAG_DISABLE_DEPTH_TEST" value="2" enum="DrawFlags">
Disables the depth test, so this object is drawn on top of all others. However, objects drawn after it in the draw order may cover it.
@@ -161,7 +139,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/LabelSettings.xml b/doc/classes/LabelSettings.xml
new file mode 100644
index 0000000000..aa972f2cf3
--- /dev/null
+++ b/doc/classes/LabelSettings.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="LabelSettings" inherits="Resource" 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="font" type="Font" setter="set_font" getter="get_font">
+ </member>
+ <member name="font_color" type="Color" setter="set_font_color" getter="get_font_color" default="Color(1, 1, 1, 1)">
+ </member>
+ <member name="font_size" type="int" setter="set_font_size" getter="get_font_size" default="16">
+ </member>
+ <member name="line_spacing" type="float" setter="set_line_spacing" getter="get_line_spacing" default="3.0">
+ </member>
+ <member name="outline_color" type="Color" setter="set_outline_color" getter="get_outline_color" default="Color(1, 1, 1, 1)">
+ </member>
+ <member name="outline_size" type="int" setter="set_outline_size" getter="get_outline_size" default="0">
+ </member>
+ <member name="shadow_color" type="Color" setter="set_shadow_color" getter="get_shadow_color" default="Color(0, 0, 0, 0)">
+ </member>
+ <member name="shadow_offset" type="Vector2" setter="set_shadow_offset" getter="get_shadow_offset" default="Vector2(1, 1)">
+ </member>
+ <member name="shadow_size" type="int" setter="set_shadow_size" getter="get_shadow_size" default="1">
+ </member>
+ </members>
+</class>
diff --git a/doc/classes/Light2D.xml b/doc/classes/Light2D.xml
index 32bf6a67a9..00815758a1 100644
--- a/doc/classes/Light2D.xml
+++ b/doc/classes/Light2D.xml
@@ -18,7 +18,7 @@
</method>
<method name="set_height">
<return type="void" />
- <argument index="0" name="height" type="float" />
+ <param index="0" name="height" type="float" />
<description>
</description>
</method>
diff --git a/doc/classes/Light3D.xml b/doc/classes/Light3D.xml
index b7822f1bb0..80ff83ec46 100644
--- a/doc/classes/Light3D.xml
+++ b/doc/classes/Light3D.xml
@@ -13,15 +13,15 @@
<methods>
<method name="get_param" qualifiers="const">
<return type="float" />
- <argument index="0" name="param" type="int" enum="Light3D.Param" />
+ <param index="0" name="param" type="int" enum="Light3D.Param" />
<description>
Returns the value of the specified [enum Light3D.Param] parameter.
</description>
</method>
<method name="set_param">
<return type="void" />
- <argument index="0" name="param" type="int" enum="Light3D.Param" />
- <argument index="1" name="value" type="float" />
+ <param index="0" name="param" type="int" enum="Light3D.Param" />
+ <param index="1" name="value" type="float" />
<description>
Sets the value of the specified [enum Light3D.Param] parameter.
</description>
@@ -37,13 +37,12 @@
[b]Note:[/b] Only effective for [OmniLight3D] and [SpotLight3D].
</member>
<member name="distance_fade_length" type="float" setter="set_distance_fade_length" getter="get_distance_fade_length" default="10.0">
- Distance over which the light fades. The light's energy is progressively reduced over this distance and is completely invisible at the end.
+ Distance over which the light and its shadow fades. The light's energy and shadow's opacity is progressively reduced over this distance and is completely invisible at the end.
[b]Note:[/b] Only effective for [OmniLight3D] and [SpotLight3D].
</member>
<member name="distance_fade_shadow" type="float" setter="set_distance_fade_shadow" getter="get_distance_fade_shadow" default="50.0">
The distance from the camera at which the light's shadow cuts off (in 3D units). Set this to a value lower than [member distance_fade_begin] + [member distance_fade_length] to further improve performance, as shadow rendering is often more expensive than light rendering itself.
[b]Note:[/b] Only effective for [OmniLight3D] and [SpotLight3D], and only when [member shadow_enabled] is [code]true[/code].
- [b]Note:[/b] Due to a rendering engine limitation, shadows will be disabled instantly instead of fading smoothly according to [member distance_fade_length]. This may result in visible pop-in depending on the scene topography.
</member>
<member name="editor_only" type="bool" setter="set_editor_only" getter="is_editor_only" default="false">
If [code]true[/code], the light only appears in the editor and will not be visible at runtime.
@@ -73,6 +72,7 @@
</member>
<member name="light_projector" type="Texture2D" setter="set_projector" getter="get_projector">
[Texture2D] projected by light. [member shadow_enabled] must be on for the projector to work. Light projectors make the light appear as if it is shining through a colored but transparent object, almost like light shining through stained-glass.
+ [b]Note:[/b] Unlike [BaseMaterial3D] whose filter mode can be adjusted on a per-material basis, the filter mode for light projector textures is set globally with [member ProjectSettings.rendering/textures/light_projectors/filter].
</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.
@@ -80,7 +80,7 @@
<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="shadow_bias" type="float" setter="set_param" getter="get_param" default="0.2">
+ <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>
<member name="shadow_blur" type="float" setter="set_param" getter="get_param" default="1.0">
@@ -94,6 +94,9 @@
<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>
+ <member name="shadow_opacity" type="float" setter="set_param" getter="get_param" default="1.0">
+ The opacity to use when rendering the light's shadow map. 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.
+ </member>
<member name="shadow_reverse_cull_face" type="bool" setter="set_shadow_reverse_cull_face" getter="get_shadow_reverse_cull_face" default="false">
If [code]true[/code], reverses the backface culling of the mesh. This can be useful when you have a flat mesh that has a light behind it. If you need to cast a shadow on both sides of the mesh, set the mesh to use double-sided shadows with [constant GeometryInstance3D.SHADOW_CASTING_SETTING_DOUBLE_SIDED].
</member>
@@ -149,15 +152,19 @@
<constant name="PARAM_SHADOW_PANCAKE_SIZE" value="15" enum="Param">
Constant for accessing [member DirectionalLight3D.directional_shadow_pancake_size].
</constant>
- <constant name="PARAM_SHADOW_BLUR" value="16" enum="Param">
+ <constant name="PARAM_SHADOW_OPACITY" value="16" enum="Param">
+ Constant for accessing [member shadow_opacity].
+ </constant>
+ <constant name="PARAM_SHADOW_BLUR" value="17" enum="Param">
Constant for accessing [member shadow_blur].
</constant>
- <constant name="PARAM_SHADOW_VOLUMETRIC_FOG_FADE" value="17" enum="Param">
+ <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="18" enum="Param">
+ <constant name="PARAM_TRANSMITTANCE_BIAS" value="19" enum="Param">
Constant for accessing [member shadow_transmittance_bias].
</constant>
- <constant name="PARAM_MAX" value="19" enum="Param">
+ <constant name="PARAM_MAX" value="20" 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 ee98356962..c0766cd1ec 100644
--- a/doc/classes/LightmapGI.xml
+++ b/doc/classes/LightmapGI.xml
@@ -4,80 +4,122 @@
Computes and stores baked lightmaps for fast global illumination.
</brief_description>
<description>
- The [LightmapGI] node is used to compute and store baked lightmaps. Lightmaps are used to provide high-quality indirect lighting with very little light leaking. [LightmapGI] can also provide rough reflections using spherical harmonics if [member directional] is enabled. Dynamic objects can receive indirect lighting thanks to [i]light probes[/i], which can be automatically placed by setting [member generate_probes_subdiv]. Additional lightmap probes can also be added by creating [LightmapProbe] nodes. The downside is that lightmaps are fully static and cannot be baked in an exported project. Baking a [LightmapGI] node is also slower compared to [VoxelGI].
+ The [LightmapGI] node is used to compute and store baked lightmaps. Lightmaps are used to provide high-quality indirect lighting with very little light leaking. [LightmapGI] can also provide rough reflections using spherical harmonics if [member directional] is enabled. Dynamic objects can receive indirect lighting thanks to [i]light probes[/i], which can be automatically placed by setting [member generate_probes_subdiv] to a value other than [constant GENERATE_PROBES_DISABLED]. Additional lightmap probes can also be added by creating [LightmapProbe] nodes. The downside is that lightmaps are fully static and cannot be baked in an exported project. Baking a [LightmapGI] node is also slower compared to [VoxelGI].
[b]Procedural generation:[/b] Lightmap baking functionality is only available in the editor. This means [LightmapGI] is not suited to procedurally generated or user-built levels. For procedurally generated or user-built levels, use [VoxelGI] or SDFGI instead (see [member Environment.sdfgi_enabled]).
[b]Performance:[/b] [LightmapGI] provides the best possible run-time performance for global illumination. It is suitable for low-end hardware including integrated graphics and mobile devices.
+ [b]Note:[/b] Due to how lightmaps work, most properties only have a visible effect once lightmaps are baked again.
+ [b]Note:[/b] Lightmap baking on [CSGShape3D]s and [PrimitiveMesh]es is not supported, as these cannot store UV2 data required for baking.
+ [b]Note:[/b] If no custom lightmappers are installed, [LightmapGI] can only be baked when using the Vulkan backend (Clustered or Mobile), not OpenGL.
</description>
<tutorials>
</tutorials>
<members>
<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">
+ 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="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.
</member>
<member name="environment_custom_color" type="Color" setter="set_environment_custom_color" getter="get_environment_custom_color">
+ The color to use for environment lighting. Only effective if [member environment_mode] is [constant ENVIRONMENT_MODE_CUSTOM_COLOR].
</member>
<member name="environment_custom_energy" type="float" setter="set_environment_custom_energy" getter="get_environment_custom_energy">
+ The color multiplier to use for environment lighting. Only effective if [member environment_mode] is [constant ENVIRONMENT_MODE_CUSTOM_COLOR].
</member>
<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">
+ 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">
+ 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.
</member>
<member name="interior" type="bool" setter="set_interior" getter="is_interior" default="false">
+ If [code]true[/code], ignore environment lighting when baking lightmaps.
</member>
<member name="light_data" type="LightmapGIData" setter="set_light_data" getter="get_light_data">
+ The [LightmapGIData] associated to this [LightmapGI] node. This resource is automatically created after baking, and is not meant to be created manually.
</member>
<member name="max_texture_size" type="int" setter="set_max_texture_size" getter="get_max_texture_size" default="16384">
+ The maximum texture size for the generated texture atlas. Higher values will result in fewer slices being generated, but may not work on all hardware as a result of hardware limitations on texture sizes. Leave [member max_texture_size] at its default value of [code]16384[/code] if unsure.
</member>
<member name="quality" type="int" setter="set_bake_quality" getter="get_bake_quality" enum="LightmapGI.BakeQuality" default="1">
+ The quality preset to use when baking lightmaps. This affects bake times, but output file sizes remain mostly identical across quality levels.
+ To further speed up bake times, decrease [member bounces], disable [member use_denoiser] and increase the lightmap texel size on 3D scenes in the Import doc.
</member>
<member name="use_denoiser" type="bool" setter="set_use_denoiser" getter="is_using_denoiser" default="true">
+ If [code]true[/code], uses a CPU-based denoising algorithm on the generated lightmap. This eliminates most noise within the generated lightmap at the cost of longer bake times. File sizes are generally not impacted significantly by the use of a denoiser, although lossless compression may do a better job at compressing a denoised image.
+ [b]Note:[/b] The built-in denoiser (OpenImageDenoise) may crash when denoising lightmaps in large scenes. If you encounter a crash at the end of lightmap baking, try disabling [member use_denoiser].
</member>
</members>
<constants>
<constant name="BAKE_QUALITY_LOW" value="0" enum="BakeQuality">
+ Low bake quality (fastest bake times). The quality of this preset can be adjusted by changing [member ProjectSettings.rendering/lightmapping/bake_quality/low_quality_ray_count] and [member ProjectSettings.rendering/lightmapping/bake_quality/low_quality_probe_ray_count].
</constant>
<constant name="BAKE_QUALITY_MEDIUM" value="1" enum="BakeQuality">
+ Medium bake quality (fast bake times). The quality of this preset can be adjusted by changing [member ProjectSettings.rendering/lightmapping/bake_quality/medium_quality_ray_count] and [member ProjectSettings.rendering/lightmapping/bake_quality/medium_quality_probe_ray_count].
</constant>
<constant name="BAKE_QUALITY_HIGH" value="2" enum="BakeQuality">
+ High bake quality (slow bake times). The quality of this preset can be adjusted by changing [member ProjectSettings.rendering/lightmapping/bake_quality/high_quality_ray_count] and [member ProjectSettings.rendering/lightmapping/bake_quality/high_quality_probe_ray_count].
</constant>
<constant name="BAKE_QUALITY_ULTRA" value="3" enum="BakeQuality">
+ Highest bake quality (slowest bake times). The quality of this preset can be adjusted by changing [member ProjectSettings.rendering/lightmapping/bake_quality/high_quality_ray_count] and [member ProjectSettings.rendering/lightmapping/bake_quality/ultra_quality_probe_ray_count].
</constant>
<constant name="GENERATE_PROBES_DISABLED" value="0" enum="GenerateProbes">
+ Don't generate lightmap probes for lighting dynamic objects.
</constant>
<constant name="GENERATE_PROBES_SUBDIV_4" value="1" enum="GenerateProbes">
+ Lowest level of subdivision (fastest bake times, smallest file sizes).
</constant>
<constant name="GENERATE_PROBES_SUBDIV_8" value="2" enum="GenerateProbes">
+ Low level of subdivision (fast bake times, small file sizes).
</constant>
<constant name="GENERATE_PROBES_SUBDIV_16" value="3" enum="GenerateProbes">
+ High level of subdivision (slow bake times, large file sizes).
</constant>
<constant name="GENERATE_PROBES_SUBDIV_32" value="4" enum="GenerateProbes">
+ Highest level of subdivision (slowest bake times, largest file sizes).
</constant>
<constant name="BAKE_ERROR_OK" value="0" enum="BakeError">
+ Lightmap baking was successful.
</constant>
<constant name="BAKE_ERROR_NO_LIGHTMAPPER" value="1" enum="BakeError">
+ Lightmap baking failed as there is no lightmapper available in this Godot build.
</constant>
<constant name="BAKE_ERROR_NO_SAVE_PATH" value="2" enum="BakeError">
+ Lightmap baking failed as the [LightmapGIData] save path isn't configured in the resource.
</constant>
<constant name="BAKE_ERROR_NO_MESHES" value="3" enum="BakeError">
+ Lightmap baking failed as there are no meshes whose [member GeometryInstance3D.gi_mode] is [constant GeometryInstance3D.GI_MODE_STATIC] and with valid UV2 mapping in the current scene. You may need to select 3D scenes in the Import dock and change their global illumination mode accordingly.
</constant>
<constant name="BAKE_ERROR_MESHES_INVALID" value="4" enum="BakeError">
+ Lightmap baking failed as the lightmapper failed to analyze some of the meshes marked as static for baking.
</constant>
<constant name="BAKE_ERROR_CANT_CREATE_IMAGE" value="5" enum="BakeError">
+ Lightmap baking failed as the resulting image couldn't be saved or imported by Godot after it was saved.
</constant>
<constant name="BAKE_ERROR_USER_ABORTED" value="6" enum="BakeError">
+ The user aborted the lightmap baking operation (typically by clicking the [b]Cancel[/b] button in the progress dialog).
</constant>
<constant name="ENVIRONMENT_MODE_DISABLED" value="0" enum="EnvironmentMode">
+ Ignore environment lighting when baking lightmaps.
</constant>
<constant name="ENVIRONMENT_MODE_SCENE" value="1" enum="EnvironmentMode">
+ Use the scene's environment lighting when baking lightmaps.
+ [b]Note:[/b] If baking lightmaps in a scene with no [WorldEnvironment] node, this will act like [constant ENVIRONMENT_MODE_DISABLED]. The editor's preview sky and sun is [i]not[/i] taken into account by [LightmapGI] when baking lightmaps.
</constant>
<constant name="ENVIRONMENT_MODE_CUSTOM_SKY" value="2" enum="EnvironmentMode">
+ Use [member environment_custom_sky] as a source of environment lighting when baking lightmaps.
</constant>
<constant name="ENVIRONMENT_MODE_CUSTOM_COLOR" value="3" enum="EnvironmentMode">
+ Use [member environment_custom_color] multiplied by [member environment_custom_energy] as a constant source of environment lighting when baking lightmaps.
</constant>
</constants>
</class>
diff --git a/doc/classes/LightmapGIData.xml b/doc/classes/LightmapGIData.xml
index c2423daef0..d24b2c6871 100644
--- a/doc/classes/LightmapGIData.xml
+++ b/doc/classes/LightmapGIData.xml
@@ -1,51 +1,61 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="LightmapGIData" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
+ Contains baked lightmap and dynamic object probe data for [LightmapGI].
</brief_description>
<description>
+ [LightmapGIData] contains baked lightmap and dynamic object probe data for [LightmapGI]. It is replaced every time lightmaps are baked in [LightmapGI].
</description>
<tutorials>
</tutorials>
<methods>
<method name="add_user">
<return type="void" />
- <argument index="0" name="path" type="NodePath" />
- <argument index="1" name="uv_scale" type="Rect2" />
- <argument index="2" name="slice_index" type="int" />
- <argument index="3" name="sub_instance" type="int" />
+ <param index="0" name="path" type="NodePath" />
+ <param index="1" name="uv_scale" type="Rect2" />
+ <param index="2" name="slice_index" type="int" />
+ <param index="3" name="sub_instance" type="int" />
<description>
+ Adds an object that is considered baked within this [LightmapGIData].
</description>
</method>
<method name="clear_users">
<return type="void" />
<description>
+ Clear all objects that are considered baked within this [LightmapGIData].
</description>
</method>
<method name="get_user_count" qualifiers="const">
<return type="int" />
<description>
+ Returns the number of objects that are considered baked within this [LightmapGIData].
</description>
</method>
<method name="get_user_path" qualifiers="const">
<return type="NodePath" />
- <argument index="0" name="user_idx" type="int" />
+ <param index="0" name="user_idx" type="int" />
<description>
+ Returns the [NodePath] of the baked object at index [param user_idx].
</description>
</method>
<method name="is_using_spherical_harmonics" qualifiers="const">
<return type="bool" />
<description>
+ If [code]true[/code], lightmaps were baked with directional information. See also [member LightmapGI.directional].
</description>
</method>
<method name="set_uses_spherical_harmonics">
<return type="void" />
- <argument index="0" name="uses_spherical_harmonics" type="bool" />
+ <param index="0" name="uses_spherical_harmonics" type="bool" />
<description>
+ 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>
</methods>
<members>
<member name="light_texture" type="TextureLayered" setter="set_light_texture" getter="get_light_texture">
+ The lightmap atlas texture generated by the lightmapper.
</member>
</members>
</class>
diff --git a/doc/classes/LightmapProbe.xml b/doc/classes/LightmapProbe.xml
index a5ba6294b9..cb4879b6c7 100644
--- a/doc/classes/LightmapProbe.xml
+++ b/doc/classes/LightmapProbe.xml
@@ -1,8 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="LightmapProbe" inherits="Node3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
+ Represents a single manually placed probe for dynamic object lighting with [LightmapGI].
</brief_description>
<description>
+ [LightmapProbe] represents the position of a single manually placed probe for dynamic object lighting with [LightmapGI].
+ Typically, [LightmapGI] probes are placed automatically by setting [member LightmapGI.generate_probes_subdiv] to a value other than [constant LightmapGI.GENERATE_PROBES_DISABLED]. By creating [LightmapProbe] nodes before baking lightmaps, you can add more probes in specific areas for greater detail, or disable automatic generation and rely only on manually placed probes instead.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/Lightmapper.xml b/doc/classes/Lightmapper.xml
index f9a1e2fa99..58ef2ed0cf 100644
--- a/doc/classes/Lightmapper.xml
+++ b/doc/classes/Lightmapper.xml
@@ -1,8 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="Lightmapper" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
+ Abstract class extended by lightmappers, for use in [LightmapGI].
</brief_description>
<description>
+ This class should be extended by custom lightmapper classes. Lightmappers can then be used with [LightmapGI] to provide fast baked global illumination in 3D.
+ Godot contains a built-in GPU-based lightmapper [LightmapperRD] that uses compute shaders, but custom lightmappers can be implemented by C++ modules.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/LightmapperRD.xml b/doc/classes/LightmapperRD.xml
index 29d95244ce..e4b68a7ef8 100644
--- a/doc/classes/LightmapperRD.xml
+++ b/doc/classes/LightmapperRD.xml
@@ -1,8 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="LightmapperRD" inherits="Lightmapper" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
+ The built-in GPU-based lightmapper for use with [LightmapGI].
</brief_description>
<description>
+ LightmapperRD ("RD" stands for [RenderingDevice]) is the built-in GPU-based lightmapper for use with [LightmapGI]. On most dedicated GPUs, it can bake lightmaps much faster than most CPU-based lightmappers. LightmapperRD uses compute shaders to bake lightmaps, so it does not require CUDA or OpenCL libraries to be installed to be usable.
+ [b]Note:[/b] Only usable when using the Vulkan backend (Clustered or Mobile), not OpenGL.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/Line2D.xml b/doc/classes/Line2D.xml
index e2cc43bb75..4547c3589f 100644
--- a/doc/classes/Line2D.xml
+++ b/doc/classes/Line2D.xml
@@ -13,11 +13,11 @@
<methods>
<method name="add_point">
<return type="void" />
- <argument index="0" name="position" type="Vector2" />
- <argument index="1" name="at_position" type="int" default="-1" />
+ <param index="0" name="position" type="Vector2" />
+ <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" />
- <argument 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" />
- <argument 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" />
- <argument index="0" name="i" type="int" />
- <argument index="1" name="position" type="Vector2" />
+ <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 55e012ee0c..20703f680c 100644
--- a/doc/classes/LineEdit.xml
+++ b/doc/classes/LineEdit.xml
@@ -37,12 +37,6 @@
Erases the [LineEdit]'s [member text].
</description>
</method>
- <method name="clear_opentype_features">
- <return type="void" />
- <description>
- Removes all OpenType features.
- </description>
- </method>
<method name="delete_char_at_caret">
<return type="void" />
<description>
@@ -51,10 +45,10 @@
</method>
<method name="delete_text">
<return type="void" />
- <argument index="0" name="from_column" type="int" />
- <argument index="1" name="to_column" type="int" />
+ <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">
@@ -70,13 +64,6 @@
[b]Warning:[/b] This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their [member Window.visible] property.
</description>
</method>
- <method name="get_opentype_feature" qualifiers="const">
- <return type="int" />
- <argument index="0" name="tag" type="String" />
- <description>
- Returns OpenType feature [code]tag[/code].
- </description>
- </method>
<method name="get_scroll_offset" qualifiers="const">
<return type="int" />
<description>
@@ -103,9 +90,9 @@
</method>
<method name="insert_text_at_caret">
<return type="void" />
- <argument index="0" name="text" type="String" />
+ <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">
@@ -116,17 +103,17 @@
</method>
<method name="menu_option">
<return type="void" />
- <argument index="0" name="option" type="int" />
+ <param index="0" name="option" type="int" />
<description>
Executes a given action as defined in the [enum MenuItems] enum.
</description>
</method>
<method name="select">
<return type="void" />
- <argument index="0" name="from" type="int" default="0" />
- <argument index="1" name="to" type="int" default="-1" />
+ <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"
@@ -149,14 +136,6 @@
Selects the whole [String].
</description>
</method>
- <method name="set_opentype_feature">
- <return type="void" />
- <argument index="0" name="tag" type="String" />
- <argument index="1" name="value" type="int" />
- <description>
- Returns OpenType feature [code]tag[/code]. More info: [url=https://docs.microsoft.com/en-us/typography/opentype/spec/featuretags]OpenType feature tags[/url].
- </description>
- </method>
</methods>
<members>
<member name="alignment" type="int" setter="set_horizontal_alignment" getter="get_horizontal_alignment" enum="HorizontalAlignment" default="0">
@@ -204,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]
@@ -242,8 +221,8 @@
<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="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.
@@ -267,22 +246,25 @@
<member name="virtual_keyboard_enabled" type="bool" setter="set_virtual_keyboard_enabled" getter="is_virtual_keyboard_enabled" default="true">
If [code]true[/code], the native virtual keyboard is shown when focused on platforms that support it.
</member>
+ <member name="virtual_keyboard_type" type="int" setter="set_virtual_keyboard_type" getter="get_virtual_keyboard_type" enum="LineEdit.VirtualKeyboardType" default="0">
+ Specifies the type of virtual keyboard to show.
+ </member>
</members>
<signals>
<signal name="text_change_rejected">
- <argument index="0" name="rejected_substring" type="String" />
+ <param index="0" name="rejected_substring" type="String" />
<description>
Emitted when appending text that overflows the [member max_length]. The appended text is truncated to fit [member max_length], and the part that couldn't fit is passed as the [code]rejected_substring[/code] argument.
</description>
</signal>
<signal name="text_changed">
- <argument index="0" name="new_text" type="String" />
+ <param index="0" name="new_text" type="String" />
<description>
Emitted when the text changes.
</description>
</signal>
<signal name="text_submitted">
- <argument index="0" name="new_text" type="String" />
+ <param index="0" name="new_text" type="String" />
<description>
Emitted when the user presses [constant KEY_ENTER] on the [LineEdit].
</description>
@@ -377,6 +359,31 @@
<constant name="MENU_MAX" value="28" enum="MenuItems">
Represents the size of the [enum MenuItems] enum.
</constant>
+ <constant name="KEYBOARD_TYPE_DEFAULT" value="0" enum="VirtualKeyboardType">
+ Default text virtual keyboard.
+ </constant>
+ <constant name="KEYBOARD_TYPE_MULTILINE" value="1" enum="VirtualKeyboardType">
+ Multiline virtual keyboard.
+ </constant>
+ <constant name="KEYBOARD_TYPE_NUMBER" value="2" enum="VirtualKeyboardType">
+ Virtual number keypad, useful for PIN entry.
+ </constant>
+ <constant name="KEYBOARD_TYPE_NUMBER_DECIMAL" value="3" enum="VirtualKeyboardType">
+ Virtual number keypad, useful for entering fractional numbers.
+ </constant>
+ <constant name="KEYBOARD_TYPE_PHONE" value="4" enum="VirtualKeyboardType">
+ Virtual phone number keypad.
+ </constant>
+ <constant name="KEYBOARD_TYPE_EMAIL_ADDRESS" value="5" enum="VirtualKeyboardType">
+ Virtual keyboard with additional keys to assist with typing email addresses.
+ </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].
+ </constant>
+ <constant name="KEYBOARD_TYPE_URL" value="7" enum="VirtualKeyboardType">
+ Virtual keyboard with additional keys to assist with typing URLs.
+ </constant>
</constants>
<theme_items>
<theme_item name="caret_color" data_type="color" type="Color" default="Color(0.95, 0.95, 0.95, 1)">
@@ -410,7 +417,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 ba80504caf..7c6ff2d4e1 100644
--- a/doc/classes/LinkButton.xml
+++ b/doc/classes/LinkButton.xml
@@ -9,29 +9,6 @@
</description>
<tutorials>
</tutorials>
- <methods>
- <method name="clear_opentype_features">
- <return type="void" />
- <description>
- Removes all OpenType features.
- </description>
- </method>
- <method name="get_opentype_feature" qualifiers="const">
- <return type="int" />
- <argument index="0" name="tag" type="String" />
- <description>
- Returns OpenType feature [code]tag[/code].
- </description>
- </method>
- <method name="set_opentype_feature">
- <return type="void" />
- <argument index="0" name="tag" type="String" />
- <argument index="1" name="value" type="int" />
- <description>
- Returns OpenType feature [code]tag[/code]. More info: [url=https://docs.microsoft.com/en-us/typography/opentype/spec/featuretags]OpenType feature tags[/url].
- </description>
- </method>
- </methods>
<members>
<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.
diff --git a/doc/classes/MainLoop.xml b/doc/classes/MainLoop.xml
index 2cf41b750a..674adb1772 100644
--- a/doc/classes/MainLoop.xml
+++ b/doc/classes/MainLoop.xml
@@ -74,15 +74,15 @@
</method>
<method name="_physics_process" qualifiers="virtual">
<return type="bool" />
- <argument index="0" name="delta" type="float" />
+ <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>
<method name="_process" qualifiers="virtual">
<return type="bool" />
- <argument index="0" name="delta" type="float" />
+ <param index="0" name="delta" type="float" />
<description>
Called each process (idle) frame with the time since the last process frame as argument (in seconds). Equivalent to [method Node._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.
@@ -91,8 +91,8 @@
</methods>
<signals>
<signal name="on_request_permissions_result">
- <argument index="0" name="permission" type="String" />
- <argument index="1" name="granted" type="bool" />
+ <param index="0" name="permission" type="String" />
+ <param index="1" name="granted" type="bool" />
<description>
Emitted when a user responds to a permission request.
</description>
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/Position3D.xml b/doc/classes/Marker3D.xml
index d91e0fbfdf..5ad1cdf513 100644
--- a/doc/classes/Position3D.xml
+++ b/doc/classes/Marker3D.xml
@@ -1,5 +1,5 @@
<?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">
+<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>
diff --git a/doc/classes/Marshalls.xml b/doc/classes/Marshalls.xml
index b66a1b9190..102e4b75ed 100644
--- a/doc/classes/Marshalls.xml
+++ b/doc/classes/Marshalls.xml
@@ -11,47 +11,47 @@
<methods>
<method name="base64_to_raw">
<return type="PackedByteArray" />
- <argument index="0" name="base64_str" type="String" />
+ <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" />
- <argument index="0" name="base64_str" 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">
<return type="Variant" />
- <argument index="0" name="base64_str" type="String" />
- <argument index="1" name="allow_objects" type="bool" default="false" />
+ <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>
<method name="raw_to_base64">
<return type="String" />
- <argument index="0" name="array" type="PackedByteArray" />
+ <param index="0" name="array" type="PackedByteArray" />
<description>
Returns a Base64-encoded string of a given [PackedByteArray].
</description>
</method>
<method name="utf8_to_base64">
<return type="String" />
- <argument index="0" name="utf8_str" 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">
<return type="String" />
- <argument index="0" name="variant" type="Variant" />
- <argument index="1" name="full_objects" type="bool" default="false" />
+ <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..3ef0572e9f
--- /dev/null
+++ b/doc/classes/MenuBar.xml
@@ -0,0 +1,172 @@
+<?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="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>
+ <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 bec567b3ef..1f38510e83 100644
--- a/doc/classes/MenuButton.xml
+++ b/doc/classes/MenuButton.xml
@@ -20,7 +20,7 @@
</method>
<method name="set_disable_shortcuts">
<return type="void" />
- <argument index="0" name="disabled" type="bool" />
+ <param index="0" name="disabled" type="bool" />
<description>
If [code]true[/code], shortcuts are disabled and cannot be used to trigger the button.
</description>
@@ -65,7 +65,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 2b24901fe2..d3d5a7bfaa 100644
--- a/doc/classes/Mesh.xml
+++ b/doc/classes/Mesh.xml
@@ -25,7 +25,7 @@
</method>
<method name="_get_blend_shape_name" qualifiers="virtual const">
<return type="StringName" />
- <argument index="0" name="index" type="int" />
+ <param index="0" name="index" type="int" />
<description>
</description>
</method>
@@ -36,79 +36,79 @@
</method>
<method name="_set_blend_shape_name" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="index" type="int" />
- <argument index="1" name="name" type="StringName" />
+ <param index="0" name="index" type="int" />
+ <param index="1" name="name" type="StringName" />
<description>
</description>
</method>
<method name="_surface_get_array_index_len" qualifiers="virtual const">
<return type="int" />
- <argument index="0" name="index" type="int" />
+ <param index="0" name="index" type="int" />
<description>
</description>
</method>
<method name="_surface_get_array_len" qualifiers="virtual const">
<return type="int" />
- <argument index="0" name="index" type="int" />
+ <param index="0" name="index" type="int" />
<description>
</description>
</method>
<method name="_surface_get_arrays" qualifiers="virtual const">
<return type="Array" />
- <argument index="0" name="index" type="int" />
+ <param index="0" name="index" type="int" />
<description>
</description>
</method>
<method name="_surface_get_blend_shape_arrays" qualifiers="virtual const">
- <return type="Array" />
- <argument index="0" name="index" type="int" />
+ <return type="Array[]" />
+ <param index="0" name="index" type="int" />
<description>
</description>
</method>
<method name="_surface_get_format" qualifiers="virtual const">
<return type="int" />
- <argument index="0" name="index" type="int" />
+ <param index="0" name="index" type="int" />
<description>
</description>
</method>
<method name="_surface_get_lods" qualifiers="virtual const">
<return type="Dictionary" />
- <argument index="0" name="index" type="int" />
+ <param index="0" name="index" type="int" />
<description>
</description>
</method>
<method name="_surface_get_material" qualifiers="virtual const">
<return type="Material" />
- <argument index="0" name="index" type="int" />
+ <param index="0" name="index" type="int" />
<description>
</description>
</method>
<method name="_surface_get_primitive_type" qualifiers="virtual const">
<return type="int" />
- <argument index="0" name="index" type="int" />
+ <param index="0" name="index" type="int" />
<description>
</description>
</method>
<method name="_surface_set_material" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="index" type="int" />
- <argument index="1" name="material" type="Material" />
+ <param index="0" name="index" type="int" />
+ <param index="1" name="material" type="Material" />
<description>
</description>
</method>
<method name="create_convex_shape" qualifiers="const">
<return type="Shape3D" />
- <argument index="0" name="clean" type="bool" default="true" />
- <argument index="1" name="simplify" type="bool" default="false" />
+ <param index="0" name="clean" type="bool" default="true" />
+ <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">
<return type="Mesh" />
- <argument index="0" name="margin" type="float" />
+ <param index="0" name="margin" type="float" />
<description>
Calculate an outline mesh at a defined offset (margin) from the original mesh.
[b]Note:[/b] This method typically returns the vertices in reverse order (e.g. clockwise to counterclockwise).
@@ -123,7 +123,7 @@
<method name="generate_triangle_mesh" qualifiers="const">
<return type="TriangleMesh" />
<description>
- Generate a [TriangleMesh] from the mesh.
+ Generate a [TriangleMesh] from the mesh. Considers only surfaces using one of these primitive types: [constant PRIMITIVE_TRIANGLES], [constant PRIMITIVE_TRIANGLE_STRIP].
</description>
</method>
<method name="get_aabb" qualifiers="const">
@@ -142,34 +142,34 @@
<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">
<return type="Array" />
- <argument index="0" name="surf_idx" type="int" />
+ <param index="0" name="surf_idx" type="int" />
<description>
Returns the arrays for the vertices, normals, uvs, etc. that make up the requested surface (see [method ArrayMesh.add_surface_from_arrays]).
</description>
</method>
<method name="surface_get_blend_shape_arrays" qualifiers="const">
- <return type="Array" />
- <argument index="0" name="surf_idx" type="int" />
+ <return type="Array[]" />
+ <param index="0" name="surf_idx" type="int" />
<description>
Returns the blend shape arrays for the requested surface.
</description>
</method>
<method name="surface_get_material" qualifiers="const">
<return type="Material" />
- <argument index="0" name="surf_idx" type="int" />
+ <param index="0" name="surf_idx" type="int" />
<description>
Returns a [Material] in a given surface. Surface is rendered using this material.
</description>
</method>
<method name="surface_set_material">
<return type="void" />
- <argument index="0" name="surf_idx" type="int" />
- <argument index="1" name="material" type="Material" />
+ <param index="0" name="surf_idx" type="int" />
+ <param index="1" name="material" type="Material" />
<description>
Sets a [Material] for a given surface. Surface will be rendered using this material.
</description>
@@ -215,12 +215,16 @@
[PackedVector2Array] for second UV coordinates.
</constant>
<constant name="ARRAY_CUSTOM0" value="6" enum="ArrayType">
+ Contains custom color channel 0. [PackedByteArray] if [code](format &gt;&gt; [constant ARRAY_FORMAT_CUSTOM0_SHIFT]) &amp; [constant ARRAY_FORMAT_CUSTOM_MASK])[/code] is [constant ARRAY_CUSTOM_RGBA8_UNORM], [constant ARRAY_CUSTOM_RGBA8_UNORM], [constant ARRAY_CUSTOM_RG_HALF] or [constant ARRAY_CUSTOM_RGBA_HALF]. [PackedFloat32Array] otherwise.
</constant>
<constant name="ARRAY_CUSTOM1" value="7" enum="ArrayType">
+ Contains custom color channel 1. [PackedByteArray] if [code](format &gt;&gt; [constant ARRAY_FORMAT_CUSTOM1_SHIFT]) &amp; [constant ARRAY_FORMAT_CUSTOM_MASK])[/code] is [constant ARRAY_CUSTOM_RGBA8_UNORM], [constant ARRAY_CUSTOM_RGBA8_UNORM], [constant ARRAY_CUSTOM_RG_HALF] or [constant ARRAY_CUSTOM_RGBA_HALF]. [PackedFloat32Array] otherwise.
</constant>
<constant name="ARRAY_CUSTOM2" value="8" enum="ArrayType">
+ Contains custom color channel 2. [PackedByteArray] if [code](format &gt;&gt; [constant ARRAY_FORMAT_CUSTOM2_SHIFT]) &amp; [constant ARRAY_FORMAT_CUSTOM_MASK])[/code] is [constant ARRAY_CUSTOM_RGBA8_UNORM], [constant ARRAY_CUSTOM_RGBA8_UNORM], [constant ARRAY_CUSTOM_RG_HALF] or [constant ARRAY_CUSTOM_RGBA_HALF]. [PackedFloat32Array] otherwise.
</constant>
<constant name="ARRAY_CUSTOM3" value="9" enum="ArrayType">
+ Contains custom color channel 3. [PackedByteArray] if [code](format &gt;&gt; [constant ARRAY_FORMAT_CUSTOM3_SHIFT]) &amp; [constant ARRAY_FORMAT_CUSTOM_MASK])[/code] is [constant ARRAY_CUSTOM_RGBA8_UNORM], [constant ARRAY_CUSTOM_RGBA8_UNORM], [constant ARRAY_CUSTOM_RG_HALF] or [constant ARRAY_CUSTOM_RGBA_HALF]. [PackedFloat32Array] otherwise.
</constant>
<constant name="ARRAY_BONES" value="10" enum="ArrayType">
[PackedFloat32Array] or [PackedInt32Array] of bone indices. Each element is a group of 4 numbers.
@@ -236,20 +240,28 @@
Represents the size of the [enum ArrayType] enum.
</constant>
<constant name="ARRAY_CUSTOM_RGBA8_UNORM" value="0" enum="ArrayCustomFormat">
+ Indicates this custom channel contains unsigned normalized byte colors from 0 to 1, encoded as [PackedByteArray].
</constant>
<constant name="ARRAY_CUSTOM_RGBA8_SNORM" value="1" enum="ArrayCustomFormat">
+ Indicates this custom channel contains signed normalized byte colors from -1 to 1, encoded as [PackedByteArray].
</constant>
<constant name="ARRAY_CUSTOM_RG_HALF" value="2" enum="ArrayCustomFormat">
+ Indicates this custom channel contains half precision float colors, encoded as [PackedByteArray]. Only red and green channels are used.
</constant>
<constant name="ARRAY_CUSTOM_RGBA_HALF" value="3" enum="ArrayCustomFormat">
+ Indicates this custom channel contains half precision float colors, encoded as [PackedByteArray].
</constant>
<constant name="ARRAY_CUSTOM_R_FLOAT" value="4" enum="ArrayCustomFormat">
+ Indicates this custom channel contains full float colors, in a [PackedFloat32Array]. Only the red green channel is used.
</constant>
<constant name="ARRAY_CUSTOM_RG_FLOAT" value="5" enum="ArrayCustomFormat">
+ Indicates this custom channel contains full float colors, in a [PackedFloat32Array]. Only red and green channels are used.
</constant>
<constant name="ARRAY_CUSTOM_RGB_FLOAT" value="6" enum="ArrayCustomFormat">
+ Indicates this custom channel contains full float colors, in a [PackedFloat32Array]. Only red, green and blue channels are used.
</constant>
<constant name="ARRAY_CUSTOM_RGBA_FLOAT" value="7" enum="ArrayCustomFormat">
+ Indicates this custom channel contains full float colors, in a [PackedFloat32Array].
</constant>
<constant name="ARRAY_CUSTOM_MAX" value="8" enum="ArrayCustomFormat">
Represents the size of the [enum ArrayCustomFormat] enum.
@@ -273,12 +285,16 @@
Mesh array contains second UV.
</constant>
<constant name="ARRAY_FORMAT_CUSTOM0" value="64" enum="ArrayFormat">
+ Mesh array contains custom channel index 0.
</constant>
<constant name="ARRAY_FORMAT_CUSTOM1" value="128" enum="ArrayFormat">
+ Mesh array contains custom channel index 1.
</constant>
<constant name="ARRAY_FORMAT_CUSTOM2" value="256" enum="ArrayFormat">
+ Mesh array contains custom channel index 2.
</constant>
<constant name="ARRAY_FORMAT_CUSTOM3" value="512" enum="ArrayFormat">
+ Mesh array contains custom channel index 3.
</constant>
<constant name="ARRAY_FORMAT_BONES" value="1024" enum="ArrayFormat">
Mesh array contains bones.
@@ -290,29 +306,40 @@
Mesh array uses indices.
</constant>
<constant name="ARRAY_FORMAT_BLEND_SHAPE_MASK" value="7" enum="ArrayFormat">
+ Mask of mesh channels permitted in blend shapes.
</constant>
<constant name="ARRAY_FORMAT_CUSTOM_BASE" value="13" enum="ArrayFormat">
+ Shift of first custom channel.
</constant>
<constant name="ARRAY_FORMAT_CUSTOM_BITS" value="3" enum="ArrayFormat">
+ Number of format bits per custom channel. See [enum ArrayCustomFormat].
</constant>
<constant name="ARRAY_FORMAT_CUSTOM0_SHIFT" value="13" enum="ArrayFormat">
+ Amount to shift [enum ArrayCustomFormat] for custom channel index 0.
</constant>
<constant name="ARRAY_FORMAT_CUSTOM1_SHIFT" value="16" enum="ArrayFormat">
+ Amount to shift [enum ArrayCustomFormat] for custom channel index 1.
</constant>
<constant name="ARRAY_FORMAT_CUSTOM2_SHIFT" value="19" enum="ArrayFormat">
+ Amount to shift [enum ArrayCustomFormat] for custom channel index 2.
</constant>
<constant name="ARRAY_FORMAT_CUSTOM3_SHIFT" value="22" enum="ArrayFormat">
+ Amount to shift [enum ArrayCustomFormat] for custom channel index 3.
</constant>
<constant name="ARRAY_FORMAT_CUSTOM_MASK" value="7" enum="ArrayFormat">
+ Mask of custom format bits per custom channel. Must be shifted by one of the SHIFT constants. See [enum ArrayCustomFormat].
</constant>
<constant name="ARRAY_COMPRESS_FLAGS_BASE" value="25" enum="ArrayFormat">
+ Shift of first compress flag. Compress flags should be passed to [method ArrayMesh.add_surface_from_arrays] and [method SurfaceTool.commit].
</constant>
<constant name="ARRAY_FLAG_USE_2D_VERTICES" value="33554432" enum="ArrayFormat">
Flag used to mark that the array contains 2D vertices.
</constant>
<constant name="ARRAY_FLAG_USE_DYNAMIC_UPDATE" value="67108864" enum="ArrayFormat">
+ Flag indices that the mesh data will use [code]GL_DYNAMIC_DRAW[/code] on GLES. Unused on Vulkan.
</constant>
<constant name="ARRAY_FLAG_USE_8_BONE_WEIGHTS" value="134217728" enum="ArrayFormat">
+ Flag used to mark that the mesh contains up to 8 bone influences per vertex. This flag indicates that [constant ARRAY_BONES] and [constant ARRAY_WEIGHTS] elements will have double length.
</constant>
<constant name="BLEND_SHAPE_MODE_NORMALIZED" value="0" enum="BlendShapeMode">
Blend shapes are normalized.
diff --git a/doc/classes/MeshDataTool.xml b/doc/classes/MeshDataTool.xml
index 0042bb20d8..b46f080a10 100644
--- a/doc/classes/MeshDataTool.xml
+++ b/doc/classes/MeshDataTool.xml
@@ -59,15 +59,15 @@
</method>
<method name="commit_to_surface">
<return type="int" enum="Error" />
- <argument index="0" name="mesh" type="ArrayMesh" />
+ <param index="0" name="mesh" type="ArrayMesh" />
<description>
Adds a new surface to specified [Mesh] with edited data.
</description>
</method>
<method name="create_from_surface">
<return type="int" enum="Error" />
- <argument index="0" name="mesh" type="ArrayMesh" />
- <argument index="1" name="surface" type="int" />
+ <param index="0" name="mesh" type="ArrayMesh" />
+ <param index="1" name="surface" type="int" />
<description>
Uses specified surface of given [Mesh] to populate data for MeshDataTool.
Requires [Mesh] with primitive type [constant Mesh.PRIMITIVE_TRIANGLES].
@@ -81,22 +81,22 @@
</method>
<method name="get_edge_faces" qualifiers="const">
<return type="PackedInt32Array" />
- <argument index="0" name="idx" type="int" />
+ <param index="0" name="idx" type="int" />
<description>
Returns array of faces that touch given edge.
</description>
</method>
<method name="get_edge_meta" qualifiers="const">
<return type="Variant" />
- <argument index="0" name="idx" type="int" />
+ <param index="0" name="idx" type="int" />
<description>
Returns meta information assigned to given edge.
</description>
</method>
<method name="get_edge_vertex" qualifiers="const">
<return type="int" />
- <argument index="0" name="idx" type="int" />
- <argument index="1" name="vertex" type="int" />
+ <param index="0" name="idx" type="int" />
+ <param index="1" name="vertex" type="int" />
<description>
Returns index of specified vertex connected to given edge.
Vertex argument can only be 0 or 1 because edges are comprised of two vertices.
@@ -110,8 +110,8 @@
</method>
<method name="get_face_edge" qualifiers="const">
<return type="int" />
- <argument index="0" name="idx" type="int" />
- <argument index="1" name="edge" type="int" />
+ <param index="0" name="idx" type="int" />
+ <param index="1" name="edge" type="int" />
<description>
Returns specified edge associated with given face.
Edge argument must be either 0, 1, or 2 because a face only has three edges.
@@ -119,22 +119,22 @@
</method>
<method name="get_face_meta" qualifiers="const">
<return type="Variant" />
- <argument index="0" name="idx" type="int" />
+ <param index="0" name="idx" type="int" />
<description>
Returns the metadata associated with the given face.
</description>
</method>
<method name="get_face_normal" qualifiers="const">
<return type="Vector3" />
- <argument index="0" name="idx" type="int" />
+ <param index="0" name="idx" type="int" />
<description>
Calculates and returns the face normal of the given face.
</description>
</method>
<method name="get_face_vertex" qualifiers="const">
<return type="int" />
- <argument index="0" name="idx" type="int" />
- <argument index="1" name="vertex" type="int" />
+ <param index="0" name="idx" type="int" />
+ <param index="1" name="vertex" type="int" />
<description>
Returns the specified vertex of the given face.
Vertex argument must be either 0, 1, or 2 because faces contain three vertices.
@@ -155,21 +155,21 @@
</method>
<method name="get_vertex" qualifiers="const">
<return type="Vector3" />
- <argument index="0" name="idx" type="int" />
+ <param index="0" name="idx" type="int" />
<description>
Returns the vertex at given index.
</description>
</method>
<method name="get_vertex_bones" qualifiers="const">
<return type="PackedInt32Array" />
- <argument index="0" name="idx" type="int" />
+ <param index="0" name="idx" type="int" />
<description>
Returns the bones of the given vertex.
</description>
</method>
<method name="get_vertex_color" qualifiers="const">
<return type="Color" />
- <argument index="0" name="idx" type="int" />
+ <param index="0" name="idx" type="int" />
<description>
Returns the color of the given vertex.
</description>
@@ -182,151 +182,151 @@
</method>
<method name="get_vertex_edges" qualifiers="const">
<return type="PackedInt32Array" />
- <argument index="0" name="idx" type="int" />
+ <param index="0" name="idx" type="int" />
<description>
Returns an array of edges that share the given vertex.
</description>
</method>
<method name="get_vertex_faces" qualifiers="const">
<return type="PackedInt32Array" />
- <argument index="0" name="idx" type="int" />
+ <param index="0" name="idx" type="int" />
<description>
Returns an array of faces that share the given vertex.
</description>
</method>
<method name="get_vertex_meta" qualifiers="const">
<return type="Variant" />
- <argument index="0" name="idx" type="int" />
+ <param index="0" name="idx" type="int" />
<description>
Returns the metadata associated with the given vertex.
</description>
</method>
<method name="get_vertex_normal" qualifiers="const">
<return type="Vector3" />
- <argument index="0" name="idx" type="int" />
+ <param index="0" name="idx" type="int" />
<description>
Returns the normal of the given vertex.
</description>
</method>
<method name="get_vertex_tangent" qualifiers="const">
<return type="Plane" />
- <argument index="0" name="idx" type="int" />
+ <param index="0" name="idx" type="int" />
<description>
Returns the tangent of the given vertex.
</description>
</method>
<method name="get_vertex_uv" qualifiers="const">
<return type="Vector2" />
- <argument index="0" name="idx" type="int" />
+ <param index="0" name="idx" type="int" />
<description>
Returns the UV of the given vertex.
</description>
</method>
<method name="get_vertex_uv2" qualifiers="const">
<return type="Vector2" />
- <argument index="0" name="idx" type="int" />
+ <param index="0" name="idx" type="int" />
<description>
Returns the UV2 of the given vertex.
</description>
</method>
<method name="get_vertex_weights" qualifiers="const">
<return type="PackedFloat32Array" />
- <argument index="0" name="idx" type="int" />
+ <param index="0" name="idx" type="int" />
<description>
Returns bone weights of the given vertex.
</description>
</method>
<method name="set_edge_meta">
<return type="void" />
- <argument index="0" name="idx" type="int" />
- <argument index="1" name="meta" type="Variant" />
+ <param index="0" name="idx" type="int" />
+ <param index="1" name="meta" type="Variant" />
<description>
Sets the metadata of the given edge.
</description>
</method>
<method name="set_face_meta">
<return type="void" />
- <argument index="0" name="idx" type="int" />
- <argument index="1" name="meta" type="Variant" />
+ <param index="0" name="idx" type="int" />
+ <param index="1" name="meta" type="Variant" />
<description>
Sets the metadata of the given face.
</description>
</method>
<method name="set_material">
<return type="void" />
- <argument index="0" name="material" type="Material" />
+ <param index="0" name="material" type="Material" />
<description>
Sets the material to be used by newly-constructed [Mesh].
</description>
</method>
<method name="set_vertex">
<return type="void" />
- <argument index="0" name="idx" type="int" />
- <argument index="1" name="vertex" type="Vector3" />
+ <param index="0" name="idx" type="int" />
+ <param index="1" name="vertex" type="Vector3" />
<description>
Sets the position of the given vertex.
</description>
</method>
<method name="set_vertex_bones">
<return type="void" />
- <argument index="0" name="idx" type="int" />
- <argument index="1" name="bones" type="PackedInt32Array" />
+ <param index="0" name="idx" type="int" />
+ <param index="1" name="bones" type="PackedInt32Array" />
<description>
Sets the bones of the given vertex.
</description>
</method>
<method name="set_vertex_color">
<return type="void" />
- <argument index="0" name="idx" type="int" />
- <argument index="1" name="color" type="Color" />
+ <param index="0" name="idx" type="int" />
+ <param index="1" name="color" type="Color" />
<description>
Sets the color of the given vertex.
</description>
</method>
<method name="set_vertex_meta">
<return type="void" />
- <argument index="0" name="idx" type="int" />
- <argument index="1" name="meta" type="Variant" />
+ <param index="0" name="idx" type="int" />
+ <param index="1" name="meta" type="Variant" />
<description>
Sets the metadata associated with the given vertex.
</description>
</method>
<method name="set_vertex_normal">
<return type="void" />
- <argument index="0" name="idx" type="int" />
- <argument index="1" name="normal" type="Vector3" />
+ <param index="0" name="idx" type="int" />
+ <param index="1" name="normal" type="Vector3" />
<description>
Sets the normal of the given vertex.
</description>
</method>
<method name="set_vertex_tangent">
<return type="void" />
- <argument index="0" name="idx" type="int" />
- <argument index="1" name="tangent" type="Plane" />
+ <param index="0" name="idx" type="int" />
+ <param index="1" name="tangent" type="Plane" />
<description>
Sets the tangent of the given vertex.
</description>
</method>
<method name="set_vertex_uv">
<return type="void" />
- <argument index="0" name="idx" type="int" />
- <argument index="1" name="uv" type="Vector2" />
+ <param index="0" name="idx" type="int" />
+ <param index="1" name="uv" type="Vector2" />
<description>
Sets the UV of the given vertex.
</description>
</method>
<method name="set_vertex_uv2">
<return type="void" />
- <argument index="0" name="idx" type="int" />
- <argument index="1" name="uv2" type="Vector2" />
+ <param index="0" name="idx" type="int" />
+ <param index="1" name="uv2" type="Vector2" />
<description>
Sets the UV2 of the given vertex.
</description>
</method>
<method name="set_vertex_weights">
<return type="void" />
- <argument index="0" name="idx" type="int" />
- <argument index="1" name="weights" type="PackedFloat32Array" />
+ <param index="0" name="idx" type="int" />
+ <param index="1" name="weights" type="PackedFloat32Array" />
<description>
Sets the bone weights of the given vertex.
</description>
diff --git a/doc/classes/MeshInstance2D.xml b/doc/classes/MeshInstance2D.xml
index 96e66f850a..e9666337a1 100644
--- a/doc/classes/MeshInstance2D.xml
+++ b/doc/classes/MeshInstance2D.xml
@@ -4,7 +4,7 @@
Node used for displaying a [Mesh] in 2D.
</brief_description>
<description>
- Node used for displaying a [Mesh] in 2D. Can be constructed from an existing [Sprite2D] via a tool in the editor toolbar. Select "Sprite2D" then "Convert to Mesh2D", select settings in popup and press "Create Mesh2D".
+ Node used for displaying a [Mesh] in 2D. A [MeshInstance2D] can be automatically created from an existing [Sprite2D] via a tool in the editor toolbar. Select the [Sprite2D] node, then choose [b]Sprite2D &gt; Convert to MeshInstance2D[/b] at the top of the 2D editor viewport.
</description>
<tutorials>
<link title="2D meshes">$DOCS_URL/tutorials/2d/2d_meshes.html</link>
diff --git a/doc/classes/MeshInstance3D.xml b/doc/classes/MeshInstance3D.xml
index f368190a29..618503c8df 100644
--- a/doc/classes/MeshInstance3D.xml
+++ b/doc/classes/MeshInstance3D.xml
@@ -4,7 +4,7 @@
Node that instances meshes into a scenario.
</brief_description>
<description>
- MeshInstance3D is a node that takes a [Mesh] resource and adds it to the current scenario by creating an instance of it. This is the class most often used render 3D geometry and can be used to instance a single [Mesh] in many places. This allows reuse of geometry which can save on resources. When a [Mesh] has to be instantiated more than thousands of times at close proximity, consider using a [MultiMesh] in a [MultiMeshInstance3D] instead.
+ MeshInstance3D is a node that takes a [Mesh] resource and adds it to the current scenario by creating an instance of it. This is the class most often used render 3D geometry and can be used to instance a single [Mesh] in many places. This allows reusing geometry, which can save on resources. When a [Mesh] has to be instantiated more than thousands of times at close proximity, consider using a [MultiMesh] in a [MultiMeshInstance3D] instead.
</description>
<tutorials>
<link title="3D Material Testers Demo">https://godotengine.org/asset-library/asset/123</link>
@@ -15,12 +15,12 @@
<methods>
<method name="create_convex_collision">
<return type="void" />
- <argument index="0" name="clean" type="bool" default="true" />
- <argument index="1" name="simplify" type="bool" default="false" />
+ <param index="0" name="clean" type="bool" default="true" />
+ <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">
@@ -43,13 +43,13 @@
</method>
<method name="find_blend_shape_by_name">
<return type="int" />
- <argument index="0" name="name" type="StringName" />
+ <param index="0" name="name" type="StringName" />
<description>
</description>
</method>
<method name="get_active_material" qualifiers="const">
<return type="Material" />
- <argument index="0" name="surface" type="int" />
+ <param index="0" name="surface" type="int" />
<description>
Returns the [Material] that will be used by the [Mesh] when drawing. This can return the [member GeometryInstance3D.material_override], the surface override [Material] defined in this [MeshInstance3D], or the surface [Material] defined in the [Mesh]. For example, if [member GeometryInstance3D.material_override] is used, all surfaces will return the override material.
</description>
@@ -61,13 +61,13 @@
</method>
<method name="get_blend_shape_value" qualifiers="const">
<return type="float" />
- <argument index="0" name="blend_shape_idx" type="int" />
+ <param index="0" name="blend_shape_idx" type="int" />
<description>
</description>
</method>
<method name="get_surface_override_material" qualifiers="const">
<return type="Material" />
- <argument index="0" name="surface" type="int" />
+ <param index="0" name="surface" type="int" />
<description>
Returns the override [Material] for the specified surface of the [Mesh] resource.
</description>
@@ -80,15 +80,15 @@
</method>
<method name="set_blend_shape_value">
<return type="void" />
- <argument index="0" name="blend_shape_idx" type="int" />
- <argument index="1" name="value" type="float" />
+ <param index="0" name="blend_shape_idx" type="int" />
+ <param index="1" name="value" type="float" />
<description>
</description>
</method>
<method name="set_surface_override_material">
<return type="void" />
- <argument index="0" name="surface" type="int" />
- <argument index="1" name="material" type="Material" />
+ <param index="0" name="surface" type="int" />
+ <param index="1" name="material" type="Material" />
<description>
Sets the override [Material] for the specified surface of the [Mesh] resource. This material is associated with this [MeshInstance3D] rather than with the [Mesh] resource.
</description>
diff --git a/doc/classes/MeshLibrary.xml b/doc/classes/MeshLibrary.xml
index 6b25441a16..85e57dd0f3 100644
--- a/doc/classes/MeshLibrary.xml
+++ b/doc/classes/MeshLibrary.xml
@@ -19,7 +19,7 @@
</method>
<method name="create_item">
<return type="void" />
- <argument index="0" name="id" type="int" />
+ <param index="0" name="id" type="int" />
<description>
Creates a new item in the library with the given ID.
You can get an unused ID from [method get_last_unused_item_id].
@@ -27,7 +27,7 @@
</method>
<method name="find_item_by_name" qualifiers="const">
<return type="int" />
- <argument index="0" name="name" type="String" />
+ <param index="0" name="name" type="String" />
<description>
Returns the first item with the given name.
</description>
@@ -40,49 +40,49 @@
</method>
<method name="get_item_mesh" qualifiers="const">
<return type="Mesh" />
- <argument index="0" name="id" type="int" />
+ <param index="0" name="id" type="int" />
<description>
Returns the item's mesh.
</description>
</method>
<method name="get_item_mesh_transform" qualifiers="const">
<return type="Transform3D" />
- <argument index="0" name="id" type="int" />
+ <param index="0" name="id" type="int" />
<description>
Returns the transform applied to the item's mesh.
</description>
</method>
<method name="get_item_name" qualifiers="const">
<return type="String" />
- <argument index="0" name="id" type="int" />
+ <param index="0" name="id" type="int" />
<description>
Returns the item's name.
</description>
</method>
<method name="get_item_navmesh" qualifiers="const">
<return type="NavigationMesh" />
- <argument index="0" name="id" type="int" />
+ <param index="0" name="id" type="int" />
<description>
Returns the item's navigation mesh.
</description>
</method>
<method name="get_item_navmesh_transform" qualifiers="const">
<return type="Transform3D" />
- <argument index="0" name="id" type="int" />
+ <param index="0" name="id" type="int" />
<description>
Returns the transform applied to the item's navigation mesh.
</description>
</method>
<method name="get_item_preview" qualifiers="const">
<return type="Texture2D" />
- <argument index="0" name="id" type="int" />
+ <param index="0" name="id" type="int" />
<description>
When running in the editor, returns a generated item preview (a 3D rendering in isometric perspective). When used in a running project, returns the manually-defined item preview which can be set using [method set_item_preview]. Returns an empty [Texture2D] if no preview was manually set in a running project.
</description>
</method>
<method name="get_item_shapes" qualifiers="const">
<return type="Array" />
- <argument index="0" name="id" type="int" />
+ <param index="0" name="id" type="int" />
<description>
Returns an item's collision shapes.
The array consists of each [Shape3D] followed by its [Transform3D].
@@ -96,31 +96,31 @@
</method>
<method name="remove_item">
<return type="void" />
- <argument index="0" name="id" type="int" />
+ <param index="0" name="id" type="int" />
<description>
Removes the item.
</description>
</method>
<method name="set_item_mesh">
<return type="void" />
- <argument index="0" name="id" type="int" />
- <argument index="1" name="mesh" type="Mesh" />
+ <param index="0" name="id" type="int" />
+ <param index="1" name="mesh" type="Mesh" />
<description>
Sets the item's mesh.
</description>
</method>
<method name="set_item_mesh_transform">
<return type="void" />
- <argument index="0" name="id" type="int" />
- <argument index="1" name="mesh_transform" type="Transform3D" />
+ <param index="0" name="id" type="int" />
+ <param index="1" name="mesh_transform" type="Transform3D" />
<description>
Sets the transform to apply to the item's mesh.
</description>
</method>
<method name="set_item_name">
<return type="void" />
- <argument index="0" name="id" type="int" />
- <argument index="1" name="name" type="String" />
+ <param index="0" name="id" type="int" />
+ <param index="1" name="name" type="String" />
<description>
Sets the item's name.
This name is shown in the editor. It can also be used to look up the item later using [method find_item_by_name].
@@ -128,32 +128,32 @@
</method>
<method name="set_item_navmesh">
<return type="void" />
- <argument index="0" name="id" type="int" />
- <argument index="1" name="navmesh" type="NavigationMesh" />
+ <param index="0" name="id" type="int" />
+ <param index="1" name="navmesh" type="NavigationMesh" />
<description>
Sets the item's navigation mesh.
</description>
</method>
<method name="set_item_navmesh_transform">
<return type="void" />
- <argument index="0" name="id" type="int" />
- <argument index="1" name="navmesh" type="Transform3D" />
+ <param index="0" name="id" type="int" />
+ <param index="1" name="navmesh" type="Transform3D" />
<description>
Sets the transform to apply to the item's navigation mesh.
</description>
</method>
<method name="set_item_preview">
<return type="void" />
- <argument index="0" name="id" type="int" />
- <argument index="1" name="texture" type="Texture2D" />
+ <param index="0" name="id" type="int" />
+ <param index="1" name="texture" type="Texture2D" />
<description>
Sets a texture to use as the item's preview icon in the editor.
</description>
</method>
<method name="set_item_shapes">
<return type="void" />
- <argument index="0" name="id" type="int" />
- <argument index="1" name="shapes" type="Array" />
+ <param index="0" name="id" type="int" />
+ <param index="1" name="shapes" type="Array" />
<description>
Sets an item's collision shapes.
The array should consist of [Shape3D] objects, each followed by a [Transform3D] that will be applied to it. For shapes that should not have a transform, use [constant Transform3D.IDENTITY].
diff --git a/doc/classes/MethodTweener.xml b/doc/classes/MethodTweener.xml
index b22341e0a1..7e042b5eb6 100644
--- a/doc/classes/MethodTweener.xml
+++ b/doc/classes/MethodTweener.xml
@@ -12,21 +12,21 @@
<methods>
<method name="set_delay">
<return type="MethodTweener" />
- <argument index="0" name="delay" type="float" />
+ <param index="0" name="delay" type="float" />
<description>
Sets the time in seconds after which the [MethodTweener] will start interpolating. By default there's no delay.
</description>
</method>
<method name="set_ease">
<return type="MethodTweener" />
- <argument index="0" name="ease" type="int" enum="Tween.EaseType" />
+ <param index="0" name="ease" type="int" enum="Tween.EaseType" />
<description>
Sets the type of used easing from [enum Tween.EaseType]. If not set, the default easing is used from the [Tween] that contains this Tweener.
</description>
</method>
<method name="set_trans">
<return type="MethodTweener" />
- <argument index="0" name="trans" type="int" enum="Tween.TransitionType" />
+ <param index="0" name="trans" type="int" enum="Tween.TransitionType" />
<description>
Sets the type of used transition from [enum Tween.TransitionType]. If not set, the default transition is used from the [Tween] that contains this Tweener.
</description>
diff --git a/doc/classes/MissingNode.xml b/doc/classes/MissingNode.xml
new file mode 100644
index 0000000000..b5aa02cfd6
--- /dev/null
+++ b/doc/classes/MissingNode.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="MissingNode" inherits="Node" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ 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.
+ </description>
+ <tutorials>
+ </tutorials>
+ <members>
+ <member name="original_class" type="String" setter="set_original_class" getter="get_original_class">
+ </member>
+ <member name="recording_properties" type="bool" setter="set_recording_properties" getter="is_recording_properties">
+ </member>
+ </members>
+</class>
diff --git a/doc/classes/MissingResource.xml b/doc/classes/MissingResource.xml
new file mode 100644
index 0000000000..eede6350d8
--- /dev/null
+++ b/doc/classes/MissingResource.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="MissingResource" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ 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.
+ </description>
+ <tutorials>
+ </tutorials>
+ <members>
+ <member name="original_class" type="String" setter="set_original_class" getter="get_original_class">
+ </member>
+ <member name="recording_properties" type="bool" setter="set_recording_properties" getter="is_recording_properties">
+ </member>
+ </members>
+</class>
diff --git a/doc/classes/MovieWriter.xml b/doc/classes/MovieWriter.xml
new file mode 100644
index 0000000000..f2509ad2b2
--- /dev/null
+++ b/doc/classes/MovieWriter.xml
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="MovieWriter" inherits="Object" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ 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 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.
+ If you need to encode to a different format or pipe a stream through third-party software, you can extend the [MovieWriter] class to create your own movie writers. This should typically be done using GDExtension for performance reasons.
+ [b]Editor usage:[/b] A default movie file path can be specified in [member ProjectSettings.editor/movie_writer/movie_file]. Alternatively, for running single scenes, a [code]movie_path[/code] metadata can be added to the root node, specifying the path to a movie file that will be used when recording that scene. Once a path is set, click the video reel icon in the top-right corner of the editor to enable Movie Maker mode, then run any scene as usual. The engine will start recording as soon as the splash screen is finished, and it will only stop recording when the engine quits. Click the video reel icon again to disable Movie Maker mode. Note that toggling Movie Maker mode does not affect project instances that are already running.
+ [b]Note:[/b] MovieWriter is available for use in both the editor and exported projects, but it is [i]not[/i] designed for use by end users to record videos while playing. Players wishing to record gameplay videos should install tools such as [url=https://obsproject.com/]OBS Studio[/url] or [url=https://www.maartenbaert.be/simplescreenrecorder/]SimpleScreenRecorder[/url] instead.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="_get_audio_mix_rate" qualifiers="virtual const">
+ <return type="int" />
+ <description>
+ Called when the audio sample rate used for recording the audio is requested by the engine. The value returned must be specified in Hz. Defaults to 48000 Hz if [method _get_audio_mix_rate] is not overridden.
+ </description>
+ </method>
+ <method name="_get_audio_speaker_mode" qualifiers="virtual const">
+ <return type="int" enum="AudioServer.SpeakerMode" />
+ <description>
+ Called when the audio speaker mode used for recording the audio is requested by the engine. This can affect the number of output channels in the resulting audio file/stream. Defaults to [constant AudioServer.SPEAKER_MODE_STEREO] if [method _get_audio_speaker_mode] is not overridden.
+ </description>
+ </method>
+ <method name="_handles_file" qualifiers="virtual const">
+ <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 [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),
+ # either in the Project Settings or with the `--write-movie &lt;path&gt;` command line argument.
+ return path.get_extension().to_lower() == "mkv"
+ [/codeblock]
+ </description>
+ </method>
+ <method name="_write_begin" qualifiers="virtual">
+ <return type="int" enum="Error" />
+ <param index="0" name="movie_size" type="Vector2i" />
+ <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. [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] command line argument.
+ </description>
+ </method>
+ <method name="_write_end" qualifiers="virtual">
+ <return type="void" />
+ <description>
+ Called when the engine finishes writing. This occurs when the engine quits by pressing the window manager's close button, or when [method SceneTree.quit] is called.
+ [b]Note:[/b] Pressing [kbd]Ctrl + C[/kbd] on the terminal running the editor/project does [i]not[/i] result in [method _write_end] being called.
+ </description>
+ </method>
+ <method name="_write_frame" qualifiers="virtual">
+ <return type="int" enum="Error" />
+ <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 [param frame_image] and [param audio_frame_block] function arguments should be written to.
+ </description>
+ </method>
+ <method name="add_writer" qualifiers="static">
+ <return type="void" />
+ <param index="0" name="writer" type="MovieWriter" />
+ <description>
+ Adds a writer to be usable by the engine. The supported file extensions can be set by overriding [method _handles_file].
+ [b]Note:[/b] [method add_writer] must be called early enough in the engine initialization to work, as movie writing is designed to start at the same time as the rest of the engine.
+ </description>
+ </method>
+ </methods>
+</class>
diff --git a/doc/classes/MultiMesh.xml b/doc/classes/MultiMesh.xml
index 631b2ea050..bae2335cfb 100644
--- a/doc/classes/MultiMesh.xml
+++ b/doc/classes/MultiMesh.xml
@@ -22,45 +22,45 @@
</method>
<method name="get_instance_color" qualifiers="const">
<return type="Color" />
- <argument index="0" name="instance" type="int" />
+ <param index="0" name="instance" type="int" />
<description>
Gets a specific instance's color.
</description>
</method>
<method name="get_instance_custom_data" qualifiers="const">
<return type="Color" />
- <argument index="0" name="instance" type="int" />
+ <param index="0" name="instance" type="int" />
<description>
Returns the custom data that has been set for a specific instance.
</description>
</method>
<method name="get_instance_transform" qualifiers="const">
<return type="Transform3D" />
- <argument index="0" name="instance" type="int" />
+ <param index="0" name="instance" type="int" />
<description>
Returns the [Transform3D] of a specific instance.
</description>
</method>
<method name="get_instance_transform_2d" qualifiers="const">
<return type="Transform2D" />
- <argument index="0" name="instance" type="int" />
+ <param index="0" name="instance" type="int" />
<description>
Returns the [Transform2D] of a specific instance.
</description>
</method>
<method name="set_instance_color">
<return type="void" />
- <argument index="0" name="instance" type="int" />
- <argument index="1" name="color" type="Color" />
+ <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.
+ 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]).
</description>
</method>
<method name="set_instance_custom_data">
<return type="void" />
- <argument index="0" name="instance" type="int" />
- <argument index="1" name="custom_data" type="Color" />
+ <param index="0" name="instance" type="int" />
+ <param index="1" name="custom_data" type="Color" />
<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].
@@ -68,16 +68,16 @@
</method>
<method name="set_instance_transform">
<return type="void" />
- <argument index="0" name="instance" type="int" />
- <argument index="1" name="transform" type="Transform3D" />
+ <param index="0" name="instance" type="int" />
+ <param index="1" name="transform" type="Transform3D" />
<description>
Sets the [Transform3D] for a specific instance.
</description>
</method>
<method name="set_instance_transform_2d">
<return type="void" />
- <argument index="0" name="instance" type="int" />
- <argument index="1" name="transform" type="Transform2D" />
+ <param index="0" name="instance" type="int" />
+ <param index="1" name="transform" type="Transform2D" />
<description>
Sets the [Transform2D] for a specific instance.
</description>
@@ -91,7 +91,8 @@
<member name="custom_data_array" type="PackedColorArray" setter="_set_custom_data_array" getter="_get_custom_data_array">
</member>
<member name="instance_count" type="int" setter="set_instance_count" getter="get_instance_count" default="0">
- Number of instances that will get drawn. This clears and (re)sizes the buffers. By default, all instances are drawn but you can limit this with [member visible_instance_count].
+ 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.
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 059d147979..3ce6ce41b4 100644
--- a/doc/classes/MultiplayerAPI.xml
+++ b/doc/classes/MultiplayerAPI.xml
@@ -1,88 +1,108 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="MultiplayerAPI" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
- High-level multiplayer API.
+ High-level multiplayer API interface.
</brief_description>
<description>
- This class implements the high-level multiplayer API. See also [MultiplayerPeer].
- By default, [SceneTree] has a reference to this class that is used to provide multiplayer capabilities (i.e. RPCs) across the whole scene.
+ Base class for high-level multiplayer API implementations. See also [MultiplayerPeer].
+ By default, [SceneTree] has a reference to an implementation of this class and uses it to provide multiplayer capabilities (i.e. RPCs) across the whole scene.
It is possible to override the MultiplayerAPI instance used by specific tree branches by calling the [method SceneTree.set_multiplayer] method, effectively allowing to run both client and server in the same scene.
- [b]Note:[/b] The high-level multiplayer API protocol is an implementation detail and isn't meant to be used by non-Godot servers. It may change without notice.
- [b]Note:[/b] When exporting to Android, make sure to enable the [code]INTERNET[/code] permission in the Android export preset before exporting the project or using one-click deploy. Otherwise, network communication of any kind will be blocked by Android.
+ It is also possible to extend or replace the default implementation via scripting or native extensions. See [MultiplayerAPIExtension] for details about extensions, [SceneMultiplayer] for the details about the default implementation.
</description>
<tutorials>
</tutorials>
<methods>
- <method name="clear">
- <return type="void" />
+ <method name="create_default_interface" qualifiers="static">
+ <return type="MultiplayerAPI" />
+ <description>
+ Returns a new instance of the default MultiplayerAPI.
+ </description>
+ </method>
+ <method name="get_default_interface" qualifiers="static">
+ <return type="StringName" />
<description>
- Clears the current MultiplayerAPI network state (you shouldn't call this unless you know what you are doing).
+ Returns the default MultiplayerAPI implementation class name. This is usually [code]"SceneMultiplayer"[/code] when [SceneMultiplayer] is available. See [method set_default_interface].
</description>
</method>
- <method name="get_peers" qualifiers="const">
+ <method name="get_peers">
<return type="PackedInt32Array" />
<description>
Returns the peer IDs of all connected peers of this MultiplayerAPI's [member multiplayer_peer].
</description>
</method>
- <method name="get_remote_sender_id" qualifiers="const">
+ <method name="get_remote_sender_id">
<return type="int" />
<description>
Returns the sender's peer ID for the RPC currently being executed.
[b]Note:[/b] If not inside an RPC this method will return 0.
</description>
</method>
- <method name="get_unique_id" qualifiers="const">
+ <method name="get_unique_id">
<return type="int" />
<description>
Returns the unique peer ID of this MultiplayerAPI's [member multiplayer_peer].
</description>
</method>
- <method name="has_multiplayer_peer" qualifiers="const">
+ <method name="has_multiplayer_peer">
<return type="bool" />
<description>
Returns [code]true[/code] if there is a [member multiplayer_peer] set.
</description>
</method>
- <method name="is_server" qualifiers="const">
+ <method name="is_server">
<return type="bool" />
<description>
Returns [code]true[/code] if this MultiplayerAPI's [member multiplayer_peer] is valid and in server mode (listening for connections).
</description>
</method>
+ <method name="object_configuration_add">
+ <return type="int" enum="Error" />
+ <param index="0" name="object" type="Object" />
+ <param index="1" name="configuration" type="Variant" />
+ <description>
+ 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>
+ <method name="object_configuration_remove">
+ <return type="int" enum="Error" />
+ <param index="0" name="object" type="Object" />
+ <param index="1" name="configuration" type="Variant" />
+ <description>
+ 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>
<method name="poll">
- <return type="void" />
+ <return type="int" enum="Error" />
<description>
Method used for polling the MultiplayerAPI. You only need to worry about this if you set [member SceneTree.multiplayer_poll] to [code]false[/code]. By default, [SceneTree] will poll its MultiplayerAPI(s) for you.
[b]Note:[/b] This method results in RPCs being called, so they will be executed in the same context of this function (e.g. [code]_process[/code], [code]physics[/code], [Thread]).
</description>
</method>
- <method name="send_bytes">
+ <method name="rpc">
<return type="int" enum="Error" />
- <argument index="0" name="bytes" type="PackedByteArray" />
- <argument index="1" name="id" type="int" default="0" />
- <argument index="2" name="mode" type="int" enum="TransferMode" default="2" />
- <argument index="3" name="channel" type="int" default="0" />
+ <param index="0" name="peer" type="int" />
+ <param index="1" name="object" type="Object" />
+ <param index="2" name="method" type="StringName" />
+ <param index="3" name="arguments" type="Array" default="[]" />
+ <description>
+ 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>
+ <method name="set_default_interface" qualifiers="static">
+ <return type="void" />
+ <param index="0" name="interface_name" type="StringName" />
<description>
- Sends the given raw [code]bytes[/code] to a specific peer identified by [code]id[/code] (see [method MultiplayerPeer.set_target_peer]). Default ID is [code]0[/code], i.e. broadcast to all peers.
+ Sets the default MultiplayerAPI implementation class. This method can be used by modules and extensions to configure which implementation will be used by [SceneTree] when the engine starts.
</description>
</method>
</methods>
<members>
- <member name="allow_object_decoding" type="bool" setter="set_allow_object_decoding" getter="is_object_decoding_allowed" default="false">
- If [code]true[/code], the MultiplayerAPI will allow encoding and decoding of object during RPCs.
- [b]Warning:[/b] Deserialized objects can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats such as remote code execution.
- </member>
<member name="multiplayer_peer" type="MultiplayerPeer" setter="set_multiplayer_peer" getter="get_multiplayer_peer">
The peer object to handle the RPC system (effectively enabling networking when set). Depending on the peer itself, the MultiplayerAPI will become a network server (check with [method is_server]) and will set root node's network mode to authority, or it will become a regular client peer. All child nodes are set to inherit the network mode by default. Handling of networking-related events (connection, disconnection, new clients) is done by connecting to MultiplayerAPI's signals.
</member>
- <member name="refuse_new_connections" type="bool" setter="set_refuse_new_connections" getter="is_refusing_new_connections" default="false">
- If [code]true[/code], the MultiplayerAPI's [member multiplayer_peer] refuses new incoming connections.
- </member>
- <member name="root_path" type="NodePath" setter="set_root_path" getter="get_root_path" default="NodePath(&quot;&quot;)">
- The root path to use for RPCs and replication. Instead of an absolute path, a relative path will be used to find the node upon which the RPC should be executed.
- This effectively allows to have different branches of the scene tree to be managed by different MultiplayerAPI, allowing for example to run both client and server in the same scene.
- </member>
</members>
<signals>
<signal name="connected_to_server">
@@ -96,28 +116,32 @@
</description>
</signal>
<signal name="peer_connected">
- <argument index="0" name="id" type="int" />
+ <param index="0" name="id" type="int" />
<description>
Emitted when this MultiplayerAPI's [member multiplayer_peer] connects with a new peer. ID is the peer ID of the new peer. Clients get notified when other clients connect to the same server. Upon connecting to a server, a client also receives this signal for the server (with ID being 1).
</description>
</signal>
<signal name="peer_disconnected">
- <argument index="0" name="id" type="int" />
+ <param index="0" name="id" type="int" />
<description>
Emitted when this MultiplayerAPI's [member multiplayer_peer] disconnects from a peer. Clients get notified when other clients disconnect from the same server.
</description>
</signal>
- <signal name="peer_packet">
- <argument index="0" name="id" type="int" />
- <argument index="1" name="packet" type="PackedByteArray" />
- <description>
- Emitted when this MultiplayerAPI's [member multiplayer_peer] receives a [code]packet[/code] with custom data (see [method send_bytes]). ID is the peer ID of the peer that sent the packet.
- </description>
- </signal>
<signal name="server_disconnected">
<description>
Emitted when this MultiplayerAPI's [member multiplayer_peer] disconnects from server. Only emitted on clients.
</description>
</signal>
</signals>
+ <constants>
+ <constant name="RPC_MODE_DISABLED" value="0" enum="RPCMode">
+ Used with [method Node.rpc_config] to disable a method or property for all RPC calls, making it unavailable. Default for all methods.
+ </constant>
+ <constant name="RPC_MODE_ANY_PEER" value="1" enum="RPCMode">
+ Used with [method Node.rpc_config] to set a method to be callable remotely by any peer. Analogous to the [code]@rpc(any)[/code] annotation. Calls are accepted from all remote peers, no matter if they are node's authority or not.
+ </constant>
+ <constant name="RPC_MODE_AUTHORITY" value="2" enum="RPCMode">
+ Used with [method Node.rpc_config] to set a method to be callable remotely only by the current multiplayer authority (which is the server by default). Analogous to the [code]@rpc(authority)[/code] annotation. See [method Node.set_multiplayer_authority].
+ </constant>
+ </constants>
</class>
diff --git a/doc/classes/MultiplayerAPIExtension.xml b/doc/classes/MultiplayerAPIExtension.xml
new file mode 100644
index 0000000000..e67970cc89
--- /dev/null
+++ b/doc/classes/MultiplayerAPIExtension.xml
@@ -0,0 +1,141 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="MultiplayerAPIExtension" inherits="MultiplayerAPI" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ Base class used for extending the [MultiplayerAPI].
+ </brief_description>
+ <description>
+ This class can be used to augment or replace the default [MultiplayerAPI] implementation via script or extensions.
+ The following example augment the default implemenation ([SceneMultiplayer]) by logging every RPC being made, and every object being configured for replication.
+ [codeblocks]
+ [gdscript]
+ extends MultiplayerAPIExtension
+ class_name LogMultiplayer
+
+ # We want to augment the default SceneMultiplayer.
+ var base_multiplayer = SceneMultiplayer.new()
+
+ func _init():
+ # Just passthourgh base signals (copied to var to avoid cyclic reference)
+ var cts = connected_to_server
+ var cf = connection_failed
+ var pc = peer_connected
+ var pd = peer_disconnected
+ base_multiplayer.connected_to_server.connect(func(): cts.emit())
+ base_multiplayer.connection_failed.connect(func(): cf.emit())
+ base_multiplayer.peer_connected.connect(func(id): pc.emit(id))
+ base_multiplayer.peer_disconnected.connect(func(id): pd.emit(id))
+
+ # Log RPC being made and forward it to the default multiplayer.
+ func _rpc(peer: int, object: Object, method: StringName, args: Array) -&gt; int: # Error
+ print("Got RPC for %d: %s::%s(%s)" % [peer, object, method, args])
+ return base_multiplayer.rpc(peer, object, method, args)
+
+ # Log configuration add. E.g. root path (nullptr, NodePath), replication (Node, Spawner|Synchronizer), custom.
+ func _object_configuration_add(object, config: Variant) -&gt; int: # Error
+ if config is MultiplayerSynchronizer:
+ print("Adding synchronization configuration for %s. Synchronizer: %s" % [object, config])
+ elif config is MultiplayerSpawner:
+ print("Adding node %s to the spawn list. Spawner: %s" % [object, config])
+ return base_multiplayer.object_configuration_add(object, config)
+
+ # Log configuration remove. E.g. root path (nullptr, NodePath), replication (Node, Spawner|Synchronizer), custom.
+ func _object_configuration_remove(object, config: Variant) -&gt; int: # Error
+ if config is MultiplayerSynchronizer:
+ print("Removing synchronization configuration for %s. Synchronizer: %s" % [object, config])
+ elif config is MultiplayerSpawner:
+ print("Removing node %s from the spawn list. Spawner: %s" % [object, config])
+ return base_multiplayer.object_configuration_remove(object, config)
+
+ # These can be optional, but in our case we want to augment SceneMultiplayer, so forward everything.
+ func _set_multiplayer_peer(p_peer: MultiplayerPeer):
+ base_multiplayer.multiplayer_peer = p_peer
+
+ func _get_multiplayer_peer() -&gt; MultiplayerPeer:
+ return base_multiplayer.multiplayer_peer
+
+ func _get_unique_id() -&gt; int:
+ return base_multiplayer.get_unique_id()
+
+ func _get_peer_ids() -&gt; PackedInt32Array:
+ return base_multiplayer.get_peers()
+ [/gdscript]
+ [/codeblocks]
+ Then in your main scene or in an autoload call [method SceneTree.set_multiplayer] to start using your custom [MultiplayerAPI]:
+ [codeblocks]
+ [gdscript]
+ # autoload.gd
+ func _enter_tree():
+ # Sets our custom multiplayer as the main one in SceneTree.
+ get_tree().set_multiplayer(LogMultiplayer.new())
+ [/gdscript]
+ [/codeblocks]
+ Native extensions can alternatively use the [method MultiplayerAPI.set_default_interface] method during initialization to configure themselves as the default implementation.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="_get_multiplayer_peer" qualifiers="virtual">
+ <return type="MultiplayerPeer" />
+ <description>
+ Called when the [member MultiplayerAPI.multiplayer_peer] is retrieved.
+ </description>
+ </method>
+ <method name="_get_peer_ids" qualifiers="virtual const">
+ <return type="PackedInt32Array" />
+ <description>
+ Callback for [method MultiplayerAPI.get_peers].
+ </description>
+ </method>
+ <method name="_get_remote_sender_id" qualifiers="virtual const">
+ <return type="int" />
+ <description>
+ Callback for [method MultiplayerAPI.get_remote_sender_id].
+ </description>
+ </method>
+ <method name="_get_unique_id" qualifiers="virtual const">
+ <return type="int" />
+ <description>
+ Callback for [method MultiplayerAPI.get_unique_id].
+ </description>
+ </method>
+ <method name="_object_configuration_add" qualifiers="virtual">
+ <return type="int" />
+ <param index="0" name="object" type="Object" />
+ <param index="1" name="configuration" type="Variant" />
+ <description>
+ Callback for [method MultiplayerAPI.object_configuration_add].
+ </description>
+ </method>
+ <method name="_object_configuration_remove" qualifiers="virtual">
+ <return type="int" />
+ <param index="0" name="object" type="Object" />
+ <param index="1" name="configuration" type="Variant" />
+ <description>
+ Callback for [method MultiplayerAPI.object_configuration_remove].
+ </description>
+ </method>
+ <method name="_poll" qualifiers="virtual">
+ <return type="int" />
+ <description>
+ Callback for [method MultiplayerAPI.poll].
+ </description>
+ </method>
+ <method name="_rpc" qualifiers="virtual">
+ <return type="int" />
+ <param index="0" name="peer" type="int" />
+ <param index="1" name="object" type="Object" />
+ <param index="2" name="method" type="StringName" />
+ <param index="3" name="args" type="Array" />
+ <description>
+ Callback for [method MultiplayerAPI.rpc].
+ </description>
+ </method>
+ <method name="_set_multiplayer_peer" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="multiplayer_peer" type="MultiplayerPeer" />
+ <description>
+ Called when the [member MultiplayerAPI.multiplayer_peer] is set.
+ </description>
+ </method>
+ </methods>
+</class>
diff --git a/doc/classes/MultiplayerPeer.xml b/doc/classes/MultiplayerPeer.xml
index 4a3559b0f7..0f57ff9e55 100644
--- a/doc/classes/MultiplayerPeer.xml
+++ b/doc/classes/MultiplayerPeer.xml
@@ -45,10 +45,10 @@
</method>
<method name="set_target_peer">
<return type="void" />
- <argument index="0" name="id" type="int" />
+ <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>
@@ -60,7 +60,7 @@
The channel to use to send packets. Many network APIs such as ENet and WebRTC allow the creation of multiple independent channels which behaves, in a way, like separate connections. This means that reliable data will only block delivery of other packets on that channel, and ordering will only be in respect to the channel the packet is being sent on. Using different channels to send [b]different and independent[/b] state updates is a common way to optimize network usage and decrease latency in fast-paced games.
[b]Note:[/b] The default channel ([code]0[/code]) actually works as 3 separate channels (one for each [enum TransferMode]) so that [constant TRANSFER_MODE_RELIABLE] and [constant TRANSFER_MODE_UNRELIABLE_ORDERED] does not interact with each other by default. Refer to the specific network API documentation (e.g. ENet or WebRTC) to learn how to set up channels correctly.
</member>
- <member name="transfer_mode" type="int" setter="set_transfer_mode" getter="get_transfer_mode" enum="TransferMode" default="2">
+ <member name="transfer_mode" type="int" setter="set_transfer_mode" getter="get_transfer_mode" enum="MultiplayerPeer.TransferMode" default="2">
The manner in which to send packets to the [code]target_peer[/code]. See [enum TransferMode].
</member>
</members>
@@ -76,13 +76,13 @@
</description>
</signal>
<signal name="peer_connected">
- <argument index="0" name="id" type="int" />
+ <param index="0" name="id" type="int" />
<description>
Emitted by the server when a client connects.
</description>
</signal>
<signal name="peer_disconnected">
- <argument index="0" name="id" type="int" />
+ <param index="0" name="id" type="int" />
<description>
Emitted by the server when a client disconnects.
</description>
@@ -109,5 +109,14 @@
<constant name="TARGET_PEER_SERVER" value="1">
Packets are sent to the server alone.
</constant>
+ <constant name="TRANSFER_MODE_UNRELIABLE" value="0" enum="TransferMode">
+ Packets are not acknowledged, no resend attempts are made for lost packets. Packets may arrive in any order. Potentially faster than [constant TRANSFER_MODE_UNRELIABLE_ORDERED]. Use for non-critical data, and always consider whether the order matters.
+ </constant>
+ <constant name="TRANSFER_MODE_UNRELIABLE_ORDERED" value="1" enum="TransferMode">
+ Packets are not acknowledged, no resend attempts are made for lost packets. Packets are received in the order they were sent in. Potentially faster than [constant TRANSFER_MODE_RELIABLE]. Use for non-critical data or data that would be outdated if received late due to resend attempt(s) anyway, for example movement and positional data.
+ </constant>
+ <constant name="TRANSFER_MODE_RELIABLE" value="2" enum="TransferMode">
+ Packets must be received and resend attempts should be made until the packets are acknowledged. Packets must be received in the order they were sent in. Most reliable transfer mode, but potentially the slowest due to the overhead. Use for critical data that must be transmitted and arrive in order, for example an ability being triggered or a chat message. Consider carefully if the information really is critical, and use sparingly.
+ </constant>
</constants>
</class>
diff --git a/doc/classes/MultiplayerPeerExtension.xml b/doc/classes/MultiplayerPeerExtension.xml
index bd11c76039..3a193abd7d 100644
--- a/doc/classes/MultiplayerPeerExtension.xml
+++ b/doc/classes/MultiplayerPeerExtension.xml
@@ -29,10 +29,10 @@
</method>
<method name="_get_packet" qualifiers="virtual">
<return type="int" />
- <argument index="0" name="r_buffer" type="const uint8_t **" />
- <argument index="1" name="r_buffer_size" type="int32_t*" />
+ <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">
@@ -41,6 +41,12 @@
Called when the ID of the [MultiplayerPeer] who sent the most recent packet is requested (see [method MultiplayerPeer.get_packet_peer]).
</description>
</method>
+ <method name="_get_packet_script" qualifiers="virtual">
+ <return type="PackedByteArray" />
+ <description>
+ Called when a packet needs to be received by the [MultiplayerAPI], if [method _get_packet] isn't implemented. Use this when extending this class via GDScript.
+ </description>
+ </method>
<method name="_get_transfer_channel" qualifiers="virtual const">
<return type="int" />
<description>
@@ -79,36 +85,43 @@
</method>
<method name="_put_packet" qualifiers="virtual">
<return type="int" />
- <argument index="0" name="p_buffer" type="const uint8_t*" />
- <argument index="1" name="p_buffer_size" type="int" />
+ <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 [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" />
+ <param index="0" name="p_buffer" type="PackedByteArray" />
<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], if [method _put_packet] isn't implemented. Use this when extending this class via GDScript.
</description>
</method>
<method name="_set_refuse_new_connections" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="p_enable" type="bool" />
+ <param index="0" name="p_enable" type="bool" />
<description>
Called when the "refuse new connections" status is set on this [MultiplayerPeer] (see [member MultiplayerPeer.refuse_new_connections]).
</description>
</method>
<method name="_set_target_peer" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="p_peer" type="int" />
+ <param index="0" name="p_peer" type="int" />
<description>
Called when the target peer to use is set for this [MultiplayerPeer] (see [method MultiplayerPeer.set_target_peer]).
</description>
</method>
<method name="_set_transfer_channel" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="p_channel" type="int" />
+ <param index="0" name="p_channel" type="int" />
<description>
Called when the channel to use is set for this [MultiplayerPeer] (see [member MultiplayerPeer.transfer_channel]).
</description>
</method>
<method name="_set_transfer_mode" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="p_mode" type="int" />
+ <param index="0" name="p_mode" type="int" />
<description>
Called when the transfer mode is set on this [MultiplayerPeer] (see [member MultiplayerPeer.transfer_mode]).
</description>
diff --git a/doc/classes/MultiplayerSpawner.xml b/doc/classes/MultiplayerSpawner.xml
deleted file mode 100644
index 465db85455..0000000000
--- a/doc/classes/MultiplayerSpawner.xml
+++ /dev/null
@@ -1,47 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="MultiplayerSpawner" inherits="Node" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <tutorials>
- </tutorials>
- <methods>
- <method name="_spawn_custom" qualifiers="virtual">
- <return type="Object" />
- <argument index="0" name="data" type="Variant" />
- <description>
- </description>
- </method>
- <method name="spawn">
- <return type="Node" />
- <argument index="0" name="data" type="Variant" default="null" />
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="auto_spawn" type="bool" setter="set_auto_spawning" getter="is_auto_spawning" default="false">
- </member>
- <member name="replication" type="PackedScene[]" setter="set_spawnable_scenes" getter="get_spawnable_scenes" default="[]">
- </member>
- <member name="spawn_limit" type="int" setter="set_spawn_limit" getter="get_spawn_limit" default="0">
- </member>
- <member name="spawn_path" type="NodePath" setter="set_spawn_path" getter="get_spawn_path" default="NodePath(&quot;&quot;)">
- </member>
- </members>
- <signals>
- <signal name="despawned">
- <argument index="0" name="scene_id" type="int" />
- <argument index="1" name="node" type="Node" />
- <description>
- </description>
- </signal>
- <signal name="spawned">
- <argument index="0" name="scene_id" type="int" />
- <argument index="1" name="node" type="Node" />
- <description>
- </description>
- </signal>
- </signals>
-</class>
diff --git a/doc/classes/MultiplayerSynchronizer.xml b/doc/classes/MultiplayerSynchronizer.xml
deleted file mode 100644
index e1f0948346..0000000000
--- a/doc/classes/MultiplayerSynchronizer.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="MultiplayerSynchronizer" inherits="Node" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <tutorials>
- </tutorials>
- <members>
- <member name="replication_interval" type="float" setter="set_replication_interval" getter="get_replication_interval" default="0.0">
- </member>
- <member name="resource" type="SceneReplicationConfig" setter="set_replication_config" getter="get_replication_config">
- </member>
- <member name="root_path" type="NodePath" setter="set_root_path" getter="get_root_path" default="NodePath(&quot;&quot;)">
- </member>
- </members>
-</class>
diff --git a/doc/classes/NativeExtension.xml b/doc/classes/NativeExtension.xml
index ccdbb617ab..50f976ca6f 100644
--- a/doc/classes/NativeExtension.xml
+++ b/doc/classes/NativeExtension.xml
@@ -19,7 +19,7 @@
</method>
<method name="initialize_library">
<return type="void" />
- <argument index="0" name="level" type="int" enum="NativeExtension.InitializationLevel" />
+ <param index="0" name="level" type="int" enum="NativeExtension.InitializationLevel" />
<description>
</description>
</method>
@@ -30,8 +30,8 @@
</method>
<method name="open_library">
<return type="int" enum="Error" />
- <argument index="0" name="path" type="String" />
- <argument index="1" name="entry_symbol" type="String" />
+ <param index="0" name="path" type="String" />
+ <param index="1" name="entry_symbol" type="String" />
<description>
</description>
</method>
@@ -43,9 +43,7 @@
</constant>
<constant name="INITIALIZATION_LEVEL_SCENE" value="2" enum="InitializationLevel">
</constant>
- <constant name="INITIALIZATION_LEVEL_DRIVER" value="3" enum="InitializationLevel">
- </constant>
- <constant name="INITIALIZATION_LEVEL_EDITOR" value="4" enum="InitializationLevel">
+ <constant name="INITIALIZATION_LEVEL_EDITOR" value="3" enum="InitializationLevel">
</constant>
</constants>
</class>
diff --git a/doc/classes/NativeExtensionManager.xml b/doc/classes/NativeExtensionManager.xml
index 10c9e32cf2..7d6eefa94f 100644
--- a/doc/classes/NativeExtensionManager.xml
+++ b/doc/classes/NativeExtensionManager.xml
@@ -9,7 +9,7 @@
<methods>
<method name="get_extension">
<return type="NativeExtension" />
- <argument index="0" name="path" type="String" />
+ <param index="0" name="path" type="String" />
<description>
</description>
</method>
@@ -20,25 +20,25 @@
</method>
<method name="is_extension_loaded" qualifiers="const">
<return type="bool" />
- <argument index="0" name="path" type="String" />
+ <param index="0" name="path" type="String" />
<description>
</description>
</method>
<method name="load_extension">
<return type="int" enum="NativeExtensionManager.LoadStatus" />
- <argument index="0" name="path" type="String" />
+ <param index="0" name="path" type="String" />
<description>
</description>
</method>
<method name="reload_extension">
<return type="int" enum="NativeExtensionManager.LoadStatus" />
- <argument index="0" name="path" type="String" />
+ <param index="0" name="path" type="String" />
<description>
</description>
</method>
<method name="unload_extension">
<return type="int" enum="NativeExtensionManager.LoadStatus" />
- <argument index="0" name="path" type="String" />
+ <param index="0" name="path" type="String" />
<description>
</description>
</method>
diff --git a/doc/classes/NavigationAgent2D.xml b/doc/classes/NavigationAgent2D.xml
index baab91569a..bf3aff2c58 100644
--- a/doc/classes/NavigationAgent2D.xml
+++ b/doc/classes/NavigationAgent2D.xml
@@ -5,6 +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.
</description>
<tutorials>
</tutorials>
@@ -24,7 +25,7 @@
<method name="get_nav_path" qualifiers="const">
<return type="PackedVector2Array" />
<description>
- Returns the path from start to finish in global coordinates.
+ Returns this agent's current path from start to finish in global coordinates. The path only updates when the target location is changed or the agent requires a repath. The path array is not intended to be used in direct path movement as the agent has its own internal path logic that would get corrupted by changing the path array manually. Use the intended [method get_next_location] once every physics frame to receive the next path point for the agents movement as this function also updates the internal path logic.
</description>
</method>
<method name="get_nav_path_index" qualifiers="const">
@@ -33,15 +34,29 @@
Returns which index the agent is currently on in the navigation path's [PackedVector2Array].
</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 [param layer_number] between 1 and 32.
+ </description>
+ </method>
+ <method name="get_navigation_map" qualifiers="const">
+ <return type="RID" />
+ <description>
+ Returns the [RID] of the navigation map for this NavigationAgent node. This function returns always the map set on the NavigationAgent node and not the map of the abstract agent on the NavigationServer. If the agent map is changed directly with the NavigationServer API the NavigationAgent node will not be aware of the map change. Use [method set_navigation_map] to change the navigation map for the NavigationAgent and also update the agent on the NavigationServer.
+ </description>
+ </method>
<method name="get_next_location">
<return type="Vector2" />
<description>
- Returns a [Vector2] in global coordinates, that can be moved to, making sure that there are no static objects in the way. If the agent does not have a navigation path, it will return the position of the agent's parent.
+ Returns the next location in global coordinates that can be moved to, making sure that there are no static objects in the way. If the agent does not have a navigation path, it will return the position of the agent's parent. The use of this function once every physics frame is required to update the internal path logic of the NavigationAgent.
</description>
</method>
<method name="get_rid" qualifiers="const">
<return type="RID" />
<description>
+ Returns the [RID] of this agent on the [NavigationServer2D].
</description>
</method>
<method name="get_target_location" qualifiers="const">
@@ -68,42 +83,64 @@
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].
</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 [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">
+ <return type="void" />
+ <param index="0" name="navigation_map" type="RID" />
+ <description>
+ 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" />
- <argument index="0" name="location" type="Vector2" />
+ <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" />
- <argument index="0" name="velocity" type="Vector2" />
+ <param index="0" name="velocity" type="Vector2" />
<description>
Sends the passed in velocity to the collision avoidance algorithm. It will adjust the velocity to avoid collisions. Once the adjustment to the velocity is complete, it will emit the [signal velocity_computed] signal.
</description>
</method>
</methods>
<members>
+ <member name="avoidance_enabled" type="bool" setter="set_avoidance_enabled" getter="get_avoidance_enabled" default="false">
+ If [code]true[/code] the agent is registered for an RVO avoidance callback on the [NavigationServer2D]. When [method NavigationAgent2D.set_velocity] is used and the processing is completed a [code]safe_velocity[/code] Vector2 is received with a signal connection to [signal velocity_computed]. Avoidance processing with many registered agents has a significant performance cost and should only be enabled on agents that currently require it.
+ </member>
<member name="max_neighbors" type="int" setter="set_max_neighbors" getter="get_max_neighbors" default="10">
The maximum number of neighbors for the agent to consider.
</member>
<member name="max_speed" type="float" setter="set_max_speed" getter="get_max_speed" default="200.0">
The maximum speed that an agent can move.
</member>
- <member name="navigable_layers" type="int" setter="set_navigable_layers" getter="get_navigable_layers" default="1">
- A bitfield determining what 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 layers.
+ <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">
+ The distance threshold before a path point is considered to be reached. This will allow an agent to not have to hit a path point on the path exactly, but in the area. If this value is set to high the NavigationAgent will skip points on the path which can lead to leaving the navigation mesh. 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 next point on each physics frame update.
+ </member>
<member name="path_max_distance" type="float" setter="set_path_max_distance" getter="get_path_max_distance" default="3.0">
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 agent.
+ 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 a target is considered to be reached. This will allow an agent to not have to hit a point on the path exactly, but in the area.
+ 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="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.
@@ -126,7 +163,7 @@
</description>
</signal>
<signal name="velocity_computed">
- <argument index="0" name="safe_velocity" type="Vector3" />
+ <param index="0" name="safe_velocity" type="Vector3" />
<description>
Notifies when the collision avoidance velocity is calculated. Emitted by [method set_velocity].
</description>
diff --git a/doc/classes/NavigationAgent3D.xml b/doc/classes/NavigationAgent3D.xml
index 04b148c70d..7c48f0b52b 100644
--- a/doc/classes/NavigationAgent3D.xml
+++ b/doc/classes/NavigationAgent3D.xml
@@ -5,6 +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.
</description>
<tutorials>
</tutorials>
@@ -24,7 +25,7 @@
<method name="get_nav_path" qualifiers="const">
<return type="PackedVector3Array" />
<description>
- Returns the path from start to finish in global coordinates.
+ Returns this agent's current path from start to finish in global coordinates. The path only updates when the target location is changed or the agent requires a repath. The path array is not intended to be used in direct path movement as the agent has its own internal path logic that would get corrupted by changing the path array manually. Use the intended [method get_next_location] once every physics frame to receive the next path point for the agents movement as this function also updates the internal path logic.
</description>
</method>
<method name="get_nav_path_index" qualifiers="const">
@@ -33,15 +34,29 @@
Returns which index the agent is currently on in the navigation path's [PackedVector3Array].
</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 [param layer_number] between 1 and 32.
+ </description>
+ </method>
+ <method name="get_navigation_map" qualifiers="const">
+ <return type="RID" />
+ <description>
+ Returns the [RID] of the navigation map for this NavigationAgent node. This function returns always the map set on the NavigationAgent node and not the map of the abstract agent on the NavigationServer. If the agent map is changed directly with the NavigationServer API the NavigationAgent node will not be aware of the map change. Use [method set_navigation_map] to change the navigation map for the NavigationAgent and also update the agent on the NavigationServer.
+ </description>
+ </method>
<method name="get_next_location">
<return type="Vector3" />
<description>
- Returns a [Vector3] in global coordinates, that can be moved to, making sure that there are no static objects in the way. If the agent does not have a navigation path, it will return the origin of the agent's parent.
+ Returns the next location in global coordinates that can be moved to, making sure that there are no static objects in the way. If the agent does not have a navigation path, it will return the position of the agent's parent. The use of this function once every physics frame is required to update the internal path logic of the NavigationAgent.
</description>
</method>
<method name="get_rid" qualifiers="const">
<return type="RID" />
<description>
+ Returns the [RID] of this agent on the [NavigationServer3D].
</description>
</method>
<method name="get_target_location" qualifiers="const">
@@ -68,16 +83,31 @@
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].
</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 [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">
+ <return type="void" />
+ <param index="0" name="navigation_map" type="RID" />
+ <description>
+ 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" />
- <argument index="0" name="location" type="Vector3" />
+ <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" />
- <argument index="0" name="velocity" type="Vector3" />
+ <param index="0" name="velocity" type="Vector3" />
<description>
Sends the passed in velocity to the collision avoidance algorithm. It will adjust the velocity to avoid collisions. Once the adjustment to the velocity is complete, it will emit the [signal velocity_computed] signal.
</description>
@@ -85,7 +115,10 @@
</methods>
<members>
<member name="agent_height_offset" type="float" setter="set_agent_height_offset" getter="get_agent_height_offset" default="0.0">
- The agent height offset to match the navigation mesh height.
+ The NavigationAgent height offset is subtracted from the y-axis value of any vector path position for this NavigationAgent. The NavigationAgent height offset does not change or influence the navigation mesh or pathfinding query result. Additional navigation maps that use regions with navigation meshes that the developer baked with appropriate agent radius or height values are required to support different-sized agents.
+ </member>
+ <member name="avoidance_enabled" type="bool" setter="set_avoidance_enabled" getter="get_avoidance_enabled" default="false">
+ If [code]true[/code] the agent is registered for an RVO avoidance callback on the [NavigationServer3D]. When [method NavigationAgent3D.set_velocity] is used and the processing is completed a [code]safe_velocity[/code] Vector3 is received with a signal connection to [signal velocity_computed]. Avoidance processing with many registered agents has a significant performance cost and should only be enabled on agents that currently require it.
</member>
<member name="ignore_y" type="bool" setter="set_ignore_y" getter="get_ignore_y" default="true">
Ignores collisions on the Y axis. Must be true to move on a horizontal plane.
@@ -96,20 +129,24 @@
<member name="max_speed" type="float" setter="set_max_speed" getter="get_max_speed" default="10.0">
The maximum speed that an agent can move.
</member>
- <member name="navigable_layers" type="int" setter="set_navigable_layers" getter="get_navigable_layers" default="1">
- A bitfield determining what 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 layers.
+ <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">
+ The distance threshold before a path point is considered to be reached. This will allow an agent to not have to hit a path point on the path exactly, but in the area. If this value is set to high the NavigationAgent will skip points on the path which can lead to leaving the navigation mesh. 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 next point on each physics frame update.
+ </member>
<member name="path_max_distance" type="float" setter="set_path_max_distance" getter="get_path_max_distance" default="3.0">
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 agent.
+ 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 a target is considered to be reached. This will allow an agent to not have to hit a point on the path exactly, but in the area.
+ 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="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.
@@ -132,7 +169,7 @@
</description>
</signal>
<signal name="velocity_computed">
- <argument index="0" name="safe_velocity" type="Vector3" />
+ <param index="0" name="safe_velocity" type="Vector3" />
<description>
Notifies when the collision avoidance velocity is calculated. Emitted by [method set_velocity].
</description>
diff --git a/doc/classes/NavigationMesh.xml b/doc/classes/NavigationMesh.xml
index bcf2cfc507..c86bc47e04 100644
--- a/doc/classes/NavigationMesh.xml
+++ b/doc/classes/NavigationMesh.xml
@@ -12,7 +12,7 @@
<methods>
<method name="add_polygon">
<return type="void" />
- <argument index="0" name="polygon" type="PackedInt32Array" />
+ <param index="0" name="polygon" type="PackedInt32Array" />
<description>
Adds a polygon using the indices of the vertices you get when calling [method get_vertices].
</description>
@@ -25,21 +25,22 @@
</method>
<method name="create_from_mesh">
<return type="void" />
- <argument index="0" name="mesh" type="Mesh" />
+ <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 [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" />
- <argument index="0" name="layer_number" type="int" />
+ <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">
<return type="PackedInt32Array" />
- <argument index="0" name="idx" type="int" />
+ <param index="0" name="idx" type="int" />
<description>
Returns a [PackedInt32Array] containing the indices of the vertices of a created polygon.
</description>
@@ -58,90 +59,96 @@
</method>
<method name="set_collision_mask_value">
<return type="void" />
- <argument index="0" name="layer_number" type="int" />
- <argument index="1" name="value" type="bool" />
+ <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">
<return type="void" />
- <argument index="0" name="vertices" type="PackedVector3Array" />
+ <param index="0" name="vertices" type="PackedVector3Array" />
<description>
Sets the vertices that can be then indexed to create polygons with the [method add_polygon] method.
</description>
</method>
</methods>
<members>
- <member name="agent/height" type="float" setter="set_agent_height" getter="get_agent_height" default="2.0">
+ <member name="agent_height" type="float" setter="set_agent_height" getter="get_agent_height" default="1.5">
The minimum floor to ceiling height that will still allow the floor area to be considered walkable.
- [b]Note:[/b] While baking, this value will be rounded up to the nearest multiple of [member cell/height].
+ [b]Note:[/b] While baking, this value will be rounded up to the nearest multiple of [member cell_height].
</member>
- <member name="agent/max_climb" type="float" setter="set_agent_max_climb" getter="get_agent_max_climb" default="0.9">
+ <member name="agent_max_climb" type="float" setter="set_agent_max_climb" getter="get_agent_max_climb" default="0.25">
The minimum ledge height that is considered to still be traversable.
- [b]Note:[/b] While baking, this value will be rounded down to the nearest multiple of [member cell/height].
+ [b]Note:[/b] While baking, this value will be rounded down to the nearest multiple of [member cell_height].
</member>
- <member name="agent/max_slope" type="float" setter="set_agent_max_slope" getter="get_agent_max_slope" default="45.0">
+ <member name="agent_max_slope" type="float" setter="set_agent_max_slope" getter="get_agent_max_slope" default="45.0">
The maximum slope that is considered walkable, in degrees.
</member>
- <member name="agent/radius" type="float" setter="set_agent_radius" getter="get_agent_radius" default="1.0">
+ <member name="agent_radius" type="float" setter="set_agent_radius" getter="get_agent_radius" default="0.5">
The distance to erode/shrink the walkable area of the heightfield away from obstructions.
- [b]Note:[/b] While baking, this value will be rounded up to the nearest multiple of [member cell/size].
+ [b]Note:[/b] While baking, this value will be rounded up to the nearest multiple of [member cell_size].
</member>
- <member name="cell/height" type="float" setter="set_cell_height" getter="get_cell_height" default="0.2">
+ <member name="cell_height" type="float" setter="set_cell_height" getter="get_cell_height" default="0.25">
The Y axis cell size to use for fields.
</member>
- <member name="cell/size" type="float" setter="set_cell_size" getter="get_cell_size" default="0.3">
+ <member name="cell_size" type="float" setter="set_cell_size" getter="get_cell_size" default="0.25">
The XZ plane cell size to use for fields.
</member>
- <member name="detail/sample_distance" type="float" setter="set_detail_sample_distance" getter="get_detail_sample_distance" default="6.0">
+ <member name="detail_sample_distance" type="float" setter="set_detail_sample_distance" getter="get_detail_sample_distance" default="6.0">
The sampling distance to use when generating the detail mesh, in cell unit.
</member>
- <member name="detail/sample_max_error" type="float" setter="set_detail_sample_max_error" getter="get_detail_sample_max_error" default="1.0">
+ <member name="detail_sample_max_error" type="float" setter="set_detail_sample_max_error" getter="get_detail_sample_max_error" default="1.0">
The maximum distance the detail mesh surface should deviate from heightfield, in cell unit.
</member>
- <member name="edge/max_error" type="float" setter="set_edge_max_error" getter="get_edge_max_error" default="1.3">
+ <member name="edge_max_error" type="float" setter="set_edge_max_error" getter="get_edge_max_error" default="1.3">
The maximum distance a simplfied contour's border edges should deviate the original raw contour.
</member>
- <member name="edge/max_length" type="float" setter="set_edge_max_length" getter="get_edge_max_length" default="12.0">
+ <member name="edge_max_length" type="float" setter="set_edge_max_length" getter="get_edge_max_length" default="12.0">
The maximum allowed length for contour edges along the border of the mesh.
- [b]Note:[/b] While baking, this value will be rounded up to the nearest multiple of [member cell/size].
+ [b]Note:[/b] While baking, this value will be rounded up to the nearest multiple of [member cell_size].
</member>
- <member name="filter/filter_walkable_low_height_spans" type="bool" setter="set_filter_walkable_low_height_spans" getter="get_filter_walkable_low_height_spans" default="false">
- If [code]true[/code], marks walkable spans as not walkable if the clearance above the span is less than [member agent/height].
+ <member name="filter_baking_aabb" type="AABB" setter="set_filter_baking_aabb" getter="get_filter_baking_aabb" default="AABB(0, 0, 0, 0, 0, 0)">
+ If the baking [AABB] has a volume the navigation mesh baking will be restricted to its enclosing area.
</member>
- <member name="filter/ledge_spans" type="bool" setter="set_filter_ledge_spans" getter="get_filter_ledge_spans" default="false">
+ <member name="filter_baking_aabb_offset" type="Vector3" setter="set_filter_baking_aabb_offset" getter="get_filter_baking_aabb_offset" default="Vector3(0, 0, 0)">
+ The position offset applied to the [member filter_baking_aabb] [AABB].
+ </member>
+ <member name="filter_ledge_spans" type="bool" setter="set_filter_ledge_spans" getter="get_filter_ledge_spans" default="false">
If [code]true[/code], marks spans that are ledges as non-walkable.
</member>
- <member name="filter/low_hanging_obstacles" type="bool" setter="set_filter_low_hanging_obstacles" getter="get_filter_low_hanging_obstacles" default="false">
- If [code]true[/code], marks non-walkable spans as walkable if their maximum is within [member agent/max_climb] of a walkable neighbor.
+ <member name="filter_low_hanging_obstacles" type="bool" setter="set_filter_low_hanging_obstacles" getter="get_filter_low_hanging_obstacles" default="false">
+ If [code]true[/code], marks non-walkable spans as walkable if their maximum is within [member agent_max_climb] of a walkable neighbor.
+ </member>
+ <member name="filter_walkable_low_height_spans" type="bool" setter="set_filter_walkable_low_height_spans" getter="get_filter_walkable_low_height_spans" default="false">
+ If [code]true[/code], marks walkable spans as not walkable if the clearance above the span is less than [member agent_height].
</member>
- <member name="geometry/collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask">
+ <member name="geometry_collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="4294967295">
The physics layers to scan for static colliders.
- Only used when [member geometry/parsed_geometry_type] is [constant PARSED_GEOMETRY_STATIC_COLLIDERS] or [constant PARSED_GEOMETRY_BOTH].
+ Only used when [member geometry_parsed_geometry_type] is [constant PARSED_GEOMETRY_STATIC_COLLIDERS] or [constant PARSED_GEOMETRY_BOTH].
</member>
- <member name="geometry/parsed_geometry_type" type="int" setter="set_parsed_geometry_type" getter="get_parsed_geometry_type" enum="NavigationMesh.ParsedGeometryType" default="0">
+ <member name="geometry_parsed_geometry_type" type="int" setter="set_parsed_geometry_type" getter="get_parsed_geometry_type" enum="NavigationMesh.ParsedGeometryType" default="0">
Determines which type of nodes will be parsed as geometry. See [enum ParsedGeometryType] for possible values.
</member>
- <member name="geometry/source_geometry_mode" type="int" setter="set_source_geometry_mode" getter="get_source_geometry_mode" enum="NavigationMesh.SourceGeometryMode" default="0">
+ <member name="geometry_source_geometry_mode" type="int" setter="set_source_geometry_mode" getter="get_source_geometry_mode" enum="NavigationMesh.SourceGeometryMode" default="0">
The source of the geometry used when baking. See [enum SourceGeometryMode] for possible values.
</member>
- <member name="geometry/source_group_name" type="StringName" setter="set_source_group_name" getter="get_source_group_name">
+ <member name="geometry_source_group_name" type="StringName" setter="set_source_group_name" getter="get_source_group_name" default="&amp;&quot;navmesh&quot;">
The name of the group to scan for geometry.
- Only used when [member geometry/source_geometry_mode] is [constant SOURCE_GEOMETRY_GROUPS_WITH_CHILDREN] or [constant SOURCE_GEOMETRY_GROUPS_EXPLICIT].
+ Only used when [member geometry_source_geometry_mode] is [constant SOURCE_GEOMETRY_GROUPS_WITH_CHILDREN] or [constant SOURCE_GEOMETRY_GROUPS_EXPLICIT].
</member>
- <member name="polygon/verts_per_poly" type="float" setter="set_verts_per_poly" getter="get_verts_per_poly" default="6.0">
+ <member name="polygon_verts_per_poly" type="float" setter="set_verts_per_poly" getter="get_verts_per_poly" default="6.0">
The maximum number of vertices allowed for polygons generated during the contour to polygon conversion process.
</member>
- <member name="region/merge_size" type="float" setter="set_region_merge_size" getter="get_region_merge_size" default="20.0">
+ <member name="region_merge_size" type="float" setter="set_region_merge_size" getter="get_region_merge_size" default="20.0">
Any regions with a size smaller than this will be merged with larger regions if possible.
[b]Note:[/b] This value will be squared to calculate the number of cells. For example, a value of 20 will set the number of cells to 400.
</member>
- <member name="region/min_size" type="float" setter="set_region_min_size" getter="get_region_min_size" default="8.0">
+ <member name="region_min_size" type="float" setter="set_region_min_size" getter="get_region_min_size" default="2.0">
The minimum size of a region for it to be created.
[b]Note:[/b] This value will be squared to calculate the minimum number of cells allowed to form isolated island areas. For example, a value of 8 will set the number of cells to 64.
</member>
- <member name="sample_partition_type/sample_partition_type" type="int" setter="set_sample_partition_type" getter="get_sample_partition_type" enum="NavigationMesh.SamplePartitionType" default="0">
+ <member name="sample_partition_type" type="int" setter="set_sample_partition_type" getter="get_sample_partition_type" enum="NavigationMesh.SamplePartitionType" default="0">
Partitioning algorithm for creating the navigation mesh polys. See [enum SamplePartitionType] for possible values.
</member>
</members>
@@ -162,7 +169,7 @@
Parses mesh instances as geometry. This includes [MeshInstance3D], [CSGShape3D], and [GridMap] nodes.
</constant>
<constant name="PARSED_GEOMETRY_STATIC_COLLIDERS" value="1" enum="ParsedGeometryType">
- Parses [StaticBody3D] colliders as geometry. The collider should be in any of the layers specified by [member geometry/collision_mask].
+ Parses [StaticBody3D] colliders as geometry. The collider should be in any of the layers specified by [member geometry_collision_mask].
</constant>
<constant name="PARSED_GEOMETRY_BOTH" value="2" enum="ParsedGeometryType">
Both [constant PARSED_GEOMETRY_MESH_INSTANCES] and [constant PARSED_GEOMETRY_STATIC_COLLIDERS].
@@ -174,10 +181,10 @@
Scans the child nodes of [NavigationRegion3D] recursively for geometry.
</constant>
<constant name="SOURCE_GEOMETRY_GROUPS_WITH_CHILDREN" value="1" enum="SourceGeometryMode">
- Scans nodes in a group and their child nodes recursively for geometry. The group is specified by [member geometry/source_group_name].
+ Scans nodes in a group and their child nodes recursively for geometry. The group is specified by [member geometry_source_group_name].
</constant>
<constant name="SOURCE_GEOMETRY_GROUPS_EXPLICIT" value="2" enum="SourceGeometryMode">
- Uses nodes in a group for geometry. The group is specified by [member geometry/source_group_name].
+ Uses nodes in a group for geometry. The group is specified by [member geometry_source_group_name].
</constant>
<constant name="SOURCE_GEOMETRY_MAX" value="3" enum="SourceGeometryMode">
Represents the size of the [enum SourceGeometryMode] enum.
diff --git a/doc/classes/NavigationMeshGenerator.xml b/doc/classes/NavigationMeshGenerator.xml
index 1cffb1a627..4c337db90f 100644
--- a/doc/classes/NavigationMeshGenerator.xml
+++ b/doc/classes/NavigationMeshGenerator.xml
@@ -1,23 +1,31 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="NavigationMeshGenerator" inherits="Object" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
+ Helper class for creating and clearing navigation meshes.
</brief_description>
<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 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>
<tutorials>
</tutorials>
<methods>
<method name="bake">
<return type="void" />
- <argument index="0" name="nav_mesh" type="NavigationMesh" />
- <argument index="1" name="root_node" type="Node" />
+ <param index="0" name="nav_mesh" type="NavigationMesh" />
+ <param index="1" name="root_node" type="Node" />
<description>
+ 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" />
- <argument index="0" name="nav_mesh" type="NavigationMesh" />
+ <param index="0" name="nav_mesh" type="NavigationMesh" />
<description>
+ 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 2540c56258..4ecdc06645 100644
--- a/doc/classes/NavigationObstacle2D.xml
+++ b/doc/classes/NavigationObstacle2D.xml
@@ -5,9 +5,18 @@
</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.
</description>
<tutorials>
</tutorials>
+ <methods>
+ <method name="get_rid" qualifiers="const">
+ <return type="RID" />
+ <description>
+ Returns the [RID] of this obstacle on the [NavigationServer2D].
+ </description>
+ </method>
+ </methods>
<members>
<member name="estimate_radius" type="bool" setter="set_estimate_radius" getter="is_radius_estimated" default="true">
Enables radius estimation algorithm which uses parent's collision shapes to determine the obstacle radius.
diff --git a/doc/classes/NavigationObstacle3D.xml b/doc/classes/NavigationObstacle3D.xml
index f9489db5f1..ed8af3883c 100644
--- a/doc/classes/NavigationObstacle3D.xml
+++ b/doc/classes/NavigationObstacle3D.xml
@@ -5,9 +5,18 @@
</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.
</description>
<tutorials>
</tutorials>
+ <methods>
+ <method name="get_rid" qualifiers="const">
+ <return type="RID" />
+ <description>
+ Returns the [RID] of this obstacle on the [NavigationServer3D].
+ </description>
+ </method>
+ </methods>
<members>
<member name="estimate_radius" type="bool" setter="set_estimate_radius" getter="is_radius_estimated" default="true">
Enables radius estimation algorithm which uses parent's collision shapes to determine the obstacle radius.
diff --git a/doc/classes/NavigationPolygon.xml b/doc/classes/NavigationPolygon.xml
index ee57d8f26b..19466c171f 100644
--- a/doc/classes/NavigationPolygon.xml
+++ b/doc/classes/NavigationPolygon.xml
@@ -48,22 +48,22 @@
<methods>
<method name="add_outline">
<return type="void" />
- <argument index="0" name="outline" type="PackedVector2Array" />
+ <param index="0" name="outline" type="PackedVector2Array" />
<description>
Appends a [PackedVector2Array] that contains the vertices of an outline to the internal array that contains all the outlines. You have to call [method make_polygons_from_outlines] in order for this array to be converted to polygons that the engine will use.
</description>
</method>
<method name="add_outline_at_index">
<return type="void" />
- <argument index="0" name="outline" type="PackedVector2Array" />
- <argument index="1" name="index" type="int" />
+ <param index="0" name="outline" type="PackedVector2Array" />
+ <param index="1" name="index" type="int" />
<description>
Adds a [PackedVector2Array] that contains the vertices of an outline to the internal array that contains all the outlines at a fixed position. You have to call [method make_polygons_from_outlines] in order for this array to be converted to polygons that the engine will use.
</description>
</method>
<method name="add_polygon">
<return type="void" />
- <argument index="0" name="polygon" type="PackedInt32Array" />
+ <param index="0" name="polygon" type="PackedInt32Array" />
<description>
Adds a polygon using the indices of the vertices you get when calling [method get_vertices].
</description>
@@ -80,9 +80,15 @@
Clears the array of polygons, but it doesn't clear the array of outlines and vertices.
</description>
</method>
+ <method name="get_mesh">
+ <return type="NavigationMesh" />
+ <description>
+ Returns the [NavigationMesh] resulting from this navigation polygon. This navmesh can be used to update the navmesh of a region with the [method NavigationServer3D.region_set_navmesh] API directly (as 2D uses the 3D server behind the scene).
+ </description>
+ </method>
<method name="get_outline" qualifiers="const">
<return type="PackedVector2Array" />
- <argument index="0" name="idx" type="int" />
+ <param index="0" name="idx" type="int" />
<description>
Returns a [PackedVector2Array] containing the vertices of an outline that was created in the editor or by script.
</description>
@@ -95,7 +101,7 @@
</method>
<method name="get_polygon">
<return type="PackedInt32Array" />
- <argument index="0" name="idx" type="int" />
+ <param index="0" name="idx" type="int" />
<description>
Returns a [PackedInt32Array] containing the indices of the vertices of a created polygon.
</description>
@@ -120,22 +126,22 @@
</method>
<method name="remove_outline">
<return type="void" />
- <argument index="0" name="idx" type="int" />
+ <param index="0" name="idx" type="int" />
<description>
Removes an outline created in the editor or by script. You have to call [method make_polygons_from_outlines] for the polygons to update.
</description>
</method>
<method name="set_outline">
<return type="void" />
- <argument index="0" name="idx" type="int" />
- <argument index="1" name="outline" type="PackedVector2Array" />
+ <param index="0" name="idx" type="int" />
+ <param index="1" name="outline" type="PackedVector2Array" />
<description>
Changes an outline created in the editor or by script. You have to call [method make_polygons_from_outlines] for the polygons to update.
</description>
</method>
<method name="set_vertices">
<return type="void" />
- <argument index="0" name="vertices" type="PackedVector2Array" />
+ <param index="0" name="vertices" type="PackedVector2Array" />
<description>
Sets the vertices that can be then indexed to create polygons with the [method add_polygon] method.
</description>
diff --git a/doc/classes/NavigationRegion2D.xml b/doc/classes/NavigationRegion2D.xml
index b1165174a2..89f7dcb4af 100644
--- a/doc/classes/NavigationRegion2D.xml
+++ b/doc/classes/NavigationRegion2D.xml
@@ -7,18 +7,50 @@
A region of the navigation map. It tells the [NavigationServer2D] what can be navigated and what cannot, based on its [NavigationPolygon] resource.
Two regions can be connected to each other if they share a similar edge. You can set the minimum distance between two vertices required to connect two edges by using [method NavigationServer2D.map_set_edge_connection_margin].
[b]Note:[/b] Overlapping two regions' polygons is not enough for connecting two regions. They must share a similar edge.
+ The pathfinding cost of entering this region from another region can be controlled with the [member enter_cost] value.
+ [b]Note:[/b] This value is not added to the path cost when the start position is already inside this region.
+ The pathfinding cost of traveling distances inside this region can be controlled with the [member travel_cost] multiplier.
</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 [param layer_number] between 1 and 32.
+ </description>
+ </method>
+ <method name="get_region_rid" qualifiers="const">
+ <return type="RID" />
+ <description>
+ Returns the [RID] of this region on the [NavigationServer2D]. Combined with [method NavigationServer2D.map_get_closest_point_owner] can be used to identify the [NavigationRegion2D] closest to a point on the merged navigation map.
+ </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 [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>
<members>
<member name="enabled" type="bool" setter="set_enabled" getter="is_enabled" default="true">
Determines if the [NavigationRegion2D] is enabled or disabled.
</member>
- <member name="layers" type="int" setter="set_layers" getter="get_layers" default="1">
- A bitfield determining all layers the region belongs to. These layers can be checked upon when requesting a path with [method NavigationServer2D.map_get_path].
+ <member name="enter_cost" type="float" setter="set_enter_cost" getter="get_enter_cost" default="0.0">
+ When pathfinding enters this region's navmesh 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 region belongs to. These navigation layers can be checked upon when requesting a path with [method NavigationServer2D.map_get_path].
</member>
<member name="navpoly" type="NavigationPolygon" setter="set_navigation_polygon" getter="get_navigation_polygon">
The [NavigationPolygon] resource to use.
</member>
+ <member name="travel_cost" type="float" setter="set_travel_cost" getter="get_travel_cost" default="1.0">
+ When pathfinding moves inside this region's navmesh the traveled distances are multiplied with [code]travel_cost[/code] for determining the shortest path.
+ </member>
</members>
</class>
diff --git a/doc/classes/NavigationRegion3D.xml b/doc/classes/NavigationRegion3D.xml
index e007633a1e..1e096515be 100644
--- a/doc/classes/NavigationRegion3D.xml
+++ b/doc/classes/NavigationRegion3D.xml
@@ -6,14 +6,40 @@
<description>
A region of the navigation map. It tells the [NavigationServer3D] what can be navigated and what cannot, based on its [NavigationMesh] resource.
Two regions can be connected to each other if they share a similar edge. You can set the minimum distance between two vertices required to connect two edges by using [method NavigationServer3D.map_set_edge_connection_margin].
+ [b]Note:[/b] Overlapping two regions' navmeshes is not enough for connecting two regions. They must share a similar edge.
+ The cost of entering this region from another region can be controlled with the [member enter_cost] value.
+ [b]Note:[/b] This value is not added to the path cost when the start position is already inside this region.
+ The cost of traveling distances inside this region can be controlled with the [member travel_cost] multiplier.
</description>
<tutorials>
</tutorials>
<methods>
<method name="bake_navigation_mesh">
<return type="void" />
+ <param index="0" name="on_thread" type="bool" default="true" />
<description>
- Bakes the [NavigationMesh]. The baking is done in a separate thread because navigation baking is not a cheap operation. This can be done at runtime. When it is completed, it automatically sets the new [NavigationMesh].
+ 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 HTML5 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 [param layer_number] between 1 and 32.
+ </description>
+ </method>
+ <method name="get_region_rid" qualifiers="const">
+ <return type="RID" />
+ <description>
+ Returns the [RID] of this region on the [NavigationServer3D]. Combined with [method NavigationServer3D.map_get_closest_point_owner] can be used to identify the [NavigationRegion3D] closest to a point on the merged navigation map.
+ </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 [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>
@@ -21,12 +47,18 @@
<member name="enabled" type="bool" setter="set_enabled" getter="is_enabled" default="true">
Determines if the [NavigationRegion3D] is enabled or disabled.
</member>
- <member name="layers" type="int" setter="set_layers" getter="get_layers" default="1">
- A bitfield determining all layers the region belongs to. These layers can be checked upon when requesting a path with [method NavigationServer3D.map_get_path].
+ <member name="enter_cost" type="float" setter="set_enter_cost" getter="get_enter_cost" default="0.0">
+ When pathfinding enters this region's navmesh 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 region belongs to. These navigation layers can be checked upon when requesting a path with [method NavigationServer3D.map_get_path].
</member>
<member name="navmesh" type="NavigationMesh" setter="set_navigation_mesh" getter="get_navigation_mesh">
The [NavigationMesh] resource to use.
</member>
+ <member name="travel_cost" type="float" setter="set_travel_cost" getter="get_travel_cost" default="1.0">
+ When pathfinding moves inside this region's navmesh the traveled distances are multiplied with [code]travel_cost[/code] for determining the shortest path.
+ </member>
</members>
<signals>
<signal name="bake_finished">
diff --git a/doc/classes/NavigationServer2D.xml b/doc/classes/NavigationServer2D.xml
index e007dfd9b5..b85c1c6649 100644
--- a/doc/classes/NavigationServer2D.xml
+++ b/doc/classes/NavigationServer2D.xml
@@ -5,8 +5,10 @@
</brief_description>
<description>
NavigationServer2D is the server responsible for all 2D navigation. It handles several objects, namely maps, regions and agents.
- Maps are made up of regions, which are made of navigation polygons. Together, they define the navigable areas in the 2D world. For two regions to be connected to each other, they must share a similar edge. An edge is considered connected to another if both of its two vertices are at a distance less than [code]edge_connection_margin[/code] to the respective other edge's vertex.
- You may assign navigation layers to regions with [method NavigationServer2D.region_set_layers], which then can be checked upon when requesting a path with [method NavigationServer2D.map_get_path]. This allows allowing or forbidding some areas to 2D objects.
+ Maps are made up of regions, which are made of navigation polygons. Together, they define the navigable areas in the 2D world.
+ [b]Note:[/b] Most NavigationServer changes take effect after the next physics frame and not immediately. This includes all changes made to maps, regions or agents by navigation related Nodes in the SceneTree or made through scripts.
+ For two regions to be connected to each other, they must share a similar edge. An edge is considered connected to another if both of its two vertices are at a distance less than [code]edge_connection_margin[/code] to the respective other edge's vertex.
+ You may assign navigation layers to regions with [method NavigationServer2D.region_set_navigation_layers], which then can be checked upon when requesting a path with [method NavigationServer2D.map_get_path]. This allows allowing or forbidding some areas to 2D objects.
To use the collision avoidance system, you may use agents. You can set an agent's target velocity, then the servers will emit a callback with a modified velocity.
[b]Note:[/b] The collision avoidance system ignores regions. Using the modified velocity as-is might lead to pushing and agent outside of a navigable area. This is a limitation of the collision avoidance system, any more complex situation may require the use of the physics engine.
This server keeps tracks of any call and executes them during the sync phase. This means that you can request any change to the map, using any thread, without worrying.
@@ -21,176 +23,214 @@
Creates the agent.
</description>
</method>
+ <method name="agent_get_map" qualifiers="const">
+ <return type="RID" />
+ <param index="0" name="agent" type="RID" />
+ <description>
+ Returns the navigation map [RID] the requested [param agent] is currently assigned to.
+ </description>
+ </method>
<method name="agent_is_map_changed" qualifiers="const">
<return type="bool" />
- <argument index="0" name="agent" type="RID" />
+ <param index="0" name="agent" type="RID" />
<description>
Returns true if the map got changed the previous frame.
</description>
</method>
<method name="agent_set_callback" qualifiers="const">
<return type="void" />
- <argument index="0" name="agent" type="RID" />
- <argument index="1" name="receiver" type="Object" />
- <argument index="2" name="method" type="StringName" />
- <argument index="3" name="userdata" type="Variant" default="null" />
+ <param index="0" name="agent" type="RID" />
+ <param index="1" name="receiver" type="Object" />
+ <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.
+ 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">
<return type="void" />
- <argument index="0" name="agent" type="RID" />
- <argument index="1" name="map" type="RID" />
+ <param index="0" name="agent" type="RID" />
+ <param index="1" name="map" type="RID" />
<description>
Puts the agent in the map.
</description>
</method>
<method name="agent_set_max_neighbors" qualifiers="const">
<return type="void" />
- <argument index="0" name="agent" type="RID" />
- <argument index="1" name="count" type="int" />
+ <param index="0" name="agent" type="RID" />
+ <param index="1" name="count" type="int" />
<description>
Sets the maximum number of other agents the 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>
</method>
<method name="agent_set_max_speed" qualifiers="const">
<return type="void" />
- <argument index="0" name="agent" type="RID" />
- <argument index="1" name="max_speed" type="float" />
+ <param index="0" name="agent" type="RID" />
+ <param index="1" name="max_speed" type="float" />
<description>
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" />
- <argument index="0" name="agent" type="RID" />
- <argument index="1" name="dist" type="float" />
+ <param index="0" name="agent" type="RID" />
+ <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>
</method>
<method name="agent_set_position" qualifiers="const">
<return type="void" />
- <argument index="0" name="agent" type="RID" />
- <argument index="1" name="position" type="Vector2" />
+ <param index="0" name="agent" type="RID" />
+ <param index="1" name="position" type="Vector2" />
<description>
Sets the position of the agent in world space.
</description>
</method>
<method name="agent_set_radius" qualifiers="const">
<return type="void" />
- <argument index="0" name="agent" type="RID" />
- <argument index="1" name="radius" type="float" />
+ <param index="0" name="agent" type="RID" />
+ <param index="1" name="radius" type="float" />
<description>
Sets the radius of the agent.
</description>
</method>
<method name="agent_set_target_velocity" qualifiers="const">
<return type="void" />
- <argument index="0" name="agent" type="RID" />
- <argument index="1" name="target_velocity" type="Vector2" />
+ <param index="0" name="agent" type="RID" />
+ <param index="1" name="target_velocity" type="Vector2" />
<description>
Sets the new target velocity.
</description>
</method>
<method name="agent_set_time_horizon" qualifiers="const">
<return type="void" />
- <argument index="0" name="agent" type="RID" />
- <argument index="1" name="time" type="float" />
+ <param index="0" name="agent" type="RID" />
+ <param index="1" name="time" type="float" />
<description>
The minimal amount of time for which the agent's velocities that are computed by the simulation are safe with respect to other agents. The larger this number, the sooner this agent will respond to the presence of other agents, but the less freedom this agent has in choosing its velocities. Must be positive.
</description>
</method>
<method name="agent_set_velocity" qualifiers="const">
<return type="void" />
- <argument index="0" name="agent" type="RID" />
- <argument index="1" name="velocity" type="Vector2" />
+ <param index="0" name="agent" type="RID" />
+ <param index="1" name="velocity" type="Vector2" />
<description>
Sets the current velocity of the agent.
</description>
</method>
<method name="free_rid" qualifiers="const">
<return type="void" />
- <argument index="0" name="rid" type="RID" />
+ <param index="0" name="rid" type="RID" />
<description>
Destroys the given RID.
</description>
</method>
+ <method name="get_maps" qualifiers="const">
+ <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="map_create" qualifiers="const">
<return type="RID" />
<description>
Create a new map.
</description>
</method>
+ <method name="map_force_update">
+ <return type="void" />
+ <param index="0" name="map" type="RID" />
+ <description>
+ 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="RID[]" />
+ <param index="0" name="map" type="RID" />
+ <description>
+ 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">
<return type="float" />
- <argument index="0" name="map" type="RID" />
+ <param index="0" name="map" type="RID" />
<description>
Returns the map cell size.
</description>
</method>
<method name="map_get_closest_point" qualifiers="const">
<return type="Vector2" />
- <argument index="0" name="map" type="RID" />
- <argument index="1" name="to_point" type="Vector2" />
+ <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">
<return type="RID" />
- <argument index="0" name="map" type="RID" />
- <argument index="1" name="to_point" type="Vector2" />
+ <param index="0" name="map" type="RID" />
+ <param index="1" name="to_point" type="Vector2" />
<description>
Returns the owner region RID for the point returned by [method map_get_closest_point].
</description>
</method>
<method name="map_get_edge_connection_margin" qualifiers="const">
<return type="float" />
- <argument index="0" name="map" type="RID" />
+ <param index="0" name="map" type="RID" />
<description>
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_path" qualifiers="const">
<return type="PackedVector2Array" />
- <argument index="0" name="map" type="RID" />
- <argument index="1" name="origin" type="Vector2" />
- <argument index="2" name="destination" type="Vector2" />
- <argument index="3" name="optimize" type="bool" />
- <argument index="4" name="layers" type="int" default="1" />
+ <param index="0" name="map" type="RID" />
+ <param index="1" name="origin" type="Vector2" />
+ <param index="2" name="destination" type="Vector2" />
+ <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. [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="RID[]" />
+ <param index="0" name="map" type="RID" />
<description>
- Returns the navigation path to reach the destination from the origin. [code]layers[/code] is a bitmask of all region layers that are allowed to be in the path.
+ 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" />
- <argument index="0" name="nap" type="RID" />
+ <param index="0" name="map" type="RID" />
<description>
Returns true if the map is active.
</description>
</method>
<method name="map_set_active" qualifiers="const">
<return type="void" />
- <argument index="0" name="map" type="RID" />
- <argument index="1" name="active" type="bool" />
+ <param index="0" name="map" type="RID" />
+ <param index="1" name="active" type="bool" />
<description>
Sets the map active.
</description>
</method>
<method name="map_set_cell_size" qualifiers="const">
<return type="void" />
- <argument index="0" name="map" type="RID" />
- <argument index="1" name="cell_size" type="float" />
+ <param index="0" name="map" type="RID" />
+ <param index="1" name="cell_size" type="float" />
<description>
Set the map cell size used to weld the navigation mesh polygons.
</description>
</method>
<method name="map_set_edge_connection_margin" qualifiers="const">
<return type="void" />
- <argument index="0" name="map" type="RID" />
- <argument index="1" name="margin" type="float" />
+ <param index="0" name="map" type="RID" />
+ <param index="1" name="margin" type="float" />
<description>
Set the map edge connection margin used to weld the compatible region edges.
</description>
@@ -203,70 +243,117 @@
</method>
<method name="region_get_connection_pathway_end" qualifiers="const">
<return type="Vector2" />
- <argument index="0" name="region" type="RID" />
- <argument index="1" name="connection" type="int" />
+ <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">
<return type="Vector2" />
- <argument index="0" name="region" type="RID" />
- <argument index="1" name="connection" type="int" />
+ <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" />
- <argument index="0" name="region" type="RID" />
+ <param index="0" name="region" type="RID" />
+ <description>
+ 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 how many connections this [code]region[/code] has with other regions in the map.
+ Returns the [code]enter_cost[/code] of this [param region].
</description>
</method>
- <method name="region_get_layers" qualifiers="const">
+ <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 [param region] is currently assigned to.
+ </description>
+ </method>
+ <method name="region_get_navigation_layers" qualifiers="const">
<return type="int" />
- <argument index="0" name="region" type="RID" />
+ <param index="0" name="region" type="RID" />
+ <description>
+ Returns the region's navigation layers.
+ </description>
+ </method>
+ <method name="region_get_travel_cost" qualifiers="const">
+ <return type="float" />
+ <param index="0" name="region" type="RID" />
+ <description>
+ Returns the [code]travel_cost[/code] of this [param region].
+ </description>
+ </method>
+ <method name="region_owns_point" qualifiers="const">
+ <return type="bool" />
+ <param index="0" name="region" type="RID" />
+ <param index="1" name="point" type="Vector2" />
<description>
- Returns the region's layers.
+ 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>
</method>
- <method name="region_set_layers" qualifiers="const">
+ <method name="region_set_enter_cost" qualifiers="const">
<return type="void" />
- <argument index="0" name="region" type="RID" />
- <argument index="1" name="layers" type="int" />
+ <param index="0" name="region" type="RID" />
+ <param index="1" name="enter_cost" type="float" />
<description>
- Set the region's layers. This allows selecting regions from a path request (when using [method NavigationServer2D.map_get_path]).
+ Sets the [param enter_cost] for this [param region].
</description>
</method>
<method name="region_set_map" qualifiers="const">
<return type="void" />
- <argument index="0" name="region" type="RID" />
- <argument index="1" name="map" type="RID" />
+ <param index="0" name="region" type="RID" />
+ <param index="1" name="map" type="RID" />
<description>
Sets the map for the region.
</description>
</method>
+ <method name="region_set_navigation_layers" qualifiers="const">
+ <return type="void" />
+ <param index="0" name="region" type="RID" />
+ <param index="1" name="navigation_layers" type="int" />
+ <description>
+ Set the region's navigation layers. This allows selecting regions from a path request (when using [method NavigationServer2D.map_get_path]).
+ </description>
+ </method>
<method name="region_set_navpoly" qualifiers="const">
<return type="void" />
- <argument index="0" name="region" type="RID" />
- <argument index="1" name="nav_poly" type="NavigationPolygon" />
+ <param index="0" name="region" type="RID" />
+ <param index="1" name="nav_poly" type="NavigationPolygon" />
<description>
Sets the navigation mesh for the region.
</description>
</method>
<method name="region_set_transform" qualifiers="const">
<return type="void" />
- <argument index="0" name="region" type="RID" />
- <argument index="1" name="transform" type="Transform2D" />
+ <param index="0" name="region" type="RID" />
+ <param index="1" name="transform" type="Transform2D" />
<description>
Sets the global transformation for the region.
</description>
</method>
+ <method name="region_set_travel_cost" qualifiers="const">
+ <return type="void" />
+ <param index="0" name="region" type="RID" />
+ <param index="1" name="travel_cost" type="float" />
+ <description>
+ Sets the [param travel_cost] for this [param region].
+ </description>
+ </method>
</methods>
<signals>
<signal name="map_changed">
- <argument index="0" name="map" type="RID" />
+ <param index="0" name="map" type="RID" />
<description>
Emitted when a navigation map is updated, when a region moves or is modified.
</description>
diff --git a/doc/classes/NavigationServer3D.xml b/doc/classes/NavigationServer3D.xml
index c987bc9042..5b2a8fc08b 100644
--- a/doc/classes/NavigationServer3D.xml
+++ b/doc/classes/NavigationServer3D.xml
@@ -5,8 +5,10 @@
</brief_description>
<description>
NavigationServer3D is the server responsible for all 3D navigation. It handles several objects, namely maps, regions and agents.
- Maps are made up of regions, which are made of navigation meshes. Together, they define the navigable areas in the 3D world. For two regions to be connected to each other, they must share a similar edge. An edge is considered connected to another if both of its two vertices are at a distance less than [code]edge_connection_margin[/code] to the respective other edge's vertex.
- You may assign navigation layers to regions with [method NavigationServer3D.region_set_layers], which then can be checked upon when requesting a path with [method NavigationServer3D.map_get_path]. This allows allowing or forbidding some areas to 3D objects.
+ Maps are made up of regions, which are made of navigation meshes. Together, they define the navigable areas in the 3D world.
+ [b]Note:[/b] Most NavigationServer changes take effect after the next physics frame and not immediately. This includes all changes made to maps, regions or agents by navigation related Nodes in the SceneTree or made through scripts.
+ For two regions to be connected to each other, they must share a similar edge. An edge is considered connected to another if both of its two vertices are at a distance less than [code]edge_connection_margin[/code] to the respective other edge's vertex.
+ You may assign navigation layers to regions with [method NavigationServer3D.region_set_navigation_layers], which then can be checked upon when requesting a path with [method NavigationServer3D.map_get_path]. This allows allowing or forbidding some areas to 3D objects.
To use the collision avoidance system, you may use agents. You can set an agent's target velocity, then the servers will emit a callback with a modified velocity.
[b]Note:[/b] The collision avoidance system ignores regions. Using the modified velocity as-is might lead to pushing and agent outside of a navigable area. This is a limitation of the collision avoidance system, any more complex situation may require the use of the physics engine.
This server keeps tracks of any call and executes them during the sync phase. This means that you can request any change to the map, using any thread, without worrying.
@@ -21,216 +23,254 @@
Creates the agent.
</description>
</method>
+ <method name="agent_get_map" qualifiers="const">
+ <return type="RID" />
+ <param index="0" name="agent" type="RID" />
+ <description>
+ Returns the navigation map [RID] the requested [param agent] is currently assigned to.
+ </description>
+ </method>
<method name="agent_is_map_changed" qualifiers="const">
<return type="bool" />
- <argument index="0" name="agent" type="RID" />
+ <param index="0" name="agent" type="RID" />
<description>
Returns true if the map got changed the previous frame.
</description>
</method>
<method name="agent_set_callback" qualifiers="const">
<return type="void" />
- <argument index="0" name="agent" type="RID" />
- <argument index="1" name="receiver" type="Object" />
- <argument index="2" name="method" type="StringName" />
- <argument index="3" name="userdata" type="Variant" default="null" />
+ <param index="0" name="agent" type="RID" />
+ <param index="1" name="receiver" type="Object" />
+ <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.
+ 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">
<return type="void" />
- <argument index="0" name="agent" type="RID" />
- <argument index="1" name="map" type="RID" />
+ <param index="0" name="agent" type="RID" />
+ <param index="1" name="map" type="RID" />
<description>
Puts the agent in the map.
</description>
</method>
<method name="agent_set_max_neighbors" qualifiers="const">
<return type="void" />
- <argument index="0" name="agent" type="RID" />
- <argument index="1" name="count" type="int" />
+ <param index="0" name="agent" type="RID" />
+ <param index="1" name="count" type="int" />
<description>
Sets the maximum number of other agents the 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>
</method>
<method name="agent_set_max_speed" qualifiers="const">
<return type="void" />
- <argument index="0" name="agent" type="RID" />
- <argument index="1" name="max_speed" type="float" />
+ <param index="0" name="agent" type="RID" />
+ <param index="1" name="max_speed" type="float" />
<description>
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" />
- <argument index="0" name="agent" type="RID" />
- <argument index="1" name="dist" type="float" />
+ <param index="0" name="agent" type="RID" />
+ <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>
</method>
<method name="agent_set_position" qualifiers="const">
<return type="void" />
- <argument index="0" name="agent" type="RID" />
- <argument index="1" name="position" type="Vector3" />
+ <param index="0" name="agent" type="RID" />
+ <param index="1" name="position" type="Vector3" />
<description>
Sets the position of the agent in world space.
</description>
</method>
<method name="agent_set_radius" qualifiers="const">
<return type="void" />
- <argument index="0" name="agent" type="RID" />
- <argument index="1" name="radius" type="float" />
+ <param index="0" name="agent" type="RID" />
+ <param index="1" name="radius" type="float" />
<description>
Sets the radius of the agent.
</description>
</method>
<method name="agent_set_target_velocity" qualifiers="const">
<return type="void" />
- <argument index="0" name="agent" type="RID" />
- <argument index="1" name="target_velocity" type="Vector3" />
+ <param index="0" name="agent" type="RID" />
+ <param index="1" name="target_velocity" type="Vector3" />
<description>
Sets the new target velocity.
</description>
</method>
<method name="agent_set_time_horizon" qualifiers="const">
<return type="void" />
- <argument index="0" name="agent" type="RID" />
- <argument index="1" name="time" type="float" />
+ <param index="0" name="agent" type="RID" />
+ <param index="1" name="time" type="float" />
<description>
The minimal amount of time for which the agent's velocities that are computed by the simulation are safe with respect to other agents. The larger this number, the sooner this agent will respond to the presence of other agents, but the less freedom this agent has in choosing its velocities. Must be positive.
</description>
</method>
<method name="agent_set_velocity" qualifiers="const">
<return type="void" />
- <argument index="0" name="agent" type="RID" />
- <argument index="1" name="velocity" type="Vector3" />
+ <param index="0" name="agent" type="RID" />
+ <param index="1" name="velocity" type="Vector3" />
<description>
Sets the current velocity of the agent.
</description>
</method>
<method name="free_rid" qualifiers="const">
<return type="void" />
- <argument index="0" name="rid" type="RID" />
+ <param index="0" name="rid" type="RID" />
<description>
Destroys the given RID.
</description>
</method>
+ <method name="get_maps" qualifiers="const">
+ <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="map_create" qualifiers="const">
<return type="RID" />
<description>
Create a new map.
</description>
</method>
+ <method name="map_force_update">
+ <return type="void" />
+ <param index="0" name="map" type="RID" />
+ <description>
+ 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="RID[]" />
+ <param index="0" name="map" type="RID" />
+ <description>
+ 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">
<return type="float" />
- <argument index="0" name="map" type="RID" />
+ <param index="0" name="map" type="RID" />
<description>
Returns the map cell size.
</description>
</method>
<method name="map_get_closest_point" qualifiers="const">
<return type="Vector3" />
- <argument index="0" name="map" type="RID" />
- <argument index="1" name="to_point" type="Vector3" />
+ <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">
<return type="Vector3" />
- <argument index="0" name="map" type="RID" />
- <argument index="1" name="to_point" type="Vector3" />
+ <param index="0" name="map" type="RID" />
+ <param index="1" name="to_point" type="Vector3" />
<description>
Returns the normal for the point returned by [method map_get_closest_point].
</description>
</method>
<method name="map_get_closest_point_owner" qualifiers="const">
<return type="RID" />
- <argument index="0" name="map" type="RID" />
- <argument index="1" name="to_point" type="Vector3" />
+ <param index="0" name="map" type="RID" />
+ <param index="1" name="to_point" type="Vector3" />
<description>
Returns the owner region RID for the point returned by [method map_get_closest_point].
</description>
</method>
<method name="map_get_closest_point_to_segment" qualifiers="const">
<return type="Vector3" />
- <argument index="0" name="map" type="RID" />
- <argument index="1" name="start" type="Vector3" />
- <argument index="2" name="end" type="Vector3" />
- <argument index="3" name="use_collision" type="bool" default="false" />
+ <param index="0" name="map" type="RID" />
+ <param index="1" name="start" type="Vector3" />
+ <param index="2" name="end" type="Vector3" />
+ <param index="3" name="use_collision" type="bool" default="false" />
<description>
Returns the closest point between the navigation surface and the segment.
</description>
</method>
<method name="map_get_edge_connection_margin" qualifiers="const">
<return type="float" />
- <argument index="0" name="map" type="RID" />
+ <param index="0" name="map" type="RID" />
<description>
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_path" qualifiers="const">
<return type="PackedVector3Array" />
- <argument index="0" name="map" type="RID" />
- <argument index="1" name="origin" type="Vector3" />
- <argument index="2" name="destination" type="Vector3" />
- <argument index="3" name="optimize" type="bool" />
- <argument index="4" name="layers" type="int" default="1" />
+ <param index="0" name="map" type="RID" />
+ <param index="1" name="origin" type="Vector3" />
+ <param index="2" name="destination" type="Vector3" />
+ <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. [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="RID[]" />
+ <param index="0" name="map" type="RID" />
<description>
- Returns the navigation path to reach the destination from the origin. [code]layers[/code] is a bitmask of all region layers that are allowed to be in the path.
+ 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">
<return type="Vector3" />
- <argument index="0" name="map" type="RID" />
+ <param index="0" name="map" type="RID" />
<description>
Returns the map's up direction.
</description>
</method>
<method name="map_is_active" qualifiers="const">
<return type="bool" />
- <argument index="0" name="nap" type="RID" />
+ <param index="0" name="map" type="RID" />
<description>
Returns true if the map is active.
</description>
</method>
<method name="map_set_active" qualifiers="const">
<return type="void" />
- <argument index="0" name="map" type="RID" />
- <argument index="1" name="active" type="bool" />
+ <param index="0" name="map" type="RID" />
+ <param index="1" name="active" type="bool" />
<description>
Sets the map active.
</description>
</method>
<method name="map_set_cell_size" qualifiers="const">
<return type="void" />
- <argument index="0" name="map" type="RID" />
- <argument index="1" name="cell_size" type="float" />
+ <param index="0" name="map" type="RID" />
+ <param index="1" name="cell_size" type="float" />
<description>
Set the map cell size used to weld the navigation mesh polygons.
</description>
</method>
<method name="map_set_edge_connection_margin" qualifiers="const">
<return type="void" />
- <argument index="0" name="map" type="RID" />
- <argument index="1" name="margin" type="float" />
+ <param index="0" name="map" type="RID" />
+ <param index="1" name="margin" type="float" />
<description>
Set the map edge connection margin used to weld the compatible region edges.
</description>
</method>
<method name="map_set_up" qualifiers="const">
<return type="void" />
- <argument index="0" name="map" type="RID" />
- <argument index="1" name="up" type="Vector3" />
+ <param index="0" name="map" type="RID" />
+ <param index="1" name="up" type="Vector3" />
<description>
Sets the map up direction.
</description>
</method>
<method name="process">
<return type="void" />
- <argument index="0" name="delta_time" type="float" />
+ <param index="0" name="delta_time" type="float" />
<description>
Process the collision avoidance agents.
The result of this process is needed by the physics server, so this must be called in the main thread.
@@ -239,8 +279,8 @@
</method>
<method name="region_bake_navmesh" qualifiers="const">
<return type="void" />
- <argument index="0" name="mesh" type="NavigationMesh" />
- <argument index="1" name="node" type="Node" />
+ <param index="0" name="mesh" type="NavigationMesh" />
+ <param index="1" name="node" type="Node" />
<description>
Bakes the navigation mesh.
</description>
@@ -253,69 +293,116 @@
</method>
<method name="region_get_connection_pathway_end" qualifiers="const">
<return type="Vector3" />
- <argument index="0" name="region" type="RID" />
- <argument index="1" name="connection" type="int" />
+ <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">
<return type="Vector3" />
- <argument index="0" name="region" type="RID" />
- <argument index="1" name="connection" type="int" />
+ <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" />
- <argument index="0" name="region" type="RID" />
+ <param index="0" name="region" type="RID" />
+ <description>
+ 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 [param region].
+ </description>
+ </method>
+ <method name="region_get_map" qualifiers="const">
+ <return type="RID" />
+ <param index="0" name="region" type="RID" />
<description>
- Returns how many connections this [code]region[/code] has with other regions in the map.
+ Returns the navigation map [RID] the requested [param region] is currently assigned to.
</description>
</method>
- <method name="region_get_layers" qualifiers="const">
+ <method name="region_get_navigation_layers" qualifiers="const">
<return type="int" />
- <argument index="0" name="region" type="RID" />
+ <param index="0" name="region" type="RID" />
+ <description>
+ Returns the region's navigation layers.
+ </description>
+ </method>
+ <method name="region_get_travel_cost" qualifiers="const">
+ <return type="float" />
+ <param index="0" name="region" type="RID" />
+ <description>
+ Returns the [code]travel_cost[/code] of this [param region].
+ </description>
+ </method>
+ <method name="region_owns_point" qualifiers="const">
+ <return type="bool" />
+ <param index="0" name="region" type="RID" />
+ <param index="1" name="point" type="Vector3" />
<description>
- Returns the region's layers.
+ 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>
</method>
- <method name="region_set_layers" qualifiers="const">
+ <method name="region_set_enter_cost" qualifiers="const">
<return type="void" />
- <argument index="0" name="region" type="RID" />
- <argument index="1" name="layers" type="int" />
+ <param index="0" name="region" type="RID" />
+ <param index="1" name="enter_cost" type="float" />
<description>
- Set the region's layers. This allows selecting regions from a path request (when using [method NavigationServer3D.map_get_path]).
+ Sets the [param enter_cost] for this [param region].
</description>
</method>
<method name="region_set_map" qualifiers="const">
<return type="void" />
- <argument index="0" name="region" type="RID" />
- <argument index="1" name="map" type="RID" />
+ <param index="0" name="region" type="RID" />
+ <param index="1" name="map" type="RID" />
<description>
Sets the map for the region.
</description>
</method>
+ <method name="region_set_navigation_layers" qualifiers="const">
+ <return type="void" />
+ <param index="0" name="region" type="RID" />
+ <param index="1" name="navigation_layers" type="int" />
+ <description>
+ Set the region's navigation layers. This allows selecting regions from a path request (when using [method NavigationServer3D.map_get_path]).
+ </description>
+ </method>
<method name="region_set_navmesh" qualifiers="const">
<return type="void" />
- <argument index="0" name="region" type="RID" />
- <argument index="1" name="nav_mesh" type="NavigationMesh" />
+ <param index="0" name="region" type="RID" />
+ <param index="1" name="nav_mesh" type="NavigationMesh" />
<description>
Sets the navigation mesh for the region.
</description>
</method>
<method name="region_set_transform" qualifiers="const">
<return type="void" />
- <argument index="0" name="region" type="RID" />
- <argument index="1" name="transform" type="Transform3D" />
+ <param index="0" name="region" type="RID" />
+ <param index="1" name="transform" type="Transform3D" />
<description>
Sets the global transformation for the region.
</description>
</method>
+ <method name="region_set_travel_cost" qualifiers="const">
+ <return type="void" />
+ <param index="0" name="region" type="RID" />
+ <param index="1" name="travel_cost" type="float" />
+ <description>
+ Sets the [param travel_cost] for this [param region].
+ </description>
+ </method>
<method name="set_active" qualifiers="const">
<return type="void" />
- <argument index="0" name="active" type="bool" />
+ <param index="0" name="active" type="bool" />
<description>
Control activation of this server.
</description>
@@ -323,10 +410,15 @@
</methods>
<signals>
<signal name="map_changed">
- <argument index="0" name="map" type="RID" />
+ <param index="0" name="map" type="RID" />
<description>
Emitted when a navigation map is updated, when a region moves or is modified.
</description>
</signal>
+ <signal name="navigation_debug_changed">
+ <description>
+ Emitted when navigation debug settings are changed. Only available in debug builds.
+ </description>
+ </signal>
</signals>
</class>
diff --git a/doc/classes/NinePatchRect.xml b/doc/classes/NinePatchRect.xml
index 863686926a..1592718c4b 100644
--- a/doc/classes/NinePatchRect.xml
+++ b/doc/classes/NinePatchRect.xml
@@ -11,17 +11,17 @@
<methods>
<method name="get_patch_margin" qualifiers="const">
<return type="int" />
- <argument index="0" name="margin" type="int" enum="Side" />
+ <param index="0" name="margin" type="int" enum="Side" />
<description>
Returns the size of the margin on the specified [enum Side].
</description>
</method>
<method name="set_patch_margin">
<return type="void" />
- <argument index="0" name="margin" type="int" enum="Side" />
- <argument index="1" name="value" type="int" />
+ <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 c9795856d5..b882425960 100644
--- a/doc/classes/Node.xml
+++ b/doc/classes/Node.xml
@@ -46,7 +46,7 @@
</method>
<method name="_input" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="event" type="InputEvent" />
+ <param index="0" name="event" type="InputEvent" />
<description>
Called when there is an input event. The input event propagates up through the node tree until a node consumes it.
It is only called if input processing is enabled, which is done automatically if this method is overridden, and can be toggled with [method set_process_input].
@@ -57,9 +57,9 @@
</method>
<method name="_physics_process" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="delta" type="float" />
+ <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).
@@ -67,9 +67,9 @@
</method>
<method name="_process" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="delta" type="float" />
+ <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).
@@ -86,7 +86,7 @@
</method>
<method name="_shortcut_input" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="event" type="InputEvent" />
+ <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.
It is only called if shortcut processing is enabled, which is done automatically if this method is overridden, and can be toggled with [method set_process_shortcut_input].
@@ -97,7 +97,7 @@
</method>
<method name="_unhandled_input" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="event" type="InputEvent" />
+ <param index="0" name="event" type="InputEvent" />
<description>
Called when an [InputEvent] 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 input processing is enabled, which is done automatically if this method is overridden, and can be toggled with [method set_process_unhandled_input].
@@ -108,7 +108,7 @@
</method>
<method name="_unhandled_key_input" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="event" type="InputEvent" />
+ <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.
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].
@@ -120,13 +120,13 @@
</method>
<method name="add_child">
<return type="void" />
- <argument index="0" name="node" type="Node" />
- <argument index="1" name="legible_unique_name" type="bool" default="false" />
- <argument index="2" name="internal" type="int" enum="Node.InternalMode" default="0" />
+ <param index="0" name="node" type="Node" />
+ <param index="1" name="legible_unique_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.
+ If [param legible_unique_name] 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 [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]
@@ -150,22 +150,22 @@
</method>
<method name="add_sibling">
<return type="void" />
- <argument index="0" name="sibling" type="Node" />
- <argument index="1" name="legible_unique_name" type="bool" default="false" />
+ <param index="0" name="sibling" type="Node" />
+ <param index="1" name="legible_unique_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 legible_unique_name] is [code]true[/code], the child node will have a human-readable name based on the name of the node being instantiated instead of its type.
Use [method add_child] instead of this method if you don't need the child node to be added below a specific node in the list of children.
[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>
</method>
<method name="add_to_group">
<return type="void" />
- <argument index="0" name="group" type="StringName" />
- <argument index="1" name="persistent" type="bool" default="false" />
+ <param index="0" name="group" type="StringName" />
+ <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>
@@ -186,23 +186,23 @@
</method>
<method name="duplicate" qualifiers="const">
<return type="Node" />
- <argument index="0" name="flags" type="int" default="15" />
+ <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>
<method name="find_child" qualifiers="const">
<return type="Node" />
- <argument index="0" name="pattern" type="String" />
- <argument index="1" name="recursive" type="bool" default="true" />
- <argument 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.
+ <param index="0" name="pattern" type="String" />
+ <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 [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].
@@ -210,16 +210,16 @@
</method>
<method name="find_children" qualifiers="const">
<return type="Node[]" />
- <argument index="0" name="pattern" type="String" />
- <argument index="1" name="type" type="String" default="&quot;&quot;" />
- <argument index="2" name="recursive" type="bool" default="true" />
- <argument 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.
+ <param index="0" name="pattern" type="String" />
+ <param index="1" name="type" type="String" default="&quot;&quot;" />
+ <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 [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].
@@ -227,42 +227,42 @@
</method>
<method name="find_parent" qualifiers="const">
<return type="Node" />
- <argument index="0" name="pattern" type="String" />
+ <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>
<method name="get_child" qualifiers="const">
<return type="Node" />
- <argument index="0" name="idx" type="int" />
- <argument index="1" name="include_internal" type="bool" default="false" />
+ <param index="0" name="idx" type="int" />
+ <param index="1" name="include_internal" type="bool" default="false" />
<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>
<method name="get_child_count" qualifiers="const">
<return type="int" />
- <argument index="0" name="include_internal" type="bool" default="false" />
+ <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">
<return type="Node[]" />
- <argument index="0" name="include_internal" type="bool" default="false" />
+ <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.
@@ -278,10 +278,10 @@
</method>
<method name="get_index" qualifiers="const">
<return type="int" />
- <argument index="0" name="include_internal" type="bool" default="false" />
+ <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">
@@ -292,7 +292,7 @@
</method>
<method name="get_node" qualifiers="const">
<return type="Node" />
- <argument index="0" name="path" type="NodePath" />
+ <param index="0" name="path" type="NodePath" />
<description>
Fetches a node. The [NodePath] can be either a relative path (from the current node) or an absolute path (in the scene tree) to a node. If the path does not exist, [code]null[/code] is returned and an error is logged. Attempts to access methods on the return value will result in an "Attempt to call &lt;method&gt; on a null instance." error.
[b]Note:[/b] Fetching absolute paths only works when the node is inside the scene tree (see [method is_inside_tree]).
@@ -326,7 +326,7 @@
</method>
<method name="get_node_and_resource">
<return type="Array" />
- <argument index="0" name="path" type="NodePath" />
+ <param index="0" name="path" type="NodePath" />
<description>
Fetches a node and one of its resources as specified by the [NodePath]'s subname (e.g. [code]Area2D/CollisionShape2D:shape[/code]). If several nested resources are specified in the [NodePath], the last one will be fetched.
The return value is an array of size 3: the first index points to the [Node] (or [code]null[/code] if not found), the second index points to the [Resource] (or [code]null[/code] if not found), and the third index is the remaining [NodePath], if any.
@@ -347,9 +347,9 @@
</method>
<method name="get_node_or_null" qualifiers="const">
<return type="Node" />
- <argument index="0" name="path" type="NodePath" />
+ <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">
@@ -366,9 +366,9 @@
</method>
<method name="get_path_to" qualifiers="const">
<return type="NodePath" />
- <argument index="0" name="node" type="Node" />
+ <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">
@@ -403,21 +403,21 @@
</method>
<method name="has_node" qualifiers="const">
<return type="bool" />
- <argument index="0" name="path" type="NodePath" />
+ <param index="0" name="path" type="NodePath" />
<description>
Returns [code]true[/code] if the node that the [NodePath] points to exists.
</description>
</method>
<method name="has_node_and_resource" qualifiers="const">
<return type="bool" />
- <argument index="0" name="path" type="NodePath" />
+ <param index="0" name="path" type="NodePath" />
<description>
Returns [code]true[/code] if the [NodePath] points to a valid node and its subname points to a valid resource, e.g. [code]Area2D/CollisionShape2D:shape[/code]. Properties with a non-[Resource] type (e.g. nodes or primitive math types) are not considered resources.
</description>
</method>
<method name="is_ancestor_of" qualifiers="const">
<return type="bool" />
- <argument index="0" name="node" type="Node" />
+ <param index="0" name="node" type="Node" />
<description>
Returns [code]true[/code] if the given node is a direct or indirect child of the current node.
</description>
@@ -430,21 +430,21 @@
</method>
<method name="is_editable_instance" qualifiers="const">
<return type="bool" />
- <argument index="0" name="node" type="Node" />
+ <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">
<return type="bool" />
- <argument index="0" name="node" type="Node" />
+ <param index="0" name="node" type="Node" />
<description>
Returns [code]true[/code] if the given node occurs later in the scene hierarchy than the current node.
</description>
</method>
<method name="is_in_group" qualifiers="const">
<return type="bool" />
- <argument index="0" name="group" type="StringName" />
+ <param index="0" name="group" type="StringName" />
<description>
Returns [code]true[/code] if this node is in the specified group. See notes in the description, and the group methods in [SceneTree].
</description>
@@ -511,8 +511,8 @@
</method>
<method name="move_child">
<return type="void" />
- <argument index="0" name="child_node" type="Node" />
- <argument index="1" name="to_position" type="int" />
+ <param index="0" name="child_node" type="Node" />
+ <param index="1" name="to_position" 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.
[b]Note:[/b] Internal children can only be moved within their expected "internal range" (see [code]internal[/code] parameter in [method add_child]).
@@ -557,16 +557,16 @@
</method>
<method name="propagate_call">
<return type="void" />
- <argument index="0" name="method" type="StringName" />
- <argument index="1" name="args" type="Array" default="[]" />
- <argument index="2" name="parent_first" type="bool" default="false" />
+ <param index="0" name="method" type="StringName" />
+ <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">
<return type="void" />
- <argument index="0" name="what" type="int" />
+ <param index="0" name="what" type="int" />
<description>
Notifies the current node and all its children recursively by calling [method Object.notification] on all of them.
</description>
@@ -591,7 +591,7 @@
</method>
<method name="remove_child">
<return type="void" />
- <argument index="0" name="node" type="Node" />
+ <param index="0" name="node" type="Node" />
<description>
Removes a child node. The node is NOT deleted and must be deleted manually.
[b]Note:[/b] This function may set the [member owner] of the removed Node (or its descendants) to be [code]null[/code], if that [member owner] is no longer a parent or ancestor.
@@ -599,18 +599,18 @@
</method>
<method name="remove_from_group">
<return type="void" />
- <argument index="0" name="group" type="StringName" />
+ <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].
</description>
</method>
<method name="replace_by">
<return type="void" />
- <argument index="0" name="node" type="Node" />
- <argument index="1" name="keep_groups" type="bool" default="false" />
+ <param index="0" name="node" type="Node" />
+ <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>
@@ -622,65 +622,71 @@
</description>
</method>
<method name="rpc" qualifiers="vararg">
- <return type="void" />
- <argument index="0" name="method" type="StringName" />
+ <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 an empty [Variant].
+ 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. 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].
[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>
<method name="rpc_config">
- <return type="int" />
- <argument index="0" name="method" type="StringName" />
- <argument index="1" name="rpc_mode" type="int" enum="RPCMode" />
- <argument index="2" name="call_local" type="bool" default="false" />
- <argument index="3" name="transfer_mode" type="int" enum="TransferMode" default="2" />
- <argument index="4" name="channel" type="int" default="0" />
+ <return type="void" />
+ <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] to the given [code]rpc_mode[/code], optionally specifying the [code]transfer_mode[/code] and [code]channel[/code] (on supported peers). See [enum RPCMode] and [enum TransferMode]. An alternative is annotating methods and properties with the corresponding annotation ([code]@rpc(any)[/code], [code]@rpc(auth)[/code]). By default, methods are not exposed to networking (and RPCs).
+ 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,
+ transfer_mode = MultiplayerPeer.TranferMode,
+ call_local = false,
+ channel = 0,
+ }
+ [/codeblock]
+ See [enum MultiplayerAPI.RPCMode] and [enum MultiplayerPeer.TransferMode]. An alternative is annotating methods and properties with the corresponding annotation ([code]@rpc(any)[/code], [code]@rpc(authority)[/code]). By default, methods are not exposed to networking (and RPCs).
</description>
</method>
<method name="rpc_id" qualifiers="vararg">
- <return type="void" />
- <argument index="0" name="peer_id" type="int" />
- <argument index="1" name="method" type="StringName" />
+ <return type="int" enum="Error" />
+ <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 an empty [Variant].
+ 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">
<return type="void" />
- <argument index="0" name="fold" type="bool" />
+ <param index="0" name="fold" type="bool" />
<description>
Sets the folded state of the node in the Scene dock. This method is only intended for use with editor tooling.
</description>
</method>
<method name="set_editable_instance">
<return type="void" />
- <argument index="0" name="node" type="Node" />
- <argument index="1" name="is_editable" type="bool" />
+ <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">
<return type="void" />
- <argument index="0" name="id" type="int" />
- <argument index="1" name="recursive" type="bool" default="true" />
+ <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">
<return type="void" />
- <argument index="0" name="enable" type="bool" />
+ <param index="0" name="enable" type="bool" />
<description>
Enables or disables physics (i.e. fixed framerate) processing. When a node is being processed, it will receive a [constant NOTIFICATION_PHYSICS_PROCESS] at a fixed (usually 60 FPS, see [member Engine.physics_ticks_per_second] to change) interval (and the [method _physics_process] callback will be called if exists). Enabled automatically if [method _physics_process] is overridden. Any calls to this before [method _ready] will be ignored.
</description>
</method>
<method name="set_physics_process_internal">
<return type="void" />
- <argument index="0" name="enable" type="bool" />
+ <param index="0" name="enable" type="bool" />
<description>
Enables or disables internal physics for this node. Internal physics processing happens in isolation from the normal [method _physics_process] calls and is used by some nodes internally to guarantee proper functioning even if the node is paused or physics processing is disabled for scripting ([method set_physics_process]). Only useful for advanced uses to manipulate built-in nodes' behavior.
[b]Warning:[/b] Built-in Nodes rely on the internal processing for their own logic, so changing this value from your code may lead to unexpected behavior. Script access to this internal logic is provided for specific advanced uses, but is unsafe and not supported.
@@ -688,21 +694,21 @@
</method>
<method name="set_process">
<return type="void" />
- <argument index="0" name="enable" type="bool" />
+ <param index="0" name="enable" type="bool" />
<description>
Enables or disables processing. When a node is being processed, it will receive a [constant NOTIFICATION_PROCESS] on every drawn frame (and the [method _process] callback will be called if exists). Enabled automatically if [method _process] is overridden. Any calls to this before [method _ready] will be ignored.
</description>
</method>
<method name="set_process_input">
<return type="void" />
- <argument index="0" name="enable" type="bool" />
+ <param index="0" name="enable" type="bool" />
<description>
Enables or disables input processing. This is not required for GUI controls! Enabled automatically if [method _input] is overridden. Any calls to this before [method _ready] will be ignored.
</description>
</method>
<method name="set_process_internal">
<return type="void" />
- <argument index="0" name="enable" type="bool" />
+ <param index="0" name="enable" type="bool" />
<description>
Enables or disabled internal processing for this node. Internal processing happens in isolation from the normal [method _process] calls and is used by some nodes internally to guarantee proper functioning even if the node is paused or processing is disabled for scripting ([method set_process]). Only useful for advanced uses to manipulate built-in nodes' behavior.
[b]Warning:[/b] Built-in Nodes rely on the internal processing for their own logic, so changing this value from your code may lead to unexpected behavior. Script access to this internal logic is provided for specific advanced uses, but is unsafe and not supported.
@@ -710,28 +716,28 @@
</method>
<method name="set_process_shortcut_input">
<return type="void" />
- <argument index="0" name="enable" type="bool" />
+ <param index="0" name="enable" type="bool" />
<description>
Enables shortcut processing. Enabled automatically if [method _shortcut_input] is overridden. Any calls to this before [method _ready] will be ignored.
</description>
</method>
<method name="set_process_unhandled_input">
<return type="void" />
- <argument index="0" name="enable" type="bool" />
+ <param index="0" name="enable" type="bool" />
<description>
Enables unhandled input processing. This is not required for GUI controls! It enables the node to receive all input that was not previously handled (usually by a [Control]). Enabled automatically if [method _unhandled_input] is overridden. Any calls to this before [method _ready] will be ignored.
</description>
</method>
<method name="set_process_unhandled_key_input">
<return type="void" />
- <argument index="0" name="enable" type="bool" />
+ <param index="0" name="enable" type="bool" />
<description>
Enables unhandled key input processing. Enabled automatically if [method _unhandled_key_input] is overridden. Any calls to this before [method _ready] will be ignored.
</description>
</method>
<method name="set_scene_instance_load_placeholder">
<return type="void" />
- <argument index="0" name="load_placeholder" type="bool" />
+ <param index="0" name="load_placeholder" type="bool" />
<description>
Sets whether this is an instance load placeholder. See [InstancePlaceholder].
</description>
@@ -775,15 +781,17 @@
</members>
<signals>
<signal name="child_entered_tree">
- <argument index="0" name="node" type="Node" />
+ <param index="0" name="node" type="Node" />
<description>
Emitted when a child node enters the scene tree, either because it entered on its own or because this node entered with it.
+ This signal is emitted [i]after[/i] the child node's own [constant NOTIFICATION_ENTER_TREE] and [signal tree_entered].
</description>
</signal>
- <signal name="child_exited_tree">
- <argument index="0" name="node" type="Node" />
+ <signal name="child_exiting_tree">
+ <param index="0" name="node" type="Node" />
<description>
- Emitted when a child node exits the scene tree, either because it exited on its own or because this node exited.
+ 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 [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">
@@ -799,6 +807,7 @@
<signal name="tree_entered">
<description>
Emitted when the node enters the tree.
+ This signal is emitted [i]after[/i] the related [constant NOTIFICATION_ENTER_TREE] notification.
</description>
</signal>
<signal name="tree_exited">
@@ -809,15 +818,18 @@
<signal name="tree_exiting">
<description>
Emitted when the node is still active but about to exit the tree. This is the right place for de-initialization (or a "destructor", if you will).
+ This signal is emitted [i]before[/i] the related [constant NOTIFICATION_EXIT_TREE] notification.
</description>
</signal>
</signals>
<constants>
<constant name="NOTIFICATION_ENTER_TREE" value="10">
Notification received when the node enters a [SceneTree].
+ This notification is emitted [i]before[/i] the related [signal tree_entered].
</constant>
<constant name="NOTIFICATION_EXIT_TREE" value="11">
Notification received when the node is about to exit a [SceneTree].
+ This notification is emitted [i]after[/i] the related [signal tree_exiting].
</constant>
<constant name="NOTIFICATION_MOVED_IN_PARENT" value="12">
Notification received when the node is moved in the parent.
diff --git a/doc/classes/Node2D.xml b/doc/classes/Node2D.xml
index bb73019668..a587811260 100644
--- a/doc/classes/Node2D.xml
+++ b/doc/classes/Node2D.xml
@@ -13,82 +13,82 @@
<methods>
<method name="apply_scale">
<return type="void" />
- <argument index="0" name="ratio" type="Vector2" />
+ <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" />
- <argument index="0" name="point" type="Vector2" />
+ <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>
<method name="get_relative_transform_to_parent" qualifiers="const">
<return type="Transform2D" />
- <argument index="0" name="parent" type="Node" />
+ <param index="0" name="parent" type="Node" />
<description>
Returns the [Transform2D] relative to this node's parent.
</description>
</method>
<method name="global_translate">
<return type="void" />
- <argument index="0" name="offset" type="Vector2" />
+ <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" />
- <argument index="0" name="point" type="Vector2" />
+ <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">
<return type="void" />
- <argument index="0" name="delta" type="float" />
- <argument index="1" name="scaled" type="bool" default="false" />
+ <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">
<return type="void" />
- <argument index="0" name="delta" type="float" />
- <argument index="1" name="scaled" type="bool" default="false" />
+ <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">
<return type="void" />
- <argument index="0" name="radians" type="float" />
+ <param index="0" name="radians" type="float" />
<description>
Applies a rotation to the node, in radians, starting from its current rotation.
</description>
</method>
<method name="to_global" qualifiers="const">
<return type="Vector2" />
- <argument index="0" name="local_point" type="Vector2" />
+ <param index="0" name="local_point" type="Vector2" />
<description>
Transforms the provided local position into a position in global coordinate space. The input is expected to be local relative to the [Node2D] it is called on. e.g. Applying this method to the positions of child nodes will correctly transform their positions into the global coordinate space, but applying it to a node's own position will give an incorrect result, as it will incorporate the node's own transformation into its global position.
</description>
</method>
<method name="to_local" qualifiers="const">
<return type="Vector2" />
- <argument index="0" name="global_point" type="Vector2" />
+ <param index="0" name="global_point" type="Vector2" />
<description>
Transforms the provided global position into a position in local coordinate space. The output will be local relative to the [Node2D] it is called on. e.g. It is appropriate for determining the positions of child nodes, but it is not appropriate for determining its own position relative to its parent.
</description>
</method>
<method name="translate">
<return type="void" />
- <argument index="0" name="offset" type="Vector2" />
+ <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>
@@ -102,6 +102,9 @@
<member name="global_scale" type="Vector2" setter="set_global_scale" getter="get_global_scale">
Global scale.
</member>
+ <member name="global_skew" type="float" setter="set_global_skew" getter="get_global_skew">
+ Global skew in radians.
+ </member>
<member name="global_transform" type="Transform2D" setter="set_global_transform" getter="get_global_transform">
Global [Transform2D].
</member>
@@ -113,6 +116,7 @@
</member>
<member name="scale" type="Vector2" setter="set_scale" getter="get_scale" default="Vector2(1, 1)">
The node's scale. Unscaled value: [code](1, 1)[/code].
+ [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">
</member>
diff --git a/doc/classes/Node3D.xml b/doc/classes/Node3D.xml
index 4444416a06..53b93beb40 100644
--- a/doc/classes/Node3D.xml
+++ b/doc/classes/Node3D.xml
@@ -15,7 +15,7 @@
<methods>
<method name="add_gizmo">
<return type="void" />
- <argument index="0" name="gizmo" type="Node3DGizmo" />
+ <param index="0" name="gizmo" type="Node3DGizmo" />
<description>
Attach a gizmo to this [code]Node3D[/code].
</description>
@@ -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>
@@ -58,22 +58,22 @@
</method>
<method name="global_rotate">
<return type="void" />
- <argument index="0" name="axis" type="Vector3" />
- <argument index="1" name="angle" type="float" />
+ <param index="0" name="axis" type="Vector3" />
+ <param index="1" name="angle" type="float" />
<description>
Rotates the global (world) transformation around axis, a unit [Vector3], by specified angle in radians. The rotation axis is in global coordinate system.
</description>
</method>
<method name="global_scale">
<return type="void" />
- <argument index="0" name="scale" type="Vector3" />
+ <param index="0" name="scale" type="Vector3" />
<description>
Scales the global (world) transformation by the given [Vector3] scale factors.
</description>
</method>
<method name="global_translate">
<return type="void" />
- <argument index="0" name="offset" type="Vector3" />
+ <param index="0" name="offset" type="Vector3" />
<description>
Moves the global (world) transformation by [Vector3] offset. The offset is in global coordinate system.
</description>
@@ -110,22 +110,22 @@
</method>
<method name="look_at">
<return type="void" />
- <argument index="0" name="target" type="Vector3" />
- <argument index="1" name="up" type="Vector3" default="Vector3(0, 1, 0)" />
+ <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.
+ 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.
</description>
</method>
<method name="look_at_from_position">
<return type="void" />
- <argument index="0" name="position" type="Vector3" />
- <argument index="1" name="target" type="Vector3" />
- <argument index="2" name="up" type="Vector3" default="Vector3(0, 1, 0)" />
+ <param index="0" name="position" type="Vector3" />
+ <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,67 +134,53 @@
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" />
- <argument 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" />
- <argument 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" />
- <argument index="0" name="axis" type="Vector3" />
- <argument index="1" name="angle" type="float" />
+ <param index="0" name="axis" type="Vector3" />
+ <param index="1" name="angle" type="float" />
<description>
Rotates the local transformation around axis, a unit [Vector3], by specified angle in radians.
</description>
</method>
<method name="rotate_object_local">
<return type="void" />
- <argument index="0" name="axis" type="Vector3" />
- <argument index="1" name="angle" type="float" />
+ <param index="0" name="axis" type="Vector3" />
+ <param index="1" name="angle" type="float" />
<description>
Rotates the local transformation around axis, a unit [Vector3], by specified angle in radians. The rotation axis is in object-local coordinate system.
</description>
</method>
<method name="rotate_x">
<return type="void" />
- <argument index="0" name="angle" type="float" />
+ <param index="0" name="angle" type="float" />
<description>
Rotates the local transformation around the X axis by angle in radians.
</description>
</method>
<method name="rotate_y">
<return type="void" />
- <argument index="0" name="angle" type="float" />
+ <param index="0" name="angle" type="float" />
<description>
Rotates the local transformation around the Y axis by angle in radians.
</description>
</method>
<method name="rotate_z">
<return type="void" />
- <argument index="0" name="angle" type="float" />
+ <param index="0" name="angle" type="float" />
<description>
Rotates the local transformation around the Z axis by angle in radians.
</description>
</method>
<method name="scale_object_local">
<return type="void" />
- <argument index="0" name="scale" type="Vector3" />
+ <param index="0" name="scale" type="Vector3" />
<description>
Scales the local transformation by given 3D scale factors in object-local coordinate system.
</description>
</method>
<method name="set_disable_scale">
<return type="void" />
- <argument index="0" name="disable" type="bool" />
+ <param index="0" name="disable" type="bool" />
<description>
Sets whether the node uses a scale of [code](1, 1, 1)[/code] or its local transformation scale. Changes to the local transformation scale are preserved.
</description>
@@ -207,30 +193,30 @@
</method>
<method name="set_ignore_transform_notification">
<return type="void" />
- <argument index="0" name="enabled" type="bool" />
+ <param index="0" name="enabled" type="bool" />
<description>
Sets whether the node ignores notification that its transformation (global or local) changed.
</description>
</method>
<method name="set_notify_local_transform">
<return type="void" />
- <argument index="0" name="enable" type="bool" />
+ <param index="0" name="enable" type="bool" />
<description>
Sets whether the node notifies about its local transformation changes. [Node3D] will not propagate this by default.
</description>
</method>
<method name="set_notify_transform">
<return type="void" />
- <argument index="0" name="enable" type="bool" />
+ <param index="0" name="enable" type="bool" />
<description>
Sets whether the node notifies about its global and local transformation changes. [Node3D] will not propagate this by default, unless it is in the editor context and it has a valid gizmo.
</description>
</method>
<method name="set_subgizmo_selection">
<return type="void" />
- <argument index="0" name="gizmo" type="Node3DGizmo" />
- <argument index="1" name="id" type="int" />
- <argument index="2" name="transform" type="Transform3D" />
+ <param index="0" name="gizmo" type="Node3DGizmo" />
+ <param index="1" name="id" type="int" />
+ <param index="2" name="transform" type="Transform3D" />
<description>
Set subgizmo selection for this node in the editor.
</description>
@@ -243,29 +229,29 @@
</method>
<method name="to_global" qualifiers="const">
<return type="Vector3" />
- <argument index="0" name="local_point" 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" />
- <argument index="0" name="global_point" 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">
<return type="void" />
- <argument index="0" name="offset" type="Vector3" />
+ <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">
<return type="void" />
- <argument index="0" name="offset" type="Vector3" />
+ <param index="0" name="offset" type="Vector3" />
<description>
Changes the node's position by the given offset [Vector3] in local space.
</description>
@@ -281,6 +267,13 @@
<member name="basis" type="Basis" setter="set_basis" getter="get_basis">
Direct access to the 3x3 basis of the [Transform3D] property.
</member>
+ <member name="global_position" type="Vector3" setter="set_global_position" getter="get_global_position">
+ Global position of this node. This is equivalent to [code]global_transform.origin[/code].
+ </member>
+ <member name="global_rotation" type="Vector3" setter="set_global_rotation" getter="get_global_rotation">
+ Rotation part of the global transformation in radians, specified in terms of YXZ-Euler angles in the format (X angle, Y angle, Z angle).
+ [b]Note:[/b] In the mathematical sense, rotation is a matrix and not a vector. The three Euler angles, which are the three independent parameters of the Euler-angle parametrization of the rotation matrix, are stored in a [Vector3] data structure not because the rotation is a vector, but only because [Vector3] exists as a convenient data-structure to store 3 floating-point numbers. Therefore, applying affine operations on the rotation "vector" is not meaningful.
+ </member>
<member name="global_transform" type="Transform3D" setter="set_global_transform" getter="get_global_transform">
World3D space (global) [Transform3D] of this node.
</member>
@@ -302,6 +295,7 @@
</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.
</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.
diff --git a/doc/classes/NodePath.xml b/doc/classes/NodePath.xml
index 3319e5d822..9db100c9f8 100644
--- a/doc/classes/NodePath.xml
+++ b/doc/classes/NodePath.xml
@@ -35,14 +35,14 @@
</constructor>
<constructor name="NodePath">
<return type="NodePath" />
- <argument index="0" name="from" type="NodePath" />
+ <param index="0" name="from" type="NodePath" />
<description>
Constructs a [NodePath] as a copy of the given [NodePath]. [code]NodePath("example")[/code] is equivalent to [code]^"example"[/code].
</description>
</constructor>
<constructor name="NodePath">
<return type="NodePath" />
- <argument index="0" name="from" type="String" />
+ <param index="0" name="from" type="String" />
<description>
Creates a NodePath from a string, e.g. [code]"Path2D/PathFollow2D/Sprite2D:texture:size"[/code]. A path is absolute if it starts with a slash. Absolute paths are only valid in the global scene tree, not within individual scenes. In a relative path, [code]"."[/code] and [code]".."[/code] indicate the current node and its parent.
The "subnames" optionally included after the path to the target node can point to resources or properties, and can also be nested.
@@ -87,6 +87,12 @@
[/codeblocks]
</description>
</method>
+ <method name="get_concatenated_names" qualifiers="const">
+ <return type="StringName" />
+ <description>
+ Returns all paths concatenated with a slash character ([code]/[/code]) as separator without subnames.
+ </description>
+ </method>
<method name="get_concatenated_subnames" qualifiers="const">
<return type="StringName" />
<description>
@@ -105,9 +111,9 @@
</method>
<method name="get_name" qualifiers="const">
<return type="StringName" />
- <argument index="0" name="idx" type="int" />
+ <param index="0" name="idx" type="int" />
<description>
- Gets the node name indicated by [code]idx[/code] (0 to [method get_name_count]).
+ Gets the node name indicated by [param idx] (0 to [method get_name_count] - 1).
[codeblocks]
[gdscript]
var node_path = NodePath("Path2D/PathFollow2D/Sprite2D")
@@ -133,9 +139,9 @@
</method>
<method name="get_subname" qualifiers="const">
<return type="StringName" />
- <argument index="0" name="idx" type="int" />
+ <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")
@@ -157,6 +163,12 @@
For example, [code]"Path2D/PathFollow2D/Sprite2D:texture:load_path"[/code] has 2 subnames.
</description>
</method>
+ <method name="hash" qualifiers="const">
+ <return type="int" />
+ <description>
+ Returns the 32-bit hash value representing the [NodePath]'s contents.
+ </description>
+ </method>
<method name="is_absolute" qualifiers="const">
<return type="bool" />
<description>
@@ -173,13 +185,13 @@
<operators>
<operator name="operator !=">
<return type="bool" />
- <argument index="0" name="right" type="NodePath" />
+ <param index="0" name="right" type="NodePath" />
<description>
</description>
</operator>
<operator name="operator ==">
<return type="bool" />
- <argument index="0" name="right" type="NodePath" />
+ <param index="0" name="right" type="NodePath" />
<description>
</description>
</operator>
diff --git a/doc/classes/ORMMaterial3D.xml b/doc/classes/ORMMaterial3D.xml
index 69d238ceff..656594a3c3 100644
--- a/doc/classes/ORMMaterial3D.xml
+++ b/doc/classes/ORMMaterial3D.xml
@@ -1,9 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="ORMMaterial3D" inherits="BaseMaterial3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
+ Physically based rendering (PBR) material that can be applied to 3D objects, can use an ORM texture.
</brief_description>
<description>
+ ORMMaterial3D's properties are inherited from [BaseMaterial3D]. Unlike [StandardMaterial3D], ORMMaterial3D uses a single texture for ambient occlusion, roughness and metallic maps, known as an ORM texture.
</description>
<tutorials>
+ <link title="Standard Material 3D and ORM Material 3D">$DOCS_URL/tutorials/3d/standard_material_3d.html</link>
</tutorials>
</class>
diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml
index f45bee4db4..e180c73733 100644
--- a/doc/classes/OS.xml
+++ b/doc/classes/OS.xml
@@ -12,8 +12,8 @@
<methods>
<method name="alert">
<return type="void" />
- <argument index="0" name="text" type="String" />
- <argument index="1" name="title" type="String" default="&quot;Alert!&quot;" />
+ <param index="0" name="text" type="String" />
+ <param index="1" name="title" type="String" default="&quot;Alert!&quot;" />
<description>
Displays a modal dialog box using the host OS' facilities. Execution is blocked until the dialog is closed.
</description>
@@ -33,28 +33,28 @@
</method>
<method name="crash">
<return type="void" />
- <argument index="0" name="message" type="String" />
+ <param index="0" name="message" type="String" />
<description>
Crashes the engine (or the editor if called within a [code]@tool[/code] script). This should [i]only[/i] be used for testing the system's crash handler, not for any other purpose. For general error reporting, use (in order of preference) [method @GDScript.assert], [method @GlobalScope.push_error] or [method alert]. See also [method kill].
</description>
</method>
<method name="create_instance">
<return type="int" />
- <argument index="0" name="arguments" type="PackedStringArray" />
+ <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>
</method>
<method name="create_process">
<return type="int" />
- <argument index="0" name="path" type="String" />
- <argument index="1" name="arguments" type="PackedStringArray" />
- <argument index="2" name="open_console" type="bool" default="false" />
+ <param index="0" name="path" type="String" />
+ <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]
@@ -72,33 +72,25 @@
</method>
<method name="delay_msec" qualifiers="const">
<return type="void" />
- <argument index="0" name="msec" type="int" />
+ <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>
</method>
<method name="delay_usec" qualifiers="const">
<return type="void" />
- <argument index="0" name="usec" type="int" />
+ <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" />
- <argument 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" />
- <argument index="0" name="file" type="String" />
+ <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".
@@ -107,14 +99,14 @@
</method>
<method name="execute">
<return type="int" />
- <argument index="0" name="path" type="String" />
- <argument index="1" name="arguments" type="PackedStringArray" />
- <argument index="2" name="output" type="Array" default="[]" />
- <argument index="3" name="read_stderr" type="bool" default="false" />
- <argument 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.
+ <param index="0" name="path" type="String" />
+ <param index="1" name="arguments" type="PackedStringArray" />
+ <param index="2" name="output" type="Array" default="[]" />
+ <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 [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,15 +132,15 @@
[/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>
<method name="find_keycode_from_string" qualifiers="const">
<return type="int" enum="Key" />
- <argument index="0" name="string" type="String" />
+ <param index="0" name="string" type="String" />
<description>
Returns the keycode of the given string (e.g. "Escape").
</description>
@@ -175,6 +167,10 @@
if argument.find("=") &gt; -1:
var key_value = argument.split("=")
arguments[key_value[0].lstrip("--")] = key_value[1]
+ else:
+ # Options without an argument will be present in the dictionary,
+ # with the value set to an empty string.
+ arguments[argument.lstrip("--")] = ""
[/gdscript]
[csharp]
var arguments = new Godot.Collections.Dictionary();
@@ -185,9 +181,26 @@
string[] keyValue = argument.Split("=");
arguments[keyValue[0].LStrip("--")] = keyValue[1];
}
+ else
+ {
+ // Options without an argument will be present in the dictionary,
+ // with the value set to an empty string.
+ arguments[keyValue[0].LStrip("--")] = "";
+ }
}
[/csharp]
[/codeblocks]
+ [b]Note:[/b] Passing custom user arguments directly is not recommended, as the engine may discard or modify them. Instead, the best way is to use the standard UNIX double dash ([code]--[/code]) and then pass custom arguments, which the engine itself will ignore. These can be read via [method get_cmdline_user_args].
+ </description>
+ </method>
+ <method name="get_cmdline_user_args">
+ <return type="PackedStringArray" />
+ <description>
+ Similar to [method get_cmdline_args], but this returns the user arguments (any argument passed after the double dash [code]--[/code] argument). These are left untouched by Godot for the user.
+ For example, in the command line below, [code]--fullscreen[/code] will not be returned in [method get_cmdline_user_args] and [code]--level 1[/code] will only be returned in [method get_cmdline_user_args]:
+ [codeblock]
+ godot --fullscreen -- --level 1
+ [/codeblock]
</description>
</method>
<method name="get_config_dir" qualifiers="const">
@@ -214,10 +227,10 @@
</method>
<method name="get_environment" qualifiers="const">
<return type="String" />
- <argument index="0" name="variable" 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">
@@ -236,7 +249,7 @@
</method>
<method name="get_keycode_string" qualifiers="const">
<return type="String" />
- <argument index="0" name="code" type="int" enum="Key" />
+ <param index="0" name="code" type="int" enum="Key" />
<description>
Returns the given keycode as a string (e.g. Return values: [code]"Escape"[/code], [code]"Shift+Escape"[/code]).
See also [member InputEventKey.keycode] and [method InputEventKey.get_keycode_with_modifiers].
@@ -353,6 +366,12 @@
[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.
</description>
</method>
+ <method name="get_restart_on_exit_arguments" qualifiers="const">
+ <return type="PackedStringArray" />
+ <description>
+ Returns the list of command line arguments that will be used when the project automatically restarts using [method set_restart_on_exit]. See also [method is_restart_on_exit_set].
+ </description>
+ </method>
<method name="get_static_memory_peak_usage" qualifiers="const">
<return type="int" />
<description>
@@ -367,14 +386,31 @@
</method>
<method name="get_system_dir" qualifiers="const">
<return type="String" />
- <argument index="0" name="dir" type="int" enum="OS.SystemDir" />
- <argument index="1" name="shared_storage" type="bool" default="true" />
+ <param index="0" name="dir" type="int" enum="OS.SystemDir" />
+ <param index="1" name="shared_storage" type="bool" default="true" />
<description>
Returns the actual path to commonly used folders across different platforms. Available locations are specified in [enum SystemDir].
[b]Note:[/b] This method is implemented on Android, Linux, macOS and Windows.
[b]Note:[/b] Shared storage is implemented on Android and allows to differentiate between app specific and shared directories. Shared directories have additional restrictions on Android.
</description>
</method>
+ <method name="get_system_font_path" qualifiers="const">
+ <return type="String" />
+ <param index="0" name="font_name" type="String" />
+ <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 [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>
+ <method name="get_system_fonts" qualifiers="const">
+ <return type="PackedStringArray" />
+ <description>
+ Returns list of font family names available.
+ [b]Note:[/b] This method is implemented on iOS, Linux, macOS and Windows.
+ </description>
+ </method>
<method name="get_thread_caller_id" qualifiers="const">
<return type="int" />
<description>
@@ -405,15 +441,15 @@
</method>
<method name="has_environment" qualifiers="const">
<return type="bool" />
- <argument index="0" name="variable" type="String" />
+ <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" />
- <argument index="0" name="tag_name" type="String" />
+ <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.
[b]Note:[/b] Tag names are case-sensitive.
@@ -429,11 +465,26 @@
</method>
<method name="is_keycode_unicode" qualifiers="const">
<return type="bool" />
- <argument index="0" name="code" type="int" />
+ <param index="0" name="code" type="int" />
<description>
Returns [code]true[/code] if the input keycode corresponds to a Unicode character.
</description>
</method>
+ <method name="is_process_running" qualifiers="const">
+ <return type="bool" />
+ <param index="0" name="pid" type="int" />
+ <description>
+ 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>
+ </method>
+ <method name="is_restart_on_exit_set" qualifiers="const">
+ <return type="bool" />
+ <description>
+ Returns [code]true[/code] if the project will automatically restart when it exits for any reason, [code]false[/code] otherwise. See also [method set_restart_on_exit] and [method get_restart_on_exit_arguments].
+ </description>
+ </method>
<method name="is_stdout_verbose" qualifiers="const">
<return type="bool" />
<description>
@@ -448,19 +499,24 @@
</method>
<method name="kill">
<return type="int" enum="Error" />
- <argument index="0" name="pid" type="int" />
+ <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>
</method>
<method name="move_to_trash" qualifiers="const">
<return type="int" enum="Error" />
- <argument index="0" name="path" type="String" />
+ <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.
[b]Note:[/b] If the user has disabled the recycle bin on their system, the file will be permanently deleted instead.
+ [codeblock]
+ var file_to_remove = "user://slot1.sav"
+ OS.move_to_trash(ProjectSettings.globalize_path(file_to_remove))
+ [/codeblock]
</description>
</method>
<method name="open_midi_inputs">
@@ -472,9 +528,9 @@
</method>
<method name="print_all_resources">
<return type="void" />
- <argument index="0" name="tofile" type="String" default="&quot;&quot;" />
+ <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].
+ Shows all resources in the game. Optionally, the list can be written to a file by specifying a file path in [param tofile].
</description>
</method>
<method name="print_all_textures_by_size">
@@ -485,21 +541,21 @@
</method>
<method name="print_resources_by_type">
<return type="void" />
- <argument index="0" name="types" type="PackedStringArray" />
+ <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" />
- <argument index="0" name="short" type="bool" default="false" />
+ <param index="0" name="short" type="bool" default="false" />
<description>
Shows all resources currently used by the game.
</description>
</method>
<method name="request_permission">
<return type="bool" />
- <argument index="0" name="name" type="String" />
+ <param index="0" name="name" type="String" />
<description>
At the moment this function is only used by [code]AudioDriverOpenSL[/code] to request permission for [code]RECORD_AUDIO[/code] on Android.
</description>
@@ -513,35 +569,46 @@
</method>
<method name="set_environment" qualifiers="const">
<return type="bool" />
- <argument index="0" name="variable" type="String" />
- <argument index="1" name="value" type="String" />
+ <param index="0" name="variable" type="String" />
+ <param index="1" name="value" type="String" />
+ <description>
+ 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">
+ <return type="void" />
+ <param index="0" name="restart" type="bool" />
+ <param index="1" name="arguments" type="PackedStringArray" default="PackedStringArray()" />
<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.
+ 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.
</description>
</method>
<method name="set_thread_name">
<return type="int" enum="Error" />
- <argument index="0" name="name" type="String" />
+ <param index="0" name="name" type="String" />
<description>
Sets the name of the current thread.
</description>
</method>
<method name="set_use_file_access_save_and_swap">
<return type="void" />
- <argument index="0" name="enabled" type="bool" />
+ <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">
<return type="int" enum="Error" />
- <argument index="0" name="uri" type="String" />
+ <param index="0" name="uri" type="String" />
<description>
Requests the OS to open a resource with the most appropriate program. For example:
- [code]OS.shell_open("C:\\Users\name\Downloads")[/code] on Windows opens the file explorer at the user's Downloads folder.
- [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://blog.escapecreative.com/customizing-mailto-links/]Customizing [code]mailto:[/code] Links[/url] for a list of fields that can be added.
+ - [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.
</description>
diff --git a/doc/classes/Object.xml b/doc/classes/Object.xml
index f7a3be48cf..3c71a02a21 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.
@@ -36,14 +36,14 @@
<methods>
<method name="_get" qualifiers="virtual">
<return type="Variant" />
- <argument index="0" name="property" type="StringName" />
+ <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.
@@ -59,18 +59,34 @@
</method>
<method name="_notification" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="what" type="int" />
+ <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">
<return type="bool" />
- <argument index="0" name="property" type="StringName" />
- <argument index="1" name="value" type="Variant" />
+ <param index="0" name="property" type="StringName" />
+ <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">
@@ -82,17 +98,17 @@
</method>
<method name="add_user_signal">
<return type="void" />
- <argument index="0" name="signal" type="String" />
- <argument index="1" name="arguments" type="Array" default="[]" />
+ <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" />
- <argument index="0" name="method" type="StringName" />
+ <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. Example:
[codeblocks]
[gdscript]
var node = Node3D.new()
@@ -108,9 +124,9 @@
</method>
<method name="call_deferred" qualifiers="vararg">
<return type="Variant" />
- <argument index="0" name="method" type="StringName" />
+ <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. Example:
[codeblocks]
[gdscript]
var node = Node3D.new()
@@ -126,10 +142,10 @@
</method>
<method name="callv">
<return type="Variant" />
- <argument index="0" name="method" type="StringName" />
- <argument index="1" name="arg_array" type="Array" />
+ <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()
@@ -150,14 +166,12 @@
</method>
<method name="connect">
<return type="int" enum="Error" />
- <argument index="0" name="signal" type="StringName" />
- <argument index="1" name="callable" type="Callable" />
- <argument index="2" name="binds" type="Array" default="[]" />
- <argument index="3" name="flags" type="int" default="0" />
- <description>
- Connects a [code]signal[/code] to a [code]callable[/code]. Pass optional [code]binds[/code] to the call as an [Array] of parameters. These parameters will be passed to the [Callable]'s method after any parameter used in the call to [method emit_signal]. Use [code]flags[/code] to set deferred or one-shot connections. See [enum ConnectFlags] constants.
- [b]Note:[/b] This method is the legacy implementation for connecting signals. The recommended modern approach is to use [method Signal.connect] and to use [method Callable.bind] to add and validate parameter binds. Both syntaxes are shown below.
- A signal can only be connected once to a [Callable]. It will throw an error if already connected, unless the signal was connected with [constant CONNECT_REFERENCE_COUNTED]. To avoid this, first, use [method is_connected] to check for existing connections.
+ <param index="0" name="signal" type="StringName" />
+ <param index="1" name="callable" type="Callable" />
+ <param index="2" name="flags" type="int" default="0" />
+ <description>
+ 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]
Connecting signals is one of the most common operations in Godot and the API gives many options to do so, which are described further down. The code block below shows the recommended approach for both GDScript and C#.
@@ -245,7 +259,7 @@
}
[/csharp]
[/codeblocks]
- While all options have the same outcome ([code]button[/code]'s [signal BaseButton.button_down] signal will be connected to [code]_on_button_down[/code]), option 3 offers the best validation: it will throw a compile-time error if either the [code]button_down[/code] signal or the [code]_on_button_down[/code] callable are undefined. On the other hand, option 2 only relies on string names and will only be able to validate either names at runtime: it will throw a runtime error if [code]"button_down"[/code] doesn't correspond to a signal, or if [code]"_on_button_down"[/code] is not a registered method in the object [code]self[/code]. The main reason for using options 1, 2, or 4 would be if you actually need to use strings (e.g. to connect signals programmatically based on strings read from a configuration file). Otherwise, option 3 is the recommended (and fastest) method.
+ While all options have the same outcome ([code]button[/code]'s [signal BaseButton.button_down] signal will be connected to [code]_on_button_down[/code]), option 3 offers the best validation: it will print a compile-time error if either the [code]button_down[/code] signal or the [code]_on_button_down[/code] callable are undefined. On the other hand, option 2 only relies on string names and will only be able to validate either names at runtime: it will print a runtime error if [code]"button_down"[/code] doesn't correspond to a signal, or if [code]"_on_button_down"[/code] is not a registered method in the object [code]self[/code]. The main reason for using options 1, 2, or 4 would be if you actually need to use strings (e.g. to connect signals programmatically based on strings read from a configuration file). Otherwise, option 3 is the recommended (and fastest) method.
[b]Parameter bindings and passing:[/b]
For legacy or language-specific reasons, there are also several ways to bind parameters to signals. One can pass a [code]binds[/code] [Array] to [method Object.connect] or [method Signal.connect], or use the recommended [method Callable.bind] method to create a new callable from an existing one, with the given parameter binds.
One can also pass additional parameters when emitting the signal with [method emit_signal]. The examples below show the relationship between those two types of parameters.
@@ -293,18 +307,18 @@
</method>
<method name="disconnect">
<return type="void" />
- <argument index="0" name="signal" type="StringName" />
- <argument index="1" name="callable" type="Callable" />
+ <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].
- If you try to disconnect a connection that does not exist, the method will throw an error. Use [method is_connected] to ensure that the connection exists.
+ 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>
<method name="emit_signal" qualifiers="vararg">
<return type="int" enum="Error" />
- <argument index="0" name="signal" type="StringName" />
+ <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. Example:
[codeblocks]
[gdscript]
emit_signal("hit", "sword", 100)
@@ -325,9 +339,9 @@
</method>
<method name="get" qualifiers="const">
<return type="Variant" />
- <argument index="0" name="property" type="String" />
+ <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>
@@ -339,7 +353,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:
@@ -350,7 +364,7 @@
</method>
<method name="get_indexed" qualifiers="const">
<return type="Variant" />
- <argument index="0" name="property" type="NodePath" />
+ <param index="0" name="property" 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].
[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.
@@ -365,11 +379,12 @@
</method>
<method name="get_meta" qualifiers="const">
<return type="Variant" />
- <argument index="0" name="name" type="StringName" />
- <argument index="1" name="default" type="Variant" default="null" />
+ <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">
@@ -379,13 +394,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]).
@@ -398,44 +413,45 @@
</description>
</method>
<method name="get_signal_connection_list" qualifiers="const">
- <return type="Array" />
- <argument index="0" name="signal" type="String" />
+ <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>
</method>
<method name="has_meta" qualifiers="const">
<return type="bool" />
- <argument index="0" name="name" type="StringName" />
+ <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" />
- <argument index="0" name="method" type="StringName" />
+ <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" />
- <argument index="0" name="signal" type="StringName" />
+ <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" />
- <argument index="0" name="signal" type="StringName" />
+ <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,18 +462,18 @@
</method>
<method name="is_class" qualifiers="const">
<return type="bool" />
- <argument index="0" name="class" type="String" />
+ <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>
<method name="is_connected" qualifiers="const">
<return type="bool" />
- <argument index="0" name="signal" type="StringName" />
- <argument index="1" name="callable" type="Callable" />
+ <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">
@@ -468,11 +484,11 @@
</method>
<method name="notification">
<return type="void" />
- <argument index="0" name="what" type="int" />
- <argument index="1" name="reversed" type="bool" default="false" />
+ <param index="0" name="what" type="int" />
+ <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,31 +499,32 @@
</method>
<method name="remove_meta">
<return type="void" />
- <argument index="0" name="name" type="StringName" />
+ <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">
<return type="void" />
- <argument index="0" name="property" type="String" />
- <argument index="1" name="value" type="Variant" />
+ <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>
<method name="set_block_signals">
<return type="void" />
- <argument index="0" name="enable" type="bool" />
+ <param index="0" name="enable" type="bool" />
<description>
If set to [code]true[/code], signal emission is blocked.
</description>
</method>
<method name="set_deferred">
<return type="void" />
- <argument index="0" name="property" type="StringName" />
- <argument index="1" name="value" type="Variant" />
+ <param index="0" name="property" type="StringName" />
+ <param index="1" name="value" type="Variant" />
<description>
Assigns a new value to the given property, after the current frame's physics step. This is equivalent to calling [method set] via [method call_deferred], i.e. [code]call_deferred("set", property, value)[/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).
@@ -515,8 +532,8 @@
</method>
<method name="set_indexed">
<return type="void" />
- <argument index="0" name="property" type="NodePath" />
- <argument index="1" name="value" type="Variant" />
+ <param index="0" name="property" 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:
[codeblocks]
@@ -537,23 +554,24 @@
</method>
<method name="set_message_translation">
<return type="void" />
- <argument index="0" name="enable" type="bool" />
+ <param index="0" name="enable" type="bool" />
<description>
Defines whether the object can translate strings (with calls to [method tr]). Enabled by default.
</description>
</method>
<method name="set_meta">
<return type="void" />
- <argument index="0" name="name" type="StringName" />
- <argument index="1" name="value" type="Variant" />
+ <param index="0" name="name" type="StringName" />
+ <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">
<return type="void" />
- <argument index="0" name="script" type="Variant" />
+ <param index="0" name="script" type="Variant" />
<description>
Assigns a script to the object. Each object can have a single script assigned to it, which are used to extend its functionality.
If the object already had a script, the previous script instance will be freed and its variables and state will be lost. The new script's [method _init] method will be called.
@@ -568,24 +586,24 @@
</method>
<method name="tr" qualifiers="const">
<return type="String" />
- <argument index="0" name="message" type="StringName" />
- <argument index="1" name="context" type="StringName" default="&quot;&quot;" />
+ <param index="0" name="message" type="StringName" />
+ <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>
<method name="tr_n" qualifiers="const">
<return type="String" />
- <argument index="0" name="message" type="StringName" />
- <argument index="1" name="plural_message" type="StringName" />
- <argument index="2" name="n" type="int" />
- <argument index="3" name="context" type="StringName" default="&quot;&quot;" />
+ <param index="0" name="message" type="StringName" />
+ <param index="1" name="plural_message" type="StringName" />
+ <param index="2" name="n" type="int" />
+ <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>
diff --git a/doc/classes/OccluderInstance3D.xml b/doc/classes/OccluderInstance3D.xml
index abd99dd3aa..0bebc7ea43 100644
--- a/doc/classes/OccluderInstance3D.xml
+++ b/doc/classes/OccluderInstance3D.xml
@@ -15,23 +15,23 @@
<methods>
<method name="get_bake_mask_value" qualifiers="const">
<return type="bool" />
- <argument index="0" name="layer_number" type="int" />
+ <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">
<return type="void" />
- <argument index="0" name="layer_number" type="int" />
- <argument index="1" name="value" type="bool" />
+ <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>
<members>
<member name="bake_mask" type="int" setter="set_bake_mask" getter="get_bake_mask" default="4294967295">
- The visual layers to account for when baking for occluders. Only [MeshInstance3D]s whose [member VisualInstance3D.layers] match with this [member bake_mask] will be included in the generated occluder mesh. By default, all objects are taken into account for the occluder baking.
+ The visual layers to account for when baking for occluders. Only [MeshInstance3D]s whose [member VisualInstance3D.layers] match with this [member bake_mask] will be included in the generated occluder mesh. By default, all objects with [i]opaque[/i] materials are taken into account for the occluder baking.
To improve performance and avoid artifacts, it is recommended to exclude dynamic objects, small objects and fixtures from the baking process by moving them to a separate visual layer and excluding this layer in [member bake_mask].
</member>
<member name="bake_simplification_distance" type="float" setter="set_bake_simplification_distance" getter="get_bake_simplification_distance" default="0.1">
diff --git a/doc/classes/OmniLight3D.xml b/doc/classes/OmniLight3D.xml
index f83d31a9b5..ce63dbdbc1 100644
--- a/doc/classes/OmniLight3D.xml
+++ b/doc/classes/OmniLight3D.xml
@@ -19,6 +19,7 @@
<member name="omni_shadow_mode" type="int" setter="set_shadow_mode" getter="get_shadow_mode" enum="OmniLight3D.ShadowMode" default="1">
See [enum ShadowMode].
</member>
+ <member name="shadow_bias" type="float" setter="set_param" getter="get_param" overrides="Light3D" default="0.2" />
</members>
<constants>
<constant name="SHADOW_DUAL_PARABOLOID" value="0" enum="ShadowMode">
diff --git a/doc/classes/OptimizedTranslation.xml b/doc/classes/OptimizedTranslation.xml
index 68765f9862..54ebfd3146 100644
--- a/doc/classes/OptimizedTranslation.xml
+++ b/doc/classes/OptimizedTranslation.xml
@@ -11,7 +11,7 @@
<methods>
<method name="generate">
<return type="void" />
- <argument index="0" name="from" type="Translation" />
+ <param index="0" name="from" type="Translation" />
<description>
Generates and sets an optimized translation from the given [Translation] resource.
</description>
diff --git a/doc/classes/OptionButton.xml b/doc/classes/OptionButton.xml
index a7b1f0ea33..f10c096c1b 100644
--- a/doc/classes/OptionButton.xml
+++ b/doc/classes/OptionButton.xml
@@ -13,26 +13,26 @@
<methods>
<method name="add_icon_item">
<return type="void" />
- <argument index="0" name="texture" type="Texture2D" />
- <argument index="1" name="label" type="String" />
- <argument index="2" name="id" type="int" default="-1" />
+ <param index="0" name="texture" type="Texture2D" />
+ <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">
<return type="void" />
- <argument index="0" name="label" type="String" />
- <argument index="1" name="id" type="int" default="-1" />
+ <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" />
- <argument index="0" name="text" type="String" default="&quot;&quot;" />
+ <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">
@@ -43,44 +43,44 @@
</method>
<method name="get_item_icon" qualifiers="const">
<return type="Texture2D" />
- <argument index="0" name="idx" type="int" />
+ <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" />
- <argument index="0" name="idx" 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" />
- <argument index="0" name="id" 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">
<return type="Variant" />
- <argument index="0" name="idx" type="int" />
+ <param index="0" name="idx" type="int" />
<description>
Retrieves the metadata of an item. Metadata may be any type and can be used to store extra information about an item, such as an external string ID.
</description>
</method>
<method name="get_item_text" qualifiers="const">
<return type="String" />
- <argument index="0" name="idx" type="int" />
+ <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" />
- <argument index="0" name="idx" type="int" />
+ <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">
@@ -92,7 +92,7 @@
</method>
<method name="get_selectable_item" qualifiers="const">
<return type="int" />
- <argument index="0" name="from_last" type="bool" default="false" />
+ <param index="0" name="from_last" type="bool" default="false" />
<description>
</description>
</method>
@@ -115,27 +115,27 @@
</method>
<method name="is_item_disabled" qualifiers="const">
<return type="bool" />
- <argument index="0" name="idx" type="int" />
+ <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">
<return type="bool" />
- <argument index="0" name="idx" type="int" />
+ <param index="0" name="idx" type="int" />
<description>
</description>
</method>
<method name="remove_item">
<return type="void" />
- <argument index="0" name="idx" type="int" />
+ <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">
<return type="void" />
- <argument index="0" name="idx" type="int" />
+ <param index="0" name="idx" type="int" />
<description>
Selects an item by index and makes it the current item. This will work even if the item is disabled.
Passing [code]-1[/code] as the index deselects any currently selected item.
@@ -143,57 +143,61 @@
</method>
<method name="set_item_disabled">
<return type="void" />
- <argument index="0" name="idx" type="int" />
- <argument index="1" name="disabled" type="bool" />
+ <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>
<method name="set_item_icon">
<return type="void" />
- <argument index="0" name="idx" type="int" />
- <argument index="1" name="texture" type="Texture2D" />
+ <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">
<return type="void" />
- <argument index="0" name="idx" type="int" />
- <argument index="1" name="id" type="int" />
+ <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">
<return type="void" />
- <argument index="0" name="idx" type="int" />
- <argument index="1" name="metadata" type="Variant" />
+ <param index="0" name="idx" type="int" />
+ <param index="1" name="metadata" type="Variant" />
<description>
Sets the metadata of an item. Metadata may be of any type and can be used to store extra information about an item, such as an external string ID.
</description>
</method>
<method name="set_item_text">
<return type="void" />
- <argument index="0" name="idx" type="int" />
- <argument index="1" name="text" type="String" />
+ <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">
<return type="void" />
- <argument index="0" name="idx" type="int" />
- <argument index="1" name="tooltip" type="String" />
+ <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>
</methods>
<members>
<member name="action_mode" type="int" setter="set_action_mode" getter="get_action_mode" overrides="BaseButton" enum="BaseButton.ActionMode" default="0" />
<member name="alignment" type="int" setter="set_text_alignment" getter="get_text_alignment" overrides="Button" enum="HorizontalAlignment" default="0" />
+ <member name="fit_to_longest_item" type="bool" setter="set_fit_to_longest_item" getter="is_fit_to_longest_item" default="true">
+ If [code]true[/code], minimum size will be determined by the longest item's text, instead of the currently selected one's.
+ [b]Note:[/b] For performance reasons, the minimum size doesn't update immediately when adding, removing or modifying items.
+ </member>
<member name="item_count" type="int" setter="set_item_count" getter="get_item_count" default="0">
The number of items to select from.
</member>
@@ -204,13 +208,13 @@
</members>
<signals>
<signal name="item_focused">
- <argument index="0" name="index" type="int" />
+ <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.
</description>
</signal>
<signal name="item_selected">
- <argument index="0" name="index" type="int" />
+ <param index="0" name="index" type="int" />
<description>
Emitted when the current item has been changed by the user. The index of the item selected is passed as argument.
</description>
@@ -229,6 +233,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>
@@ -239,7 +246,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 3b84128123..cb00b45fed 100644
--- a/doc/classes/PCKPacker.xml
+++ b/doc/classes/PCKPacker.xml
@@ -26,28 +26,28 @@
<methods>
<method name="add_file">
<return type="int" enum="Error" />
- <argument index="0" name="pck_path" type="String" />
- <argument index="1" name="source_path" type="String" />
- <argument index="2" name="encrypt" type="bool" default="false" />
+ <param index="0" name="pck_path" type="String" />
+ <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" />
- <argument index="0" name="verbose" type="bool" default="false" />
+ <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">
<return type="int" enum="Error" />
- <argument index="0" name="pck_name" type="String" />
- <argument index="1" name="alignment" type="int" default="32" />
- <argument index="2" name="key" type="String" default="&quot;0000000000000000000000000000000000000000000000000000000000000000&quot;" />
- <argument index="3" name="encrypt_directory" type="bool" default="false" />
+ <param index="0" name="pck_name" type="String" />
+ <param index="1" name="alignment" type="int" default="32" />
+ <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 61dc1eef00..efb559522a 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>
@@ -17,14 +18,14 @@
</constructor>
<constructor name="PackedByteArray">
<return type="PackedByteArray" />
- <argument index="0" name="from" type="PackedByteArray" />
+ <param index="0" name="from" type="PackedByteArray" />
<description>
Constructs a [PackedByteArray] as a copy of the given [PackedByteArray].
</description>
</constructor>
<constructor name="PackedByteArray">
<return type="PackedByteArray" />
- <argument index="0" name="from" type="Array" />
+ <param index="0" name="from" type="Array" />
<description>
Constructs a new [PackedByteArray]. Optionally, you can pass in a generic [Array] that will be converted.
</description>
@@ -33,130 +34,156 @@
<methods>
<method name="append">
<return type="bool" />
- <argument index="0" name="value" type="int" />
+ <param index="0" name="value" type="int" />
<description>
Appends an element at the end of the array (alias of [method push_back]).
</description>
</method>
<method name="append_array">
<return type="void" />
- <argument index="0" name="array" type="PackedByteArray" />
+ <param index="0" name="array" type="PackedByteArray" />
<description>
Appends a [PackedByteArray] at the end of this array.
</description>
</method>
<method name="bsearch">
<return type="int" />
- <argument index="0" name="value" type="int" />
- <argument index="1" name="before" type="bool" default="true" />
+ <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>
+ <method name="clear">
+ <return type="void" />
+ <description>
+ Clears the array. This is equivalent to using [method resize] with a size of [code]0[/code].
+ </description>
+ </method>
<method name="compress" qualifiers="const">
<return type="PackedByteArray" />
- <argument index="0" name="compression_mode" type="int" default="0" />
+ <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.
</description>
</method>
+ <method name="count" qualifiers="const">
+ <return type="int" />
+ <param index="0" name="value" type="int" />
+ <description>
+ Returns the number of times an element is in the array.
+ </description>
+ </method>
<method name="decode_double" qualifiers="const">
<return type="float" />
- <argument index="0" name="byte_offset" type="int" />
+ <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" />
- <argument index="0" name="byte_offset" type="int" />
+ <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" />
- <argument index="0" name="byte_offset" type="int" />
+ <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" />
- <argument index="0" name="byte_offset" 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" />
- <argument index="0" name="byte_offset" 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" />
- <argument index="0" name="byte_offset" 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" />
- <argument index="0" name="byte_offset" 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" />
- <argument index="0" name="byte_offset" 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" />
- <argument index="0" name="byte_offset" 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" />
- <argument index="0" name="byte_offset" 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" />
- <argument index="0" name="byte_offset" 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">
<return type="Variant" />
- <argument index="0" name="byte_offset" type="int" />
- <argument index="1" name="allow_objects" type="bool" default="false" />
+ <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">
<return type="int" />
- <argument index="0" name="byte_offset" type="int" />
- <argument index="1" name="allow_objects" type="bool" default="false" />
+ <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">
<return type="PackedByteArray" />
- <argument index="0" name="buffer_size" type="int" />
- <argument index="1" name="compression_mode" type="int" default="0" />
+ <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 File.CompressionMode]'s constants.
</description>
</method>
<method name="decompress_dynamic" qualifiers="const">
<return type="PackedByteArray" />
- <argument index="0" name="max_output_size" type="int" />
- <argument index="1" name="compression_mode" type="int" default="0" />
+ <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]
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">
@@ -167,96 +194,116 @@
</method>
<method name="encode_double">
<return type="void" />
- <argument index="0" name="byte_offset" type="int" />
- <argument index="1" name="value" type="float" />
+ <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">
<return type="void" />
- <argument index="0" name="byte_offset" type="int" />
- <argument index="1" name="value" type="float" />
+ <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">
<return type="void" />
- <argument index="0" name="byte_offset" type="int" />
- <argument index="1" name="value" type="float" />
+ <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">
<return type="void" />
- <argument index="0" name="byte_offset" type="int" />
- <argument index="1" name="value" type="int" />
+ <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">
<return type="void" />
- <argument index="0" name="byte_offset" type="int" />
- <argument index="1" name="value" type="int" />
+ <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">
<return type="void" />
- <argument index="0" name="byte_offset" type="int" />
- <argument index="1" name="value" type="int" />
+ <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">
<return type="void" />
- <argument index="0" name="byte_offset" type="int" />
- <argument index="1" name="value" type="int" />
+ <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">
<return type="void" />
- <argument index="0" name="byte_offset" type="int" />
- <argument index="1" name="value" type="int" />
+ <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">
<return type="void" />
- <argument index="0" name="byte_offset" type="int" />
- <argument index="1" name="value" type="int" />
+ <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">
<return type="void" />
- <argument index="0" name="byte_offset" type="int" />
- <argument index="1" name="value" type="int" />
+ <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">
<return type="void" />
- <argument index="0" name="byte_offset" type="int" />
- <argument index="1" name="value" type="int" />
+ <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">
<return type="int" />
- <argument index="0" name="byte_offset" type="int" />
- <argument index="1" name="value" type="Variant" />
- <argument index="2" name="allow_objects" type="bool" default="false" />
+ <param index="0" name="byte_offset" type="int" />
+ <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">
<return type="void" />
- <argument index="0" name="value" type="int" />
+ <param index="0" name="value" type="int" />
<description>
Assigns the given value to all elements in the array. This can typically be used together with [method resize] to create an array with a given size and initialized elements.
</description>
</method>
+ <method name="find" qualifiers="const">
+ <return type="int" />
+ <param index="0" name="value" type="int" />
+ <param index="1" name="from" type="int" default="0" />
+ <description>
+ Searches the array for a value and returns its index or [code]-1[/code] if not found. Optionally, the initial search index can be passed.
+ </description>
+ </method>
<method name="get_string_from_ascii" qualifiers="const">
<return type="String" />
<description>
@@ -283,16 +330,17 @@
</method>
<method name="has" qualifiers="const">
<return type="bool" />
- <argument index="0" name="value" type="int" />
+ <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">
<return type="bool" />
- <argument index="0" name="byte_offset" type="int" />
- <argument index="1" name="allow_objects" type="bool" default="false" />
+ <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">
@@ -313,8 +361,8 @@
</method>
<method name="insert">
<return type="int" />
- <argument index="0" name="at_index" type="int" />
- <argument index="1" name="value" type="int" />
+ <param index="0" name="at_index" type="int" />
+ <param index="1" name="value" type="int" />
<description>
Inserts a new element at a given position in the array. The position must be valid, or at the end of the array ([code]idx == size()[/code]).
</description>
@@ -327,21 +375,21 @@
</method>
<method name="push_back">
<return type="bool" />
- <argument index="0" name="value" type="int" />
+ <param index="0" name="value" type="int" />
<description>
Appends an element at the end of the array.
</description>
</method>
<method name="remove_at">
<return type="void" />
- <argument index="0" name="index" type="int" />
+ <param index="0" name="index" type="int" />
<description>
Removes an element from the array by index.
</description>
</method>
<method name="resize">
<return type="int" />
- <argument index="0" name="new_size" type="int" />
+ <param index="0" name="new_size" type="int" />
<description>
Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size.
</description>
@@ -352,10 +400,18 @@
Reverses the order of the elements in the array.
</description>
</method>
+ <method name="rfind" qualifiers="const">
+ <return type="int" />
+ <param index="0" name="value" type="int" />
+ <param index="1" name="from" type="int" default="-1" />
+ <description>
+ 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">
<return type="void" />
- <argument index="0" name="index" type="int" />
- <argument index="1" name="value" type="int" />
+ <param index="0" name="index" type="int" />
+ <param index="1" name="value" type="int" />
<description>
Changes the byte at the given index.
</description>
@@ -368,12 +424,12 @@
</method>
<method name="slice" qualifiers="const">
<return type="PackedByteArray" />
- <argument index="0" name="begin" type="int" />
- <argument index="1" name="end" type="int" default="2147483647" />
+ <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">
@@ -386,7 +442,7 @@
<return type="PackedFloat32Array" />
<description>
Returns a copy of the data converted to a [PackedFloat32Array], where each block of 4 bytes has been converted to a 32-bit float (C++ [code]float[/code]).
- The size of the new array will be [code]byte_array.size() / 4[/code].
+ The size of the input array must be a multiple of 4 (size of 32-bit float). The size of the new array will be [code]byte_array.size() / 4[/code].
If the original data can't be converted to 32-bit floats, the resulting data is undefined.
</description>
</method>
@@ -394,7 +450,7 @@
<return type="PackedFloat64Array" />
<description>
Returns a copy of the data converted to a [PackedFloat64Array], where each block of 8 bytes has been converted to a 64-bit float (C++ [code]double[/code], Godot [float]).
- The size of the new array will be [code]byte_array.size() / 8[/code].
+ The size of the input array must be a multiple of 8 (size of 64-bit double). The size of the new array will be [code]byte_array.size() / 8[/code].
If the original data can't be converted to 64-bit floats, the resulting data is undefined.
</description>
</method>
@@ -402,15 +458,15 @@
<return type="PackedInt32Array" />
<description>
Returns a copy of the data converted to a [PackedInt32Array], where each block of 4 bytes has been converted to a signed 32-bit integer (C++ [code]int32_t[/code]).
- The size of the new array will be [code]byte_array.size() / 4[/code].
+ The size of the input array must be a multiple of 4 (size of 32-bit integer). The size of the new array will be [code]byte_array.size() / 4[/code].
If the original data can't be converted to signed 32-bit integers, the resulting data is undefined.
</description>
</method>
<method name="to_int64_array" qualifiers="const">
<return type="PackedInt64Array" />
<description>
- Returns a copy of the data converted to a [PackedInt64Array], where each block of 4 bytes has been converted to a signed 64-bit integer (C++ [code]int64_t[/code], Godot [int]).
- The size of the new array will be [code]byte_array.size() / 8[/code].
+ Returns a copy of the data converted to a [PackedInt64Array], where each block of 8 bytes has been converted to a signed 64-bit integer (C++ [code]int64_t[/code], Godot [int]).
+ The size of the input array must be a multiple of 8 (size of 64-bit integer). The size of the new array will be [code]byte_array.size() / 8[/code].
If the original data can't be converted to signed 64-bit integers, the resulting data is undefined.
</description>
</method>
@@ -418,26 +474,31 @@
<operators>
<operator name="operator !=">
<return type="bool" />
- <argument index="0" name="right" type="PackedByteArray" />
+ <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" />
- <argument index="0" name="right" 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" />
- <argument index="0" name="right" type="PackedByteArray" />
+ <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" />
- <argument index="0" name="index" 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 f880771c77..a2dc8e8f1d 100644
--- a/doc/classes/PackedColorArray.xml
+++ b/doc/classes/PackedColorArray.xml
@@ -17,14 +17,14 @@
</constructor>
<constructor name="PackedColorArray">
<return type="PackedColorArray" />
- <argument index="0" name="from" type="PackedColorArray" />
+ <param index="0" name="from" type="PackedColorArray" />
<description>
Constructs a [PackedColorArray] as a copy of the given [PackedColorArray].
</description>
</constructor>
<constructor name="PackedColorArray">
<return type="PackedColorArray" />
- <argument index="0" name="from" type="Array" />
+ <param index="0" name="from" type="Array" />
<description>
Constructs a new [PackedColorArray]. Optionally, you can pass in a generic [Array] that will be converted.
</description>
@@ -33,27 +33,40 @@
<methods>
<method name="append">
<return type="bool" />
- <argument index="0" name="value" type="Color" />
+ <param index="0" name="value" type="Color" />
<description>
Appends an element at the end of the array (alias of [method push_back]).
</description>
</method>
<method name="append_array">
<return type="void" />
- <argument index="0" name="array" type="PackedColorArray" />
+ <param index="0" name="array" type="PackedColorArray" />
<description>
Appends a [PackedColorArray] at the end of this array.
</description>
</method>
<method name="bsearch">
<return type="int" />
- <argument index="0" name="value" type="Color" />
- <argument index="1" name="before" type="bool" default="true" />
+ <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>
+ <method name="clear">
+ <return type="void" />
+ <description>
+ Clears the array. This is equivalent to using [method resize] with a size of [code]0[/code].
+ </description>
+ </method>
+ <method name="count" qualifiers="const">
+ <return type="int" />
+ <param index="0" name="value" type="Color" />
+ <description>
+ Returns the number of times an element is in the array.
+ </description>
+ </method>
<method name="duplicate">
<return type="PackedColorArray" />
<description>
@@ -62,22 +75,30 @@
</method>
<method name="fill">
<return type="void" />
- <argument index="0" name="value" type="Color" />
+ <param index="0" name="value" type="Color" />
<description>
Assigns the given value to all elements in the array. This can typically be used together with [method resize] to create an array with a given size and initialized elements.
</description>
</method>
+ <method name="find" qualifiers="const">
+ <return type="int" />
+ <param index="0" name="value" type="Color" />
+ <param index="1" name="from" type="int" default="0" />
+ <description>
+ Searches the array for a value and returns its index or [code]-1[/code] if not found. Optionally, the initial search index can be passed.
+ </description>
+ </method>
<method name="has" qualifiers="const">
<return type="bool" />
- <argument index="0" name="value" type="Color" />
+ <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">
<return type="int" />
- <argument index="0" name="at_index" type="int" />
- <argument index="1" name="value" type="Color" />
+ <param index="0" name="at_index" type="int" />
+ <param index="1" name="value" type="Color" />
<description>
Inserts a new element at a given position in the array. The position must be valid, or at the end of the array ([code]idx == size()[/code]).
</description>
@@ -90,21 +111,21 @@
</method>
<method name="push_back">
<return type="bool" />
- <argument index="0" name="value" type="Color" />
+ <param index="0" name="value" type="Color" />
<description>
Appends a value to the array.
</description>
</method>
<method name="remove_at">
<return type="void" />
- <argument index="0" name="index" type="int" />
+ <param index="0" name="index" type="int" />
<description>
Removes an element from the array by index.
</description>
</method>
<method name="resize">
<return type="int" />
- <argument index="0" name="new_size" type="int" />
+ <param index="0" name="new_size" type="int" />
<description>
Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size.
</description>
@@ -115,10 +136,18 @@
Reverses the order of the elements in the array.
</description>
</method>
+ <method name="rfind" qualifiers="const">
+ <return type="int" />
+ <param index="0" name="value" type="Color" />
+ <param index="1" name="from" type="int" default="-1" />
+ <description>
+ 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">
<return type="void" />
- <argument index="0" name="index" type="int" />
- <argument index="1" name="value" type="Color" />
+ <param index="0" name="index" type="int" />
+ <param index="1" name="value" type="Color" />
<description>
Changes the [Color] at the given index.
</description>
@@ -131,12 +160,12 @@
</method>
<method name="slice" qualifiers="const">
<return type="PackedColorArray" />
- <argument index="0" name="begin" type="int" />
- <argument index="1" name="end" type="int" default="2147483647" />
+ <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">
@@ -148,32 +177,37 @@
<method name="to_byte_array" qualifiers="const">
<return type="PackedByteArray" />
<description>
+ Returns a [PackedByteArray] with each color encoded as bytes.
</description>
</method>
</methods>
<operators>
<operator name="operator !=">
<return type="bool" />
- <argument index="0" name="right" type="PackedColorArray" />
+ <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" />
- <argument index="0" name="right" 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" />
- <argument index="0" name="right" type="PackedColorArray" />
+ <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" />
- <argument index="0" name="index" type="int" />
+ <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/PackedDataContainer.xml b/doc/classes/PackedDataContainer.xml
index cba7269ccf..5035c8dee4 100644
--- a/doc/classes/PackedDataContainer.xml
+++ b/doc/classes/PackedDataContainer.xml
@@ -9,7 +9,7 @@
<methods>
<method name="pack">
<return type="int" enum="Error" />
- <argument index="0" name="value" type="Variant" />
+ <param index="0" name="value" type="Variant" />
<description>
</description>
</method>
diff --git a/doc/classes/PackedFloat32Array.xml b/doc/classes/PackedFloat32Array.xml
index e2b877ad5f..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>
@@ -18,14 +18,14 @@
</constructor>
<constructor name="PackedFloat32Array">
<return type="PackedFloat32Array" />
- <argument index="0" name="from" type="PackedFloat32Array" />
+ <param index="0" name="from" type="PackedFloat32Array" />
<description>
Constructs a [PackedFloat32Array] as a copy of the given [PackedFloat32Array].
</description>
</constructor>
<constructor name="PackedFloat32Array">
<return type="PackedFloat32Array" />
- <argument index="0" name="from" type="Array" />
+ <param index="0" name="from" type="Array" />
<description>
Constructs a new [PackedFloat32Array]. Optionally, you can pass in a generic [Array] that will be converted.
</description>
@@ -34,27 +34,40 @@
<methods>
<method name="append">
<return type="bool" />
- <argument index="0" name="value" type="float" />
+ <param index="0" name="value" type="float" />
<description>
Appends an element at the end of the array (alias of [method push_back]).
</description>
</method>
<method name="append_array">
<return type="void" />
- <argument index="0" name="array" type="PackedFloat32Array" />
+ <param index="0" name="array" type="PackedFloat32Array" />
<description>
Appends a [PackedFloat32Array] at the end of this array.
</description>
</method>
<method name="bsearch">
<return type="int" />
- <argument index="0" name="value" type="float" />
- <argument index="1" name="before" type="bool" default="true" />
+ <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>
+ <method name="clear">
+ <return type="void" />
+ <description>
+ Clears the array. This is equivalent to using [method resize] with a size of [code]0[/code].
+ </description>
+ </method>
+ <method name="count" qualifiers="const">
+ <return type="int" />
+ <param index="0" name="value" type="float" />
+ <description>
+ Returns the number of times an element is in the array.
+ </description>
+ </method>
<method name="duplicate">
<return type="PackedFloat32Array" />
<description>
@@ -63,22 +76,30 @@
</method>
<method name="fill">
<return type="void" />
- <argument index="0" name="value" type="float" />
+ <param index="0" name="value" type="float" />
<description>
Assigns the given value to all elements in the array. This can typically be used together with [method resize] to create an array with a given size and initialized elements.
</description>
</method>
+ <method name="find" qualifiers="const">
+ <return type="int" />
+ <param index="0" name="value" type="float" />
+ <param index="1" name="from" type="int" default="0" />
+ <description>
+ Searches the array for a value and returns its index or [code]-1[/code] if not found. Optionally, the initial search index can be passed.
+ </description>
+ </method>
<method name="has" qualifiers="const">
<return type="bool" />
- <argument index="0" name="value" type="float" />
+ <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">
<return type="int" />
- <argument index="0" name="at_index" type="int" />
- <argument index="1" name="value" type="float" />
+ <param index="0" name="at_index" type="int" />
+ <param index="1" name="value" type="float" />
<description>
Inserts a new element at a given position in the array. The position must be valid, or at the end of the array ([code]idx == size()[/code]).
</description>
@@ -91,21 +112,21 @@
</method>
<method name="push_back">
<return type="bool" />
- <argument index="0" name="value" type="float" />
+ <param index="0" name="value" type="float" />
<description>
Appends an element at the end of the array.
</description>
</method>
<method name="remove_at">
<return type="void" />
- <argument index="0" name="index" type="int" />
+ <param index="0" name="index" type="int" />
<description>
Removes an element from the array by index.
</description>
</method>
<method name="resize">
<return type="int" />
- <argument index="0" name="new_size" type="int" />
+ <param index="0" name="new_size" type="int" />
<description>
Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size.
</description>
@@ -116,10 +137,18 @@
Reverses the order of the elements in the array.
</description>
</method>
+ <method name="rfind" qualifiers="const">
+ <return type="int" />
+ <param index="0" name="value" type="float" />
+ <param index="1" name="from" type="int" default="-1" />
+ <description>
+ 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">
<return type="void" />
- <argument index="0" name="index" type="int" />
- <argument index="1" name="value" type="float" />
+ <param index="0" name="index" type="int" />
+ <param index="1" name="value" type="float" />
<description>
Changes the float at the given index.
</description>
@@ -132,12 +161,12 @@
</method>
<method name="slice" qualifiers="const">
<return type="PackedFloat32Array" />
- <argument index="0" name="begin" type="int" />
- <argument index="1" name="end" type="int" default="2147483647" />
+ <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">
@@ -157,26 +186,31 @@
<operators>
<operator name="operator !=">
<return type="bool" />
- <argument index="0" name="right" type="PackedFloat32Array" />
+ <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" />
- <argument index="0" name="right" 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" />
- <argument index="0" name="right" type="PackedFloat32Array" />
+ <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" />
- <argument index="0" name="index" type="int" />
+ <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 be7a52b7f4..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>
@@ -18,14 +18,14 @@
</constructor>
<constructor name="PackedFloat64Array">
<return type="PackedFloat64Array" />
- <argument index="0" name="from" type="PackedFloat64Array" />
+ <param index="0" name="from" type="PackedFloat64Array" />
<description>
Constructs a [PackedFloat64Array] as a copy of the given [PackedFloat64Array].
</description>
</constructor>
<constructor name="PackedFloat64Array">
<return type="PackedFloat64Array" />
- <argument index="0" name="from" type="Array" />
+ <param index="0" name="from" type="Array" />
<description>
Constructs a new [PackedFloat64Array]. Optionally, you can pass in a generic [Array] that will be converted.
</description>
@@ -34,27 +34,40 @@
<methods>
<method name="append">
<return type="bool" />
- <argument index="0" name="value" type="float" />
+ <param index="0" name="value" type="float" />
<description>
Appends an element at the end of the array (alias of [method push_back]).
</description>
</method>
<method name="append_array">
<return type="void" />
- <argument index="0" name="array" type="PackedFloat64Array" />
+ <param index="0" name="array" type="PackedFloat64Array" />
<description>
Appends a [PackedFloat64Array] at the end of this array.
</description>
</method>
<method name="bsearch">
<return type="int" />
- <argument index="0" name="value" type="float" />
- <argument index="1" name="before" type="bool" default="true" />
+ <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>
+ <method name="clear">
+ <return type="void" />
+ <description>
+ Clears the array. This is equivalent to using [method resize] with a size of [code]0[/code].
+ </description>
+ </method>
+ <method name="count" qualifiers="const">
+ <return type="int" />
+ <param index="0" name="value" type="float" />
+ <description>
+ Returns the number of times an element is in the array.
+ </description>
+ </method>
<method name="duplicate">
<return type="PackedFloat64Array" />
<description>
@@ -63,22 +76,30 @@
</method>
<method name="fill">
<return type="void" />
- <argument index="0" name="value" type="float" />
+ <param index="0" name="value" type="float" />
<description>
Assigns the given value to all elements in the array. This can typically be used together with [method resize] to create an array with a given size and initialized elements.
</description>
</method>
+ <method name="find" qualifiers="const">
+ <return type="int" />
+ <param index="0" name="value" type="float" />
+ <param index="1" name="from" type="int" default="0" />
+ <description>
+ Searches the array for a value and returns its index or [code]-1[/code] if not found. Optionally, the initial search index can be passed.
+ </description>
+ </method>
<method name="has" qualifiers="const">
<return type="bool" />
- <argument index="0" name="value" type="float" />
+ <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">
<return type="int" />
- <argument index="0" name="at_index" type="int" />
- <argument index="1" name="value" type="float" />
+ <param index="0" name="at_index" type="int" />
+ <param index="1" name="value" type="float" />
<description>
Inserts a new element at a given position in the array. The position must be valid, or at the end of the array ([code]idx == size()[/code]).
</description>
@@ -91,21 +112,21 @@
</method>
<method name="push_back">
<return type="bool" />
- <argument index="0" name="value" type="float" />
+ <param index="0" name="value" type="float" />
<description>
Appends an element at the end of the array.
</description>
</method>
<method name="remove_at">
<return type="void" />
- <argument index="0" name="index" type="int" />
+ <param index="0" name="index" type="int" />
<description>
Removes an element from the array by index.
</description>
</method>
<method name="resize">
<return type="int" />
- <argument index="0" name="new_size" type="int" />
+ <param index="0" name="new_size" type="int" />
<description>
Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size.
</description>
@@ -116,10 +137,18 @@
Reverses the order of the elements in the array.
</description>
</method>
+ <method name="rfind" qualifiers="const">
+ <return type="int" />
+ <param index="0" name="value" type="float" />
+ <param index="1" name="from" type="int" default="-1" />
+ <description>
+ 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">
<return type="void" />
- <argument index="0" name="index" type="int" />
- <argument index="1" name="value" type="float" />
+ <param index="0" name="index" type="int" />
+ <param index="1" name="value" type="float" />
<description>
Changes the float at the given index.
</description>
@@ -132,12 +161,12 @@
</method>
<method name="slice" qualifiers="const">
<return type="PackedFloat64Array" />
- <argument index="0" name="begin" type="int" />
- <argument index="1" name="end" type="int" default="2147483647" />
+ <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">
@@ -157,26 +186,30 @@
<operators>
<operator name="operator !=">
<return type="bool" />
- <argument index="0" name="right" type="PackedFloat64Array" />
+ <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" />
- <argument index="0" name="right" 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" />
- <argument index="0" name="right" type="PackedFloat64Array" />
+ <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" />
- <argument index="0" name="index" type="int" />
+ <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 108273d859..2f9032e214 100644
--- a/doc/classes/PackedInt32Array.xml
+++ b/doc/classes/PackedInt32Array.xml
@@ -18,14 +18,14 @@
</constructor>
<constructor name="PackedInt32Array">
<return type="PackedInt32Array" />
- <argument index="0" name="from" type="PackedInt32Array" />
+ <param index="0" name="from" type="PackedInt32Array" />
<description>
Constructs a [PackedInt32Array] as a copy of the given [PackedInt32Array].
</description>
</constructor>
<constructor name="PackedInt32Array">
<return type="PackedInt32Array" />
- <argument index="0" name="from" type="Array" />
+ <param index="0" name="from" type="Array" />
<description>
Constructs a new [PackedInt32Array]. Optionally, you can pass in a generic [Array] that will be converted.
</description>
@@ -34,27 +34,40 @@
<methods>
<method name="append">
<return type="bool" />
- <argument index="0" name="value" type="int" />
+ <param index="0" name="value" type="int" />
<description>
Appends an element at the end of the array (alias of [method push_back]).
</description>
</method>
<method name="append_array">
<return type="void" />
- <argument index="0" name="array" type="PackedInt32Array" />
+ <param index="0" name="array" type="PackedInt32Array" />
<description>
Appends a [PackedInt32Array] at the end of this array.
</description>
</method>
<method name="bsearch">
<return type="int" />
- <argument index="0" name="value" type="int" />
- <argument index="1" name="before" type="bool" default="true" />
+ <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>
+ <method name="clear">
+ <return type="void" />
+ <description>
+ Clears the array. This is equivalent to using [method resize] with a size of [code]0[/code].
+ </description>
+ </method>
+ <method name="count" qualifiers="const">
+ <return type="int" />
+ <param index="0" name="value" type="int" />
+ <description>
+ Returns the number of times an element is in the array.
+ </description>
+ </method>
<method name="duplicate">
<return type="PackedInt32Array" />
<description>
@@ -63,22 +76,30 @@
</method>
<method name="fill">
<return type="void" />
- <argument index="0" name="value" type="int" />
+ <param index="0" name="value" type="int" />
<description>
Assigns the given value to all elements in the array. This can typically be used together with [method resize] to create an array with a given size and initialized elements.
</description>
</method>
+ <method name="find" qualifiers="const">
+ <return type="int" />
+ <param index="0" name="value" type="int" />
+ <param index="1" name="from" type="int" default="0" />
+ <description>
+ Searches the array for a value and returns its index or [code]-1[/code] if not found. Optionally, the initial search index can be passed.
+ </description>
+ </method>
<method name="has" qualifiers="const">
<return type="bool" />
- <argument index="0" name="value" type="int" />
+ <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">
<return type="int" />
- <argument index="0" name="at_index" type="int" />
- <argument index="1" name="value" type="int" />
+ <param index="0" name="at_index" type="int" />
+ <param index="1" name="value" type="int" />
<description>
Inserts a new integer at a given position in the array. The position must be valid, or at the end of the array ([code]idx == size()[/code]).
</description>
@@ -91,21 +112,21 @@
</method>
<method name="push_back">
<return type="bool" />
- <argument index="0" name="value" type="int" />
+ <param index="0" name="value" type="int" />
<description>
Appends a value to the array.
</description>
</method>
<method name="remove_at">
<return type="void" />
- <argument index="0" name="index" type="int" />
+ <param index="0" name="index" type="int" />
<description>
Removes an element from the array by index.
</description>
</method>
<method name="resize">
<return type="int" />
- <argument index="0" name="new_size" type="int" />
+ <param index="0" name="new_size" type="int" />
<description>
Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size.
</description>
@@ -116,10 +137,18 @@
Reverses the order of the elements in the array.
</description>
</method>
+ <method name="rfind" qualifiers="const">
+ <return type="int" />
+ <param index="0" name="value" type="int" />
+ <param index="1" name="from" type="int" default="-1" />
+ <description>
+ 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">
<return type="void" />
- <argument index="0" name="index" type="int" />
- <argument index="1" name="value" type="int" />
+ <param index="0" name="index" type="int" />
+ <param index="1" name="value" type="int" />
<description>
Changes the integer at the given index.
</description>
@@ -132,12 +161,12 @@
</method>
<method name="slice" qualifiers="const">
<return type="PackedInt32Array" />
- <argument index="0" name="begin" type="int" />
- <argument index="1" name="end" type="int" default="2147483647" />
+ <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">
@@ -157,26 +186,31 @@
<operators>
<operator name="operator !=">
<return type="bool" />
- <argument index="0" name="right" type="PackedInt32Array" />
+ <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" />
- <argument index="0" name="right" 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" />
- <argument index="0" name="right" type="PackedInt32Array" />
+ <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" />
- <argument index="0" name="index" 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 c34f2fc75e..5f762cde3e 100644
--- a/doc/classes/PackedInt64Array.xml
+++ b/doc/classes/PackedInt64Array.xml
@@ -18,14 +18,14 @@
</constructor>
<constructor name="PackedInt64Array">
<return type="PackedInt64Array" />
- <argument index="0" name="from" type="PackedInt64Array" />
+ <param index="0" name="from" type="PackedInt64Array" />
<description>
Constructs a [PackedInt64Array] as a copy of the given [PackedInt64Array].
</description>
</constructor>
<constructor name="PackedInt64Array">
<return type="PackedInt64Array" />
- <argument index="0" name="from" type="Array" />
+ <param index="0" name="from" type="Array" />
<description>
Constructs a new [PackedInt64Array]. Optionally, you can pass in a generic [Array] that will be converted.
</description>
@@ -34,27 +34,40 @@
<methods>
<method name="append">
<return type="bool" />
- <argument index="0" name="value" type="int" />
+ <param index="0" name="value" type="int" />
<description>
Appends an element at the end of the array (alias of [method push_back]).
</description>
</method>
<method name="append_array">
<return type="void" />
- <argument index="0" name="array" type="PackedInt64Array" />
+ <param index="0" name="array" type="PackedInt64Array" />
<description>
Appends a [PackedInt64Array] at the end of this array.
</description>
</method>
<method name="bsearch">
<return type="int" />
- <argument index="0" name="value" type="int" />
- <argument index="1" name="before" type="bool" default="true" />
+ <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>
+ <method name="clear">
+ <return type="void" />
+ <description>
+ Clears the array. This is equivalent to using [method resize] with a size of [code]0[/code].
+ </description>
+ </method>
+ <method name="count" qualifiers="const">
+ <return type="int" />
+ <param index="0" name="value" type="int" />
+ <description>
+ Returns the number of times an element is in the array.
+ </description>
+ </method>
<method name="duplicate">
<return type="PackedInt64Array" />
<description>
@@ -63,22 +76,30 @@
</method>
<method name="fill">
<return type="void" />
- <argument index="0" name="value" type="int" />
+ <param index="0" name="value" type="int" />
<description>
Assigns the given value to all elements in the array. This can typically be used together with [method resize] to create an array with a given size and initialized elements.
</description>
</method>
+ <method name="find" qualifiers="const">
+ <return type="int" />
+ <param index="0" name="value" type="int" />
+ <param index="1" name="from" type="int" default="0" />
+ <description>
+ Searches the array for a value and returns its index or [code]-1[/code] if not found. Optionally, the initial search index can be passed.
+ </description>
+ </method>
<method name="has" qualifiers="const">
<return type="bool" />
- <argument index="0" name="value" type="int" />
+ <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">
<return type="int" />
- <argument index="0" name="at_index" type="int" />
- <argument index="1" name="value" type="int" />
+ <param index="0" name="at_index" type="int" />
+ <param index="1" name="value" type="int" />
<description>
Inserts a new integer at a given position in the array. The position must be valid, or at the end of the array ([code]idx == size()[/code]).
</description>
@@ -91,21 +112,21 @@
</method>
<method name="push_back">
<return type="bool" />
- <argument index="0" name="value" type="int" />
+ <param index="0" name="value" type="int" />
<description>
Appends a value to the array.
</description>
</method>
<method name="remove_at">
<return type="void" />
- <argument index="0" name="index" type="int" />
+ <param index="0" name="index" type="int" />
<description>
Removes an element from the array by index.
</description>
</method>
<method name="resize">
<return type="int" />
- <argument index="0" name="new_size" type="int" />
+ <param index="0" name="new_size" type="int" />
<description>
Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size.
</description>
@@ -116,10 +137,18 @@
Reverses the order of the elements in the array.
</description>
</method>
+ <method name="rfind" qualifiers="const">
+ <return type="int" />
+ <param index="0" name="value" type="int" />
+ <param index="1" name="from" type="int" default="-1" />
+ <description>
+ 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">
<return type="void" />
- <argument index="0" name="index" type="int" />
- <argument index="1" name="value" type="int" />
+ <param index="0" name="index" type="int" />
+ <param index="1" name="value" type="int" />
<description>
Changes the integer at the given index.
</description>
@@ -132,12 +161,12 @@
</method>
<method name="slice" qualifiers="const">
<return type="PackedInt64Array" />
- <argument index="0" name="begin" type="int" />
- <argument index="1" name="end" type="int" default="2147483647" />
+ <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">
@@ -157,26 +186,30 @@
<operators>
<operator name="operator !=">
<return type="bool" />
- <argument index="0" name="right" type="PackedInt64Array" />
+ <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" />
- <argument index="0" name="right" 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" />
- <argument index="0" name="right" type="PackedInt64Array" />
+ <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" />
- <argument index="0" name="index" 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 821fc1ae95..c7fe7d8c37 100644
--- a/doc/classes/PackedScene.xml
+++ b/doc/classes/PackedScene.xml
@@ -90,14 +90,14 @@
</method>
<method name="instantiate" qualifiers="const">
<return type="Node" />
- <argument index="0" name="edit_state" type="int" enum="PackedScene.GenEditState" default="0" />
+ <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.
</description>
</method>
<method name="pack">
<return type="int" enum="Error" />
- <argument index="0" name="path" type="Node" />
+ <param index="0" name="path" type="Node" />
<description>
Pack will ignore any sub-nodes not owned by given node. See [member Node.owner].
</description>
diff --git a/doc/classes/PackedStringArray.xml b/doc/classes/PackedStringArray.xml
index 536f5f02eb..2c3376d659 100644
--- a/doc/classes/PackedStringArray.xml
+++ b/doc/classes/PackedStringArray.xml
@@ -5,6 +5,12 @@
</brief_description>
<description>
An array specifically designed to hold [String]s. Packs data tightly, so it saves memory for large array sizes.
+ If you want to join the strings in the array, use [method String.join].
+ [codeblock]
+ var string_array = PackedStringArray(["hello", "world"])
+ var string = " ".join(string_array)
+ print(string) # "hello world"
+ [/codeblock]
</description>
<tutorials>
<link title="OS Test Demo">https://godotengine.org/asset-library/asset/677</link>
@@ -18,14 +24,14 @@
</constructor>
<constructor name="PackedStringArray">
<return type="PackedStringArray" />
- <argument index="0" name="from" type="PackedStringArray" />
+ <param index="0" name="from" type="PackedStringArray" />
<description>
Constructs a [PackedStringArray] as a copy of the given [PackedStringArray].
</description>
</constructor>
<constructor name="PackedStringArray">
<return type="PackedStringArray" />
- <argument index="0" name="from" type="Array" />
+ <param index="0" name="from" type="Array" />
<description>
Constructs a new [PackedStringArray]. Optionally, you can pass in a generic [Array] that will be converted.
</description>
@@ -34,27 +40,40 @@
<methods>
<method name="append">
<return type="bool" />
- <argument index="0" name="value" type="String" />
+ <param index="0" name="value" type="String" />
<description>
Appends an element at the end of the array (alias of [method push_back]).
</description>
</method>
<method name="append_array">
<return type="void" />
- <argument index="0" name="array" type="PackedStringArray" />
+ <param index="0" name="array" type="PackedStringArray" />
<description>
Appends a [PackedStringArray] at the end of this array.
</description>
</method>
<method name="bsearch">
<return type="int" />
- <argument index="0" name="value" type="String" />
- <argument index="1" name="before" type="bool" default="true" />
+ <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>
+ <method name="clear">
+ <return type="void" />
+ <description>
+ Clears the array. This is equivalent to using [method resize] with a size of [code]0[/code].
+ </description>
+ </method>
+ <method name="count" qualifiers="const">
+ <return type="int" />
+ <param index="0" name="value" type="String" />
+ <description>
+ Returns the number of times an element is in the array.
+ </description>
+ </method>
<method name="duplicate">
<return type="PackedStringArray" />
<description>
@@ -63,22 +82,30 @@
</method>
<method name="fill">
<return type="void" />
- <argument index="0" name="value" type="String" />
+ <param index="0" name="value" type="String" />
<description>
Assigns the given value to all elements in the array. This can typically be used together with [method resize] to create an array with a given size and initialized elements.
</description>
</method>
+ <method name="find" qualifiers="const">
+ <return type="int" />
+ <param index="0" name="value" type="String" />
+ <param index="1" name="from" type="int" default="0" />
+ <description>
+ Searches the array for a value and returns its index or [code]-1[/code] if not found. Optionally, the initial search index can be passed.
+ </description>
+ </method>
<method name="has" qualifiers="const">
<return type="bool" />
- <argument index="0" name="value" type="String" />
+ <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">
<return type="int" />
- <argument index="0" name="at_index" type="int" />
- <argument index="1" name="value" type="String" />
+ <param index="0" name="at_index" type="int" />
+ <param index="1" name="value" type="String" />
<description>
Inserts a new element at a given position in the array. The position must be valid, or at the end of the array ([code]idx == size()[/code]).
</description>
@@ -91,21 +118,21 @@
</method>
<method name="push_back">
<return type="bool" />
- <argument index="0" name="value" type="String" />
+ <param index="0" name="value" type="String" />
<description>
Appends a string element at end of the array.
</description>
</method>
<method name="remove_at">
<return type="void" />
- <argument index="0" name="index" type="int" />
+ <param index="0" name="index" type="int" />
<description>
Removes an element from the array by index.
</description>
</method>
<method name="resize">
<return type="int" />
- <argument index="0" name="new_size" type="int" />
+ <param index="0" name="new_size" type="int" />
<description>
Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size.
</description>
@@ -116,10 +143,18 @@
Reverses the order of the elements in the array.
</description>
</method>
+ <method name="rfind" qualifiers="const">
+ <return type="int" />
+ <param index="0" name="value" type="String" />
+ <param index="1" name="from" type="int" default="-1" />
+ <description>
+ 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">
<return type="void" />
- <argument index="0" name="index" type="int" />
- <argument index="1" name="value" type="String" />
+ <param index="0" name="index" type="int" />
+ <param index="1" name="value" type="String" />
<description>
Changes the [String] at the given index.
</description>
@@ -132,12 +167,12 @@
</method>
<method name="slice" qualifiers="const">
<return type="PackedStringArray" />
- <argument index="0" name="begin" type="int" />
- <argument index="1" name="end" type="int" default="2147483647" />
+ <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">
@@ -149,32 +184,37 @@
<method name="to_byte_array" qualifiers="const">
<return type="PackedByteArray" />
<description>
+ Returns a [PackedByteArray] with each string encoded as bytes.
</description>
</method>
</methods>
<operators>
<operator name="operator !=">
<return type="bool" />
- <argument index="0" name="right" type="PackedStringArray" />
+ <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" />
- <argument index="0" name="right" 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" />
- <argument index="0" name="right" type="PackedStringArray" />
+ <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" />
- <argument index="0" name="index" type="int" />
+ <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 29423d1cde..25650ef40a 100644
--- a/doc/classes/PackedVector2Array.xml
+++ b/doc/classes/PackedVector2Array.xml
@@ -18,14 +18,14 @@
</constructor>
<constructor name="PackedVector2Array">
<return type="PackedVector2Array" />
- <argument index="0" name="from" type="PackedVector2Array" />
+ <param index="0" name="from" type="PackedVector2Array" />
<description>
Constructs a [PackedVector2Array] as a copy of the given [PackedVector2Array].
</description>
</constructor>
<constructor name="PackedVector2Array">
<return type="PackedVector2Array" />
- <argument index="0" name="from" type="Array" />
+ <param index="0" name="from" type="Array" />
<description>
Constructs a new [PackedVector2Array]. Optionally, you can pass in a generic [Array] that will be converted.
</description>
@@ -34,27 +34,40 @@
<methods>
<method name="append">
<return type="bool" />
- <argument index="0" name="value" type="Vector2" />
+ <param index="0" name="value" type="Vector2" />
<description>
Appends an element at the end of the array (alias of [method push_back]).
</description>
</method>
<method name="append_array">
<return type="void" />
- <argument index="0" name="array" type="PackedVector2Array" />
+ <param index="0" name="array" type="PackedVector2Array" />
<description>
Appends a [PackedVector2Array] at the end of this array.
</description>
</method>
<method name="bsearch">
<return type="int" />
- <argument index="0" name="value" type="Vector2" />
- <argument index="1" name="before" type="bool" default="true" />
+ <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>
+ <method name="clear">
+ <return type="void" />
+ <description>
+ Clears the array. This is equivalent to using [method resize] with a size of [code]0[/code].
+ </description>
+ </method>
+ <method name="count" qualifiers="const">
+ <return type="int" />
+ <param index="0" name="value" type="Vector2" />
+ <description>
+ Returns the number of times an element is in the array.
+ </description>
+ </method>
<method name="duplicate">
<return type="PackedVector2Array" />
<description>
@@ -63,22 +76,30 @@
</method>
<method name="fill">
<return type="void" />
- <argument index="0" name="value" type="Vector2" />
+ <param index="0" name="value" type="Vector2" />
<description>
Assigns the given value to all elements in the array. This can typically be used together with [method resize] to create an array with a given size and initialized elements.
</description>
</method>
+ <method name="find" qualifiers="const">
+ <return type="int" />
+ <param index="0" name="value" type="Vector2" />
+ <param index="1" name="from" type="int" default="0" />
+ <description>
+ Searches the array for a value and returns its index or [code]-1[/code] if not found. Optionally, the initial search index can be passed.
+ </description>
+ </method>
<method name="has" qualifiers="const">
<return type="bool" />
- <argument index="0" name="value" type="Vector2" />
+ <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">
<return type="int" />
- <argument index="0" name="at_index" type="int" />
- <argument index="1" name="value" type="Vector2" />
+ <param index="0" name="at_index" type="int" />
+ <param index="1" name="value" type="Vector2" />
<description>
Inserts a new element at a given position in the array. The position must be valid, or at the end of the array ([code]idx == size()[/code]).
</description>
@@ -91,21 +112,21 @@
</method>
<method name="push_back">
<return type="bool" />
- <argument index="0" name="value" type="Vector2" />
+ <param index="0" name="value" type="Vector2" />
<description>
Inserts a [Vector2] at the end.
</description>
</method>
<method name="remove_at">
<return type="void" />
- <argument index="0" name="index" type="int" />
+ <param index="0" name="index" type="int" />
<description>
Removes an element from the array by index.
</description>
</method>
<method name="resize">
<return type="int" />
- <argument index="0" name="new_size" type="int" />
+ <param index="0" name="new_size" type="int" />
<description>
Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size.
</description>
@@ -116,10 +137,18 @@
Reverses the order of the elements in the array.
</description>
</method>
+ <method name="rfind" qualifiers="const">
+ <return type="int" />
+ <param index="0" name="value" type="Vector2" />
+ <param index="1" name="from" type="int" default="-1" />
+ <description>
+ 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">
<return type="void" />
- <argument index="0" name="index" type="int" />
- <argument index="1" name="value" type="Vector2" />
+ <param index="0" name="index" type="int" />
+ <param index="1" name="value" type="Vector2" />
<description>
Changes the [Vector2] at the given index.
</description>
@@ -132,12 +161,12 @@
</method>
<method name="slice" qualifiers="const">
<return type="PackedVector2Array" />
- <argument index="0" name="begin" type="int" />
- <argument index="1" name="end" type="int" default="2147483647" />
+ <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">
@@ -149,38 +178,44 @@
<method name="to_byte_array" qualifiers="const">
<return type="PackedByteArray" />
<description>
+ Returns a [PackedByteArray] with each vector encoded as bytes.
</description>
</method>
</methods>
<operators>
<operator name="operator !=">
<return type="bool" />
- <argument index="0" name="right" type="PackedVector2Array" />
+ <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" />
- <argument index="0" name="right" type="Transform2D" />
+ <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" />
- <argument index="0" name="right" 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" />
- <argument index="0" name="right" type="PackedVector2Array" />
+ <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" />
- <argument index="0" name="index" type="int" />
+ <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 6d460cecab..22979a5a37 100644
--- a/doc/classes/PackedVector3Array.xml
+++ b/doc/classes/PackedVector3Array.xml
@@ -17,14 +17,14 @@
</constructor>
<constructor name="PackedVector3Array">
<return type="PackedVector3Array" />
- <argument index="0" name="from" type="PackedVector3Array" />
+ <param index="0" name="from" type="PackedVector3Array" />
<description>
Constructs a [PackedVector3Array] as a copy of the given [PackedVector3Array].
</description>
</constructor>
<constructor name="PackedVector3Array">
<return type="PackedVector3Array" />
- <argument index="0" name="from" type="Array" />
+ <param index="0" name="from" type="Array" />
<description>
Constructs a new [PackedVector3Array]. Optionally, you can pass in a generic [Array] that will be converted.
</description>
@@ -33,27 +33,40 @@
<methods>
<method name="append">
<return type="bool" />
- <argument index="0" name="value" type="Vector3" />
+ <param index="0" name="value" type="Vector3" />
<description>
Appends an element at the end of the array (alias of [method push_back]).
</description>
</method>
<method name="append_array">
<return type="void" />
- <argument index="0" name="array" type="PackedVector3Array" />
+ <param index="0" name="array" type="PackedVector3Array" />
<description>
Appends a [PackedVector3Array] at the end of this array.
</description>
</method>
<method name="bsearch">
<return type="int" />
- <argument index="0" name="value" type="Vector3" />
- <argument index="1" name="before" type="bool" default="true" />
+ <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>
+ <method name="clear">
+ <return type="void" />
+ <description>
+ Clears the array. This is equivalent to using [method resize] with a size of [code]0[/code].
+ </description>
+ </method>
+ <method name="count" qualifiers="const">
+ <return type="int" />
+ <param index="0" name="value" type="Vector3" />
+ <description>
+ Returns the number of times an element is in the array.
+ </description>
+ </method>
<method name="duplicate">
<return type="PackedVector3Array" />
<description>
@@ -62,22 +75,30 @@
</method>
<method name="fill">
<return type="void" />
- <argument index="0" name="value" type="Vector3" />
+ <param index="0" name="value" type="Vector3" />
<description>
Assigns the given value to all elements in the array. This can typically be used together with [method resize] to create an array with a given size and initialized elements.
</description>
</method>
+ <method name="find" qualifiers="const">
+ <return type="int" />
+ <param index="0" name="value" type="Vector3" />
+ <param index="1" name="from" type="int" default="0" />
+ <description>
+ Searches the array for a value and returns its index or [code]-1[/code] if not found. Optionally, the initial search index can be passed.
+ </description>
+ </method>
<method name="has" qualifiers="const">
<return type="bool" />
- <argument index="0" name="value" type="Vector3" />
+ <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">
<return type="int" />
- <argument index="0" name="at_index" type="int" />
- <argument index="1" name="value" type="Vector3" />
+ <param index="0" name="at_index" type="int" />
+ <param index="1" name="value" type="Vector3" />
<description>
Inserts a new element at a given position in the array. The position must be valid, or at the end of the array ([code]idx == size()[/code]).
</description>
@@ -90,21 +111,21 @@
</method>
<method name="push_back">
<return type="bool" />
- <argument index="0" name="value" type="Vector3" />
+ <param index="0" name="value" type="Vector3" />
<description>
Inserts a [Vector3] at the end.
</description>
</method>
<method name="remove_at">
<return type="void" />
- <argument index="0" name="index" type="int" />
+ <param index="0" name="index" type="int" />
<description>
Removes an element from the array by index.
</description>
</method>
<method name="resize">
<return type="int" />
- <argument index="0" name="new_size" type="int" />
+ <param index="0" name="new_size" type="int" />
<description>
Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size.
</description>
@@ -115,10 +136,18 @@
Reverses the order of the elements in the array.
</description>
</method>
+ <method name="rfind" qualifiers="const">
+ <return type="int" />
+ <param index="0" name="value" type="Vector3" />
+ <param index="1" name="from" type="int" default="-1" />
+ <description>
+ 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">
<return type="void" />
- <argument index="0" name="index" type="int" />
- <argument index="1" name="value" type="Vector3" />
+ <param index="0" name="index" type="int" />
+ <param index="1" name="value" type="Vector3" />
<description>
Changes the [Vector3] at the given index.
</description>
@@ -131,12 +160,12 @@
</method>
<method name="slice" qualifiers="const">
<return type="PackedVector3Array" />
- <argument index="0" name="begin" type="int" />
- <argument index="1" name="end" type="int" default="2147483647" />
+ <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">
@@ -148,38 +177,44 @@
<method name="to_byte_array" qualifiers="const">
<return type="PackedByteArray" />
<description>
+ Returns a [PackedByteArray] with each vector encoded as bytes.
</description>
</method>
</methods>
<operators>
<operator name="operator !=">
<return type="bool" />
- <argument index="0" name="right" type="PackedVector3Array" />
+ <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" />
- <argument index="0" name="right" type="Transform3D" />
+ <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" />
- <argument index="0" name="right" 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" />
- <argument index="0" name="right" type="PackedVector3Array" />
+ <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" />
- <argument index="0" name="index" type="int" />
+ <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 40fa90e4da..ab2bc34672 100644
--- a/doc/classes/PacketPeer.xml
+++ b/doc/classes/PacketPeer.xml
@@ -30,25 +30,25 @@
</method>
<method name="get_var">
<return type="Variant" />
- <argument index="0" name="allow_objects" type="bool" default="false" />
+ <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>
<method name="put_packet">
<return type="int" enum="Error" />
- <argument index="0" name="buffer" type="PackedByteArray" />
+ <param index="0" name="buffer" type="PackedByteArray" />
<description>
Sends a raw packet.
</description>
</method>
<method name="put_var">
<return type="int" enum="Error" />
- <argument index="0" name="var" type="Variant" />
- <argument index="1" name="full_objects" type="bool" default="false" />
+ <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 ee45c42498..e9918bdd3a 100644
--- a/doc/classes/PacketPeerDTLS.xml
+++ b/doc/classes/PacketPeerDTLS.xml
@@ -13,12 +13,12 @@
<methods>
<method name="connect_to_peer">
<return type="int" enum="Error" />
- <argument index="0" name="packet_peer" type="PacketPeerUDP" />
- <argument index="1" name="validate_certs" type="bool" default="true" />
- <argument index="2" name="for_hostname" type="String" default="&quot;&quot;" />
- <argument index="3" name="valid_certificate" type="X509Certificate" default="null" />
+ <param index="0" name="packet_peer" type="PacketPeerUDP" />
+ <param index="1" name="validate_certs" type="bool" default="true" />
+ <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 7cf5ef3504..28263b3f59 100644
--- a/doc/classes/PacketPeerExtension.xml
+++ b/doc/classes/PacketPeerExtension.xml
@@ -19,15 +19,15 @@
</method>
<method name="_get_packet" qualifiers="virtual">
<return type="int" />
- <argument index="0" name="r_buffer" type="const uint8_t **" />
- <argument index="1" name="r_buffer_size" type="int32_t*" />
+ <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" />
- <argument index="0" name="p_buffer" type="const uint8_t*" />
- <argument index="1" name="p_buffer_size" type="int" />
+ <param index="0" name="p_buffer" type="const uint8_t*" />
+ <param index="1" name="p_buffer_size" type="int" />
<description>
</description>
</method>
diff --git a/doc/classes/PacketPeerUDP.xml b/doc/classes/PacketPeerUDP.xml
index 7c6622be3c..b635757b2b 100644
--- a/doc/classes/PacketPeerUDP.xml
+++ b/doc/classes/PacketPeerUDP.xml
@@ -12,14 +12,14 @@
<methods>
<method name="bind">
<return type="int" enum="Error" />
- <argument index="0" name="port" type="int" />
- <argument index="1" name="bind_address" type="String" default="&quot;*&quot;" />
- <argument index="2" name="recv_buf_size" type="int" default="65536" />
+ <param index="0" name="port" type="int" />
+ <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">
@@ -30,10 +30,10 @@
</method>
<method name="connect_to_host">
<return type="int" enum="Error" />
- <argument index="0" name="host" type="String" />
- <argument index="1" name="port" type="int" />
+ <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].
+ 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 SSL or DTLS if you feel like your application is transferring sensitive information.
</description>
</method>
@@ -69,25 +69,25 @@
</method>
<method name="join_multicast_group">
<return type="int" enum="Error" />
- <argument index="0" name="multicast_address" type="String" />
- <argument index="1" name="interface_name" type="String" />
+ <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>
</method>
<method name="leave_multicast_group">
<return type="int" enum="Error" />
- <argument index="0" name="multicast_address" type="String" />
- <argument index="1" name="interface_name" type="String" />
+ <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">
<return type="void" />
- <argument index="0" name="enabled" type="bool" />
+ <param index="0" name="enabled" type="bool" />
<description>
Enable or disable sending of broadcast packets (e.g. [code]set_dest_address("255.255.255.255", 4343)[/code]. This option is disabled by default.
[b]Note:[/b] Some Android devices might require the [code]CHANGE_WIFI_MULTICAST_STATE[/code] permission and this option to be enabled to receive broadcast packets too.
@@ -95,8 +95,8 @@
</method>
<method name="set_dest_address">
<return type="int" enum="Error" />
- <argument index="0" name="host" type="String" />
- <argument index="1" name="port" type="int" />
+ <param index="0" name="host" type="String" />
+ <param index="1" name="port" type="int" />
<description>
Sets the destination address and port for sending packets and variables. A hostname will be resolved using DNS if needed.
[b]Note:[/b] [method set_broadcast_enabled] must be enabled before sending packets to a broadcast address (e.g. [code]255.255.255.255[/code]).
diff --git a/doc/classes/ParticlesMaterial.xml b/doc/classes/ParticlesMaterial.xml
index 885bedbc04..55f4c4dcdd 100644
--- a/doc/classes/ParticlesMaterial.xml
+++ b/doc/classes/ParticlesMaterial.xml
@@ -13,60 +13,60 @@
<methods>
<method name="get_param_max" qualifiers="const">
<return type="float" />
- <argument index="0" name="param" type="int" enum="ParticlesMaterial.Parameter" />
+ <param index="0" name="param" type="int" enum="ParticlesMaterial.Parameter" />
<description>
Returns the maximum value range for the given parameter.
</description>
</method>
<method name="get_param_min" qualifiers="const">
<return type="float" />
- <argument index="0" name="param" type="int" enum="ParticlesMaterial.Parameter" />
+ <param index="0" name="param" type="int" enum="ParticlesMaterial.Parameter" />
<description>
Returns the minimum value range for the given parameter.
</description>
</method>
<method name="get_param_texture" qualifiers="const">
<return type="Texture2D" />
- <argument index="0" name="param" type="int" enum="ParticlesMaterial.Parameter" />
+ <param index="0" name="param" type="int" enum="ParticlesMaterial.Parameter" />
<description>
Returns the [Texture2D] used by the specified parameter.
</description>
</method>
<method name="get_particle_flag" qualifiers="const">
<return type="bool" />
- <argument index="0" name="particle_flag" type="int" enum="ParticlesMaterial.ParticleFlags" />
+ <param index="0" name="particle_flag" type="int" enum="ParticlesMaterial.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" />
- <argument index="0" name="param" type="int" enum="ParticlesMaterial.Parameter" />
- <argument index="1" name="value" type="float" />
+ <param index="0" name="param" type="int" enum="ParticlesMaterial.Parameter" />
+ <param index="1" name="value" type="float" />
<description>
Sets the maximum value range for the given parameter.
</description>
</method>
<method name="set_param_min">
<return type="void" />
- <argument index="0" name="param" type="int" enum="ParticlesMaterial.Parameter" />
- <argument index="1" name="value" type="float" />
+ <param index="0" name="param" type="int" enum="ParticlesMaterial.Parameter" />
+ <param index="1" name="value" type="float" />
<description>
Sets the minimum value range for the given parameter.
</description>
</method>
<method name="set_param_texture">
<return type="void" />
- <argument index="0" name="param" type="int" enum="ParticlesMaterial.Parameter" />
- <argument index="1" name="texture" type="Texture2D" />
+ <param index="0" name="param" type="int" enum="ParticlesMaterial.Parameter" />
+ <param index="1" name="texture" type="Texture2D" />
<description>
Sets the [Texture2D] for the specified [enum Parameter].
</description>
</method>
<method name="set_particle_flag">
<return type="void" />
- <argument index="0" name="particle_flag" type="int" enum="ParticlesMaterial.ParticleFlags" />
- <argument index="1" name="enable" type="bool" />
+ <param index="0" name="particle_flag" type="int" enum="ParticlesMaterial.ParticleFlags" />
+ <param index="1" name="enable" type="bool" />
<description>
If [code]true[/code], enables the specified particle flag. See [enum ParticleFlags] for options.
</description>
@@ -77,28 +77,30 @@
Each particle's rotation will be animated along this [CurveTexture].
</member>
<member name="angle_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0">
- Maximum angle.
+ Maximum initial rotation applied to each particle, in degrees.
+ Only applied when [member particle_flag_disable_z] or [member particle_flag_rotate_y] are [code]true[/code] or the [BaseMaterial3D] being used to draw the particle is using [constant BaseMaterial3D.BILLBOARD_PARTICLES].
</member>
<member name="angle_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0">
- Minimum angle.
+ Minimum equivalent of [member angle_max].
</member>
<member name="angular_velocity_curve" type="Texture2D" setter="set_param_texture" getter="get_param_texture">
Each particle's angular velocity (rotation speed) will vary along this [CurveTexture] over its lifetime.
</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.
+ Only applied when [member particle_flag_disable_z] or [member particle_flag_rotate_y] are [code]true[/code] or the [BaseMaterial3D] being used to draw the particle is using [constant BaseMaterial3D.BILLBOARD_PARTICLES].
</member>
<member name="angular_velocity_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0">
- Minimum initial angular velocity (rotation speed) applied to each particle in [i]degrees[/i] per second.
+ Minimum equivalent of [member angular_velocity_max].
</member>
<member name="anim_offset_curve" type="Texture2D" setter="set_param_texture" getter="get_param_texture">
Each particle's animation offset will vary along this [CurveTexture].
</member>
<member name="anim_offset_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0">
- Maximum animation offset.
+ 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 animation offset.
+ Minimum equivalent of [member anim_offset_max].
</member>
<member name="anim_speed_curve" type="Texture2D" setter="set_param_texture" getter="get_param_texture">
Each particle's animation speed will vary along this [CurveTexture].
@@ -108,19 +110,20 @@
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 particle animation speed.
+ Minimum equivalent of [member anim_speed_max].
</member>
<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="ParticlesMaterial.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.
@@ -138,8 +141,10 @@
Damping will vary along this [CurveTexture].
</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="Vector3" setter="set_direction" getter="get_direction" default="Vector3(1, 0, 0)">
Unit vector specifying the particles' emission direction.
@@ -187,16 +192,16 @@
Each particle's hue will vary along this [CurveTexture].
</member>
<member name="hue_variation_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0">
- Maximum hue variation.
+ 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 hue variation.
+ 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.
+ 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 initial velocity.
+ Minimum equivalent of [member initial_velocity_max].
</member>
<member name="lifetime_randomness" type="float" setter="set_lifetime_randomness" getter="get_lifetime_randomness" default="0.0">
Particle lifetime randomness ratio. The lifetime will be multiplied by a value interpolated between [code]1.0[/code] and a random number less than one. For example a random ratio of [code]0.4[/code] would scale the original lifetime between [code]0.4-1.0[/code] of its original value.
@@ -205,19 +210,20 @@
Each particle's linear acceleration will vary along this [CurveTexture].
</member>
<member name="linear_accel_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0">
- Maximum linear acceleration.
+ 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 linear acceleration.
+ Minimum equivalent of [member linear_accel_min].
</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].
</member>
<member name="orbit_velocity_max" type="float" setter="set_param_max" getter="get_param_max">
- Maximum orbit velocity.
+ Maximum orbital velocity applied to each particle. Makes the particles circle around origin. Specified in number of full rotations around origin per second.
+ Only available when [member particle_flag_disable_z] is [code]true[/code].
</member>
<member name="orbit_velocity_min" type="float" setter="set_param_min" getter="get_param_min">
- Minimum orbit velocity.
+ 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.
@@ -232,19 +238,19 @@
Each particle's radial acceleration will vary along this [CurveTexture].
</member>
<member name="radial_accel_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0">
- Maximum radial acceleration.
+ 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 radial acceleration.
+ Minimum equivalent of [member radial_accel_max].
</member>
<member name="scale_curve" type="Texture2D" setter="set_param_texture" getter="get_param_texture">
Each particle's scale will vary along this [CurveTexture]. If a [CurveXYZTexture] is supplied instead, the scale will be separated per-axis.
</member>
<member name="scale_max" type="float" setter="set_param_max" getter="get_param_max" default="1.0">
- Maximum scale.
+ Maximum initial scale applied to each particle.
</member>
<member name="scale_min" type="float" setter="set_param_min" getter="get_param_min" default="1.0">
- Minimum scale.
+ Minimum equivalent of [member scale_max].
</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.
@@ -261,10 +267,46 @@
Each particle's tangential acceleration will vary along this [CurveTexture].
</member>
<member name="tangential_accel_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0">
- Maximum tangential acceleration.
+ 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 tangential acceleration.
+ Minimum equivalent of [member tangential_accel_max].
+ </member>
+ <member name="turbulence_enabled" type="bool" setter="set_turbulence_enabled" getter="get_turbulence_enabled" default="false">
+ Enables and disables Turbulence for the particle system.
+ </member>
+ <member name="turbulence_influence_max" type="float" setter="set_param_max" getter="get_param_max" default="0.1">
+ Minimum turbulence influence on each particle.
+ The actual amount of turbulence influence on each particle is calculated as a random value between [member turbulence_influence_min] and [member turbulence_influence_max] and multiplied by the amount of turbulence influence from [member turbulence_influence_over_life].
+ </member>
+ <member name="turbulence_influence_min" type="float" setter="set_param_min" getter="get_param_min" default="0.1">
+ Maximum turbulence influence on each particle.
+ The actual amount of turbulence influence on each particle is calculated as a random value between [member turbulence_influence_min] and [member turbulence_influence_max] and multiplied by the amount of turbulence influence from [member turbulence_influence_over_life].
+ </member>
+ <member name="turbulence_influence_over_life" type="Texture2D" setter="set_param_texture" getter="get_param_texture">
+ Each particle's amount of turbulence will be influenced along this [CurveTexture] over its life time.
+ </member>
+ <member name="turbulence_initial_displacement_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0">
+ Maximum displacement of each particles spawn position by the turbulence.
+ The actual amount of displacement will be a factor of the underlying turbulence multiplied by a random value between [member turbulence_initial_displacement_min] and [member turbulence_initial_displacement_max].
+ </member>
+ <member name="turbulence_initial_displacement_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0">
+ Minimum displacement of each particles spawn position by the turbulence.
+ The actual amount of displacement will be a factor of the underlying turbulence multiplied by a random value between [member turbulence_initial_displacement_min] and [member turbulence_initial_displacement_max].
+ </member>
+ <member name="turbulence_noise_scale" type="float" setter="set_turbulence_noise_scale" getter="get_turbulence_noise_scale" default="9.0">
+ This value controls the overall scale/frequency of the turbulence noise pattern.
+ A small scale will result in smaller features with more detail while a high scale will result in smoother noise with larger features.
+ </member>
+ <member name="turbulence_noise_speed" type="Vector3" setter="set_turbulence_noise_speed" getter="get_turbulence_noise_speed" default="Vector3(0.5, 0.5, 0.5)">
+ The movement speed of the turbulence pattern. This changes how quickly the noise changes over time.
+ A value of [code]Vector3(0.0, 0.0, 0.0)[/code] will freeze the turbulence pattern in place.
+ </member>
+ <member name="turbulence_noise_speed_random" type="float" setter="set_turbulence_noise_speed_random" getter="get_turbulence_noise_speed_random" default="0.0">
+ Use to influence the noise speed in a random pattern. This helps to break up visible movement patterns.
+ </member>
+ <member name="turbulence_noise_strength" type="float" setter="set_turbulence_noise_strength" getter="get_turbulence_noise_strength" default="1.0">
+ The turbulence noise strength. Increasing this will result in a stronger, more contrasting, noise pattern.
</member>
</members>
<constants>
@@ -304,7 +346,7 @@
<constant name="PARAM_ANIM_OFFSET" value="11" enum="Parameter">
Use with [method set_param_min], [method set_param_max], and [method set_param_texture] to set animation offset properties.
</constant>
- <constant name="PARAM_MAX" value="12" enum="Parameter">
+ <constant name="PARAM_MAX" value="15" enum="Parameter">
Represents the size of the [enum Parameter] enum.
</constant>
<constant name="PARTICLE_FLAG_ALIGN_Y_TO_VELOCITY" value="0" enum="ParticleFlags">
@@ -343,6 +385,15 @@
<constant name="EMISSION_SHAPE_MAX" value="7" enum="EmissionShape">
Represents the size of the [enum EmissionShape] enum.
</constant>
+ <constant name="PARAM_TURB_VEL_INFLUENCE" value="13" enum="Parameter">
+ Use with [method set_param_min] and [method set_param_max] to set the turbulence minimum und maximum influence on each particles velocity.
+ </constant>
+ <constant name="PARAM_TURB_INIT_DISPLACEMENT" value="14" enum="Parameter">
+ Use with [method set_param_min] and [method set_param_max] to set the turbulence minimum and maximum displacement of the particles spawn position.
+ </constant>
+ <constant name="PARAM_TURB_INFLUENCE_OVER_LIFE" value="12" enum="Parameter">
+ Use with [method set_param_texture] to set the turbulence influence over the particles life time.
+ </constant>
<constant name="SUB_EMITTER_DISABLED" value="0" enum="SubEmitterMode">
</constant>
<constant name="SUB_EMITTER_CONSTANT" value="1" enum="SubEmitterMode">
@@ -352,6 +403,19 @@
<constant name="SUB_EMITTER_AT_COLLISION" value="3" enum="SubEmitterMode">
</constant>
<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">
+ [RigidDynamicBody3D]-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..ba7207be8f 100644
--- a/doc/classes/PathFollow3D.xml
+++ b/doc/classes/PathFollow3D.xml
@@ -5,7 +5,7 @@
</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>
@@ -21,15 +21,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 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>
<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/Performance.xml b/doc/classes/Performance.xml
index 3b8e481519..92fa1040af 100644
--- a/doc/classes/Performance.xml
+++ b/doc/classes/Performance.xml
@@ -6,8 +6,8 @@
<description>
This class provides access to a number of different monitors related to performance, such as memory usage, draw calls, and FPS. These are the same as the values displayed in the [b]Monitor[/b] tab in the editor's [b]Debugger[/b] panel. By using the [method get_monitor] method of this class, you can access this data from your code.
You can add custom monitors using the [method add_custom_monitor] method. Custom monitors are available in [b]Monitor[/b] tab in the editor's [b]Debugger[/b] panel together with built-in monitors.
- [b]Note:[/b] A few of these monitors are only available in debug mode and will always return 0 when used in a release build.
- [b]Note:[/b] Many of these monitors are not updated in real-time, so there may be a short delay between changes.
+ [b]Note:[/b] Some of the built-in monitors are only available in debug mode and will always return [code]0[/code] when used in a project exported in release mode.
+ [b]Note:[/b] Some of the built-in monitors are not updated in real-time for performance reasons, so there may be a delay of up to 1 second between changes.
[b]Note:[/b] Custom monitors do not support negative values. Negative values are clamped to 0.
</description>
<tutorials>
@@ -15,11 +15,11 @@
<methods>
<method name="add_custom_monitor">
<return type="void" />
- <argument index="0" name="id" type="StringName" />
- <argument index="1" name="callable" type="Callable" />
- <argument index="2" name="arguments" type="Array" default="[]" />
+ <param index="0" name="id" type="StringName" />
+ <param index="1" name="callable" type="Callable" />
+ <param index="2" name="arguments" type="Array" default="[]" />
<description>
- Adds a custom monitor with name same as id. You can specify the category of monitor using '/' in id. If there are more than one '/' then default category is used. Default category is "Custom".
+ 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():
@@ -29,11 +29,11 @@
Performance.add_custom_monitor("MyCategory/MyMonitor", monitor_value)
# Adds monitor with name "MyName" to category "Custom".
- # Note: "MyCategory/MyMonitor" and "MyMonitor" have same name but different ids so the code is valid.
+ # Note: "MyCategory/MyMonitor" and "MyMonitor" have same name but different IDs, so the code is valid.
Performance.add_custom_monitor("MyMonitor", monitor_value)
# Adds monitor with name "MyName" to category "Custom".
- # Note: "MyMonitor" and "Custom/MyMonitor" have same name and same category but different ids so the code is valid.
+ # Note: "MyMonitor" and "Custom/MyMonitor" have same name and same category but different IDs, so the code is valid.
Performance.add_custom_monitor("Custom/MyMonitor", monitor_value)
# Adds monitor with name "MyCategoryOne/MyCategoryTwo/MyMonitor" to category "Custom".
@@ -67,30 +67,28 @@
}
[/csharp]
[/codeblocks]
- The debugger calls the callable to get the value of custom monitor. The callable must return a number.
+ The debugger calls the callable to get the value of custom monitor. The callable must return a zero or positive integer or floating-point number.
Callables are called with arguments supplied in argument array.
- [b]Note:[/b] It throws an error if given id is already present.
</description>
</method>
<method name="get_custom_monitor">
<return type="Variant" />
- <argument index="0" name="id" type="StringName" />
+ <param index="0" name="id" type="StringName" />
<description>
- Returns the value of custom monitor with given id. The callable is called to get the value of custom monitor.
- [b]Note:[/b] It throws an error if the given id 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.
+ Returns the names of active custom monitors in an [Array].
</description>
</method>
<method name="get_monitor" qualifiers="const">
<return type="float" />
- <argument index="0" name="monitor" type="int" enum="Performance.Monitor" />
+ <param index="0" name="monitor" type="int" enum="Performance.Monitor" />
<description>
- Returns the value of one of the available monitors. You should provide one of the [enum Monitor] constants as the argument, like this:
+ Returns the value of one of the available built-in monitors. You should provide one of the [enum Monitor] constants as the argument, like this:
[codeblocks]
[gdscript]
print(Performance.get_monitor(Performance.TIME_FPS)) # Prints the FPS to the console.
@@ -99,95 +97,99 @@
GD.Print(Performance.GetMonitor(Performance.Monitor.TimeFps)); // Prints the FPS to the console.
[/csharp]
[/codeblocks]
+ See [method get_custom_monitor] to query custom performance monitors' values.
</description>
</method>
<method name="get_monitor_modification_time">
<return type="int" />
<description>
- Returns the last tick in which custom monitor was added/removed.
+ Returns the last tick in which custom monitor was added/removed (in microseconds since the engine started). This is set to [method Time.get_ticks_usec] when the monitor is updated.
</description>
</method>
<method name="has_custom_monitor">
<return type="bool" />
- <argument index="0" name="id" type="StringName" />
+ <param index="0" name="id" type="StringName" />
<description>
- Returns true if custom monitor with the given id is present otherwise returns false.
+ 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" />
- <argument index="0" name="id" type="StringName" />
+ <param index="0" name="id" type="StringName" />
<description>
- Removes the custom monitor with given id.
- [b]Note:[/b] It throws an error if the given id 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>
<constants>
<constant name="TIME_FPS" value="0" enum="Monitor">
- Number of frames per second.
+ The number of frames rendered in the last second. This metric is only updated once per second, even if queried more often. [i]Higher is better.[/i]
</constant>
<constant name="TIME_PROCESS" value="1" enum="Monitor">
- Time it took to complete one frame, in seconds.
+ Time it took to complete one frame, in seconds. [i]Lower is better.[/i]
</constant>
<constant name="TIME_PHYSICS_PROCESS" value="2" enum="Monitor">
- Time it took to complete one physics frame, in seconds.
+ Time it took to complete one physics frame, in seconds. [i]Lower is better.[/i]
</constant>
<constant name="MEMORY_STATIC" value="3" enum="Monitor">
- Static memory currently used, in bytes. Not available in release builds.
+ Static memory currently used, in bytes. Not available in release builds. [i]Lower is better.[/i]
</constant>
<constant name="MEMORY_STATIC_MAX" value="4" enum="Monitor">
- Available static memory. Not available in release builds.
+ Available static memory. Not available in release builds. [i]Lower is better.[/i]
</constant>
<constant name="MEMORY_MESSAGE_BUFFER_MAX" value="5" enum="Monitor">
- Largest amount of memory the message queue buffer has used, in bytes. The message queue is used for deferred functions calls and notifications.
+ Largest amount of memory the message queue buffer has used, in bytes. The message queue is used for deferred functions calls and notifications. [i]Lower is better.[/i]
</constant>
<constant name="OBJECT_COUNT" value="6" enum="Monitor">
- Number of objects currently instantiated (including nodes).
+ Number of objects currently instantiated (including nodes). [i]Lower is better.[/i]
</constant>
<constant name="OBJECT_RESOURCE_COUNT" value="7" enum="Monitor">
- Number of resources currently used.
+ Number of resources currently used. [i]Lower is better.[/i]
</constant>
<constant name="OBJECT_NODE_COUNT" value="8" enum="Monitor">
- Number of nodes currently instantiated in the scene tree. This also includes the root node.
+ Number of nodes currently instantiated in the scene tree. This also includes the root node. [i]Lower is better.[/i]
</constant>
<constant name="OBJECT_ORPHAN_NODE_COUNT" value="9" enum="Monitor">
- Number of orphan nodes, i.e. nodes which are not parented to a node of the scene tree.
+ Number of orphan nodes, i.e. nodes which are not parented to a node of the scene tree. [i]Lower is better.[/i]
</constant>
<constant name="RENDER_TOTAL_OBJECTS_IN_FRAME" value="10" enum="Monitor">
+ The total number of objects in the last rendered frame. This metric doesn't include culled objects (either via hiding nodes, frustum culling or occlusion culling). [i]Lower is better.[/i]
</constant>
<constant name="RENDER_TOTAL_PRIMITIVES_IN_FRAME" value="11" enum="Monitor">
+ The total number of vertices or indices rendered in the last rendered frame. This metric doesn't include primitives from culled objects (either via hiding nodes, frustum culling or occlusion culling). Due to the depth prepass and shadow passes, the number of primitives is always higher than the actual number of vertices in the scene (typically double or triple the original vertex count). [i]Lower is better.[/i]
</constant>
<constant name="RENDER_TOTAL_DRAW_CALLS_IN_FRAME" value="12" enum="Monitor">
+ The total number of draw calls performed in the last rendered frame. This metric doesn't include culled objects (either via hiding nodes, frustum culling or occlusion culling), since they do not result in draw calls. [i]Lower is better.[/i]
</constant>
<constant name="RENDER_VIDEO_MEM_USED" value="13" enum="Monitor">
- The amount of video memory used, i.e. texture and vertex memory combined.
+ The amount of video memory used (texture and vertex memory combined, in bytes). Since this metric also includes miscellaneous allocations, this value is always greater than the sum of [constant RENDER_TEXTURE_MEM_USED] and [constant RENDER_BUFFER_MEM_USED]. [i]Lower is better.[/i]
</constant>
<constant name="RENDER_TEXTURE_MEM_USED" value="14" enum="Monitor">
- The amount of texture memory used.
+ The amount of texture memory used (in bytes). [i]Lower is better.[/i]
</constant>
<constant name="RENDER_BUFFER_MEM_USED" value="15" enum="Monitor">
+ 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.
+ Number of active [RigidDynamicBody2D] 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.
+ Number of collision pairs in the 2D physics engine. [i]Lower is better.[/i]
</constant>
<constant name="PHYSICS_2D_ISLAND_COUNT" value="18" enum="Monitor">
- Number of islands in the 2D physics engine.
+ 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.
+ Number of active [RigidDynamicBody3D] 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.
+ Number of collision pairs in the 3D physics engine. [i]Lower is better.[/i]
</constant>
<constant name="PHYSICS_3D_ISLAND_COUNT" value="21" enum="Monitor">
- Number of islands in the 3D physics engine.
+ Number of islands in the 3D physics engine. [i]Lower is better.[/i]
</constant>
<constant name="AUDIO_OUTPUT_LATENCY" value="22" enum="Monitor">
- Output latency of the [AudioServer].
+ Output latency of the [AudioServer]. [i]Lower is better.[/i]
</constant>
<constant name="MONITOR_MAX" value="23" enum="Monitor">
Represents the size of the [enum Monitor] enum.
diff --git a/doc/classes/PhysicalBone3D.xml b/doc/classes/PhysicalBone3D.xml
index 7e8cc91766..0768df31cc 100644
--- a/doc/classes/PhysicalBone3D.xml
+++ b/doc/classes/PhysicalBone3D.xml
@@ -9,21 +9,21 @@
<methods>
<method name="_integrate_forces" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="state" type="PhysicsDirectBodyState3D" />
+ <param index="0" name="state" type="PhysicsDirectBodyState3D" />
<description>
Called during physics processing, allowing you to read and safely modify the simulation state for the object. By default, it works in addition to the usual physics behavior, but the [member custom_integrator] property allows you to disable the default behavior and do fully custom force integration for a body.
</description>
</method>
<method name="apply_central_impulse">
<return type="void" />
- <argument index="0" name="impulse" type="Vector3" />
+ <param index="0" name="impulse" type="Vector3" />
<description>
</description>
</method>
<method name="apply_impulse">
<return type="void" />
- <argument index="0" name="impulse" type="Vector3" />
- <argument index="1" name="position" type="Vector3" default="Vector3(0, 0, 0)" />
+ <param index="0" name="impulse" type="Vector3" />
+ <param index="1" name="position" type="Vector3" default="Vector3(0, 0, 0)" />
<description>
</description>
</method>
diff --git a/doc/classes/PhysicalSkyMaterial.xml b/doc/classes/PhysicalSkyMaterial.xml
index 3e85074e41..7c2ea088c8 100644
--- a/doc/classes/PhysicalSkyMaterial.xml
+++ b/doc/classes/PhysicalSkyMaterial.xml
@@ -11,9 +11,6 @@
<tutorials>
</tutorials>
<members>
- <member name="dither_strength" type="float" setter="set_dither_strength" getter="get_dither_strength" default="1.0">
- Sets the amount of dithering to use. Dithering helps reduce banding that appears from the smooth changes in color in the sky. Use the lowest value possible, higher amounts may add fuzziness to the sky.
- </member>
<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>
@@ -44,5 +41,8 @@
<member name="turbidity" type="float" setter="set_turbidity" getter="get_turbidity" default="10.0">
Sets the thickness of the atmosphere. High turbidity creates a foggy-looking atmosphere, while a low turbidity results in a clearer atmosphere.
</member>
+ <member name="use_debanding" type="bool" setter="set_use_debanding" getter="get_use_debanding" default="true">
+ If [code]true[/code], enables debanding. Debanding adds a small amount of noise which helps reduce banding that appears from the smooth changes in color in the sky.
+ </member>
</members>
</class>
diff --git a/doc/classes/PhysicsBody2D.xml b/doc/classes/PhysicsBody2D.xml
index 9cebd68d76..e8d7ac9920 100644
--- a/doc/classes/PhysicsBody2D.xml
+++ b/doc/classes/PhysicsBody2D.xml
@@ -12,7 +12,7 @@
<methods>
<method name="add_collision_exception_with">
<return type="void" />
- <argument index="0" name="body" type="Node" />
+ <param index="0" name="body" type="Node" />
<description>
Adds a body to the list of bodies that this body can't collide with.
</description>
@@ -25,34 +25,34 @@
</method>
<method name="move_and_collide">
<return type="KinematicCollision2D" />
- <argument index="0" name="distance" type="Vector2" />
- <argument index="1" name="test_only" type="bool" default="false" />
- <argument index="2" name="safe_margin" type="float" default="0.08" />
+ <param index="0" name="distance" type="Vector2" />
+ <param index="1" name="test_only" type="bool" default="false" />
+ <param index="2" name="safe_margin" type="float" default="0.08" />
<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 distance]. In order to be frame rate independent in [method Node._physics_process] or [method Node._process], [param distance] 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).
</description>
</method>
<method name="remove_collision_exception_with">
<return type="void" />
- <argument index="0" name="body" type="Node" />
+ <param index="0" name="body" type="Node" />
<description>
Removes a body from the list of bodies that this body can't collide with.
</description>
</method>
<method name="test_move">
<return type="bool" />
- <argument index="0" name="from" type="Transform2D" />
- <argument index="1" name="distance" type="Vector2" />
- <argument index="2" name="collision" type="KinematicCollision2D" default="null" />
- <argument index="3" name="safe_margin" type="float" default="0.08" />
+ <param index="0" name="from" type="Transform2D" />
+ <param index="1" name="distance" type="Vector2" />
+ <param index="2" name="collision" type="KinematicCollision2D" default="null" />
+ <param index="3" name="safe_margin" type="float" default="0.08" />
<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 distance] 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 distance]. 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).
</description>
</method>
</methods>
diff --git a/doc/classes/PhysicsBody3D.xml b/doc/classes/PhysicsBody3D.xml
index 843f813997..310671274f 100644
--- a/doc/classes/PhysicsBody3D.xml
+++ b/doc/classes/PhysicsBody3D.xml
@@ -12,16 +12,16 @@
<methods>
<method name="add_collision_exception_with">
<return type="void" />
- <argument index="0" name="body" type="Node" />
+ <param index="0" name="body" type="Node" />
<description>
Adds a body to the list of bodies that this body can't collide with.
</description>
</method>
<method name="get_axis_lock" qualifiers="const">
<return type="bool" />
- <argument index="0" name="axis" type="int" enum="PhysicsServer3D.BodyAxis" />
+ <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,46 +32,46 @@
</method>
<method name="move_and_collide">
<return type="KinematicCollision3D" />
- <argument index="0" name="distance" type="Vector3" />
- <argument index="1" name="test_only" type="bool" default="false" />
- <argument index="2" name="safe_margin" type="float" default="0.001" />
- <argument index="3" name="max_collisions" type="int" default="1" />
+ <param index="0" name="distance" 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" />
<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 distance]. In order to be frame rate independent in [method Node._physics_process] or [method Node._process], [param distance] 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).
+ [param max_collisions] allows to retrieve more than one collision result.
</description>
</method>
<method name="remove_collision_exception_with">
<return type="void" />
- <argument index="0" name="body" type="Node" />
+ <param index="0" name="body" type="Node" />
<description>
Removes a body from the list of bodies that this body can't collide with.
</description>
</method>
<method name="set_axis_lock">
<return type="void" />
- <argument index="0" name="axis" type="int" enum="PhysicsServer3D.BodyAxis" />
- <argument index="1" name="lock" type="bool" />
+ <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" />
- <argument index="0" name="from" type="Transform3D" />
- <argument index="1" name="distance" type="Vector3" />
- <argument index="2" name="collision" type="KinematicCollision3D" default="null" />
- <argument index="3" name="safe_margin" type="float" default="0.001" />
- <argument index="4" name="max_collisions" type="int" default="1" />
+ <param index="0" name="from" type="Transform3D" />
+ <param index="1" name="distance" 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" />
<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 distance] 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 distance]. 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).
+ [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 783b0488d8..93c9f83ff2 100644
--- a/doc/classes/PhysicsDirectBodyState2D.xml
+++ b/doc/classes/PhysicsDirectBodyState2D.xml
@@ -13,7 +13,7 @@
<methods>
<method name="add_constant_central_force">
<return type="void" />
- <argument index="0" name="force" type="Vector2" default="Vector2(0, 0)" />
+ <param index="0" name="force" type="Vector2" default="Vector2(0, 0)" />
<description>
Adds a constant directional force without affecting rotation that keeps being applied over time until cleared with [code]constant_force = Vector2(0, 0)[/code].
This is equivalent to using [method add_constant_force] at the body's center of mass.
@@ -21,23 +21,23 @@
</method>
<method name="add_constant_force">
<return type="void" />
- <argument index="0" name="force" type="Vector2" />
- <argument index="1" name="position" type="Vector2" default="Vector2(0, 0)" />
+ <param index="0" name="force" type="Vector2" />
+ <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">
<return type="void" />
- <argument index="0" name="torque" type="float" />
+ <param index="0" name="torque" type="float" />
<description>
Adds a constant rotational force without affecting position that keeps being applied over time until cleared with [code]constant_torque = 0[/code].
</description>
</method>
<method name="apply_central_force">
<return type="void" />
- <argument index="0" name="force" type="Vector2" default="Vector2(0, 0)" />
+ <param index="0" name="force" type="Vector2" default="Vector2(0, 0)" />
<description>
Applies a directional force without affecting rotation. A force is time dependent and meant to be applied every physics update.
This is equivalent to using [method apply_force] at the body's center of mass.
@@ -45,7 +45,7 @@
</method>
<method name="apply_central_impulse">
<return type="void" />
- <argument index="0" name="impulse" type="Vector2" />
+ <param index="0" name="impulse" type="Vector2" />
<description>
Applies a directional impulse without affecting rotation.
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).
@@ -54,33 +54,33 @@
</method>
<method name="apply_force">
<return type="void" />
- <argument index="0" name="force" type="Vector2" />
- <argument index="1" name="position" type="Vector2" default="Vector2(0, 0)" />
+ <param index="0" name="force" type="Vector2" />
+ <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">
<return type="void" />
- <argument index="0" name="impulse" type="Vector2" />
- <argument index="1" name="position" type="Vector2" default="Vector2(0, 0)" />
+ <param index="0" name="impulse" type="Vector2" />
+ <param index="1" name="position" type="Vector2" default="Vector2(0, 0)" />
<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">
<return type="void" />
- <argument index="0" name="torque" type="float" />
+ <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.
</description>
</method>
<method name="apply_torque_impulse">
<return type="void" />
- <argument index="0" name="impulse" type="float" />
+ <param index="0" name="impulse" type="float" />
<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).
@@ -102,42 +102,42 @@
</method>
<method name="get_contact_collider" qualifiers="const">
<return type="RID" />
- <argument index="0" name="contact_idx" type="int" />
+ <param index="0" name="contact_idx" type="int" />
<description>
Returns the collider's [RID].
</description>
</method>
<method name="get_contact_collider_id" qualifiers="const">
<return type="int" />
- <argument index="0" name="contact_idx" type="int" />
+ <param index="0" name="contact_idx" type="int" />
<description>
Returns the collider's object id.
</description>
</method>
<method name="get_contact_collider_object" qualifiers="const">
<return type="Object" />
- <argument index="0" name="contact_idx" type="int" />
+ <param index="0" name="contact_idx" type="int" />
<description>
Returns the collider object. This depends on how it was created (will return a scene node if such was used to create it).
</description>
</method>
<method name="get_contact_collider_position" qualifiers="const">
<return type="Vector2" />
- <argument index="0" name="contact_idx" type="int" />
+ <param index="0" name="contact_idx" type="int" />
<description>
Returns the contact position in the collider.
</description>
</method>
<method name="get_contact_collider_shape" qualifiers="const">
<return type="int" />
- <argument index="0" name="contact_idx" type="int" />
+ <param index="0" name="contact_idx" type="int" />
<description>
Returns the collider's shape index.
</description>
</method>
<method name="get_contact_collider_velocity_at_position" qualifiers="const">
<return type="Vector2" />
- <argument index="0" name="contact_idx" type="int" />
+ <param index="0" name="contact_idx" type="int" />
<description>
Returns the linear velocity vector at the collider's contact point.
</description>
@@ -151,21 +151,21 @@
</method>
<method name="get_contact_local_normal" qualifiers="const">
<return type="Vector2" />
- <argument index="0" name="contact_idx" type="int" />
+ <param index="0" name="contact_idx" type="int" />
<description>
Returns the local normal at the contact point.
</description>
</method>
<method name="get_contact_local_position" qualifiers="const">
<return type="Vector2" />
- <argument index="0" name="contact_idx" type="int" />
+ <param index="0" name="contact_idx" type="int" />
<description>
Returns the local position of the contact point.
</description>
</method>
<method name="get_contact_local_shape" qualifiers="const">
<return type="int" />
- <argument index="0" name="contact_idx" type="int" />
+ <param index="0" name="contact_idx" type="int" />
<description>
Returns the local shape index of the collision.
</description>
@@ -178,7 +178,7 @@
</method>
<method name="get_velocity_at_local_position" qualifiers="const">
<return type="Vector2" />
- <argument index="0" name="local_position" type="Vector2" />
+ <param index="0" name="local_position" type="Vector2" />
<description>
Returns the body's velocity at the given relative position, including both translation and rotation.
</description>
@@ -191,7 +191,7 @@
</method>
<method name="set_constant_force">
<return type="void" />
- <argument index="0" name="force" type="Vector2" />
+ <param index="0" name="force" type="Vector2" />
<description>
Sets the body's total constant positional forces applied during each physics update.
See [method add_constant_force] and [method add_constant_central_force].
@@ -199,7 +199,7 @@
</method>
<method name="set_constant_torque">
<return type="void" />
- <argument index="0" name="torque" type="float" />
+ <param index="0" name="torque" type="float" />
<description>
Sets the body's total constant rotational forces applied during each physics update.
See [method add_constant_torque].
diff --git a/doc/classes/PhysicsDirectBodyState3D.xml b/doc/classes/PhysicsDirectBodyState3D.xml
index 16c53b0727..62eb9f6ac4 100644
--- a/doc/classes/PhysicsDirectBodyState3D.xml
+++ b/doc/classes/PhysicsDirectBodyState3D.xml
@@ -13,7 +13,7 @@
<methods>
<method name="add_constant_central_force">
<return type="void" />
- <argument index="0" name="force" type="Vector3" default="Vector3(0, 0, 0)" />
+ <param index="0" name="force" type="Vector3" default="Vector3(0, 0, 0)" />
<description>
Adds a constant directional force without affecting rotation that keeps being applied over time until cleared with [code]constant_force = Vector3(0, 0, 0)[/code].
This is equivalent to using [method add_constant_force] at the body's center of mass.
@@ -21,23 +21,23 @@
</method>
<method name="add_constant_force">
<return type="void" />
- <argument index="0" name="force" type="Vector3" />
- <argument index="1" name="position" type="Vector3" default="Vector3(0, 0, 0)" />
+ <param index="0" name="force" type="Vector3" />
+ <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">
<return type="void" />
- <argument index="0" name="torque" type="Vector3" />
+ <param index="0" name="torque" type="Vector3" />
<description>
Adds a constant rotational force without affecting position that keeps being applied over time until cleared with [code]constant_torque = Vector3(0, 0, 0)[/code].
</description>
</method>
<method name="apply_central_force">
<return type="void" />
- <argument index="0" name="force" type="Vector3" default="Vector3(0, 0, 0)" />
+ <param index="0" name="force" type="Vector3" default="Vector3(0, 0, 0)" />
<description>
Applies a directional force without affecting rotation. A force is time dependent and meant to be applied every physics update.
This is equivalent to using [method apply_force] at the body's center of mass.
@@ -45,7 +45,7 @@
</method>
<method name="apply_central_impulse">
<return type="void" />
- <argument index="0" name="impulse" type="Vector3" default="Vector3(0, 0, 0)" />
+ <param index="0" name="impulse" type="Vector3" default="Vector3(0, 0, 0)" />
<description>
Applies a directional impulse without affecting rotation.
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).
@@ -54,33 +54,33 @@
</method>
<method name="apply_force">
<return type="void" />
- <argument index="0" name="force" type="Vector3" />
- <argument index="1" name="position" type="Vector3" default="Vector3(0, 0, 0)" />
+ <param index="0" name="force" type="Vector3" />
+ <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">
<return type="void" />
- <argument index="0" name="impulse" type="Vector3" />
- <argument index="1" name="position" type="Vector3" default="Vector3(0, 0, 0)" />
+ <param index="0" name="impulse" type="Vector3" />
+ <param index="1" name="position" type="Vector3" default="Vector3(0, 0, 0)" />
<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">
<return type="void" />
- <argument index="0" name="torque" type="Vector3" />
+ <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.
</description>
</method>
<method name="apply_torque_impulse">
<return type="void" />
- <argument index="0" name="impulse" type="Vector3" />
+ <param index="0" name="impulse" type="Vector3" />
<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).
@@ -102,42 +102,42 @@
</method>
<method name="get_contact_collider" qualifiers="const">
<return type="RID" />
- <argument index="0" name="contact_idx" type="int" />
+ <param index="0" name="contact_idx" type="int" />
<description>
Returns the collider's [RID].
</description>
</method>
<method name="get_contact_collider_id" qualifiers="const">
<return type="int" />
- <argument index="0" name="contact_idx" type="int" />
+ <param index="0" name="contact_idx" type="int" />
<description>
Returns the collider's object id.
</description>
</method>
<method name="get_contact_collider_object" qualifiers="const">
<return type="Object" />
- <argument index="0" name="contact_idx" type="int" />
+ <param index="0" name="contact_idx" type="int" />
<description>
Returns the collider object.
</description>
</method>
<method name="get_contact_collider_position" qualifiers="const">
<return type="Vector3" />
- <argument index="0" name="contact_idx" type="int" />
+ <param index="0" name="contact_idx" type="int" />
<description>
Returns the contact position in the collider.
</description>
</method>
<method name="get_contact_collider_shape" qualifiers="const">
<return type="int" />
- <argument index="0" name="contact_idx" type="int" />
+ <param index="0" name="contact_idx" type="int" />
<description>
Returns the collider's shape index.
</description>
</method>
<method name="get_contact_collider_velocity_at_position" qualifiers="const">
<return type="Vector3" />
- <argument index="0" name="contact_idx" type="int" />
+ <param index="0" name="contact_idx" type="int" />
<description>
Returns the linear velocity vector at the collider's contact point.
</description>
@@ -151,28 +151,28 @@
</method>
<method name="get_contact_impulse" qualifiers="const">
<return type="float" />
- <argument index="0" name="contact_idx" type="int" />
+ <param index="0" name="contact_idx" type="int" />
<description>
Impulse created by the contact. Only implemented for Bullet physics.
</description>
</method>
<method name="get_contact_local_normal" qualifiers="const">
<return type="Vector3" />
- <argument index="0" name="contact_idx" type="int" />
+ <param index="0" name="contact_idx" type="int" />
<description>
Returns the local normal at the contact point.
</description>
</method>
<method name="get_contact_local_position" qualifiers="const">
<return type="Vector3" />
- <argument index="0" name="contact_idx" type="int" />
+ <param index="0" name="contact_idx" type="int" />
<description>
Returns the local position of the contact point.
</description>
</method>
<method name="get_contact_local_shape" qualifiers="const">
<return type="int" />
- <argument index="0" name="contact_idx" type="int" />
+ <param index="0" name="contact_idx" type="int" />
<description>
Returns the local shape index of the collision.
</description>
@@ -185,7 +185,7 @@
</method>
<method name="get_velocity_at_local_position" qualifiers="const">
<return type="Vector3" />
- <argument index="0" name="local_position" type="Vector3" />
+ <param index="0" name="local_position" type="Vector3" />
<description>
Returns the body's velocity at the given relative position, including both translation and rotation.
</description>
@@ -198,7 +198,7 @@
</method>
<method name="set_constant_force">
<return type="void" />
- <argument index="0" name="force" type="Vector3" />
+ <param index="0" name="force" type="Vector3" />
<description>
Sets the body's total constant positional forces applied during each physics update.
See [method add_constant_force] and [method add_constant_central_force].
@@ -206,7 +206,7 @@
</method>
<method name="set_constant_torque">
<return type="void" />
- <argument index="0" name="torque" type="Vector3" />
+ <param index="0" name="torque" type="Vector3" />
<description>
Sets the body's total constant rotational forces applied during each physics update.
See [method add_constant_torque].
diff --git a/doc/classes/PhysicsDirectBodyState3DExtension.xml b/doc/classes/PhysicsDirectBodyState3DExtension.xml
index f0659f8f1b..ade197eadc 100644
--- a/doc/classes/PhysicsDirectBodyState3DExtension.xml
+++ b/doc/classes/PhysicsDirectBodyState3DExtension.xml
@@ -9,58 +9,58 @@
<methods>
<method name="_add_constant_central_force" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="force" type="Vector3" />
+ <param index="0" name="force" type="Vector3" />
<description>
</description>
</method>
<method name="_add_constant_force" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="force" type="Vector3" />
- <argument index="1" name="position" type="Vector3" />
+ <param index="0" name="force" type="Vector3" />
+ <param index="1" name="position" type="Vector3" />
<description>
</description>
</method>
<method name="_add_constant_torque" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="torque" type="Vector3" />
+ <param index="0" name="torque" type="Vector3" />
<description>
</description>
</method>
<method name="_apply_central_force" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="force" type="Vector3" />
+ <param index="0" name="force" type="Vector3" />
<description>
</description>
</method>
<method name="_apply_central_impulse" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="impulse" type="Vector3" />
+ <param index="0" name="impulse" type="Vector3" />
<description>
</description>
</method>
<method name="_apply_force" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="force" type="Vector3" />
- <argument index="1" name="position" type="Vector3" />
+ <param index="0" name="force" type="Vector3" />
+ <param index="1" name="position" type="Vector3" />
<description>
</description>
</method>
<method name="_apply_impulse" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="impulse" type="Vector3" />
- <argument index="1" name="position" type="Vector3" />
+ <param index="0" name="impulse" type="Vector3" />
+ <param index="1" name="position" type="Vector3" />
<description>
</description>
</method>
<method name="_apply_torque" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="torque" type="Vector3" />
+ <param index="0" name="torque" type="Vector3" />
<description>
</description>
</method>
<method name="_apply_torque_impulse" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="impulse" type="Vector3" />
+ <param index="0" name="impulse" type="Vector3" />
<description>
</description>
</method>
@@ -91,37 +91,37 @@
</method>
<method name="_get_contact_collider" qualifiers="virtual const">
<return type="RID" />
- <argument index="0" name="contact_idx" type="int" />
+ <param index="0" name="contact_idx" type="int" />
<description>
</description>
</method>
<method name="_get_contact_collider_id" qualifiers="virtual const">
<return type="int" />
- <argument index="0" name="contact_idx" 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" />
- <argument index="0" name="contact_idx" type="int" />
+ <param index="0" name="contact_idx" type="int" />
<description>
</description>
</method>
<method name="_get_contact_collider_position" qualifiers="virtual const">
<return type="Vector3" />
- <argument index="0" name="contact_idx" type="int" />
+ <param index="0" name="contact_idx" type="int" />
<description>
</description>
</method>
<method name="_get_contact_collider_shape" qualifiers="virtual const">
<return type="int" />
- <argument index="0" name="contact_idx" 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="Vector3" />
- <argument index="0" name="contact_idx" type="int" />
+ <param index="0" name="contact_idx" type="int" />
<description>
</description>
</method>
@@ -132,25 +132,25 @@
</method>
<method name="_get_contact_impulse" qualifiers="virtual const">
<return type="float" />
- <argument index="0" name="contact_idx" type="int" />
+ <param index="0" name="contact_idx" type="int" />
<description>
</description>
</method>
<method name="_get_contact_local_normal" qualifiers="virtual const">
<return type="Vector3" />
- <argument index="0" name="contact_idx" type="int" />
+ <param index="0" name="contact_idx" type="int" />
<description>
</description>
</method>
<method name="_get_contact_local_position" qualifiers="virtual const">
<return type="Vector3" />
- <argument index="0" name="contact_idx" type="int" />
+ <param index="0" name="contact_idx" type="int" />
<description>
</description>
</method>
<method name="_get_contact_local_shape" qualifiers="virtual const">
<return type="int" />
- <argument index="0" name="contact_idx" type="int" />
+ <param index="0" name="contact_idx" type="int" />
<description>
</description>
</method>
@@ -206,7 +206,7 @@
</method>
<method name="_get_velocity_at_local_position" qualifiers="virtual const">
<return type="Vector3" />
- <argument index="0" name="local_position" type="Vector3" />
+ <param index="0" name="local_position" type="Vector3" />
<description>
</description>
</method>
@@ -222,37 +222,37 @@
</method>
<method name="_set_angular_velocity" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="velocity" type="Vector3" />
+ <param index="0" name="velocity" type="Vector3" />
<description>
</description>
</method>
<method name="_set_constant_force" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="force" type="Vector3" />
+ <param index="0" name="force" type="Vector3" />
<description>
</description>
</method>
<method name="_set_constant_torque" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="torque" type="Vector3" />
+ <param index="0" name="torque" type="Vector3" />
<description>
</description>
</method>
<method name="_set_linear_velocity" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="velocity" type="Vector3" />
+ <param index="0" name="velocity" type="Vector3" />
<description>
</description>
</method>
<method name="_set_sleep_state" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="enabled" type="bool" />
+ <param index="0" name="enabled" type="bool" />
<description>
</description>
</method>
<method name="_set_transform" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="transform" type="Transform3D" />
+ <param index="0" name="transform" type="Transform3D" />
<description>
</description>
</method>
diff --git a/doc/classes/PhysicsDirectSpaceState2D.xml b/doc/classes/PhysicsDirectSpaceState2D.xml
index 0b95243fe6..d4cb073d15 100644
--- a/doc/classes/PhysicsDirectSpaceState2D.xml
+++ b/doc/classes/PhysicsDirectSpaceState2D.xml
@@ -12,8 +12,8 @@
</tutorials>
<methods>
<method name="cast_motion">
- <return type="Array" />
- <argument index="0" name="parameters" type="PhysicsShapeQueryParameters2D" />
+ <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.
Returns an array with the safe and unsafe proportions (between 0 and 1) of the motion. The safe proportion is the maximum fraction of the motion that can be made without a collision. The unsafe proportion is the minimum fraction of the distance that must be moved for a collision. If no collision is detected a result of [code][1.0, 1.0][/code] will be returned.
@@ -21,9 +21,9 @@
</description>
</method>
<method name="collide_shape">
- <return type="Array" />
- <argument index="0" name="parameters" type="PhysicsShapeQueryParameters2D" />
- <argument index="1" name="max_results" type="int" default="32" />
+ <return type="PackedVector2Array[]" />
+ <param index="0" name="parameters" type="PhysicsShapeQueryParameters2D" />
+ <param index="1" name="max_results" type="int" default="32" />
<description>
Checks the intersections of a shape, given through a [PhysicsShapeQueryParameters2D] object, against the space. The resulting array contains a list of points where the shape intersects another. Like with [method intersect_shape], the number of returned results can be limited to save processing time.
Returned points are a list of pairs of contact points. For each pair the first one is in the shape passed in [PhysicsShapeQueryParameters2D] object, second one is in the collided shape from the physics space.
@@ -31,7 +31,7 @@
</method>
<method name="get_rest_info">
<return type="Dictionary" />
- <argument index="0" name="parameters" type="PhysicsShapeQueryParameters2D" />
+ <param index="0" name="parameters" type="PhysicsShapeQueryParameters2D" />
<description>
Checks the intersections of a shape, given through a [PhysicsShapeQueryParameters2D] object, against the space. If it collides with more than one shape, the nearest one is selected. If the shape did not intersect anything, then an empty dictionary is returned instead.
[b]Note:[/b] This method does not take into account the [code]motion[/code] property of the object. The returned object is a dictionary containing the following fields:
@@ -44,22 +44,22 @@
</description>
</method>
<method name="intersect_point">
- <return type="Array" />
- <argument index="0" name="parameters" type="PhysicsPointQueryParameters2D" />
- <argument index="1" name="max_results" type="int" default="32" />
+ <return type="Dictionary[]" />
+ <param index="0" name="parameters" type="PhysicsPointQueryParameters2D" />
+ <param index="1" name="max_results" type="int" default="32" />
<description>
Checks whether a point is inside any solid shape. Position and other parameters are defined through [PhysicsPointQueryParameters2D]. The shapes the point is inside of are returned in an array containing dictionaries with the following fields:
[code]collider[/code]: The colliding object.
[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>
<method name="intersect_ray">
<return type="Dictionary" />
- <argument index="0" name="parameters" type="PhysicsRayQueryParameters2D" />
+ <param index="0" name="parameters" type="PhysicsRayQueryParameters2D" />
<description>
Intersects a ray in a given space. Ray position and other parameters are defined through [PhysicsRayQueryParameters2D]. The returned object is a dictionary with the following fields:
[code]collider[/code]: The colliding object.
@@ -72,16 +72,16 @@
</description>
</method>
<method name="intersect_shape">
- <return type="Array" />
- <argument index="0" name="parameters" type="PhysicsShapeQueryParameters2D" />
- <argument index="1" name="max_results" type="int" default="32" />
+ <return type="Dictionary[]" />
+ <param index="0" name="parameters" type="PhysicsShapeQueryParameters2D" />
+ <param index="1" name="max_results" type="int" default="32" />
<description>
Checks the intersections of a shape, given through a [PhysicsShapeQueryParameters2D] object, against the space. The intersected shapes are returned in an array containing dictionaries with the following fields:
[code]collider[/code]: The colliding object.
[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/PhysicsDirectSpaceState3D.xml b/doc/classes/PhysicsDirectSpaceState3D.xml
index 048baed345..cc1cf8a323 100644
--- a/doc/classes/PhysicsDirectSpaceState3D.xml
+++ b/doc/classes/PhysicsDirectSpaceState3D.xml
@@ -12,8 +12,8 @@
</tutorials>
<methods>
<method name="cast_motion">
- <return type="Array" />
- <argument index="0" name="parameters" type="PhysicsShapeQueryParameters3D" />
+ <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.
Returns an array with the safe and unsafe proportions (between 0 and 1) of the motion. The safe proportion is the maximum fraction of the motion that can be made without a collision. The unsafe proportion is the minimum fraction of the distance that must be moved for a collision. If no collision is detected a result of [code][1.0, 1.0][/code] will be returned.
@@ -21,9 +21,9 @@
</description>
</method>
<method name="collide_shape">
- <return type="Array" />
- <argument index="0" name="parameters" type="PhysicsShapeQueryParameters3D" />
- <argument index="1" name="max_results" type="int" default="32" />
+ <return type="PackedVector2Array[]" />
+ <param index="0" name="parameters" type="PhysicsShapeQueryParameters3D" />
+ <param index="1" name="max_results" type="int" default="32" />
<description>
Checks the intersections of a shape, given through a [PhysicsShapeQueryParameters3D] object, against the space. The resulting array contains a list of points where the shape intersects another. Like with [method intersect_shape], the number of returned results can be limited to save processing time.
Returned points are a list of pairs of contact points. For each pair the first one is in the shape passed in [PhysicsShapeQueryParameters3D] object, second one is in the collided shape from the physics space.
@@ -32,7 +32,7 @@
</method>
<method name="get_rest_info">
<return type="Dictionary" />
- <argument index="0" name="parameters" type="PhysicsShapeQueryParameters3D" />
+ <param index="0" name="parameters" type="PhysicsShapeQueryParameters3D" />
<description>
Checks the intersections of a shape, given through a [PhysicsShapeQueryParameters3D] object, against the space. If it collides with more than one shape, the nearest one is selected. The returned object is a dictionary containing the following fields:
[code]collider_id[/code]: The colliding object's ID.
@@ -46,21 +46,21 @@
</description>
</method>
<method name="intersect_point">
- <return type="Array" />
- <argument index="0" name="parameters" type="PhysicsPointQueryParameters3D" />
- <argument index="1" name="max_results" type="int" default="32" />
+ <return type="Dictionary[]" />
+ <param index="0" name="parameters" type="PhysicsPointQueryParameters3D" />
+ <param index="1" name="max_results" type="int" default="32" />
<description>
Checks whether a point is inside any solid shape. Position and other parameters are defined through [PhysicsPointQueryParameters3D]. The shapes the point is inside of are returned in an array containing dictionaries with the following fields:
[code]collider[/code]: The colliding object.
[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">
<return type="Dictionary" />
- <argument index="0" name="parameters" type="PhysicsRayQueryParameters3D" />
+ <param index="0" name="parameters" type="PhysicsRayQueryParameters3D" />
<description>
Intersects a ray in a given space. Ray position and other parameters are defined through [PhysicsRayQueryParameters3D]. The returned object is a dictionary with the following fields:
[code]collider[/code]: The colliding object.
@@ -73,16 +73,16 @@
</description>
</method>
<method name="intersect_shape">
- <return type="Array" />
- <argument index="0" name="parameters" type="PhysicsShapeQueryParameters3D" />
- <argument index="1" name="max_results" type="int" default="32" />
+ <return type="Dictionary[]" />
+ <param index="0" name="parameters" type="PhysicsShapeQueryParameters3D" />
+ <param index="1" name="max_results" type="int" default="32" />
<description>
Checks the intersections of a shape, given through a [PhysicsShapeQueryParameters3D] object, against the space. The intersected shapes are returned in an array containing dictionaries with the following fields:
[code]collider[/code]: The colliding object.
[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/PhysicsDirectSpaceState3DExtension.xml b/doc/classes/PhysicsDirectSpaceState3DExtension.xml
index f150907963..98593012db 100644
--- a/doc/classes/PhysicsDirectSpaceState3DExtension.xml
+++ b/doc/classes/PhysicsDirectSpaceState3DExtension.xml
@@ -9,89 +9,89 @@
<methods>
<method name="_cast_motion" qualifiers="virtual">
<return type="bool" />
- <argument index="0" name="shape_rid" type="RID" />
- <argument index="1" name="transform" type="Transform3D" />
- <argument index="2" name="motion" type="Vector3" />
- <argument index="3" name="margin" type="float" />
- <argument index="4" name="collision_mask" type="int" />
- <argument index="5" name="collide_with_bodies" type="bool" />
- <argument index="6" name="collide_with_areas" type="bool" />
- <argument index="7" name="closest_safe" type="float*" />
- <argument index="8" name="closest_unsafe" type="float*" />
- <argument index="9" name="info" type="PhysicsServer3DExtensionShapeRestInfo*" />
+ <param index="0" name="shape_rid" type="RID" />
+ <param index="1" name="transform" type="Transform3D" />
+ <param index="2" name="motion" type="Vector3" />
+ <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*" />
+ <param index="9" name="info" type="PhysicsServer3DExtensionShapeRestInfo*" />
<description>
</description>
</method>
<method name="_collide_shape" qualifiers="virtual">
<return type="bool" />
- <argument index="0" name="shape_rid" type="RID" />
- <argument index="1" name="transform" type="Transform3D" />
- <argument index="2" name="motion" type="Vector3" />
- <argument index="3" name="margin" type="float" />
- <argument index="4" name="collision_mask" type="int" />
- <argument index="5" name="collide_with_bodies" type="bool" />
- <argument index="6" name="collide_with_areas" type="bool" />
- <argument index="7" name="results" type="void*" />
- <argument index="8" name="max_results" type="int" />
- <argument index="9" name="result_count" type="int32_t*" />
+ <param index="0" name="shape_rid" type="RID" />
+ <param index="1" name="transform" type="Transform3D" />
+ <param index="2" name="motion" type="Vector3" />
+ <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="_get_closest_point_to_object_volume" qualifiers="virtual const">
<return type="Vector3" />
- <argument index="0" name="object" type="RID" />
- <argument index="1" name="point" type="Vector3" />
+ <param index="0" name="object" type="RID" />
+ <param index="1" name="point" type="Vector3" />
<description>
</description>
</method>
<method name="_intersect_point" qualifiers="virtual">
<return type="int" />
- <argument index="0" name="position" type="Vector3" />
- <argument index="1" name="collision_mask" type="int" />
- <argument index="2" name="collide_with_bodies" type="bool" />
- <argument index="3" name="collide_with_areas" type="bool" />
- <argument index="4" name="results" type="PhysicsServer3DExtensionShapeResult*" />
- <argument index="5" name="max_results" type="int" />
+ <param index="0" name="position" type="Vector3" />
+ <param index="1" name="collision_mask" type="int" />
+ <param index="2" name="collide_with_bodies" type="bool" />
+ <param index="3" name="collide_with_areas" type="bool" />
+ <param index="4" name="results" type="PhysicsServer3DExtensionShapeResult*" />
+ <param index="5" name="max_results" type="int" />
<description>
</description>
</method>
<method name="_intersect_ray" qualifiers="virtual">
<return type="bool" />
- <argument index="0" name="from" type="Vector3" />
- <argument index="1" name="to" type="Vector3" />
- <argument index="2" name="collision_mask" type="int" />
- <argument index="3" name="collide_with_bodies" type="bool" />
- <argument index="4" name="collide_with_areas" type="bool" />
- <argument index="5" name="hit_from_inside" type="bool" />
- <argument index="6" name="hit_back_faces" type="bool" />
- <argument index="7" name="result" type="PhysicsServer3DExtensionRayResult*" />
+ <param index="0" name="from" type="Vector3" />
+ <param index="1" name="to" type="Vector3" />
+ <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="hit_back_faces" type="bool" />
+ <param index="7" name="result" type="PhysicsServer3DExtensionRayResult*" />
<description>
</description>
</method>
<method name="_intersect_shape" qualifiers="virtual">
<return type="int" />
- <argument index="0" name="shape_rid" type="RID" />
- <argument index="1" name="transform" type="Transform3D" />
- <argument index="2" name="motion" type="Vector3" />
- <argument index="3" name="margin" type="float" />
- <argument index="4" name="collision_mask" type="int" />
- <argument index="5" name="collide_with_bodies" type="bool" />
- <argument index="6" name="collide_with_areas" type="bool" />
- <argument index="7" name="result_count" type="PhysicsServer3DExtensionShapeResult*" />
- <argument index="8" name="max_results" type="int" />
+ <param index="0" name="shape_rid" type="RID" />
+ <param index="1" name="transform" type="Transform3D" />
+ <param index="2" name="motion" type="Vector3" />
+ <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_count" type="PhysicsServer3DExtensionShapeResult*" />
+ <param index="8" name="max_results" type="int" />
<description>
</description>
</method>
<method name="_rest_info" qualifiers="virtual">
<return type="bool" />
- <argument index="0" name="shape_rid" type="RID" />
- <argument index="1" name="transform" type="Transform3D" />
- <argument index="2" name="motion" type="Vector3" />
- <argument index="3" name="margin" type="float" />
- <argument index="4" name="collision_mask" type="int" />
- <argument index="5" name="collide_with_bodies" type="bool" />
- <argument index="6" name="collide_with_areas" type="bool" />
- <argument index="7" name="rest_info" type="PhysicsServer3DExtensionShapeRestInfo*" />
+ <param index="0" name="shape_rid" type="RID" />
+ <param index="1" name="transform" type="Transform3D" />
+ <param index="2" name="motion" type="Vector3" />
+ <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="PhysicsServer3DExtensionShapeRestInfo*" />
<description>
</description>
</method>
diff --git a/doc/classes/PhysicsRayQueryParameters2D.xml b/doc/classes/PhysicsRayQueryParameters2D.xml
index 36933ef9a2..5afd3973a0 100644
--- a/doc/classes/PhysicsRayQueryParameters2D.xml
+++ b/doc/classes/PhysicsRayQueryParameters2D.xml
@@ -8,6 +8,22 @@
</description>
<tutorials>
</tutorials>
+ <methods>
+ <method name="create" qualifiers="static">
+ <return type="PhysicsRayQueryParameters2D" />
+ <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="[]" />
+ <description>
+ Returns a new, pre-configured [PhysicsRayQueryParameters2D] object. Use it to quickly create query parameters using the most common options.
+ [codeblock]
+ var query = PhysicsRayQueryParameters2D.create(global_position, global_position + Vector2(0, 100))
+ var collision = get_world_2d().direct_space_state.intersect_ray(query)
+ [/codeblock]
+ </description>
+ </method>
+ </methods>
<members>
<member name="collide_with_areas" type="bool" setter="set_collide_with_areas" getter="is_collide_with_areas_enabled" default="false">
If [code]true[/code], the query will take [Area2D]s into account.
diff --git a/doc/classes/PhysicsRayQueryParameters3D.xml b/doc/classes/PhysicsRayQueryParameters3D.xml
index 4244ec785f..620aa6bf5f 100644
--- a/doc/classes/PhysicsRayQueryParameters3D.xml
+++ b/doc/classes/PhysicsRayQueryParameters3D.xml
@@ -8,6 +8,22 @@
</description>
<tutorials>
</tutorials>
+ <methods>
+ <method name="create" qualifiers="static">
+ <return type="PhysicsRayQueryParameters3D" />
+ <param index="0" name="from" type="Vector3" />
+ <param index="1" name="to" type="Vector3" />
+ <param index="2" name="collision_mask" type="int" default="4294967295" />
+ <param index="3" name="exclude" type="Array" default="[]" />
+ <description>
+ Returns a new, pre-configured [PhysicsRayQueryParameters3D] object. Use it to quickly create query parameters using the most common options.
+ [codeblock]
+ var query = PhysicsRayQueryParameters3D.create(position, position + Vector3(0, -10, 0))
+ var collision = get_world_3d().direct_space_state.intersect_ray(query)
+ [/codeblock]
+ </description>
+ </method>
+ </methods>
<members>
<member name="collide_with_areas" type="bool" setter="set_collide_with_areas" getter="is_collide_with_areas_enabled" default="false">
If [code]true[/code], the query will take [Area3D]s into account.
diff --git a/doc/classes/PhysicsServer2D.xml b/doc/classes/PhysicsServer2D.xml
index 1413a3ec11..7ba52c40c6 100644
--- a/doc/classes/PhysicsServer2D.xml
+++ b/doc/classes/PhysicsServer2D.xml
@@ -11,32 +11,32 @@
<methods>
<method name="area_add_shape">
<return type="void" />
- <argument index="0" name="area" type="RID" />
- <argument index="1" name="shape" type="RID" />
- <argument index="2" name="transform" type="Transform2D" default="Transform2D(1, 0, 0, 1, 0, 0)" />
- <argument index="3" name="disabled" type="bool" default="false" />
+ <param index="0" name="area" type="RID" />
+ <param index="1" name="shape" type="RID" />
+ <param index="2" name="transform" type="Transform2D" default="Transform2D(1, 0, 0, 1, 0, 0)" />
+ <param index="3" name="disabled" type="bool" default="false" />
<description>
Adds a shape to the area, along with a transform matrix. Shapes are usually referenced by their index, so you should track which shape has a given index.
</description>
</method>
<method name="area_attach_canvas_instance_id">
<return type="void" />
- <argument index="0" name="area" type="RID" />
- <argument index="1" name="id" type="int" />
+ <param index="0" name="area" type="RID" />
+ <param index="1" name="id" type="int" />
<description>
</description>
</method>
<method name="area_attach_object_instance_id">
<return type="void" />
- <argument index="0" name="area" type="RID" />
- <argument index="1" name="id" type="int" />
+ <param index="0" name="area" type="RID" />
+ <param index="1" name="id" type="int" />
<description>
Assigns the area to a descendant of [Object], so it can exist in the node tree.
</description>
</method>
<method name="area_clear_shapes">
<return type="void" />
- <argument index="0" name="area" type="RID" />
+ <param index="0" name="area" type="RID" />
<description>
Removes all shapes from an area. It does not delete the shapes, so they can be reassigned later.
</description>
@@ -49,97 +49,97 @@
</method>
<method name="area_get_canvas_instance_id" qualifiers="const">
<return type="int" />
- <argument index="0" name="area" type="RID" />
+ <param index="0" name="area" type="RID" />
<description>
</description>
</method>
<method name="area_get_object_instance_id" qualifiers="const">
<return type="int" />
- <argument index="0" name="area" type="RID" />
+ <param index="0" name="area" type="RID" />
<description>
Gets the instance ID of the object the area is assigned to.
</description>
</method>
<method name="area_get_param" qualifiers="const">
<return type="Variant" />
- <argument index="0" name="area" type="RID" />
- <argument index="1" name="param" type="int" enum="PhysicsServer2D.AreaParameter" />
+ <param index="0" name="area" type="RID" />
+ <param index="1" name="param" type="int" enum="PhysicsServer2D.AreaParameter" />
<description>
Returns an area parameter value. See [enum AreaParameter] for a list of available parameters.
</description>
</method>
<method name="area_get_shape" qualifiers="const">
<return type="RID" />
- <argument index="0" name="area" type="RID" />
- <argument index="1" name="shape_idx" type="int" />
+ <param index="0" name="area" type="RID" />
+ <param index="1" name="shape_idx" type="int" />
<description>
Returns the [RID] of the nth shape of an area.
</description>
</method>
<method name="area_get_shape_count" qualifiers="const">
<return type="int" />
- <argument index="0" name="area" type="RID" />
+ <param index="0" name="area" type="RID" />
<description>
Returns the number of shapes assigned to an area.
</description>
</method>
<method name="area_get_shape_transform" qualifiers="const">
<return type="Transform2D" />
- <argument index="0" name="area" type="RID" />
- <argument index="1" name="shape_idx" type="int" />
+ <param index="0" name="area" type="RID" />
+ <param index="1" name="shape_idx" type="int" />
<description>
Returns the transform matrix of a shape within an area.
</description>
</method>
<method name="area_get_space" qualifiers="const">
<return type="RID" />
- <argument index="0" name="area" type="RID" />
+ <param index="0" name="area" type="RID" />
<description>
Returns the space assigned to the area.
</description>
</method>
<method name="area_get_transform" qualifiers="const">
<return type="Transform2D" />
- <argument index="0" name="area" type="RID" />
+ <param index="0" name="area" type="RID" />
<description>
Returns the transform matrix for an area.
</description>
</method>
<method name="area_remove_shape">
<return type="void" />
- <argument index="0" name="area" type="RID" />
- <argument index="1" name="shape_idx" type="int" />
+ <param index="0" name="area" type="RID" />
+ <param index="1" name="shape_idx" type="int" />
<description>
Removes a shape from an area. It does not delete the shape, so it can be reassigned later.
</description>
</method>
<method name="area_set_area_monitor_callback">
<return type="void" />
- <argument index="0" name="area" type="RID" />
- <argument index="1" name="callback" type="Callable" />
+ <param index="0" name="area" type="RID" />
+ <param index="1" name="callback" type="Callable" />
<description>
</description>
</method>
<method name="area_set_collision_layer">
<return type="void" />
- <argument index="0" name="area" type="RID" />
- <argument index="1" name="layer" type="int" />
+ <param index="0" name="area" type="RID" />
+ <param index="1" name="layer" type="int" />
<description>
Assigns the area to one or many physics layers.
</description>
</method>
<method name="area_set_collision_mask">
<return type="void" />
- <argument index="0" name="area" type="RID" />
- <argument index="1" name="mask" type="int" />
+ <param index="0" name="area" type="RID" />
+ <param index="1" name="mask" type="int" />
<description>
Sets which physics layers the area will monitor.
</description>
</method>
<method name="area_set_monitor_callback">
<return type="void" />
- <argument index="0" name="area" type="RID" />
- <argument index="1" name="callback" type="Callable" />
+ <param index="0" name="area" type="RID" />
+ <param index="1" name="callback" type="Callable" />
<description>
Sets the function to call when any body/area enters or exits the area. This callback will be called for any object interacting with the area, and takes five parameters:
1: [constant AREA_BODY_ADDED] or [constant AREA_BODY_REMOVED], depending on whether the object entered or exited the area.
@@ -151,75 +151,75 @@
</method>
<method name="area_set_monitorable">
<return type="void" />
- <argument index="0" name="area" type="RID" />
- <argument index="1" name="monitorable" type="bool" />
+ <param index="0" name="area" type="RID" />
+ <param index="1" name="monitorable" type="bool" />
<description>
</description>
</method>
<method name="area_set_param">
<return type="void" />
- <argument index="0" name="area" type="RID" />
- <argument index="1" name="param" type="int" enum="PhysicsServer2D.AreaParameter" />
- <argument index="2" name="value" type="Variant" />
+ <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>
Sets the value for an area parameter. See [enum AreaParameter] for a list of available parameters.
</description>
</method>
<method name="area_set_shape">
<return type="void" />
- <argument index="0" name="area" type="RID" />
- <argument index="1" name="shape_idx" type="int" />
- <argument index="2" name="shape" type="RID" />
+ <param index="0" name="area" type="RID" />
+ <param index="1" name="shape_idx" type="int" />
+ <param index="2" name="shape" type="RID" />
<description>
Substitutes a given area shape by another. The old shape is selected by its index, the new one by its [RID].
</description>
</method>
<method name="area_set_shape_disabled">
<return type="void" />
- <argument index="0" name="area" type="RID" />
- <argument index="1" name="shape_idx" type="int" />
- <argument index="2" name="disabled" type="bool" />
+ <param index="0" name="area" type="RID" />
+ <param index="1" name="shape_idx" type="int" />
+ <param index="2" name="disabled" type="bool" />
<description>
Disables a given shape in an area.
</description>
</method>
<method name="area_set_shape_transform">
<return type="void" />
- <argument index="0" name="area" type="RID" />
- <argument index="1" name="shape_idx" type="int" />
- <argument index="2" name="transform" type="Transform2D" />
+ <param index="0" name="area" type="RID" />
+ <param index="1" name="shape_idx" type="int" />
+ <param index="2" name="transform" type="Transform2D" />
<description>
Sets the transform matrix for an area shape.
</description>
</method>
<method name="area_set_space">
<return type="void" />
- <argument index="0" name="area" type="RID" />
- <argument index="1" name="space" type="RID" />
+ <param index="0" name="area" type="RID" />
+ <param index="1" name="space" type="RID" />
<description>
Assigns a space to the area.
</description>
</method>
<method name="area_set_transform">
<return type="void" />
- <argument index="0" name="area" type="RID" />
- <argument index="1" name="transform" type="Transform2D" />
+ <param index="0" name="area" type="RID" />
+ <param index="1" name="transform" type="Transform2D" />
<description>
Sets the transform matrix for an area.
</description>
</method>
<method name="body_add_collision_exception">
<return type="void" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="excepted_body" type="RID" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="excepted_body" type="RID" />
<description>
Adds a body to the list of bodies exempt from collisions.
</description>
</method>
<method name="body_add_constant_central_force">
<return type="void" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="force" type="Vector2" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="force" type="Vector2" />
<description>
Adds a constant directional force without affecting rotation that keeps being applied over time until cleared with [code]body_set_constant_force(body, Vector2(0, 0))[/code].
This is equivalent to using [method body_add_constant_force] at the body's center of mass.
@@ -227,36 +227,36 @@
</method>
<method name="body_add_constant_force">
<return type="void" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="force" type="Vector2" />
- <argument index="2" name="position" type="Vector2" default="Vector2(0, 0)" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="force" type="Vector2" />
+ <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">
<return type="void" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="torque" type="float" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="torque" type="float" />
<description>
Adds a constant rotational force without affecting position that keeps being applied over time until cleared with [code]body_set_constant_torque(body, 0)[/code].
</description>
</method>
<method name="body_add_shape">
<return type="void" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="shape" type="RID" />
- <argument index="2" name="transform" type="Transform2D" default="Transform2D(1, 0, 0, 1, 0, 0)" />
- <argument index="3" name="disabled" type="bool" default="false" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="shape" type="RID" />
+ <param index="2" name="transform" type="Transform2D" default="Transform2D(1, 0, 0, 1, 0, 0)" />
+ <param index="3" name="disabled" type="bool" default="false" />
<description>
Adds a shape to the body, along with a transform matrix. Shapes are usually referenced by their index, so you should track which shape has a given index.
</description>
</method>
<method name="body_apply_central_force">
<return type="void" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="force" type="Vector2" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="force" type="Vector2" />
<description>
Applies a directional force without affecting rotation. A force is time dependent and meant to be applied every physics update.
This is equivalent to using [method body_apply_force] at the body's center of mass.
@@ -264,8 +264,8 @@
</method>
<method name="body_apply_central_impulse">
<return type="void" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="impulse" type="Vector2" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="impulse" type="Vector2" />
<description>
Applies a directional impulse without affecting rotation.
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).
@@ -274,37 +274,37 @@
</method>
<method name="body_apply_force">
<return type="void" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="force" type="Vector2" />
- <argument index="2" name="position" type="Vector2" default="Vector2(0, 0)" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="force" type="Vector2" />
+ <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">
<return type="void" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="impulse" type="Vector2" />
- <argument index="2" name="position" type="Vector2" default="Vector2(0, 0)" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="impulse" type="Vector2" />
+ <param index="2" name="position" type="Vector2" default="Vector2(0, 0)" />
<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">
<return type="void" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="torque" type="float" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" 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.
</description>
</method>
<method name="body_apply_torque_impulse">
<return type="void" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="impulse" type="float" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="impulse" type="float" />
<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).
@@ -312,22 +312,22 @@
</method>
<method name="body_attach_canvas_instance_id">
<return type="void" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="id" type="int" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="id" type="int" />
<description>
</description>
</method>
<method name="body_attach_object_instance_id">
<return type="void" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="id" type="int" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="id" type="int" />
<description>
Assigns the area to a descendant of [Object], so it can exist in the node tree.
</description>
</method>
<method name="body_clear_shapes">
<return type="void" />
- <argument index="0" name="body" type="RID" />
+ <param index="0" name="body" type="RID" />
<description>
Removes all shapes from a body.
</description>
@@ -340,27 +340,34 @@
</method>
<method name="body_get_canvas_instance_id" qualifiers="const">
<return type="int" />
- <argument index="0" name="body" type="RID" />
+ <param index="0" name="body" type="RID" />
<description>
</description>
</method>
<method name="body_get_collision_layer" qualifiers="const">
<return type="int" />
- <argument index="0" name="body" type="RID" />
+ <param index="0" name="body" type="RID" />
<description>
Returns the physics layer or layers a body belongs to.
</description>
</method>
<method name="body_get_collision_mask" qualifiers="const">
<return type="int" />
- <argument index="0" name="body" type="RID" />
+ <param index="0" name="body" type="RID" />
<description>
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" />
- <argument index="0" name="body" type="RID" />
+ <param index="0" name="body" type="RID" />
<description>
Returns the body's total constant positional forces applied during each physics update.
See [method body_add_constant_force] and [method body_add_constant_central_force].
@@ -368,7 +375,7 @@
</method>
<method name="body_get_constant_torque" qualifiers="const">
<return type="float" />
- <argument index="0" name="body" type="RID" />
+ <param index="0" name="body" type="RID" />
<description>
Returns the body's total constant rotational forces applied during each physics update.
See [method body_add_constant_torque].
@@ -376,143 +383,151 @@
</method>
<method name="body_get_continuous_collision_detection_mode" qualifiers="const">
<return type="int" enum="PhysicsServer2D.CCDMode" />
- <argument index="0" name="body" type="RID" />
+ <param index="0" name="body" type="RID" />
<description>
Returns the continuous collision detection mode.
</description>
</method>
<method name="body_get_direct_state">
<return type="PhysicsDirectBodyState2D" />
- <argument index="0" name="body" type="RID" />
+ <param index="0" name="body" type="RID" />
<description>
Returns the [PhysicsDirectBodyState2D] of the body. Returns [code]null[/code] if the body is destroyed or removed from the physics space.
</description>
</method>
<method name="body_get_max_contacts_reported" qualifiers="const">
<return type="int" />
- <argument index="0" name="body" type="RID" />
+ <param index="0" name="body" type="RID" />
<description>
Returns the maximum contacts that can be reported. See [method body_set_max_contacts_reported].
</description>
</method>
<method name="body_get_mode" qualifiers="const">
<return type="int" enum="PhysicsServer2D.BodyMode" />
- <argument index="0" name="body" type="RID" />
+ <param index="0" name="body" type="RID" />
<description>
Returns the body mode.
</description>
</method>
<method name="body_get_object_instance_id" qualifiers="const">
<return type="int" />
- <argument index="0" name="body" type="RID" />
+ <param index="0" name="body" type="RID" />
<description>
Gets the instance ID of the object the area is assigned to.
</description>
</method>
<method name="body_get_param" qualifiers="const">
<return type="Variant" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="param" type="int" enum="PhysicsServer2D.BodyParameter" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="param" type="int" enum="PhysicsServer2D.BodyParameter" />
<description>
Returns the value of a body parameter. See [enum BodyParameter] for a list of available parameters.
</description>
</method>
<method name="body_get_shape" qualifiers="const">
<return type="RID" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="shape_idx" type="int" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="shape_idx" type="int" />
<description>
Returns the [RID] of the nth shape of a body.
</description>
</method>
<method name="body_get_shape_count" qualifiers="const">
<return type="int" />
- <argument index="0" name="body" type="RID" />
+ <param index="0" name="body" type="RID" />
<description>
Returns the number of shapes assigned to a body.
</description>
</method>
<method name="body_get_shape_transform" qualifiers="const">
<return type="Transform2D" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="shape_idx" type="int" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="shape_idx" type="int" />
<description>
Returns the transform matrix of a body shape.
</description>
</method>
<method name="body_get_space" qualifiers="const">
<return type="RID" />
- <argument index="0" name="body" type="RID" />
+ <param index="0" name="body" type="RID" />
<description>
Returns the [RID] of the space assigned to a body.
</description>
</method>
<method name="body_get_state" qualifiers="const">
<return type="Variant" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="state" type="int" enum="PhysicsServer2D.BodyState" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="state" type="int" enum="PhysicsServer2D.BodyState" />
<description>
Returns a body state.
</description>
</method>
<method name="body_is_omitting_force_integration" qualifiers="const">
<return type="bool" />
- <argument index="0" name="body" type="RID" />
+ <param index="0" name="body" type="RID" />
<description>
Returns whether a body uses a callback function to calculate its own physics (see [method body_set_force_integration_callback]).
</description>
</method>
<method name="body_remove_collision_exception">
<return type="void" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="excepted_body" type="RID" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="excepted_body" type="RID" />
<description>
Removes a body from the list of bodies exempt from collisions.
</description>
</method>
<method name="body_remove_shape">
<return type="void" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="shape_idx" type="int" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="shape_idx" type="int" />
<description>
Removes a shape from a body. The shape is not deleted, so it can be reused afterwards.
</description>
</method>
<method name="body_reset_mass_properties">
<return type="void" />
- <argument index="0" name="body" type="RID" />
+ <param index="0" name="body" type="RID" />
<description>
Restores the default inertia and center of mass based on shapes to cancel any custom values previously set using [method body_set_param].
</description>
</method>
<method name="body_set_axis_velocity">
<return type="void" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="axis_velocity" type="Vector2" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="axis_velocity" type="Vector2" />
<description>
Sets an axis velocity. The velocity in the given vector axis will be set as the given vector length. This is useful for jumping behavior.
</description>
</method>
<method name="body_set_collision_layer">
<return type="void" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="layer" type="int" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="layer" type="int" />
<description>
Sets the physics layer or layers a body belongs to.
</description>
</method>
<method name="body_set_collision_mask">
<return type="void" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="mask" type="int" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="mask" type="int" />
<description>
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" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="force" type="Vector2" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="force" type="Vector2" />
<description>
Sets the body's total constant positional forces applied during each physics update.
See [method body_add_constant_force] and [method body_add_constant_central_force].
@@ -520,8 +535,8 @@
</method>
<method name="body_set_constant_torque">
<return type="void" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="torque" type="float" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="torque" type="float" />
<description>
Sets the body's total constant rotational forces applied during each physics update.
See [method body_add_constant_torque].
@@ -529,8 +544,8 @@
</method>
<method name="body_set_continuous_collision_detection_mode">
<return type="void" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="mode" type="int" enum="PhysicsServer2D.CCDMode" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="mode" type="int" enum="PhysicsServer2D.CCDMode" />
<description>
Sets the continuous collision detection mode using one of the [enum CCDMode] constants.
Continuous collision detection tries to predict where a moving body will collide, instead of moving it and correcting its movement if it collided.
@@ -538,9 +553,9 @@
</method>
<method name="body_set_force_integration_callback">
<return type="void" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="callable" type="Callable" />
- <argument index="2" name="userdata" type="Variant" default="null" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="callable" type="Callable" />
+ <param index="2" name="userdata" type="Variant" default="null" />
<description>
Sets the function used to calculate physics for an object, if that object allows it (see [method body_set_omit_force_integration]).
The force integration function takes 2 arguments:
@@ -550,87 +565,87 @@
</method>
<method name="body_set_max_contacts_reported">
<return type="void" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="amount" type="int" />
+ <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">
<return type="void" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="mode" type="int" enum="PhysicsServer2D.BodyMode" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="mode" type="int" enum="PhysicsServer2D.BodyMode" />
<description>
Sets the body mode using one of the [enum BodyMode] constants.
</description>
</method>
<method name="body_set_omit_force_integration">
<return type="void" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="enable" type="bool" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="enable" type="bool" />
<description>
Sets whether a body uses a callback function to calculate its own physics (see [method body_set_force_integration_callback]).
</description>
</method>
<method name="body_set_param">
<return type="void" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="param" type="int" enum="PhysicsServer2D.BodyParameter" />
- <argument index="2" name="value" type="Variant" />
+ <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>
Sets a body parameter. See [enum BodyParameter] for a list of available parameters.
</description>
</method>
<method name="body_set_shape">
<return type="void" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="shape_idx" type="int" />
- <argument index="2" name="shape" type="RID" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="shape_idx" type="int" />
+ <param index="2" name="shape" type="RID" />
<description>
Substitutes a given body shape by another. The old shape is selected by its index, the new one by its [RID].
</description>
</method>
<method name="body_set_shape_as_one_way_collision">
<return type="void" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="shape_idx" type="int" />
- <argument index="2" name="enable" type="bool" />
- <argument index="3" name="margin" type="float" />
+ <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>
- 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">
<return type="void" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="shape_idx" type="int" />
- <argument index="2" name="disabled" type="bool" />
+ <param index="0" name="body" type="RID" />
+ <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">
<return type="void" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="shape_idx" type="int" />
- <argument index="2" name="transform" type="Transform2D" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="shape_idx" type="int" />
+ <param index="2" name="transform" type="Transform2D" />
<description>
Sets the transform matrix for a body shape.
</description>
</method>
<method name="body_set_space">
<return type="void" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="space" type="RID" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="space" type="RID" />
<description>
Assigns a space to the body (see [method space_create]).
</description>
</method>
<method name="body_set_state">
<return type="void" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="state" type="int" enum="PhysicsServer2D.BodyState" />
- <argument index="2" name="value" type="Variant" />
+ <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>
Sets a body state using one of the [enum BodyState] constants.
Note that the method doesn't take effect immediately. The state will change on the next physics frame.
@@ -638,9 +653,9 @@
</method>
<method name="body_test_motion">
<return type="bool" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="parameters" type="PhysicsTestMotionParameters2D" />
- <argument index="2" name="result" type="PhysicsTestMotionResult2D" default="null" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="parameters" type="PhysicsTestMotionParameters2D" />
+ <param index="2" name="result" type="PhysicsTestMotionResult2D" default="null" />
<description>
Returns [code]true[/code] if a collision would result from moving along a motion vector from a given point in space. [PhysicsTestMotionParameters2D] is passed to set motion parameters. [PhysicsTestMotionResult2D] can be passed to return additional information.
</description>
@@ -667,38 +682,38 @@
</method>
<method name="damped_spring_joint_get_param" qualifiers="const">
<return type="float" />
- <argument index="0" name="joint" type="RID" />
- <argument index="1" name="param" type="int" enum="PhysicsServer2D.DampedSpringParam" />
+ <param index="0" name="joint" type="RID" />
+ <param index="1" name="param" type="int" enum="PhysicsServer2D.DampedSpringParam" />
<description>
Returns the value of a damped spring joint parameter. See [enum DampedSpringParam] for a list of available parameters.
</description>
</method>
<method name="damped_spring_joint_set_param">
<return type="void" />
- <argument index="0" name="joint" type="RID" />
- <argument index="1" name="param" type="int" enum="PhysicsServer2D.DampedSpringParam" />
- <argument index="2" name="value" type="float" />
+ <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>
Sets a damped spring joint parameter. See [enum DampedSpringParam] for a list of available parameters.
</description>
</method>
<method name="free_rid">
<return type="void" />
- <argument index="0" name="rid" type="RID" />
+ <param index="0" name="rid" type="RID" />
<description>
Destroys any of the objects created by PhysicsServer2D. If the [RID] passed is not one of the objects that can be created by PhysicsServer2D, an error will be sent to the console.
</description>
</method>
<method name="get_process_info">
<return type="int" />
- <argument index="0" name="process_info" type="int" enum="PhysicsServer2D.ProcessInfo" />
+ <param index="0" name="process_info" type="int" enum="PhysicsServer2D.ProcessInfo" />
<description>
Returns information about the current state of the 2D physics engine. See [enum ProcessInfo] for a list of available states.
</description>
</method>
<method name="joint_clear">
<return type="void" />
- <argument index="0" name="joint" type="RID" />
+ <param index="0" name="joint" type="RID" />
<description>
</description>
</method>
@@ -709,54 +724,54 @@
</method>
<method name="joint_get_param" qualifiers="const">
<return type="float" />
- <argument index="0" name="joint" type="RID" />
- <argument index="1" name="param" type="int" enum="PhysicsServer2D.JointParam" />
+ <param index="0" name="joint" type="RID" />
+ <param index="1" name="param" type="int" enum="PhysicsServer2D.JointParam" />
<description>
Returns the value of a joint parameter.
</description>
</method>
<method name="joint_get_type" qualifiers="const">
<return type="int" enum="PhysicsServer2D.JointType" />
- <argument index="0" name="joint" type="RID" />
+ <param index="0" name="joint" type="RID" />
<description>
Returns a joint's type (see [enum JointType]).
</description>
</method>
<method name="joint_make_damped_spring">
<return type="void" />
- <argument index="0" name="joint" type="RID" />
- <argument index="1" name="anchor_a" type="Vector2" />
- <argument index="2" name="anchor_b" type="Vector2" />
- <argument index="3" name="body_a" type="RID" />
- <argument index="4" name="body_b" type="RID" />
+ <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">
<return type="void" />
- <argument index="0" name="joint" type="RID" />
- <argument index="1" name="groove1_a" type="Vector2" />
- <argument index="2" name="groove2_a" type="Vector2" />
- <argument index="3" name="anchor_b" type="Vector2" />
- <argument index="4" name="body_a" type="RID" />
- <argument index="5" name="body_b" type="RID" />
+ <param index="0" name="joint" type="RID" />
+ <param index="1" name="groove1_a" type="Vector2" />
+ <param index="2" name="groove2_a" type="Vector2" />
+ <param index="3" name="anchor_b" 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">
<return type="void" />
- <argument index="0" name="joint" type="RID" />
- <argument index="1" name="anchor" type="Vector2" />
- <argument index="2" name="body_a" type="RID" />
- <argument index="3" name="body_b" type="RID" />
+ <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">
<return type="void" />
- <argument index="0" name="joint" type="RID" />
- <argument index="1" name="param" type="int" enum="PhysicsServer2D.JointParam" />
- <argument index="2" name="value" type="float" />
+ <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>
Sets a joint parameter. See [enum JointParam] for a list of available parameters.
</description>
@@ -778,29 +793,29 @@
</method>
<method name="set_active">
<return type="void" />
- <argument index="0" name="active" type="bool" />
+ <param index="0" name="active" type="bool" />
<description>
Activates or deactivates the 2D physics engine.
</description>
</method>
<method name="shape_get_data" qualifiers="const">
<return type="Variant" />
- <argument index="0" name="shape" type="RID" />
+ <param index="0" name="shape" type="RID" />
<description>
Returns the shape data.
</description>
</method>
<method name="shape_get_type" qualifiers="const">
<return type="int" enum="PhysicsServer2D.ShapeType" />
- <argument index="0" name="shape" type="RID" />
+ <param index="0" name="shape" type="RID" />
<description>
Returns a shape's type (see [enum ShapeType]).
</description>
</method>
<method name="shape_set_data">
<return type="void" />
- <argument index="0" name="shape" type="RID" />
- <argument index="1" name="data" type="Variant" />
+ <param index="0" name="shape" type="RID" />
+ <param index="1" name="data" type="Variant" />
<description>
Sets the shape data that defines its shape and size. The data to be passed depends on the kind of shape created [method shape_get_type].
</description>
@@ -813,39 +828,39 @@
</method>
<method name="space_get_direct_state">
<return type="PhysicsDirectSpaceState2D" />
- <argument index="0" name="space" type="RID" />
+ <param index="0" name="space" type="RID" />
<description>
Returns the state of a space, a [PhysicsDirectSpaceState2D]. This object can be used to make collision/intersection queries.
</description>
</method>
<method name="space_get_param" qualifiers="const">
<return type="float" />
- <argument index="0" name="space" type="RID" />
- <argument index="1" name="param" type="int" enum="PhysicsServer2D.SpaceParameter" />
+ <param index="0" name="space" type="RID" />
+ <param index="1" name="param" type="int" enum="PhysicsServer2D.SpaceParameter" />
<description>
Returns the value of a space parameter.
</description>
</method>
<method name="space_is_active" qualifiers="const">
<return type="bool" />
- <argument index="0" name="space" type="RID" />
+ <param index="0" name="space" type="RID" />
<description>
Returns whether the space is active.
</description>
</method>
<method name="space_set_active">
<return type="void" />
- <argument index="0" name="space" type="RID" />
- <argument index="1" name="active" type="bool" />
+ <param index="0" name="space" type="RID" />
+ <param index="1" name="active" type="bool" />
<description>
Marks a space as active. It will not have an effect, unless it is assigned to an area or body.
</description>
</method>
<method name="space_set_param">
<return type="void" />
- <argument index="0" name="space" type="RID" />
- <argument index="1" name="param" type="int" enum="PhysicsServer2D.SpaceParameter" />
- <argument index="2" name="value" type="float" />
+ <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>
Sets the value for a space parameter. See [enum SpaceParameter] for a list of available parameters.
</description>
@@ -882,7 +897,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.
diff --git a/doc/classes/PhysicsServer3D.xml b/doc/classes/PhysicsServer3D.xml
index 2e84287227..d4796fe2cf 100644
--- a/doc/classes/PhysicsServer3D.xml
+++ b/doc/classes/PhysicsServer3D.xml
@@ -11,25 +11,25 @@
<methods>
<method name="area_add_shape">
<return type="void" />
- <argument index="0" name="area" type="RID" />
- <argument index="1" name="shape" type="RID" />
- <argument index="2" name="transform" type="Transform3D" default="Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)" />
- <argument index="3" name="disabled" type="bool" default="false" />
+ <param index="0" name="area" type="RID" />
+ <param index="1" name="shape" type="RID" />
+ <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="disabled" type="bool" default="false" />
<description>
Adds a shape to the area, along with a transform matrix. Shapes are usually referenced by their index, so you should track which shape has a given index.
</description>
</method>
<method name="area_attach_object_instance_id">
<return type="void" />
- <argument index="0" name="area" type="RID" />
- <argument index="1" name="id" type="int" />
+ <param index="0" name="area" type="RID" />
+ <param index="1" name="id" type="int" />
<description>
Assigns the area to a descendant of [Object], so it can exist in the node tree.
</description>
</method>
<method name="area_clear_shapes">
<return type="void" />
- <argument index="0" name="area" type="RID" />
+ <param index="0" name="area" type="RID" />
<description>
Removes all shapes from an area. It does not delete the shapes, so they can be reassigned later.
</description>
@@ -42,91 +42,91 @@
</method>
<method name="area_get_object_instance_id" qualifiers="const">
<return type="int" />
- <argument index="0" name="area" type="RID" />
+ <param index="0" name="area" type="RID" />
<description>
Gets the instance ID of the object the area is assigned to.
</description>
</method>
<method name="area_get_param" qualifiers="const">
<return type="Variant" />
- <argument index="0" name="area" type="RID" />
- <argument index="1" name="param" type="int" enum="PhysicsServer3D.AreaParameter" />
+ <param index="0" name="area" type="RID" />
+ <param index="1" name="param" type="int" enum="PhysicsServer3D.AreaParameter" />
<description>
Returns an area parameter value. A list of available parameters is on the [enum AreaParameter] constants.
</description>
</method>
<method name="area_get_shape" qualifiers="const">
<return type="RID" />
- <argument index="0" name="area" type="RID" />
- <argument index="1" name="shape_idx" type="int" />
+ <param index="0" name="area" type="RID" />
+ <param index="1" name="shape_idx" type="int" />
<description>
Returns the [RID] of the nth shape of an area.
</description>
</method>
<method name="area_get_shape_count" qualifiers="const">
<return type="int" />
- <argument index="0" name="area" type="RID" />
+ <param index="0" name="area" type="RID" />
<description>
Returns the number of shapes assigned to an area.
</description>
</method>
<method name="area_get_shape_transform" qualifiers="const">
<return type="Transform3D" />
- <argument index="0" name="area" type="RID" />
- <argument index="1" name="shape_idx" type="int" />
+ <param index="0" name="area" type="RID" />
+ <param index="1" name="shape_idx" type="int" />
<description>
Returns the transform matrix of a shape within an area.
</description>
</method>
<method name="area_get_space" qualifiers="const">
<return type="RID" />
- <argument index="0" name="area" type="RID" />
+ <param index="0" name="area" type="RID" />
<description>
Returns the space assigned to the area.
</description>
</method>
<method name="area_get_transform" qualifiers="const">
<return type="Transform3D" />
- <argument index="0" name="area" type="RID" />
+ <param index="0" name="area" type="RID" />
<description>
Returns the transform matrix for an area.
</description>
</method>
<method name="area_remove_shape">
<return type="void" />
- <argument index="0" name="area" type="RID" />
- <argument index="1" name="shape_idx" type="int" />
+ <param index="0" name="area" type="RID" />
+ <param index="1" name="shape_idx" type="int" />
<description>
Removes a shape from an area. It does not delete the shape, so it can be reassigned later.
</description>
</method>
<method name="area_set_area_monitor_callback">
<return type="void" />
- <argument index="0" name="area" type="RID" />
- <argument index="1" name="callback" type="Callable" />
+ <param index="0" name="area" type="RID" />
+ <param index="1" name="callback" type="Callable" />
<description>
</description>
</method>
<method name="area_set_collision_layer">
<return type="void" />
- <argument index="0" name="area" type="RID" />
- <argument index="1" name="layer" type="int" />
+ <param index="0" name="area" type="RID" />
+ <param index="1" name="layer" type="int" />
<description>
Assigns the area to one or many physics layers.
</description>
</method>
<method name="area_set_collision_mask">
<return type="void" />
- <argument index="0" name="area" type="RID" />
- <argument index="1" name="mask" type="int" />
+ <param index="0" name="area" type="RID" />
+ <param index="1" name="mask" type="int" />
<description>
Sets which physics layers the area will monitor.
</description>
</method>
<method name="area_set_monitor_callback">
<return type="void" />
- <argument index="0" name="area" type="RID" />
- <argument index="1" name="callback" type="Callable" />
+ <param index="0" name="area" type="RID" />
+ <param index="1" name="callback" type="Callable" />
<description>
Sets the function to call when any body/area enters or exits the area. This callback will be called for any object interacting with the area, and takes five parameters:
1: [constant AREA_BODY_ADDED] or [constant AREA_BODY_REMOVED], depending on whether the object entered or exited the area.
@@ -138,82 +138,82 @@
</method>
<method name="area_set_monitorable">
<return type="void" />
- <argument index="0" name="area" type="RID" />
- <argument index="1" name="monitorable" type="bool" />
+ <param index="0" name="area" type="RID" />
+ <param index="1" name="monitorable" type="bool" />
<description>
</description>
</method>
<method name="area_set_param">
<return type="void" />
- <argument index="0" name="area" type="RID" />
- <argument index="1" name="param" type="int" enum="PhysicsServer3D.AreaParameter" />
- <argument index="2" name="value" type="Variant" />
+ <param index="0" name="area" type="RID" />
+ <param index="1" name="param" type="int" enum="PhysicsServer3D.AreaParameter" />
+ <param index="2" name="value" type="Variant" />
<description>
Sets the value for an area parameter. A list of available parameters is on the [enum AreaParameter] constants.
</description>
</method>
<method name="area_set_ray_pickable">
<return type="void" />
- <argument index="0" name="area" type="RID" />
- <argument index="1" name="enable" type="bool" />
+ <param index="0" name="area" type="RID" />
+ <param index="1" name="enable" type="bool" />
<description>
Sets object pickable with rays.
</description>
</method>
<method name="area_set_shape">
<return type="void" />
- <argument index="0" name="area" type="RID" />
- <argument index="1" name="shape_idx" type="int" />
- <argument index="2" name="shape" type="RID" />
+ <param index="0" name="area" type="RID" />
+ <param index="1" name="shape_idx" type="int" />
+ <param index="2" name="shape" type="RID" />
<description>
Substitutes a given area shape by another. The old shape is selected by its index, the new one by its [RID].
</description>
</method>
<method name="area_set_shape_disabled">
<return type="void" />
- <argument index="0" name="area" type="RID" />
- <argument index="1" name="shape_idx" type="int" />
- <argument index="2" name="disabled" type="bool" />
+ <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">
<return type="void" />
- <argument index="0" name="area" type="RID" />
- <argument index="1" name="shape_idx" type="int" />
- <argument index="2" name="transform" type="Transform3D" />
+ <param index="0" name="area" type="RID" />
+ <param index="1" name="shape_idx" type="int" />
+ <param index="2" name="transform" type="Transform3D" />
<description>
Sets the transform matrix for an area shape.
</description>
</method>
<method name="area_set_space">
<return type="void" />
- <argument index="0" name="area" type="RID" />
- <argument index="1" name="space" type="RID" />
+ <param index="0" name="area" type="RID" />
+ <param index="1" name="space" type="RID" />
<description>
Assigns a space to the area.
</description>
</method>
<method name="area_set_transform">
<return type="void" />
- <argument index="0" name="area" type="RID" />
- <argument index="1" name="transform" type="Transform3D" />
+ <param index="0" name="area" type="RID" />
+ <param index="1" name="transform" type="Transform3D" />
<description>
Sets the transform matrix for an area.
</description>
</method>
<method name="body_add_collision_exception">
<return type="void" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="excepted_body" type="RID" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="excepted_body" type="RID" />
<description>
Adds a body to the list of bodies exempt from collisions.
</description>
</method>
<method name="body_add_constant_central_force">
<return type="void" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="force" type="Vector3" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="force" type="Vector3" />
<description>
Adds a constant directional force without affecting rotation that keeps being applied over time until cleared with [code]body_set_constant_force(body, Vector3(0, 0, 0))[/code].
This is equivalent to using [method body_add_constant_force] at the body's center of mass.
@@ -221,36 +221,36 @@
</method>
<method name="body_add_constant_force">
<return type="void" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="force" type="Vector3" />
- <argument index="2" name="position" type="Vector3" default="Vector3(0, 0, 0)" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="force" type="Vector3" />
+ <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">
<return type="void" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="torque" type="Vector3" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="torque" type="Vector3" />
<description>
Adds a constant rotational force without affecting position that keeps being applied over time until cleared with [code]body_set_constant_torque(body, Vector3(0, 0, 0))[/code].
</description>
</method>
<method name="body_add_shape">
<return type="void" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="shape" type="RID" />
- <argument index="2" name="transform" type="Transform3D" default="Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)" />
- <argument index="3" name="disabled" type="bool" default="false" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="shape" type="RID" />
+ <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="disabled" type="bool" default="false" />
<description>
Adds a shape to the body, along with a transform matrix. Shapes are usually referenced by their index, so you should track which shape has a given index.
</description>
</method>
<method name="body_apply_central_force">
<return type="void" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="force" type="Vector3" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="force" type="Vector3" />
<description>
Applies a directional force without affecting rotation. A force is time dependent and meant to be applied every physics update.
This is equivalent to using [method body_apply_force] at the body's center of mass.
@@ -258,8 +258,8 @@
</method>
<method name="body_apply_central_impulse">
<return type="void" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="impulse" type="Vector3" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="impulse" type="Vector3" />
<description>
Applies a directional impulse without affecting rotation.
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).
@@ -268,37 +268,37 @@
</method>
<method name="body_apply_force">
<return type="void" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="force" type="Vector3" />
- <argument index="2" name="position" type="Vector3" default="Vector3(0, 0, 0)" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="force" type="Vector3" />
+ <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">
<return type="void" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="impulse" type="Vector3" />
- <argument index="2" name="position" type="Vector3" default="Vector3(0, 0, 0)" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="impulse" type="Vector3" />
+ <param index="2" name="position" type="Vector3" default="Vector3(0, 0, 0)" />
<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">
<return type="void" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="torque" type="Vector3" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" 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.
</description>
</method>
<method name="body_apply_torque_impulse">
<return type="void" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="impulse" type="Vector3" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="impulse" type="Vector3" />
<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).
@@ -306,15 +306,15 @@
</method>
<method name="body_attach_object_instance_id">
<return type="void" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="id" type="int" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="id" type="int" />
<description>
Assigns the area to a descendant of [Object], so it can exist in the node tree.
</description>
</method>
<method name="body_clear_shapes">
<return type="void" />
- <argument index="0" name="body" type="RID" />
+ <param index="0" name="body" type="RID" />
<description>
Removes all shapes from a body.
</description>
@@ -326,21 +326,28 @@
</method>
<method name="body_get_collision_layer" qualifiers="const">
<return type="int" />
- <argument index="0" name="body" type="RID" />
+ <param index="0" name="body" type="RID" />
<description>
Returns the physics layer or layers a body belongs to.
</description>
</method>
<method name="body_get_collision_mask" qualifiers="const">
<return type="int" />
- <argument index="0" name="body" type="RID" />
+ <param index="0" name="body" type="RID" />
<description>
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" />
- <argument index="0" name="body" type="RID" />
+ <param index="0" name="body" type="RID" />
<description>
Returns the body's total constant positional forces applied during each physics update.
See [method body_add_constant_force] and [method body_add_constant_central_force].
@@ -348,7 +355,7 @@
</method>
<method name="body_get_constant_torque" qualifiers="const">
<return type="Vector3" />
- <argument index="0" name="body" type="RID" />
+ <param index="0" name="body" type="RID" />
<description>
Returns the body's total constant rotational forces applied during each physics update.
See [method body_add_constant_torque].
@@ -356,103 +363,103 @@
</method>
<method name="body_get_direct_state">
<return type="PhysicsDirectBodyState3D" />
- <argument index="0" name="body" type="RID" />
+ <param index="0" name="body" type="RID" />
<description>
Returns the [PhysicsDirectBodyState3D] of the body. Returns [code]null[/code] if the body is destroyed or removed from the physics space.
</description>
</method>
<method name="body_get_max_contacts_reported" qualifiers="const">
<return type="int" />
- <argument index="0" name="body" type="RID" />
+ <param index="0" name="body" type="RID" />
<description>
Returns the maximum contacts that can be reported. See [method body_set_max_contacts_reported].
</description>
</method>
<method name="body_get_mode" qualifiers="const">
<return type="int" enum="PhysicsServer3D.BodyMode" />
- <argument index="0" name="body" type="RID" />
+ <param index="0" name="body" type="RID" />
<description>
Returns the body mode.
</description>
</method>
<method name="body_get_object_instance_id" qualifiers="const">
<return type="int" />
- <argument index="0" name="body" type="RID" />
+ <param index="0" name="body" type="RID" />
<description>
Gets the instance ID of the object the area is assigned to.
</description>
</method>
<method name="body_get_param" qualifiers="const">
<return type="Variant" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="param" type="int" enum="PhysicsServer3D.BodyParameter" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="param" type="int" enum="PhysicsServer3D.BodyParameter" />
<description>
Returns the value of a body parameter. A list of available parameters is on the [enum BodyParameter] constants.
</description>
</method>
<method name="body_get_shape" qualifiers="const">
<return type="RID" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="shape_idx" type="int" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="shape_idx" type="int" />
<description>
Returns the [RID] of the nth shape of a body.
</description>
</method>
<method name="body_get_shape_count" qualifiers="const">
<return type="int" />
- <argument index="0" name="body" type="RID" />
+ <param index="0" name="body" type="RID" />
<description>
Returns the number of shapes assigned to a body.
</description>
</method>
<method name="body_get_shape_transform" qualifiers="const">
<return type="Transform3D" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="shape_idx" type="int" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="shape_idx" type="int" />
<description>
Returns the transform matrix of a body shape.
</description>
</method>
<method name="body_get_space" qualifiers="const">
<return type="RID" />
- <argument index="0" name="body" type="RID" />
+ <param index="0" name="body" type="RID" />
<description>
Returns the [RID] of the space assigned to a body.
</description>
</method>
<method name="body_get_state" qualifiers="const">
<return type="Variant" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="state" type="int" enum="PhysicsServer3D.BodyState" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="state" type="int" enum="PhysicsServer3D.BodyState" />
<description>
Returns a body state.
</description>
</method>
<method name="body_is_axis_locked" qualifiers="const">
<return type="bool" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="axis" type="int" enum="PhysicsServer3D.BodyAxis" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="axis" type="int" enum="PhysicsServer3D.BodyAxis" />
<description>
</description>
</method>
<method name="body_is_continuous_collision_detection_enabled" qualifiers="const">
<return type="bool" />
- <argument index="0" name="body" type="RID" />
+ <param index="0" name="body" type="RID" />
<description>
If [code]true[/code], the continuous collision detection mode is enabled.
</description>
</method>
<method name="body_is_omitting_force_integration" qualifiers="const">
<return type="bool" />
- <argument index="0" name="body" type="RID" />
+ <param index="0" name="body" type="RID" />
<description>
Returns whether a body uses a callback function to calculate its own physics (see [method body_set_force_integration_callback]).
</description>
</method>
<method name="body_remove_collision_exception">
<return type="void" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="excepted_body" type="RID" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="excepted_body" type="RID" />
<description>
Removes a body from the list of bodies exempt from collisions.
Continuous collision detection tries to predict where a moving body will collide, instead of moving it and correcting its movement if it collided.
@@ -460,55 +467,63 @@
</method>
<method name="body_remove_shape">
<return type="void" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="shape_idx" type="int" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="shape_idx" type="int" />
<description>
Removes a shape from a body. The shape is not deleted, so it can be reused afterwards.
</description>
</method>
<method name="body_reset_mass_properties">
<return type="void" />
- <argument index="0" name="body" type="RID" />
+ <param index="0" name="body" type="RID" />
<description>
Restores the default inertia and center of mass based on shapes to cancel any custom values previously set using [method body_set_param].
</description>
</method>
<method name="body_set_axis_lock">
<return type="void" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="axis" type="int" enum="PhysicsServer3D.BodyAxis" />
- <argument index="2" name="lock" type="bool" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="axis" type="int" enum="PhysicsServer3D.BodyAxis" />
+ <param index="2" name="lock" type="bool" />
<description>
</description>
</method>
<method name="body_set_axis_velocity">
<return type="void" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="axis_velocity" type="Vector3" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="axis_velocity" type="Vector3" />
<description>
Sets an axis velocity. The velocity in the given vector axis will be set as the given vector length. This is useful for jumping behavior.
</description>
</method>
<method name="body_set_collision_layer">
<return type="void" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="layer" type="int" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="layer" type="int" />
<description>
Sets the physics layer or layers a body belongs to.
</description>
</method>
<method name="body_set_collision_mask">
<return type="void" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="mask" type="int" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="mask" type="int" />
<description>
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" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="force" type="Vector3" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="force" type="Vector3" />
<description>
Sets the body's total constant positional forces applied during each physics update.
See [method body_add_constant_force] and [method body_add_constant_central_force].
@@ -516,8 +531,8 @@
</method>
<method name="body_set_constant_torque">
<return type="void" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="torque" type="Vector3" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="torque" type="Vector3" />
<description>
Sets the body's total constant rotational forces applied during each physics update.
See [method body_add_constant_torque].
@@ -525,8 +540,8 @@
</method>
<method name="body_set_enable_continuous_collision_detection">
<return type="void" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="enable" type="bool" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="enable" type="bool" />
<description>
If [code]true[/code], the continuous collision detection mode is enabled.
Continuous collision detection tries to predict where a moving body will collide, instead of moving it and correcting its movement if it collided.
@@ -534,9 +549,9 @@
</method>
<method name="body_set_force_integration_callback">
<return type="void" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="callable" type="Callable" />
- <argument index="2" name="userdata" type="Variant" default="null" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="callable" type="Callable" />
+ <param index="2" name="userdata" type="Variant" default="null" />
<description>
Sets the function used to calculate physics for an object, if that object allows it (see [method body_set_omit_force_integration]).
The force integration function takes 2 arguments:
@@ -546,93 +561,93 @@
</method>
<method name="body_set_max_contacts_reported">
<return type="void" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="amount" type="int" />
+ <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">
<return type="void" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="mode" type="int" enum="PhysicsServer3D.BodyMode" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="mode" type="int" enum="PhysicsServer3D.BodyMode" />
<description>
Sets the body mode, from one of the [enum BodyMode] constants.
</description>
</method>
<method name="body_set_omit_force_integration">
<return type="void" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="enable" type="bool" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="enable" type="bool" />
<description>
Sets whether a body uses a callback function to calculate its own physics (see [method body_set_force_integration_callback]).
</description>
</method>
<method name="body_set_param">
<return type="void" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="param" type="int" enum="PhysicsServer3D.BodyParameter" />
- <argument index="2" name="value" type="Variant" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="param" type="int" enum="PhysicsServer3D.BodyParameter" />
+ <param index="2" name="value" type="Variant" />
<description>
Sets a body parameter. A list of available parameters is on the [enum BodyParameter] constants.
</description>
</method>
<method name="body_set_ray_pickable">
<return type="void" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="enable" type="bool" />
+ <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">
<return type="void" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="shape_idx" type="int" />
- <argument index="2" name="shape" type="RID" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="shape_idx" type="int" />
+ <param index="2" name="shape" type="RID" />
<description>
Substitutes a given body shape by another. The old shape is selected by its index, the new one by its [RID].
</description>
</method>
<method name="body_set_shape_disabled">
<return type="void" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="shape_idx" type="int" />
- <argument index="2" name="disabled" type="bool" />
+ <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">
<return type="void" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="shape_idx" type="int" />
- <argument index="2" name="transform" type="Transform3D" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="shape_idx" type="int" />
+ <param index="2" name="transform" type="Transform3D" />
<description>
Sets the transform matrix for a body shape.
</description>
</method>
<method name="body_set_space">
<return type="void" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="space" type="RID" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="space" type="RID" />
<description>
Assigns a space to the body (see [method space_create]).
</description>
</method>
<method name="body_set_state">
<return type="void" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="state" type="int" enum="PhysicsServer3D.BodyState" />
- <argument index="2" name="value" type="Variant" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="state" type="int" enum="PhysicsServer3D.BodyState" />
+ <param index="2" name="value" type="Variant" />
<description>
Sets a body state (see [enum BodyState] constants).
</description>
</method>
<method name="body_test_motion">
<return type="bool" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="parameters" type="PhysicsTestMotionParameters3D" />
- <argument index="2" name="result" type="PhysicsTestMotionResult3D" default="null" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="parameters" type="PhysicsTestMotionParameters3D" />
+ <param index="2" name="result" type="PhysicsTestMotionResult3D" default="null" />
<description>
Returns [code]true[/code] if a collision would result from moving along a motion vector from a given point in space. [PhysicsTestMotionParameters3D] is passed to set motion parameters. [PhysicsTestMotionResult3D] can be passed to return additional information.
</description>
@@ -654,17 +669,17 @@
</method>
<method name="cone_twist_joint_get_param" qualifiers="const">
<return type="float" />
- <argument index="0" name="joint" type="RID" />
- <argument index="1" name="param" type="int" enum="PhysicsServer3D.ConeTwistJointParam" />
+ <param index="0" name="joint" type="RID" />
+ <param index="1" name="param" type="int" enum="PhysicsServer3D.ConeTwistJointParam" />
<description>
Gets a cone_twist_joint parameter (see [enum ConeTwistJointParam] constants).
</description>
</method>
<method name="cone_twist_joint_set_param">
<return type="void" />
- <argument index="0" name="joint" type="RID" />
- <argument index="1" name="param" type="int" enum="PhysicsServer3D.ConeTwistJointParam" />
- <argument index="2" name="value" type="float" />
+ <param index="0" name="joint" type="RID" />
+ <param index="1" name="param" type="int" enum="PhysicsServer3D.ConeTwistJointParam" />
+ <param index="2" name="value" type="float" />
<description>
Sets a cone_twist_joint parameter (see [enum ConeTwistJointParam] constants).
</description>
@@ -686,52 +701,52 @@
</method>
<method name="free_rid">
<return type="void" />
- <argument index="0" name="rid" type="RID" />
+ <param index="0" name="rid" type="RID" />
<description>
Destroys any of the objects created by PhysicsServer3D. If the [RID] passed is not one of the objects that can be created by PhysicsServer3D, an error will be sent to the console.
</description>
</method>
<method name="generic_6dof_joint_get_flag" qualifiers="const">
<return type="bool" />
- <argument index="0" name="joint" type="RID" />
- <argument index="1" name="axis" type="int" enum="Vector3.Axis" />
- <argument index="2" name="flag" type="int" enum="PhysicsServer3D.G6DOFJointAxisFlag" />
+ <param index="0" name="joint" type="RID" />
+ <param index="1" name="axis" type="int" enum="Vector3.Axis" />
+ <param index="2" name="flag" type="int" enum="PhysicsServer3D.G6DOFJointAxisFlag" />
<description>
Gets a generic_6_DOF_joint flag (see [enum G6DOFJointAxisFlag] constants).
</description>
</method>
<method name="generic_6dof_joint_get_param" qualifiers="const">
<return type="float" />
- <argument index="0" name="joint" type="RID" />
- <argument index="1" name="axis" type="int" enum="Vector3.Axis" />
- <argument index="2" name="param" type="int" enum="PhysicsServer3D.G6DOFJointAxisParam" />
+ <param index="0" name="joint" type="RID" />
+ <param index="1" name="axis" type="int" enum="Vector3.Axis" />
+ <param index="2" name="param" type="int" enum="PhysicsServer3D.G6DOFJointAxisParam" />
<description>
Gets a generic_6_DOF_joint parameter (see [enum G6DOFJointAxisParam] constants).
</description>
</method>
<method name="generic_6dof_joint_set_flag">
<return type="void" />
- <argument index="0" name="joint" type="RID" />
- <argument index="1" name="axis" type="int" enum="Vector3.Axis" />
- <argument index="2" name="flag" type="int" enum="PhysicsServer3D.G6DOFJointAxisFlag" />
- <argument index="3" name="enable" type="bool" />
+ <param index="0" name="joint" type="RID" />
+ <param index="1" name="axis" type="int" enum="Vector3.Axis" />
+ <param index="2" name="flag" type="int" enum="PhysicsServer3D.G6DOFJointAxisFlag" />
+ <param index="3" name="enable" type="bool" />
<description>
Sets a generic_6_DOF_joint flag (see [enum G6DOFJointAxisFlag] constants).
</description>
</method>
<method name="generic_6dof_joint_set_param">
<return type="void" />
- <argument index="0" name="joint" type="RID" />
- <argument index="1" name="axis" type="int" enum="Vector3.Axis" />
- <argument index="2" name="param" type="int" enum="PhysicsServer3D.G6DOFJointAxisParam" />
- <argument index="3" name="value" type="float" />
+ <param index="0" name="joint" type="RID" />
+ <param index="1" name="axis" type="int" enum="Vector3.Axis" />
+ <param index="2" name="param" type="int" enum="PhysicsServer3D.G6DOFJointAxisParam" />
+ <param index="3" name="value" type="float" />
<description>
Sets a generic_6_DOF_joint parameter (see [enum G6DOFJointAxisParam] constants).
</description>
</method>
<method name="get_process_info">
<return type="int" />
- <argument index="0" name="process_info" type="int" enum="PhysicsServer3D.ProcessInfo" />
+ <param index="0" name="process_info" type="int" enum="PhysicsServer3D.ProcessInfo" />
<description>
Returns information about the current state of the 3D physics engine. See [enum ProcessInfo] for a list of available states.
</description>
@@ -743,41 +758,41 @@
</method>
<method name="hinge_joint_get_flag" qualifiers="const">
<return type="bool" />
- <argument index="0" name="joint" type="RID" />
- <argument index="1" name="flag" type="int" enum="PhysicsServer3D.HingeJointFlag" />
+ <param index="0" name="joint" type="RID" />
+ <param index="1" name="flag" type="int" enum="PhysicsServer3D.HingeJointFlag" />
<description>
Gets a hinge_joint flag (see [enum HingeJointFlag] constants).
</description>
</method>
<method name="hinge_joint_get_param" qualifiers="const">
<return type="float" />
- <argument index="0" name="joint" type="RID" />
- <argument index="1" name="param" type="int" enum="PhysicsServer3D.HingeJointParam" />
+ <param index="0" name="joint" type="RID" />
+ <param index="1" name="param" type="int" enum="PhysicsServer3D.HingeJointParam" />
<description>
Gets a hinge_joint parameter (see [enum HingeJointParam]).
</description>
</method>
<method name="hinge_joint_set_flag">
<return type="void" />
- <argument index="0" name="joint" type="RID" />
- <argument index="1" name="flag" type="int" enum="PhysicsServer3D.HingeJointFlag" />
- <argument index="2" name="enabled" type="bool" />
+ <param index="0" name="joint" type="RID" />
+ <param index="1" name="flag" type="int" enum="PhysicsServer3D.HingeJointFlag" />
+ <param index="2" name="enabled" type="bool" />
<description>
Sets a hinge_joint flag (see [enum HingeJointFlag] constants).
</description>
</method>
<method name="hinge_joint_set_param">
<return type="void" />
- <argument index="0" name="joint" type="RID" />
- <argument index="1" name="param" type="int" enum="PhysicsServer3D.HingeJointParam" />
- <argument index="2" name="value" type="float" />
+ <param index="0" name="joint" type="RID" />
+ <param index="1" name="param" type="int" enum="PhysicsServer3D.HingeJointParam" />
+ <param index="2" name="value" type="float" />
<description>
Sets a hinge_joint parameter (see [enum HingeJointParam] constants).
</description>
</method>
<method name="joint_clear">
<return type="void" />
- <argument index="0" name="joint" type="RID" />
+ <param index="0" name="joint" type="RID" />
<description>
</description>
</method>
@@ -788,119 +803,119 @@
</method>
<method name="joint_get_solver_priority" qualifiers="const">
<return type="int" />
- <argument index="0" name="joint" type="RID" />
+ <param index="0" name="joint" type="RID" />
<description>
Gets the priority value of the Joint3D.
</description>
</method>
<method name="joint_get_type" qualifiers="const">
<return type="int" enum="PhysicsServer3D.JointType" />
- <argument index="0" name="joint" type="RID" />
+ <param index="0" name="joint" type="RID" />
<description>
Returns the type of the Joint3D.
</description>
</method>
<method name="joint_make_cone_twist">
<return type="void" />
- <argument index="0" name="joint" type="RID" />
- <argument index="1" name="body_A" type="RID" />
- <argument index="2" name="local_ref_A" type="Transform3D" />
- <argument index="3" name="body_B" type="RID" />
- <argument index="4" name="local_ref_B" type="Transform3D" />
+ <param index="0" name="joint" type="RID" />
+ <param index="1" name="body_A" type="RID" />
+ <param index="2" name="local_ref_A" type="Transform3D" />
+ <param index="3" name="body_B" type="RID" />
+ <param index="4" name="local_ref_B" type="Transform3D" />
<description>
</description>
</method>
<method name="joint_make_generic_6dof">
<return type="void" />
- <argument index="0" name="joint" type="RID" />
- <argument index="1" name="body_A" type="RID" />
- <argument index="2" name="local_ref_A" type="Transform3D" />
- <argument index="3" name="body_B" type="RID" />
- <argument index="4" name="local_ref_B" type="Transform3D" />
+ <param index="0" name="joint" type="RID" />
+ <param index="1" name="body_A" type="RID" />
+ <param index="2" name="local_ref_A" type="Transform3D" />
+ <param index="3" name="body_B" type="RID" />
+ <param index="4" name="local_ref_B" type="Transform3D" />
<description>
</description>
</method>
<method name="joint_make_hinge">
<return type="void" />
- <argument index="0" name="joint" type="RID" />
- <argument index="1" name="body_A" type="RID" />
- <argument index="2" name="hinge_A" type="Transform3D" />
- <argument index="3" name="body_B" type="RID" />
- <argument index="4" name="hinge_B" type="Transform3D" />
+ <param index="0" name="joint" type="RID" />
+ <param index="1" name="body_A" type="RID" />
+ <param index="2" name="hinge_A" type="Transform3D" />
+ <param index="3" name="body_B" type="RID" />
+ <param index="4" name="hinge_B" type="Transform3D" />
<description>
</description>
</method>
<method name="joint_make_pin">
<return type="void" />
- <argument index="0" name="joint" type="RID" />
- <argument index="1" name="body_A" type="RID" />
- <argument index="2" name="local_A" type="Vector3" />
- <argument index="3" name="body_B" type="RID" />
- <argument index="4" name="local_B" type="Vector3" />
+ <param index="0" name="joint" type="RID" />
+ <param index="1" name="body_A" type="RID" />
+ <param index="2" name="local_A" type="Vector3" />
+ <param index="3" name="body_B" type="RID" />
+ <param index="4" name="local_B" type="Vector3" />
<description>
</description>
</method>
<method name="joint_make_slider">
<return type="void" />
- <argument index="0" name="joint" type="RID" />
- <argument index="1" name="body_A" type="RID" />
- <argument index="2" name="local_ref_A" type="Transform3D" />
- <argument index="3" name="body_B" type="RID" />
- <argument index="4" name="local_ref_B" type="Transform3D" />
+ <param index="0" name="joint" type="RID" />
+ <param index="1" name="body_A" type="RID" />
+ <param index="2" name="local_ref_A" type="Transform3D" />
+ <param index="3" name="body_B" type="RID" />
+ <param index="4" name="local_ref_B" type="Transform3D" />
<description>
</description>
</method>
<method name="joint_set_solver_priority">
<return type="void" />
- <argument index="0" name="joint" type="RID" />
- <argument index="1" name="priority" type="int" />
+ <param index="0" name="joint" type="RID" />
+ <param index="1" name="priority" type="int" />
<description>
Sets the priority value of the Joint3D.
</description>
</method>
<method name="pin_joint_get_local_a" qualifiers="const">
<return type="Vector3" />
- <argument index="0" name="joint" type="RID" />
+ <param index="0" name="joint" type="RID" />
<description>
Returns position of the joint in the local space of body a of the joint.
</description>
</method>
<method name="pin_joint_get_local_b" qualifiers="const">
<return type="Vector3" />
- <argument index="0" name="joint" type="RID" />
+ <param index="0" name="joint" type="RID" />
<description>
Returns position of the joint in the local space of body b of the joint.
</description>
</method>
<method name="pin_joint_get_param" qualifiers="const">
<return type="float" />
- <argument index="0" name="joint" type="RID" />
- <argument index="1" name="param" type="int" enum="PhysicsServer3D.PinJointParam" />
+ <param index="0" name="joint" type="RID" />
+ <param index="1" name="param" type="int" enum="PhysicsServer3D.PinJointParam" />
<description>
Gets a pin_joint parameter (see [enum PinJointParam] constants).
</description>
</method>
<method name="pin_joint_set_local_a">
<return type="void" />
- <argument index="0" name="joint" type="RID" />
- <argument index="1" name="local_A" type="Vector3" />
+ <param index="0" name="joint" type="RID" />
+ <param index="1" name="local_A" type="Vector3" />
<description>
Sets position of the joint in the local space of body a of the joint.
</description>
</method>
<method name="pin_joint_set_local_b">
<return type="void" />
- <argument index="0" name="joint" type="RID" />
- <argument index="1" name="local_B" type="Vector3" />
+ <param index="0" name="joint" type="RID" />
+ <param index="1" name="local_B" type="Vector3" />
<description>
Sets position of the joint in the local space of body b of the joint.
</description>
</method>
<method name="pin_joint_set_param">
<return type="void" />
- <argument index="0" name="joint" type="RID" />
- <argument index="1" name="param" type="int" enum="PhysicsServer3D.PinJointParam" />
- <argument index="2" name="value" type="float" />
+ <param index="0" name="joint" type="RID" />
+ <param index="1" name="param" type="int" enum="PhysicsServer3D.PinJointParam" />
+ <param index="2" name="value" type="float" />
<description>
Sets a pin_joint parameter (see [enum PinJointParam] constants).
</description>
@@ -912,53 +927,53 @@
</method>
<method name="set_active">
<return type="void" />
- <argument index="0" name="active" type="bool" />
+ <param index="0" name="active" type="bool" />
<description>
Activates or deactivates the 3D physics engine.
</description>
</method>
<method name="shape_get_data" qualifiers="const">
<return type="Variant" />
- <argument index="0" name="shape" type="RID" />
+ <param index="0" name="shape" type="RID" />
<description>
Returns the shape data.
</description>
</method>
<method name="shape_get_type" qualifiers="const">
<return type="int" enum="PhysicsServer3D.ShapeType" />
- <argument index="0" name="shape" type="RID" />
+ <param index="0" name="shape" type="RID" />
<description>
Returns the type of shape (see [enum ShapeType] constants).
</description>
</method>
<method name="shape_set_data">
<return type="void" />
- <argument index="0" name="shape" type="RID" />
- <argument index="1" name="data" type="Variant" />
+ <param index="0" name="shape" type="RID" />
+ <param index="1" name="data" type="Variant" />
<description>
Sets the shape data that defines its shape and size. The data to be passed depends on the kind of shape created [method shape_get_type].
</description>
</method>
<method name="slider_joint_get_param" qualifiers="const">
<return type="float" />
- <argument index="0" name="joint" type="RID" />
- <argument index="1" name="param" type="int" enum="PhysicsServer3D.SliderJointParam" />
+ <param index="0" name="joint" type="RID" />
+ <param index="1" name="param" type="int" enum="PhysicsServer3D.SliderJointParam" />
<description>
Gets a slider_joint parameter (see [enum SliderJointParam] constants).
</description>
</method>
<method name="slider_joint_set_param">
<return type="void" />
- <argument index="0" name="joint" type="RID" />
- <argument index="1" name="param" type="int" enum="PhysicsServer3D.SliderJointParam" />
- <argument index="2" name="value" type="float" />
+ <param index="0" name="joint" type="RID" />
+ <param index="1" name="param" type="int" enum="PhysicsServer3D.SliderJointParam" />
+ <param index="2" name="value" type="float" />
<description>
Gets a slider_joint parameter (see [enum SliderJointParam] constants).
</description>
</method>
<method name="soft_body_get_bounds" qualifiers="const">
<return type="AABB" />
- <argument index="0" name="body" type="RID" />
+ <param index="0" name="body" type="RID" />
<description>
</description>
</method>
@@ -970,39 +985,39 @@
</method>
<method name="space_get_direct_state">
<return type="PhysicsDirectSpaceState3D" />
- <argument index="0" name="space" type="RID" />
+ <param index="0" name="space" type="RID" />
<description>
Returns the state of a space, a [PhysicsDirectSpaceState3D]. This object can be used to make collision/intersection queries.
</description>
</method>
<method name="space_get_param" qualifiers="const">
<return type="float" />
- <argument index="0" name="space" type="RID" />
- <argument index="1" name="param" type="int" enum="PhysicsServer3D.SpaceParameter" />
+ <param index="0" name="space" type="RID" />
+ <param index="1" name="param" type="int" enum="PhysicsServer3D.SpaceParameter" />
<description>
Returns the value of a space parameter.
</description>
</method>
<method name="space_is_active" qualifiers="const">
<return type="bool" />
- <argument index="0" name="space" type="RID" />
+ <param index="0" name="space" type="RID" />
<description>
Returns whether the space is active.
</description>
</method>
<method name="space_set_active">
<return type="void" />
- <argument index="0" name="space" type="RID" />
- <argument index="1" name="active" type="bool" />
+ <param index="0" name="space" type="RID" />
+ <param index="1" name="active" type="bool" />
<description>
Marks a space as active. It will not have an effect, unless it is assigned to an area or body.
</description>
</method>
<method name="space_set_param">
<return type="void" />
- <argument index="0" name="space" type="RID" />
- <argument index="1" name="param" type="int" enum="PhysicsServer3D.SpaceParameter" />
- <argument index="2" name="value" type="float" />
+ <param index="0" name="space" type="RID" />
+ <param index="1" name="param" type="int" enum="PhysicsServer3D.SpaceParameter" />
+ <param index="2" name="value" type="float" />
<description>
Sets the value for a space parameter. A list of available parameters is on the [enum SpaceParameter] constants.
</description>
@@ -1422,7 +1437,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 795f5b86dd..200065de54 100644
--- a/doc/classes/PhysicsServer3DExtension.xml
+++ b/doc/classes/PhysicsServer3DExtension.xml
@@ -9,23 +9,23 @@
<methods>
<method name="_area_add_shape" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="area" type="RID" />
- <argument index="1" name="shape" type="RID" />
- <argument index="2" name="transform" type="Transform3D" />
- <argument index="3" name="disabled" type="bool" />
+ <param index="0" name="area" type="RID" />
+ <param index="1" name="shape" type="RID" />
+ <param index="2" name="transform" type="Transform3D" />
+ <param index="3" name="disabled" type="bool" />
<description>
</description>
</method>
<method name="_area_attach_object_instance_id" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="area" type="RID" />
- <argument index="1" name="id" type="int" />
+ <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" />
- <argument index="0" name="area" type="RID" />
+ <param index="0" name="area" type="RID" />
<description>
</description>
</method>
@@ -36,236 +36,236 @@
</method>
<method name="_area_get_object_instance_id" qualifiers="virtual const">
<return type="int" />
- <argument index="0" name="area" type="RID" />
+ <param index="0" name="area" type="RID" />
<description>
</description>
</method>
<method name="_area_get_param" qualifiers="virtual const">
<return type="Variant" />
- <argument index="0" name="area" type="RID" />
- <argument index="1" name="param" type="int" enum="PhysicsServer3D.AreaParameter" />
+ <param index="0" name="area" type="RID" />
+ <param index="1" name="param" type="int" enum="PhysicsServer3D.AreaParameter" />
<description>
</description>
</method>
<method name="_area_get_shape" qualifiers="virtual const">
<return type="RID" />
- <argument index="0" name="area" type="RID" />
- <argument index="1" name="shape_idx" type="int" />
+ <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" />
- <argument index="0" name="area" type="RID" />
+ <param index="0" name="area" type="RID" />
<description>
</description>
</method>
<method name="_area_get_shape_transform" qualifiers="virtual const">
<return type="Transform3D" />
- <argument index="0" name="area" type="RID" />
- <argument index="1" name="shape_idx" type="int" />
+ <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" />
- <argument index="0" name="area" type="RID" />
+ <param index="0" name="area" type="RID" />
<description>
</description>
</method>
<method name="_area_get_transform" qualifiers="virtual const">
<return type="Transform3D" />
- <argument index="0" name="area" type="RID" />
+ <param index="0" name="area" type="RID" />
<description>
</description>
</method>
<method name="_area_remove_shape" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="area" type="RID" />
- <argument index="1" name="shape_idx" type="int" />
+ <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" />
- <argument index="0" name="area" type="RID" />
- <argument index="1" name="callback" type="Callable" />
+ <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" />
- <argument index="0" name="area" type="RID" />
- <argument index="1" name="layer" type="int" />
+ <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" />
- <argument index="0" name="area" type="RID" />
- <argument index="1" name="mask" type="int" />
+ <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" />
- <argument index="0" name="area" type="RID" />
- <argument index="1" name="callback" type="Callable" />
+ <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" />
- <argument index="0" name="area" type="RID" />
- <argument index="1" name="monitorable" type="bool" />
+ <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" />
- <argument index="0" name="area" type="RID" />
- <argument index="1" name="param" type="int" enum="PhysicsServer3D.AreaParameter" />
- <argument index="2" name="value" type="Variant" />
+ <param index="0" name="area" type="RID" />
+ <param index="1" name="param" type="int" enum="PhysicsServer3D.AreaParameter" />
+ <param index="2" name="value" type="Variant" />
<description>
</description>
</method>
<method name="_area_set_ray_pickable" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="area" type="RID" />
- <argument index="1" name="enable" type="bool" />
+ <param index="0" name="area" type="RID" />
+ <param index="1" name="enable" type="bool" />
<description>
</description>
</method>
<method name="_area_set_shape" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="area" type="RID" />
- <argument index="1" name="shape_idx" type="int" />
- <argument index="2" name="shape" type="RID" />
+ <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" />
- <argument index="0" name="area" type="RID" />
- <argument index="1" name="shape_idx" type="int" />
- <argument index="2" name="disabled" type="bool" />
+ <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" />
- <argument index="0" name="area" type="RID" />
- <argument index="1" name="shape_idx" type="int" />
- <argument index="2" name="transform" type="Transform3D" />
+ <param index="0" name="area" type="RID" />
+ <param index="1" name="shape_idx" type="int" />
+ <param index="2" name="transform" type="Transform3D" />
<description>
</description>
</method>
<method name="_area_set_space" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="area" type="RID" />
- <argument index="1" name="space" type="RID" />
+ <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" />
- <argument index="0" name="area" type="RID" />
- <argument index="1" name="transform" type="Transform3D" />
+ <param index="0" name="area" type="RID" />
+ <param index="1" name="transform" type="Transform3D" />
<description>
</description>
</method>
<method name="_body_add_collision_exception" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="excepted_body" type="RID" />
+ <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" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="force" type="Vector3" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="force" type="Vector3" />
<description>
</description>
</method>
<method name="_body_add_constant_force" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="force" type="Vector3" />
- <argument index="2" name="position" type="Vector3" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="force" type="Vector3" />
+ <param index="2" name="position" type="Vector3" />
<description>
</description>
</method>
<method name="_body_add_constant_torque" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="torque" type="Vector3" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="torque" type="Vector3" />
<description>
</description>
</method>
<method name="_body_add_shape" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="shape" type="RID" />
- <argument index="2" name="transform" type="Transform3D" />
- <argument index="3" name="disabled" type="bool" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="shape" type="RID" />
+ <param index="2" name="transform" type="Transform3D" />
+ <param index="3" name="disabled" type="bool" />
<description>
</description>
</method>
<method name="_body_apply_central_force" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="force" type="Vector3" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="force" type="Vector3" />
<description>
</description>
</method>
<method name="_body_apply_central_impulse" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="impulse" type="Vector3" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="impulse" type="Vector3" />
<description>
</description>
</method>
<method name="_body_apply_force" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="force" type="Vector3" />
- <argument index="2" name="position" type="Vector3" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="force" type="Vector3" />
+ <param index="2" name="position" type="Vector3" />
<description>
</description>
</method>
<method name="_body_apply_impulse" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="impulse" type="Vector3" />
- <argument index="2" name="position" type="Vector3" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="impulse" type="Vector3" />
+ <param index="2" name="position" type="Vector3" />
<description>
</description>
</method>
<method name="_body_apply_torque" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="torque" type="Vector3" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="torque" type="Vector3" />
<description>
</description>
</method>
<method name="_body_apply_torque_impulse" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="impulse" type="Vector3" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="impulse" type="Vector3" />
<description>
</description>
</method>
<method name="_body_attach_object_instance_id" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="id" type="int" />
+ <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" />
- <argument index="0" name="body" type="RID" />
+ <param index="0" name="body" type="RID" />
<description>
</description>
</method>
@@ -276,273 +276,286 @@
</method>
<method name="_body_get_collision_layer" qualifiers="virtual const">
<return type="int" />
- <argument index="0" name="body" type="RID" />
+ <param index="0" name="body" type="RID" />
<description>
</description>
</method>
<method name="_body_get_collision_mask" qualifiers="virtual const">
<return type="int" />
- <argument index="0" name="body" type="RID" />
+ <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="Vector3" />
- <argument index="0" name="body" type="RID" />
+ <param index="0" name="body" type="RID" />
<description>
</description>
</method>
<method name="_body_get_constant_torque" qualifiers="virtual const">
<return type="Vector3" />
- <argument index="0" name="body" type="RID" />
+ <param index="0" name="body" type="RID" />
<description>
</description>
</method>
<method name="_body_get_direct_state" qualifiers="virtual">
<return type="PhysicsDirectBodyState3D" />
- <argument index="0" name="body" type="RID" />
+ <param index="0" name="body" type="RID" />
<description>
</description>
</method>
<method name="_body_get_max_contacts_reported" qualifiers="virtual const">
<return type="int" />
- <argument index="0" name="body" type="RID" />
+ <param index="0" name="body" type="RID" />
<description>
</description>
</method>
<method name="_body_get_mode" qualifiers="virtual const">
<return type="int" enum="PhysicsServer3D.BodyMode" />
- <argument index="0" name="body" type="RID" />
+ <param index="0" name="body" type="RID" />
<description>
</description>
</method>
<method name="_body_get_object_instance_id" qualifiers="virtual const">
<return type="int" />
- <argument index="0" name="body" type="RID" />
+ <param index="0" name="body" type="RID" />
<description>
</description>
</method>
<method name="_body_get_param" qualifiers="virtual const">
<return type="Variant" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="param" type="int" enum="PhysicsServer3D.BodyParameter" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="param" type="int" enum="PhysicsServer3D.BodyParameter" />
<description>
</description>
</method>
<method name="_body_get_shape" qualifiers="virtual const">
<return type="RID" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="shape_idx" type="int" />
+ <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" />
- <argument index="0" name="body" type="RID" />
+ <param index="0" name="body" type="RID" />
<description>
</description>
</method>
<method name="_body_get_shape_transform" qualifiers="virtual const">
<return type="Transform3D" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="shape_idx" type="int" />
+ <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" />
- <argument index="0" name="body" type="RID" />
+ <param index="0" name="body" type="RID" />
<description>
</description>
</method>
<method name="_body_get_state" qualifiers="virtual const">
<return type="Variant" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="state" type="int" enum="PhysicsServer3D.BodyState" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="state" type="int" enum="PhysicsServer3D.BodyState" />
<description>
</description>
</method>
<method name="_body_is_axis_locked" qualifiers="virtual const">
<return type="bool" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="axis" type="int" enum="PhysicsServer3D.BodyAxis" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="axis" type="int" enum="PhysicsServer3D.BodyAxis" />
<description>
</description>
</method>
<method name="_body_is_continuous_collision_detection_enabled" qualifiers="virtual const">
<return type="bool" />
- <argument index="0" name="body" type="RID" />
+ <param index="0" name="body" type="RID" />
<description>
</description>
</method>
<method name="_body_is_omitting_force_integration" qualifiers="virtual const">
<return type="bool" />
- <argument index="0" name="body" type="RID" />
+ <param index="0" name="body" type="RID" />
<description>
</description>
</method>
<method name="_body_remove_collision_exception" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="excepted_body" type="RID" />
+ <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" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="shape_idx" type="int" />
+ <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" />
- <argument index="0" name="body" type="RID" />
+ <param index="0" name="body" type="RID" />
<description>
</description>
</method>
<method name="_body_set_axis_lock" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="axis" type="int" enum="PhysicsServer3D.BodyAxis" />
- <argument index="2" name="lock" type="bool" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="axis" type="int" enum="PhysicsServer3D.BodyAxis" />
+ <param index="2" name="lock" type="bool" />
<description>
</description>
</method>
<method name="_body_set_axis_velocity" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="axis_velocity" type="Vector3" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="axis_velocity" type="Vector3" />
<description>
</description>
</method>
<method name="_body_set_collision_layer" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="layer" type="int" />
+ <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" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="mask" type="int" />
+ <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" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="force" type="Vector3" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="force" type="Vector3" />
<description>
</description>
</method>
<method name="_body_set_constant_torque" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="torque" type="Vector3" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="torque" type="Vector3" />
<description>
</description>
</method>
<method name="_body_set_enable_continuous_collision_detection" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="enable" type="bool" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="enable" type="bool" />
<description>
</description>
</method>
<method name="_body_set_force_integration_callback" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="callable" type="Callable" />
- <argument index="2" name="userdata" type="Variant" />
+ <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" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="amount" type="int" />
+ <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" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="mode" type="int" enum="PhysicsServer3D.BodyMode" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="mode" type="int" enum="PhysicsServer3D.BodyMode" />
<description>
</description>
</method>
<method name="_body_set_omit_force_integration" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="enable" type="bool" />
+ <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" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="param" type="int" enum="PhysicsServer3D.BodyParameter" />
- <argument index="2" name="value" type="Variant" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="param" type="int" enum="PhysicsServer3D.BodyParameter" />
+ <param index="2" name="value" type="Variant" />
<description>
</description>
</method>
<method name="_body_set_ray_pickable" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="enable" type="bool" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="enable" type="bool" />
<description>
</description>
</method>
<method name="_body_set_shape" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="shape_idx" type="int" />
- <argument index="2" name="shape" type="RID" />
+ <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_disabled" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="shape_idx" type="int" />
- <argument index="2" name="disabled" type="bool" />
+ <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" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="shape_idx" type="int" />
- <argument index="2" name="transform" type="Transform3D" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="shape_idx" type="int" />
+ <param index="2" name="transform" type="Transform3D" />
<description>
</description>
</method>
<method name="_body_set_space" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="space" type="RID" />
+ <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" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="state" type="int" enum="PhysicsServer3D.BodyState" />
- <argument index="2" name="value" type="Variant" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="state" type="int" enum="PhysicsServer3D.BodyState" />
+ <param index="2" name="value" type="Variant" />
<description>
</description>
</method>
<method name="_body_test_motion" qualifiers="virtual const">
<return type="bool" />
- <argument index="0" name="body" type="RID" />
- <argument index="1" name="from" type="Transform3D" />
- <argument index="2" name="motion" type="Vector3" />
- <argument index="3" name="margin" type="float" />
- <argument index="4" name="max_collisions" type="int" />
- <argument index="5" name="collide_separation_ray" type="bool" />
- <argument index="6" name="result" type="PhysicsServer3DExtensionMotionResult*" />
+ <param index="0" name="body" type="RID" />
+ <param index="1" name="from" type="Transform3D" />
+ <param index="2" name="motion" type="Vector3" />
+ <param index="3" name="margin" type="float" />
+ <param index="4" name="max_collisions" type="int" />
+ <param index="5" name="collide_separation_ray" type="bool" />
+ <param index="6" name="result" type="PhysicsServer3DExtensionMotionResult*" />
<description>
</description>
</method>
@@ -563,16 +576,16 @@
</method>
<method name="_cone_twist_joint_get_param" qualifiers="virtual const">
<return type="float" />
- <argument index="0" name="joint" type="RID" />
- <argument index="1" name="param" type="int" enum="PhysicsServer3D.ConeTwistJointParam" />
+ <param index="0" name="joint" type="RID" />
+ <param index="1" name="param" type="int" enum="PhysicsServer3D.ConeTwistJointParam" />
<description>
</description>
</method>
<method name="_cone_twist_joint_set_param" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="joint" type="RID" />
- <argument index="1" name="param" type="int" enum="PhysicsServer3D.ConeTwistJointParam" />
- <argument index="2" name="value" type="float" />
+ <param index="0" name="joint" type="RID" />
+ <param index="1" name="param" type="int" enum="PhysicsServer3D.ConeTwistJointParam" />
+ <param index="2" name="value" type="float" />
<description>
</description>
</method>
@@ -593,47 +606,47 @@
</method>
<method name="_free_rid" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="rid" type="RID" />
+ <param index="0" name="rid" type="RID" />
<description>
</description>
</method>
<method name="_generic_6dof_joint_get_flag" qualifiers="virtual const">
<return type="bool" />
- <argument index="0" name="joint" type="RID" />
- <argument index="1" name="axis" type="int" enum="Vector3.Axis" />
- <argument index="2" name="flag" type="int" enum="PhysicsServer3D.G6DOFJointAxisFlag" />
+ <param index="0" name="joint" type="RID" />
+ <param index="1" name="axis" type="int" enum="Vector3.Axis" />
+ <param index="2" name="flag" type="int" enum="PhysicsServer3D.G6DOFJointAxisFlag" />
<description>
</description>
</method>
<method name="_generic_6dof_joint_get_param" qualifiers="virtual const">
<return type="float" />
- <argument index="0" name="joint" type="RID" />
- <argument index="1" name="axis" type="int" enum="Vector3.Axis" />
- <argument index="2" name="param" type="int" enum="PhysicsServer3D.G6DOFJointAxisParam" />
+ <param index="0" name="joint" type="RID" />
+ <param index="1" name="axis" type="int" enum="Vector3.Axis" />
+ <param index="2" name="param" type="int" enum="PhysicsServer3D.G6DOFJointAxisParam" />
<description>
</description>
</method>
<method name="_generic_6dof_joint_set_flag" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="joint" type="RID" />
- <argument index="1" name="axis" type="int" enum="Vector3.Axis" />
- <argument index="2" name="flag" type="int" enum="PhysicsServer3D.G6DOFJointAxisFlag" />
- <argument index="3" name="enable" type="bool" />
+ <param index="0" name="joint" type="RID" />
+ <param index="1" name="axis" type="int" enum="Vector3.Axis" />
+ <param index="2" name="flag" type="int" enum="PhysicsServer3D.G6DOFJointAxisFlag" />
+ <param index="3" name="enable" type="bool" />
<description>
</description>
</method>
<method name="_generic_6dof_joint_set_param" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="joint" type="RID" />
- <argument index="1" name="axis" type="int" enum="Vector3.Axis" />
- <argument index="2" name="param" type="int" enum="PhysicsServer3D.G6DOFJointAxisParam" />
- <argument index="3" name="value" type="float" />
+ <param index="0" name="joint" type="RID" />
+ <param index="1" name="axis" type="int" enum="Vector3.Axis" />
+ <param index="2" name="param" type="int" enum="PhysicsServer3D.G6DOFJointAxisParam" />
+ <param index="3" name="value" type="float" />
<description>
</description>
</method>
<method name="_get_process_info" qualifiers="virtual">
<return type="int" />
- <argument index="0" name="process_info" type="int" enum="PhysicsServer3D.ProcessInfo" />
+ <param index="0" name="process_info" type="int" enum="PhysicsServer3D.ProcessInfo" />
<description>
</description>
</method>
@@ -644,37 +657,37 @@
</method>
<method name="_hinge_joint_get_flag" qualifiers="virtual const">
<return type="bool" />
- <argument index="0" name="joint" type="RID" />
- <argument index="1" name="flag" type="int" enum="PhysicsServer3D.HingeJointFlag" />
+ <param index="0" name="joint" type="RID" />
+ <param index="1" name="flag" type="int" enum="PhysicsServer3D.HingeJointFlag" />
<description>
</description>
</method>
<method name="_hinge_joint_get_param" qualifiers="virtual const">
<return type="float" />
- <argument index="0" name="joint" type="RID" />
- <argument index="1" name="param" type="int" enum="PhysicsServer3D.HingeJointParam" />
+ <param index="0" name="joint" type="RID" />
+ <param index="1" name="param" type="int" enum="PhysicsServer3D.HingeJointParam" />
<description>
</description>
</method>
<method name="_hinge_joint_set_flag" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="joint" type="RID" />
- <argument index="1" name="flag" type="int" enum="PhysicsServer3D.HingeJointFlag" />
- <argument index="2" name="enabled" type="bool" />
+ <param index="0" name="joint" type="RID" />
+ <param index="1" name="flag" type="int" enum="PhysicsServer3D.HingeJointFlag" />
+ <param index="2" name="enabled" type="bool" />
<description>
</description>
</method>
<method name="_hinge_joint_set_param" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="joint" type="RID" />
- <argument index="1" name="param" type="int" enum="PhysicsServer3D.HingeJointParam" />
- <argument index="2" name="value" type="float" />
+ <param index="0" name="joint" type="RID" />
+ <param index="1" name="param" type="int" enum="PhysicsServer3D.HingeJointParam" />
+ <param index="2" name="value" type="float" />
<description>
</description>
</method>
<method name="_joint_clear" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="joint" type="RID" />
+ <param index="0" name="joint" type="RID" />
<description>
</description>
</method>
@@ -685,111 +698,111 @@
</method>
<method name="_joint_get_solver_priority" qualifiers="virtual const">
<return type="int" />
- <argument index="0" name="joint" type="RID" />
+ <param index="0" name="joint" type="RID" />
<description>
</description>
</method>
<method name="_joint_get_type" qualifiers="virtual const">
<return type="int" enum="PhysicsServer3D.JointType" />
- <argument index="0" name="joint" type="RID" />
+ <param index="0" name="joint" type="RID" />
<description>
</description>
</method>
<method name="_joint_make_cone_twist" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="joint" type="RID" />
- <argument index="1" name="body_A" type="RID" />
- <argument index="2" name="local_ref_A" type="Transform3D" />
- <argument index="3" name="body_B" type="RID" />
- <argument index="4" name="local_ref_B" type="Transform3D" />
+ <param index="0" name="joint" type="RID" />
+ <param index="1" name="body_A" type="RID" />
+ <param index="2" name="local_ref_A" type="Transform3D" />
+ <param index="3" name="body_B" type="RID" />
+ <param index="4" name="local_ref_B" type="Transform3D" />
<description>
</description>
</method>
<method name="_joint_make_generic_6dof" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="joint" type="RID" />
- <argument index="1" name="body_A" type="RID" />
- <argument index="2" name="local_ref_A" type="Transform3D" />
- <argument index="3" name="body_B" type="RID" />
- <argument index="4" name="local_ref_B" type="Transform3D" />
+ <param index="0" name="joint" type="RID" />
+ <param index="1" name="body_A" type="RID" />
+ <param index="2" name="local_ref_A" type="Transform3D" />
+ <param index="3" name="body_B" type="RID" />
+ <param index="4" name="local_ref_B" type="Transform3D" />
<description>
</description>
</method>
<method name="_joint_make_hinge" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="joint" type="RID" />
- <argument index="1" name="body_A" type="RID" />
- <argument index="2" name="hinge_A" type="Transform3D" />
- <argument index="3" name="body_B" type="RID" />
- <argument index="4" name="hinge_B" type="Transform3D" />
+ <param index="0" name="joint" type="RID" />
+ <param index="1" name="body_A" type="RID" />
+ <param index="2" name="hinge_A" type="Transform3D" />
+ <param index="3" name="body_B" type="RID" />
+ <param index="4" name="hinge_B" type="Transform3D" />
<description>
</description>
</method>
<method name="_joint_make_pin" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="joint" type="RID" />
- <argument index="1" name="body_A" type="RID" />
- <argument index="2" name="local_A" type="Vector3" />
- <argument index="3" name="body_B" type="RID" />
- <argument index="4" name="local_B" type="Vector3" />
+ <param index="0" name="joint" type="RID" />
+ <param index="1" name="body_A" type="RID" />
+ <param index="2" name="local_A" type="Vector3" />
+ <param index="3" name="body_B" type="RID" />
+ <param index="4" name="local_B" type="Vector3" />
<description>
</description>
</method>
<method name="_joint_make_slider" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="joint" type="RID" />
- <argument index="1" name="body_A" type="RID" />
- <argument index="2" name="local_ref_A" type="Transform3D" />
- <argument index="3" name="body_B" type="RID" />
- <argument index="4" name="local_ref_B" type="Transform3D" />
+ <param index="0" name="joint" type="RID" />
+ <param index="1" name="body_A" type="RID" />
+ <param index="2" name="local_ref_A" type="Transform3D" />
+ <param index="3" name="body_B" type="RID" />
+ <param index="4" name="local_ref_B" type="Transform3D" />
<description>
</description>
</method>
<method name="_joint_set_solver_priority" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="joint" type="RID" />
- <argument index="1" name="priority" type="int" />
+ <param index="0" name="joint" type="RID" />
+ <param index="1" name="priority" type="int" />
<description>
</description>
</method>
<method name="_pin_joint_get_local_a" qualifiers="virtual const">
<return type="Vector3" />
- <argument index="0" name="joint" type="RID" />
+ <param index="0" name="joint" type="RID" />
<description>
</description>
</method>
<method name="_pin_joint_get_local_b" qualifiers="virtual const">
<return type="Vector3" />
- <argument index="0" name="joint" type="RID" />
+ <param index="0" name="joint" type="RID" />
<description>
</description>
</method>
<method name="_pin_joint_get_param" qualifiers="virtual const">
<return type="float" />
- <argument index="0" name="joint" type="RID" />
- <argument index="1" name="param" type="int" enum="PhysicsServer3D.PinJointParam" />
+ <param index="0" name="joint" type="RID" />
+ <param index="1" name="param" type="int" enum="PhysicsServer3D.PinJointParam" />
<description>
</description>
</method>
<method name="_pin_joint_set_local_a" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="joint" type="RID" />
- <argument index="1" name="local_A" type="Vector3" />
+ <param index="0" name="joint" type="RID" />
+ <param index="1" name="local_A" type="Vector3" />
<description>
</description>
</method>
<method name="_pin_joint_set_local_b" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="joint" type="RID" />
- <argument index="1" name="local_B" type="Vector3" />
+ <param index="0" name="joint" type="RID" />
+ <param index="1" name="local_B" type="Vector3" />
<description>
</description>
</method>
<method name="_pin_joint_set_param" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="joint" type="RID" />
- <argument index="1" name="param" type="int" enum="PhysicsServer3D.PinJointParam" />
- <argument index="2" name="value" type="float" />
+ <param index="0" name="joint" type="RID" />
+ <param index="1" name="param" type="int" enum="PhysicsServer3D.PinJointParam" />
+ <param index="2" name="value" type="float" />
<description>
</description>
</method>
@@ -800,47 +813,47 @@
</method>
<method name="_set_active" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="active" type="bool" />
+ <param index="0" name="active" type="bool" />
<description>
</description>
</method>
<method name="_shape_get_data" qualifiers="virtual const">
<return type="Variant" />
- <argument index="0" name="shape" type="RID" />
+ <param index="0" name="shape" type="RID" />
<description>
</description>
</method>
<method name="_shape_get_type" qualifiers="virtual const">
<return type="int" enum="PhysicsServer3D.ShapeType" />
- <argument index="0" name="shape" type="RID" />
+ <param index="0" name="shape" type="RID" />
<description>
</description>
</method>
<method name="_shape_set_data" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="shape" type="RID" />
- <argument index="1" name="data" type="Variant" />
+ <param index="0" name="shape" type="RID" />
+ <param index="1" name="data" type="Variant" />
<description>
</description>
</method>
<method name="_slider_joint_get_param" qualifiers="virtual const">
<return type="float" />
- <argument index="0" name="joint" type="RID" />
- <argument index="1" name="param" type="int" enum="PhysicsServer3D.SliderJointParam" />
+ <param index="0" name="joint" type="RID" />
+ <param index="1" name="param" type="int" enum="PhysicsServer3D.SliderJointParam" />
<description>
</description>
</method>
<method name="_slider_joint_set_param" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="joint" type="RID" />
- <argument index="1" name="param" type="int" enum="PhysicsServer3D.SliderJointParam" />
- <argument index="2" name="value" type="float" />
+ <param index="0" name="joint" type="RID" />
+ <param index="1" name="param" type="int" enum="PhysicsServer3D.SliderJointParam" />
+ <param index="2" name="value" type="float" />
<description>
</description>
</method>
<method name="_soft_body_get_bounds" qualifiers="virtual const">
<return type="AABB" />
- <argument index="0" name="body" type="RID" />
+ <param index="0" name="body" type="RID" />
<description>
</description>
</method>
@@ -851,35 +864,35 @@
</method>
<method name="_space_get_direct_state" qualifiers="virtual">
<return type="PhysicsDirectSpaceState3D" />
- <argument index="0" name="space" type="RID" />
+ <param index="0" name="space" type="RID" />
<description>
</description>
</method>
<method name="_space_get_param" qualifiers="virtual const">
<return type="float" />
- <argument index="0" name="space" type="RID" />
- <argument index="1" name="param" type="int" enum="PhysicsServer3D.SpaceParameter" />
+ <param index="0" name="space" type="RID" />
+ <param index="1" name="param" type="int" enum="PhysicsServer3D.SpaceParameter" />
<description>
</description>
</method>
<method name="_space_is_active" qualifiers="virtual const">
<return type="bool" />
- <argument index="0" name="space" type="RID" />
+ <param index="0" name="space" type="RID" />
<description>
</description>
</method>
<method name="_space_set_active" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="space" type="RID" />
- <argument index="1" name="active" type="bool" />
+ <param index="0" name="space" type="RID" />
+ <param index="1" name="active" type="bool" />
<description>
</description>
</method>
<method name="_space_set_param" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="space" type="RID" />
- <argument index="1" name="param" type="int" enum="PhysicsServer3D.SpaceParameter" />
- <argument index="2" name="value" type="float" />
+ <param index="0" name="space" type="RID" />
+ <param index="1" name="param" type="int" enum="PhysicsServer3D.SpaceParameter" />
+ <param index="2" name="value" type="float" />
<description>
</description>
</method>
diff --git a/doc/classes/PhysicsServer3DRenderingServerHandler.xml b/doc/classes/PhysicsServer3DRenderingServerHandler.xml
index a40a2dd1c6..90066aeb2c 100644
--- a/doc/classes/PhysicsServer3DRenderingServerHandler.xml
+++ b/doc/classes/PhysicsServer3DRenderingServerHandler.xml
@@ -9,21 +9,21 @@
<methods>
<method name="_set_aabb" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="aabb" type="AABB" />
+ <param index="0" name="aabb" type="AABB" />
<description>
</description>
</method>
<method name="_set_normal" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="vertex_id" type="int" />
- <argument index="1" name="normals" type="const void*" />
+ <param index="0" name="vertex_id" type="int" />
+ <param index="1" name="normals" type="const void*" />
<description>
</description>
</method>
<method name="_set_vertex" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="vertex_id" type="int" />
- <argument index="1" name="vertices" type="const void*" />
+ <param index="0" name="vertex_id" type="int" />
+ <param index="1" name="vertices" type="const void*" />
<description>
</description>
</method>
diff --git a/doc/classes/PhysicsTestMotionParameters2D.xml b/doc/classes/PhysicsTestMotionParameters2D.xml
index c22a49edf7..00f21a2058 100644
--- a/doc/classes/PhysicsTestMotionParameters2D.xml
+++ b/doc/classes/PhysicsTestMotionParameters2D.xml
@@ -28,5 +28,9 @@
<member name="motion" type="Vector2" setter="set_motion" getter="get_motion" default="Vector2(0, 0)">
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].
+ </member>
</members>
</class>
diff --git a/doc/classes/PhysicsTestMotionParameters3D.xml b/doc/classes/PhysicsTestMotionParameters3D.xml
index 4ff07de7aa..5b07796a10 100644
--- a/doc/classes/PhysicsTestMotionParameters3D.xml
+++ b/doc/classes/PhysicsTestMotionParameters3D.xml
@@ -31,5 +31,9 @@
<member name="motion" type="Vector3" setter="set_motion" getter="get_motion" default="Vector3(0, 0, 0)">
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].
+ </member>
</members>
</class>
diff --git a/doc/classes/PhysicsTestMotionResult3D.xml b/doc/classes/PhysicsTestMotionResult3D.xml
index e347a350c2..f82df1989f 100644
--- a/doc/classes/PhysicsTestMotionResult3D.xml
+++ b/doc/classes/PhysicsTestMotionResult3D.xml
@@ -11,35 +11,35 @@
<methods>
<method name="get_collider" qualifiers="const">
<return type="Object" />
- <argument index="0" name="collision_index" type="int" default="0" />
+ <param index="0" name="collision_index" type="int" default="0" />
<description>
Returns the colliding body's attached [Object] given a collision index (the deepest collision by default), if a collision occurred.
</description>
</method>
<method name="get_collider_id" qualifiers="const">
<return type="int" />
- <argument index="0" name="collision_index" type="int" default="0" />
+ <param index="0" name="collision_index" type="int" default="0" />
<description>
Returns the unique instance ID of the colliding body's attached [Object] given a collision index (the deepest collision by default), if a collision occurred. See [method Object.get_instance_id].
</description>
</method>
<method name="get_collider_rid" qualifiers="const">
<return type="RID" />
- <argument index="0" name="collision_index" type="int" default="0" />
+ <param index="0" name="collision_index" type="int" default="0" />
<description>
Returns the colliding body's [RID] used by the [PhysicsServer3D] given a collision index (the deepest collision by default), if a collision occurred.
</description>
</method>
<method name="get_collider_shape" qualifiers="const">
<return type="int" />
- <argument index="0" name="collision_index" type="int" default="0" />
+ <param index="0" name="collision_index" type="int" default="0" />
<description>
Returns the colliding body's shape index given a collision index (the deepest collision by default), if a collision occurred. See [CollisionObject3D].
</description>
</method>
<method name="get_collider_velocity" qualifiers="const">
<return type="Vector3" />
- <argument index="0" name="collision_index" type="int" default="0" />
+ <param index="0" name="collision_index" type="int" default="0" />
<description>
Returns the colliding body's velocity given a collision index (the deepest collision by default), if a collision occurred.
</description>
@@ -52,28 +52,28 @@
</method>
<method name="get_collision_depth" qualifiers="const">
<return type="float" />
- <argument index="0" name="collision_index" type="int" default="0" />
+ <param index="0" name="collision_index" type="int" default="0" />
<description>
Returns the length of overlap along the collision normal given a collision index (the deepest collision by default), if a collision occurred.
</description>
</method>
<method name="get_collision_local_shape" qualifiers="const">
<return type="int" />
- <argument index="0" name="collision_index" type="int" default="0" />
+ <param index="0" name="collision_index" type="int" default="0" />
<description>
Returns the moving object's colliding shape given a collision index (the deepest collision by default), if a collision occurred.
</description>
</method>
<method name="get_collision_normal" qualifiers="const">
<return type="Vector3" />
- <argument index="0" name="collision_index" type="int" default="0" />
+ <param index="0" name="collision_index" type="int" default="0" />
<description>
Returns the colliding body's shape's normal at the point of collision given a collision index (the deepest collision by default), if a collision occurred.
</description>
</method>
<method name="get_collision_point" qualifiers="const">
<return type="Vector3" />
- <argument index="0" name="collision_index" type="int" default="0" />
+ <param index="0" name="collision_index" type="int" default="0" />
<description>
Returns the point of collision in global coordinates given a collision index (the deepest collision by default), if a collision occurred.
</description>
diff --git a/doc/classes/PinJoint3D.xml b/doc/classes/PinJoint3D.xml
index 013a18b92c..007cdf830d 100644
--- a/doc/classes/PinJoint3D.xml
+++ b/doc/classes/PinJoint3D.xml
@@ -11,15 +11,15 @@
<methods>
<method name="get_param" qualifiers="const">
<return type="float" />
- <argument index="0" name="param" type="int" enum="PinJoint3D.Param" />
+ <param index="0" name="param" type="int" enum="PinJoint3D.Param" />
<description>
Returns the value of the specified parameter.
</description>
</method>
<method name="set_param">
<return type="void" />
- <argument index="0" name="param" type="int" enum="PinJoint3D.Param" />
- <argument index="1" name="value" type="float" />
+ <param index="0" name="param" type="int" enum="PinJoint3D.Param" />
+ <param index="1" name="value" type="float" />
<description>
Sets the value of the specified parameter.
</description>
diff --git a/doc/classes/PlaceholderCubemap.xml b/doc/classes/PlaceholderCubemap.xml
new file mode 100644
index 0000000000..3617c6ac2c
--- /dev/null
+++ b/doc/classes/PlaceholderCubemap.xml
@@ -0,0 +1,9 @@
+<?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>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+</class>
diff --git a/doc/classes/PlaceholderCubemapArray.xml b/doc/classes/PlaceholderCubemapArray.xml
new file mode 100644
index 0000000000..1fcf1e7795
--- /dev/null
+++ b/doc/classes/PlaceholderCubemapArray.xml
@@ -0,0 +1,9 @@
+<?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>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+</class>
diff --git a/doc/classes/PlaceholderMaterial.xml b/doc/classes/PlaceholderMaterial.xml
new file mode 100644
index 0000000000..c66641d81c
--- /dev/null
+++ b/doc/classes/PlaceholderMaterial.xml
@@ -0,0 +1,9 @@
+<?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>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+</class>
diff --git a/doc/classes/PlaceholderMesh.xml b/doc/classes/PlaceholderMesh.xml
new file mode 100644
index 0000000000..cc688816b6
--- /dev/null
+++ b/doc/classes/PlaceholderMesh.xml
@@ -0,0 +1,13 @@
+<?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>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <members>
+ <member name="aabb" type="AABB" setter="set_aabb" getter="get_aabb" default="AABB(0, 0, 0, 0, 0, 0)">
+ </member>
+ </members>
+</class>
diff --git a/doc/classes/PlaceholderTexture2D.xml b/doc/classes/PlaceholderTexture2D.xml
new file mode 100644
index 0000000000..76e575265b
--- /dev/null
+++ b/doc/classes/PlaceholderTexture2D.xml
@@ -0,0 +1,13 @@
+<?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>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <members>
+ <member name="size" type="Vector2" setter="set_size" getter="get_size" default="Vector2(1, 1)">
+ </member>
+ </members>
+</class>
diff --git a/doc/classes/PlaceholderTexture2DArray.xml b/doc/classes/PlaceholderTexture2DArray.xml
new file mode 100644
index 0000000000..a502e5d334
--- /dev/null
+++ b/doc/classes/PlaceholderTexture2DArray.xml
@@ -0,0 +1,9 @@
+<?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>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+</class>
diff --git a/doc/classes/PlaceholderTexture3D.xml b/doc/classes/PlaceholderTexture3D.xml
new file mode 100644
index 0000000000..d31e538307
--- /dev/null
+++ b/doc/classes/PlaceholderTexture3D.xml
@@ -0,0 +1,13 @@
+<?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>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <members>
+ <member name="size" type="Vector3i" setter="set_size" getter="get_size" default="Vector3i(1, 1, 1)">
+ </member>
+ </members>
+</class>
diff --git a/doc/classes/PlaceholderTextureLayered.xml b/doc/classes/PlaceholderTextureLayered.xml
new file mode 100644
index 0000000000..39af08473a
--- /dev/null
+++ b/doc/classes/PlaceholderTextureLayered.xml
@@ -0,0 +1,15 @@
+<?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>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <members>
+ <member name="layers" type="int" setter="set_layers" getter="get_layers" default="1">
+ </member>
+ <member name="size" type="Vector2i" setter="set_size" getter="get_size" default="Vector2i(1, 1)">
+ </member>
+ </members>
+</class>
diff --git a/doc/classes/Plane.xml b/doc/classes/Plane.xml
index a42ceba777..e51e3753fc 100644
--- a/doc/classes/Plane.xml
+++ b/doc/classes/Plane.xml
@@ -18,49 +18,49 @@
</constructor>
<constructor name="Plane">
<return type="Plane" />
- <argument index="0" name="from" type="Plane" />
+ <param index="0" name="from" type="Plane" />
<description>
Constructs a [Plane] as a copy of the given [Plane].
</description>
</constructor>
<constructor name="Plane">
<return type="Plane" />
- <argument index="0" name="a" type="float" />
- <argument index="1" name="b" type="float" />
- <argument index="2" name="c" type="float" />
- <argument index="3" name="d" type="float" />
+ <param index="0" name="a" type="float" />
+ <param index="1" name="b" type="float" />
+ <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">
<return type="Plane" />
- <argument index="0" name="normal" type="Vector3" />
+ <param index="0" name="normal" type="Vector3" />
<description>
Creates a plane from the normal vector. The plane will intersect the origin.
</description>
</constructor>
<constructor name="Plane">
<return type="Plane" />
- <argument index="0" name="normal" type="Vector3" />
- <argument index="1" name="d" type="float" />
+ <param index="0" name="normal" type="Vector3" />
+ <param index="1" name="d" type="float" />
<description>
Creates a plane from the normal vector and the plane's distance from the origin.
</description>
</constructor>
<constructor name="Plane">
<return type="Plane" />
- <argument index="0" name="normal" type="Vector3" />
- <argument index="1" name="point" type="Vector3" />
+ <param index="0" name="normal" type="Vector3" />
+ <param index="1" name="point" type="Vector3" />
<description>
Creates a plane from the normal vector and a point on the plane.
</description>
</constructor>
<constructor name="Plane">
<return type="Plane" />
- <argument index="0" name="point1" type="Vector3" />
- <argument index="1" name="point2" type="Vector3" />
- <argument index="2" name="point3" type="Vector3" />
+ <param index="0" name="point1" type="Vector3" />
+ <param index="1" name="point2" type="Vector3" />
+ <param index="2" name="point3" type="Vector3" />
<description>
Creates a plane from the three points, given in clockwise order.
</description>
@@ -75,55 +75,55 @@
</method>
<method name="distance_to" qualifiers="const">
<return type="float" />
- <argument index="0" name="point" type="Vector3" />
+ <param index="0" name="point" type="Vector3" />
<description>
- Returns the shortest distance from the plane to the position [code]point[/code].
+ 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">
<return type="bool" />
- <argument index="0" name="point" type="Vector3" />
- <argument index="1" name="epsilon" type="float" default="1e-05" />
+ <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]epsilon[/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">
<return type="Variant" />
- <argument index="0" name="b" type="Plane" />
- <argument index="1" name="c" type="Plane" />
+ <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">
<return type="Variant" />
- <argument index="0" name="from" type="Vector3" />
- <argument index="1" name="dir" type="Vector3" />
+ <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">
<return type="Variant" />
- <argument index="0" name="from" type="Vector3" />
- <argument index="1" name="to" type="Vector3" />
+ <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]begin[/code] to position [code]end[/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" />
- <argument index="0" name="to_plane" type="Plane" />
+ <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_point_over" qualifiers="const">
<return type="bool" />
- <argument index="0" name="plane" type="Vector3" />
+ <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">
@@ -134,9 +134,9 @@
</method>
<method name="project" qualifiers="const">
<return type="Vector3" />
- <argument index="0" name="point" 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>
@@ -173,15 +173,22 @@
<operators>
<operator name="operator !=">
<return type="bool" />
- <argument index="0" name="right" type="Plane" />
+ <param index="0" name="right" type="Plane" />
<description>
Returns [code]true[/code] if the planes are not equal.
[b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.
</description>
</operator>
+ <operator name="operator *">
+ <return type="Plane" />
+ <param index="0" name="right" type="Transform3D" />
+ <description>
+ Inversely transforms (multiplies) the [Plane] by the given [Transform3D] transformation matrix.
+ </description>
+ </operator>
<operator name="operator ==">
<return type="bool" />
- <argument index="0" name="right" type="Plane" />
+ <param index="0" name="right" type="Plane" />
<description>
Returns [code]true[/code] if the planes are exactly equal.
[b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.
diff --git a/doc/classes/PlaneMesh.xml b/doc/classes/PlaneMesh.xml
index 6b3a7ed548..564b6fe743 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 behaviour 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 behvaiour of the QuadMesh in Godot 3.x.
+ </constant>
+ </constants>
</class>
diff --git a/doc/classes/Polygon2D.xml b/doc/classes/Polygon2D.xml
index 5f75ac6c50..12f8055180 100644
--- a/doc/classes/Polygon2D.xml
+++ b/doc/classes/Polygon2D.xml
@@ -11,10 +11,10 @@
<methods>
<method name="add_bone">
<return type="void" />
- <argument index="0" name="path" type="NodePath" />
- <argument index="1" name="weights" type="PackedFloat32Array" />
+ <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">
@@ -25,7 +25,7 @@
</method>
<method name="erase_bone">
<return type="void" />
- <argument index="0" name="index" type="int" />
+ <param index="0" name="index" type="int" />
<description>
Removes the specified bone from this [Polygon2D].
</description>
@@ -38,30 +38,30 @@
</method>
<method name="get_bone_path" qualifiers="const">
<return type="NodePath" />
- <argument index="0" name="index" type="int" />
+ <param index="0" name="index" type="int" />
<description>
Returns the path to the node associated with the specified bone.
</description>
</method>
<method name="get_bone_weights" qualifiers="const">
<return type="PackedFloat32Array" />
- <argument index="0" name="index" type="int" />
+ <param index="0" name="index" type="int" />
<description>
Returns the height values of the specified bone.
</description>
</method>
<method name="set_bone_path">
<return type="void" />
- <argument index="0" name="index" type="int" />
- <argument index="1" name="path" type="NodePath" />
+ <param index="0" name="index" type="int" />
+ <param index="1" name="path" type="NodePath" />
<description>
Sets the path to the node associated with the specified bone.
</description>
</method>
<method name="set_bone_weights">
<return type="void" />
- <argument index="0" name="index" type="int" />
- <argument index="1" name="weights" type="PackedFloat32Array" />
+ <param index="0" name="index" type="int" />
+ <param index="1" name="weights" type="PackedFloat32Array" />
<description>
Sets the weight values for the specified bone.
</description>
@@ -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.
diff --git a/doc/classes/PolygonPathFinder.xml b/doc/classes/PolygonPathFinder.xml
index dbe9978ef5..84d757bfca 100644
--- a/doc/classes/PolygonPathFinder.xml
+++ b/doc/classes/PolygonPathFinder.xml
@@ -9,8 +9,8 @@
<methods>
<method name="find_path">
<return type="PackedVector2Array" />
- <argument index="0" name="from" type="Vector2" />
- <argument index="1" name="to" type="Vector2" />
+ <param index="0" name="from" type="Vector2" />
+ <param index="1" name="to" type="Vector2" />
<description>
</description>
</method>
@@ -21,40 +21,40 @@
</method>
<method name="get_closest_point" qualifiers="const">
<return type="Vector2" />
- <argument index="0" name="point" type="Vector2" />
+ <param index="0" name="point" type="Vector2" />
<description>
</description>
</method>
<method name="get_intersections" qualifiers="const">
<return type="PackedVector2Array" />
- <argument index="0" name="from" type="Vector2" />
- <argument index="1" name="to" type="Vector2" />
+ <param index="0" name="from" type="Vector2" />
+ <param index="1" name="to" type="Vector2" />
<description>
</description>
</method>
<method name="get_point_penalty" qualifiers="const">
<return type="float" />
- <argument index="0" name="idx" type="int" />
+ <param index="0" name="idx" type="int" />
<description>
</description>
</method>
<method name="is_point_inside" qualifiers="const">
<return type="bool" />
- <argument index="0" name="point" type="Vector2" />
+ <param index="0" name="point" type="Vector2" />
<description>
</description>
</method>
<method name="set_point_penalty">
<return type="void" />
- <argument index="0" name="idx" type="int" />
- <argument index="1" name="penalty" type="float" />
+ <param index="0" name="idx" type="int" />
+ <param index="1" name="penalty" type="float" />
<description>
</description>
</method>
<method name="setup">
<return type="void" />
- <argument index="0" name="points" type="PackedVector2Array" />
- <argument index="1" name="connections" type="PackedInt32Array" />
+ <param index="0" name="points" type="PackedVector2Array" />
+ <param index="1" name="connections" type="PackedInt32Array" />
<description>
</description>
</method>
diff --git a/doc/classes/PopupMenu.xml b/doc/classes/PopupMenu.xml
index bf80aa94a5..0f47bea5df 100644
--- a/doc/classes/PopupMenu.xml
+++ b/doc/classes/PopupMenu.xml
@@ -8,171 +8,172 @@
The size of a [PopupMenu] can be limited by using [member Window.max_size]. If the height of the list of items is larger than the maximum height of the [PopupMenu], a [ScrollContainer] within the popup will allow the user to scroll the contents.
If no maximum size is set, or if it is set to 0, the [PopupMenu] height will be limited by its parent rect.
All [code]set_*[/code] methods allow negative item index, which makes the item accessed from the last one.
+ [b]Incremental search:[/b] Like [ItemList] and [Tree], [PopupMenu] supports searching within the list while the control is focused. Press a key that matches the first letter of an item's name to select the first item starting with the given letter. After that point, there are two ways to perform incremental search: 1) Press the same key again before the timeout duration to select the next item starting with the same letter. 2) Press letter keys that match the rest of the word before the timeout duration to match to select the item in question directly. Both of these actions will be reset to the beginning of the list if the timeout duration has passed since the last keystroke was registered. You can adjust the timeout duration by changing [member ProjectSettings.gui/timers/incremental_search_max_interval_msec].
</description>
<tutorials>
</tutorials>
<methods>
<method name="add_check_item">
<return type="void" />
- <argument index="0" name="label" type="String" />
- <argument index="1" name="id" type="int" default="-1" />
- <argument index="2" name="accel" type="int" enum="Key" default="0" />
+ <param index="0" name="label" type="String" />
+ <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>
<method name="add_check_shortcut">
<return type="void" />
- <argument index="0" name="shortcut" type="Shortcut" />
- <argument index="1" name="id" type="int" default="-1" />
- <argument index="2" name="global" type="bool" default="false" />
+ <param index="0" name="shortcut" type="Shortcut" />
+ <param index="1" name="id" type="int" default="-1" />
+ <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>
<method name="add_icon_check_item">
<return type="void" />
- <argument index="0" name="texture" type="Texture2D" />
- <argument index="1" name="label" type="String" />
- <argument index="2" name="id" type="int" default="-1" />
- <argument index="3" name="accel" type="int" enum="Key" default="0" />
+ <param index="0" name="texture" type="Texture2D" />
+ <param index="1" name="label" type="String" />
+ <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>
<method name="add_icon_check_shortcut">
<return type="void" />
- <argument index="0" name="texture" type="Texture2D" />
- <argument index="1" name="shortcut" type="Shortcut" />
- <argument index="2" name="id" type="int" default="-1" />
- <argument index="3" name="global" type="bool" default="false" />
+ <param index="0" name="texture" type="Texture2D" />
+ <param index="1" name="shortcut" type="Shortcut" />
+ <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>
<method name="add_icon_item">
<return type="void" />
- <argument index="0" name="texture" type="Texture2D" />
- <argument index="1" name="label" type="String" />
- <argument index="2" name="id" type="int" default="-1" />
- <argument index="3" name="accel" type="int" enum="Key" default="0" />
+ <param index="0" name="texture" type="Texture2D" />
+ <param index="1" name="label" type="String" />
+ <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">
<return type="void" />
- <argument index="0" name="texture" type="Texture2D" />
- <argument index="1" name="label" type="String" />
- <argument index="2" name="id" type="int" default="-1" />
- <argument index="3" name="accel" type="int" enum="Key" default="0" />
+ <param index="0" name="texture" type="Texture2D" />
+ <param index="1" name="label" type="String" />
+ <param index="2" name="id" type="int" default="-1" />
+ <param index="3" name="accel" type="int" enum="Key" default="0" />
<description>
Same as [method add_icon_check_item], but uses a radio check button.
</description>
</method>
<method name="add_icon_radio_check_shortcut">
<return type="void" />
- <argument index="0" name="texture" type="Texture2D" />
- <argument index="1" name="shortcut" type="Shortcut" />
- <argument index="2" name="id" type="int" default="-1" />
- <argument index="3" name="global" type="bool" default="false" />
+ <param index="0" name="texture" type="Texture2D" />
+ <param index="1" name="shortcut" type="Shortcut" />
+ <param index="2" name="id" type="int" default="-1" />
+ <param index="3" name="global" type="bool" default="false" />
<description>
Same as [method add_icon_check_shortcut], but uses a radio check button.
</description>
</method>
<method name="add_icon_shortcut">
<return type="void" />
- <argument index="0" name="texture" type="Texture2D" />
- <argument index="1" name="shortcut" type="Shortcut" />
- <argument index="2" name="id" type="int" default="-1" />
- <argument index="3" name="global" type="bool" default="false" />
+ <param index="0" name="texture" type="Texture2D" />
+ <param index="1" name="shortcut" type="Shortcut" />
+ <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">
<return type="void" />
- <argument index="0" name="label" type="String" />
- <argument index="1" name="id" type="int" default="-1" />
- <argument index="2" name="accel" type="int" enum="Key" default="0" />
+ <param index="0" name="label" type="String" />
+ <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">
<return type="void" />
- <argument index="0" name="label" type="String" />
- <argument index="1" name="max_states" type="int" />
- <argument index="2" name="default_state" type="int" default="0" />
- <argument index="3" name="id" type="int" default="-1" />
- <argument index="4" name="accel" type="int" enum="Key" default="0" />
+ <param index="0" name="label" type="String" />
+ <param index="1" name="max_states" type="int" />
+ <param index="2" name="default_state" type="int" default="0" />
+ <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">
<return type="void" />
- <argument index="0" name="label" type="String" />
- <argument index="1" name="id" type="int" default="-1" />
- <argument index="2" name="accel" type="int" enum="Key" default="0" />
+ <param index="0" name="label" type="String" />
+ <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>
<method name="add_radio_check_shortcut">
<return type="void" />
- <argument index="0" name="shortcut" type="Shortcut" />
- <argument index="1" name="id" type="int" default="-1" />
- <argument index="2" name="global" type="bool" default="false" />
+ <param index="0" name="shortcut" type="Shortcut" />
+ <param index="1" name="id" type="int" default="-1" />
+ <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>
<method name="add_separator">
<return type="void" />
- <argument index="0" name="label" type="String" default="&quot;&quot;" />
- <argument index="1" name="id" type="int" default="-1" />
+ <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">
<return type="void" />
- <argument index="0" name="shortcut" type="Shortcut" />
- <argument index="1" name="id" type="int" default="-1" />
- <argument index="2" name="global" type="bool" default="false" />
+ <param index="0" name="shortcut" type="Shortcut" />
+ <param index="1" name="id" type="int" default="-1" />
+ <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">
<return type="void" />
- <argument index="0" name="label" type="String" />
- <argument index="1" name="submenu" type="String" />
- <argument index="2" name="id" type="int" default="-1" />
+ <param index="0" name="label" type="String" />
+ <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">
@@ -181,13 +182,6 @@
Removes all items from the [PopupMenu].
</description>
</method>
- <method name="clear_item_opentype_features">
- <return type="void" />
- <argument index="0" name="index" type="int" />
- <description>
- Removes all OpenType features form the item's text.
- </description>
- </method>
<method name="get_current_index" qualifiers="const">
<return type="int" />
<description>
@@ -196,314 +190,312 @@
</method>
<method name="get_item_accelerator" qualifiers="const">
<return type="int" enum="Key" />
- <argument index="0" name="index" type="int" />
+ <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_icon" qualifiers="const">
<return type="Texture2D" />
- <argument index="0" name="index" type="int" />
+ <param index="0" name="index" type="int" />
<description>
- Returns the icon 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_id" qualifiers="const">
<return type="int" />
- <argument index="0" name="index" type="int" />
+ <param index="0" name="index" type="int" />
+ <description>
+ 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_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" />
- <argument index="0" name="id" 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">
<return type="String" />
- <argument index="0" name="index" type="int" />
+ <param index="0" name="index" type="int" />
<description>
Returns item's text language code.
</description>
</method>
<method name="get_item_metadata" qualifiers="const">
<return type="Variant" />
- <argument index="0" name="index" type="int" />
+ <param index="0" name="index" type="int" />
<description>
Returns the metadata of the specified item, which might be of any type. You can set it with [method set_item_metadata], which provides a simple way of assigning context data to items.
</description>
</method>
- <method name="get_item_opentype_feature" qualifiers="const">
- <return type="int" />
- <argument index="0" name="index" type="int" />
- <argument index="1" name="tag" type="String" />
- <description>
- Returns OpenType feature [code]tag[/code] of the item's text.
- </description>
- </method>
<method name="get_item_shortcut" qualifiers="const">
<return type="Shortcut" />
- <argument index="0" name="index" type="int" />
+ <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" />
- <argument index="0" name="index" type="int" />
+ <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" />
- <argument index="0" name="index" type="int" />
+ <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">
<return type="int" enum="Control.TextDirection" />
- <argument index="0" name="index" type="int" />
+ <param index="0" name="index" type="int" />
<description>
Returns item's text base writing direction.
</description>
</method>
<method name="get_item_tooltip" qualifiers="const">
<return type="String" />
- <argument index="0" name="index" type="int" />
+ <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" />
- <argument index="0" name="index" type="int" />
+ <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>
<method name="is_item_checked" qualifiers="const">
<return type="bool" />
- <argument index="0" name="index" type="int" />
+ <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" />
- <argument index="0" name="index" type="int" />
+ <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>
<method name="is_item_radio_checkable" qualifiers="const">
<return type="bool" />
- <argument index="0" name="index" type="int" />
+ <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>
<method name="is_item_separator" qualifiers="const">
<return type="bool" />
- <argument index="0" name="index" type="int" />
+ <param index="0" name="index" type="int" />
<description>
Returns [code]true[/code] if the item is a separator. If it is, it will be displayed as a line. See [method add_separator] for more info on how to add a separator.
</description>
</method>
<method name="is_item_shortcut_disabled" qualifiers="const">
<return type="bool" />
- <argument index="0" name="index" type="int" />
+ <param index="0" name="index" type="int" />
<description>
Returns [code]true[/code] if the specified item's shortcut is disabled.
</description>
</method>
<method name="remove_item">
<return type="void" />
- <argument index="0" name="index" type="int" />
+ <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>
<method name="scroll_to_item">
<return type="void" />
- <argument index="0" name="index" type="int" />
+ <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">
<return type="void" />
- <argument index="0" name="index" type="int" />
+ <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].
</description>
</method>
<method name="set_item_accelerator">
<return type="void" />
- <argument index="0" name="index" type="int" />
- <argument index="1" name="accel" type="int" enum="Key" />
+ <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">
<return type="void" />
- <argument index="0" name="index" type="int" />
- <argument index="1" name="enable" type="bool" />
+ <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>
<method name="set_item_as_radio_checkable">
<return type="void" />
- <argument index="0" name="index" type="int" />
- <argument index="1" name="enable" type="bool" />
+ <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">
<return type="void" />
- <argument index="0" name="index" type="int" />
- <argument index="1" name="enable" type="bool" />
+ <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">
<return type="void" />
- <argument index="0" name="index" type="int" />
- <argument index="1" name="checked" type="bool" />
+ <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">
<return type="void" />
- <argument index="0" name="index" type="int" />
- <argument index="1" name="disabled" type="bool" />
+ <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_icon">
<return type="void" />
- <argument index="0" name="index" type="int" />
- <argument index="1" name="icon" type="Texture2D" />
+ <param index="0" name="index" type="int" />
+ <param index="1" name="icon" type="Texture2D" />
<description>
- Replaces the [Texture2D] icon 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_id">
<return type="void" />
- <argument index="0" name="index" type="int" />
- <argument index="1" name="id" type="int" />
+ <param index="0" name="index" type="int" />
+ <param index="1" name="id" type="int" />
+ <description>
+ 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_indent">
+ <return type="void" />
+ <param index="0" name="index" 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">
<return type="void" />
- <argument index="0" name="index" type="int" />
- <argument index="1" name="language" type="String" />
+ <param index="0" name="index" type="int" />
+ <param index="1" name="language" type="String" />
<description>
Sets language code of item's text used for line-breaking and text shaping algorithms, if left empty current locale is used instead.
</description>
</method>
<method name="set_item_metadata">
<return type="void" />
- <argument index="0" name="index" type="int" />
- <argument index="1" name="metadata" type="Variant" />
+ <param index="0" name="index" type="int" />
+ <param index="1" name="metadata" type="Variant" />
<description>
Sets the metadata of an item, which may be of any type. You can later get it with [method get_item_metadata], which provides a simple way of assigning context data to items.
</description>
</method>
<method name="set_item_multistate">
<return type="void" />
- <argument index="0" name="index" type="int" />
- <argument index="1" name="state" type="int" />
+ <param index="0" name="index" type="int" />
+ <param index="1" name="state" type="int" />
<description>
Sets the state of a multistate item. See [method add_multistate_item] for details.
</description>
</method>
- <method name="set_item_opentype_feature">
- <return type="void" />
- <argument index="0" name="index" type="int" />
- <argument index="1" name="tag" type="String" />
- <argument index="2" name="value" type="int" />
- <description>
- Sets OpenType feature [code]tag[/code] for the item's text. More info: [url=https://docs.microsoft.com/en-us/typography/opentype/spec/featuretags]OpenType feature tags[/url].
- </description>
- </method>
<method name="set_item_shortcut">
<return type="void" />
- <argument index="0" name="index" type="int" />
- <argument index="1" name="shortcut" type="Shortcut" />
- <argument index="2" name="global" type="bool" default="false" />
+ <param index="0" name="index" type="int" />
+ <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">
<return type="void" />
- <argument index="0" name="index" type="int" />
- <argument index="1" name="disabled" type="bool" />
+ <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">
<return type="void" />
- <argument index="0" name="index" type="int" />
- <argument index="1" name="submenu" type="String" />
+ <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">
<return type="void" />
- <argument index="0" name="index" type="int" />
- <argument index="1" name="text" type="String" />
+ <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">
<return type="void" />
- <argument index="0" name="index" type="int" />
- <argument index="1" name="direction" type="int" enum="Control.TextDirection" />
+ <param index="0" name="index" type="int" />
+ <param index="1" name="direction" type="int" enum="Control.TextDirection" />
<description>
Sets item's text base writing direction.
</description>
</method>
<method name="set_item_tooltip">
<return type="void" />
- <argument index="0" name="index" type="int" />
- <argument index="1" name="tooltip" type="String" />
+ <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" />
- <argument index="0" name="index" type="int" />
+ <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">
<return type="void" />
- <argument index="0" name="index" type="int" />
+ <param index="0" name="index" type="int" />
<description>
Cycle to the next state of a multistate item. See [method add_multistate_item] for details.
</description>
@@ -531,21 +523,25 @@
</members>
<signals>
<signal name="id_focused">
- <argument index="0" name="id" type="int" />
+ <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 user navigated to an item of some [param id] using [code]ui_up[/code] or [code]ui_down[/code] action.
</description>
</signal>
<signal name="id_pressed">
- <argument index="0" name="id" type="int" />
+ <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.
</description>
</signal>
<signal name="index_pressed">
- <argument index="0" name="index" type="int" />
+ <param index="0" name="index" type="int" />
+ <description>
+ Emitted when an item of some [param index] is pressed or its accelerator is activated.
+ </description>
+ </signal>
+ <signal name="menu_changed">
<description>
- Emitted when an item of some [code]index[/code] is pressed or its accelerator is activated.
</description>
</signal>
</signals>
@@ -574,6 +570,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">
@@ -602,12 +601,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>
@@ -617,6 +625,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 aad72bbb48..c7e2f2fbdc 100644
--- a/doc/classes/PortableCompressedTexture2D.xml
+++ b/doc/classes/PortableCompressedTexture2D.xml
@@ -15,10 +15,10 @@
<methods>
<method name="create_from_image">
<return type="void" />
- <argument index="0" name="image" type="Image" />
- <argument index="1" name="compression_mode" type="int" enum="PortableCompressedTexture2D.CompressionMode" />
- <argument index="2" name="normal_map" type="bool" default="false" />
- <argument index="3" name="lossy_quality" type="float" default="0.8" />
+ <param index="0" name="image" type="Image" />
+ <param index="1" name="compression_mode" type="int" enum="PortableCompressedTexture2D.CompressionMode" />
+ <param index="2" name="normal_map" type="bool" default="false" />
+ <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.
@@ -45,7 +45,7 @@
</method>
<method name="set_keep_all_compressed_buffers" qualifiers="static">
<return type="void" />
- <argument index="0" name="keep" type="bool" />
+ <param index="0" name="keep" type="bool" />
<description>
Overrides the flag globally for all textures of this type. This is used primarily by the editor.
</description>
diff --git a/doc/classes/PrimitiveMesh.xml b/doc/classes/PrimitiveMesh.xml
index 7046a21f68..1b9ecdbfa0 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>
diff --git a/doc/classes/PrismMesh.xml b/doc/classes/PrismMesh.xml
index 10c2b11a9a..a7bfa43c52 100644
--- a/doc/classes/PrismMesh.xml
+++ b/doc/classes/PrismMesh.xml
@@ -12,7 +12,7 @@
<member name="left_to_right" type="float" setter="set_left_to_right" getter="get_left_to_right" default="0.5">
Displacement of the upper edge along the X axis. 0.0 positions edge straight above the bottom-left edge.
</member>
- <member name="size" type="Vector3" setter="set_size" getter="get_size" default="Vector3(2, 2, 2)">
+ <member name="size" type="Vector3" setter="set_size" getter="get_size" default="Vector3(1, 1, 1)">
Size of the prism.
</member>
<member name="subdivide_depth" type="int" setter="set_subdivide_depth" getter="get_subdivide_depth" default="0">
diff --git a/doc/classes/ProceduralSkyMaterial.xml b/doc/classes/ProceduralSkyMaterial.xml
index bf33232406..3cc4bd71f7 100644
--- a/doc/classes/ProceduralSkyMaterial.xml
+++ b/doc/classes/ProceduralSkyMaterial.xml
@@ -47,5 +47,8 @@
<member name="sun_curve" type="float" setter="set_sun_curve" getter="get_sun_curve" default="0.15">
How quickly the sun fades away between the edge of the sun disk and [member sun_angle_max].
</member>
+ <member name="use_debanding" type="bool" setter="set_use_debanding" getter="get_use_debanding" default="true">
+ If [code]true[/code], enables debanding. Debanding adds a small amount of noise which helps reduce banding that appears from the smooth changes in color in the sky.
+ </member>
</members>
</class>
diff --git a/doc/classes/ProgressBar.xml b/doc/classes/ProgressBar.xml
index 1e9ab7c375..8a781c51fb 100644
--- a/doc/classes/ProgressBar.xml
+++ b/doc/classes/ProgressBar.xml
@@ -9,10 +9,27 @@
<tutorials>
</tutorials>
<members>
+ <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">
If [code]true[/code], the fill percentage is displayed on the bar.
</member>
</members>
+ <constants>
+ <constant name="FILL_BEGIN_TO_END" value="0" enum="FillMode">
+ The progress bar fills from begin to end horizontally, according to the language direction. If [method Control.is_layout_rtl] returns [code]false[/code], it fills from left to right, and if it returns [code]true[/code], it fills from right to left.
+ </constant>
+ <constant name="FILL_END_TO_BEGIN" value="1" enum="FillMode">
+ The progress bar fills from end to begin horizontally, according to the language direction. If [method Control.is_layout_rtl] returns [code]false[/code], it fills from right to left, and if it returns [code]true[/code], it fills from left to right.
+ </constant>
+ <constant name="FILL_TOP_TO_BOTTOM" value="2" enum="FillMode">
+ The progress fills from top to bottom.
+ </constant>
+ <constant name="FILL_BOTTOM_TO_TOP" value="3" enum="FillMode">
+ The progress fills from bottom to top.
+ </constant>
+ </constants>
<theme_items>
<theme_item name="font_color" data_type="color" type="Color" default="Color(0.95, 0.95, 0.95, 1)">
The color of the text.
diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml
index 7c6d6d1c10..a2e202b218 100644
--- a/doc/classes/ProjectSettings.xml
+++ b/doc/classes/ProjectSettings.xml
@@ -17,7 +17,7 @@
<methods>
<method name="add_property_info">
<return type="void" />
- <argument index="0" name="hint" type="Dictionary" />
+ <param index="0" name="hint" type="Dictionary" />
<description>
Adds a custom property info to a property. The dictionary must contain:
- [code]name[/code]: [String] (the property's name)
@@ -55,21 +55,21 @@
</method>
<method name="clear">
<return type="void" />
- <argument index="0" name="name" type="String" />
+ <param index="0" name="name" type="String" />
<description>
Clears the whole configuration (not recommended, may break things).
</description>
</method>
<method name="get_order" qualifiers="const">
<return type="int" />
- <argument index="0" name="name" type="String" />
+ <param index="0" name="name" type="String" />
<description>
Returns the order of a configuration value (influences when saved to the config file).
</description>
</method>
<method name="get_setting" qualifiers="const">
<return type="Variant" />
- <argument index="0" name="name" type="String" />
+ <param index="0" name="name" type="String" />
<description>
Returns the value of a setting.
[b]Example:[/b]
@@ -85,9 +85,9 @@
</method>
<method name="globalize_path" qualifiers="const">
<return type="String" />
- <argument index="0" name="path" 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 = ""
@@ -106,41 +106,27 @@
</method>
<method name="has_setting" qualifiers="const">
<return type="bool" />
- <argument index="0" name="name" type="String" />
+ <param index="0" name="name" type="String" />
<description>
Returns [code]true[/code] if a configuration value is present.
</description>
</method>
<method name="load_resource_pack">
<return type="bool" />
- <argument index="0" name="pack" type="String" />
- <argument index="1" name="replace_files" type="bool" default="true" />
- <argument index="2" name="offset" type="int" default="0" />
+ <param index="0" name="pack" type="String" />
+ <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" />
- <argument index="0" name="path" 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" />
- <argument 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" />
- <argument 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">
@@ -152,31 +138,31 @@
</method>
<method name="save_custom">
<return type="int" enum="Error" />
- <argument index="0" name="file" type="String" />
+ <param index="0" name="file" type="String" />
<description>
Saves the configuration to a custom file. The file extension must be [code].godot[/code] (to save in text-based [ConfigFile] format) or [code].binary[/code] (to save in binary format). You can also save [code]override.cfg[/code] file, which is also text, but can be used in exported projects unlike other formats.
</description>
</method>
<method name="set_initial_value">
<return type="void" />
- <argument index="0" name="name" type="String" />
- <argument index="1" name="value" type="Variant" />
+ <param index="0" name="name" type="String" />
+ <param index="1" name="value" type="Variant" />
<description>
Sets the specified property's initial value. This is the value the property reverts to.
</description>
</method>
<method name="set_order">
<return type="void" />
- <argument index="0" name="name" type="String" />
- <argument index="1" name="position" type="int" />
+ <param index="0" name="name" type="String" />
+ <param index="1" name="position" type="int" />
<description>
Sets the order of a configuration value (influences when saved to the config file).
</description>
</method>
<method name="set_setting">
<return type="void" />
- <argument index="0" name="name" type="String" />
- <argument index="1" name="value" type="Variant" />
+ <param index="0" name="name" type="String" />
+ <param index="1" name="value" type="Variant" />
<description>
Sets the value of a setting.
[b]Example:[/b]
@@ -203,6 +189,9 @@
Path to an image used as the boot splash. If left empty, the default Godot Engine splash will be displayed instead.
[b]Note:[/b] Only effective if [member application/boot_splash/show_image] is [code]true[/code].
</member>
+ <member name="application/boot_splash/minimum_display_time" type="int" setter="" getter="" default="0">
+ Minimum boot splash display time (in milliseconds). It is not recommended to set too high values for this setting.
+ </member>
<member name="application/boot_splash/show_image" type="bool" setter="" getter="" default="true">
If [code]true[/code], displays the image specified in [member application/boot_splash/image] when the engine starts. If [code]false[/code], only displays the plain color specified in [member application/boot_splash/bg_color].
</member>
@@ -216,6 +205,9 @@
<member name="application/config/description" type="String" setter="" getter="" default="&quot;&quot;">
The project's description, displayed as a tooltip in the Project Manager when hovering the project.
</member>
+ <member name="application/config/features" type="PackedStringArray" setter="" getter="">
+ List of internal features associated with the project, like [code]Double Precision[/code] or [code]C#[/code]. Not to be confused with feature tags.
+ </member>
<member name="application/config/icon" type="String" setter="" getter="" default="&quot;&quot;">
Icon used for the project, set when project loads. Exporters will also use this icon when possible.
</member>
@@ -286,6 +278,8 @@
</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] command line argument.
</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.
@@ -304,6 +298,12 @@
<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>
+ <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>
<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.
</member>
@@ -332,20 +332,22 @@
Path to logs within the project. Using an [code]user://[/code] path 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="bool" setter="" getter="" default="true">
+ <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.
</member>
- <member name="debug/gdscript/warnings/assert_always_true" type="bool" setter="" getter="" default="true">
+ <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.
</member>
- <member name="debug/gdscript/warnings/constant_used_as_function" type="bool" setter="" getter="" default="true">
- If [code]true[/code], enables warnings when a constant is used as a function.
+ <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.
</member>
- <member name="debug/gdscript/warnings/deprecated_keyword" type="bool" setter="" getter="" default="true">
- If [code]true[/code], enables warnings when deprecated keywords are used.
+ <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.
</member>
- <member name="debug/gdscript/warnings/empty_file" type="bool" setter="" getter="" default="true">
- If [code]true[/code], enables warnings when an empty file is parsed.
+ <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.
</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.
@@ -353,85 +355,94 @@
<member name="debug/gdscript/warnings/exclude_addons" type="bool" setter="" getter="" default="true">
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="bool" setter="" getter="" default="true">
- If [code]true[/code], enables warnings when using a function as if it was a property.
+ <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.
</member>
- <member name="debug/gdscript/warnings/incompatible_ternary" type="bool" setter="" getter="" default="true">
- If [code]true[/code], enables warnings when a ternary operator may emit values with incompatible types.
+ <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.
</member>
- <member name="debug/gdscript/warnings/int_assigned_to_enum" type="bool" setter="" getter="" default="true">
+ <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.
</member>
- <member name="debug/gdscript/warnings/integer_division" type="bool" setter="" getter="" default="true">
- If [code]true[/code], enables warnings when dividing an integer by another integer (the decimal part will be discarded).
+ <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).
</member>
- <member name="debug/gdscript/warnings/narrowing_conversion" type="bool" setter="" getter="" default="true">
- If [code]true[/code], enables warnings when passing a floating-point value to a function that expects an integer (it will be converted and lose precision).
+ <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).
</member>
- <member name="debug/gdscript/warnings/property_used_as_function" type="bool" setter="" getter="" default="true">
- If [code]true[/code], enables warnings when using a property as if it was a function.
+ <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.
</member>
- <member name="debug/gdscript/warnings/redundant_await" type="bool" setter="" getter="" default="true">
+ <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.
</member>
- <member name="debug/gdscript/warnings/return_value_discarded" type="bool" setter="" getter="" default="true">
- If [code]true[/code], enables warnings 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="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>
- <member name="debug/gdscript/warnings/shadowed_global_identifier" type="bool" setter="" getter="" default="true">
- If [code]true[/code], enables warnings 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.
+ <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.
</member>
- <member name="debug/gdscript/warnings/shadowed_variable" type="bool" setter="" getter="" default="true">
- If [code]true[/code], enables warnings when defining a local or subclass member variable that would shadow a variable at an upper level (such as a member variable).
+ <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).
</member>
- <member name="debug/gdscript/warnings/shadowed_variable_base_class" type="bool" setter="" getter="" default="true">
+ <member name="debug/gdscript/warnings/shadowed_variable_base_class" type="int" setter="" getter="" default="1">
</member>
- <member name="debug/gdscript/warnings/standalone_expression" type="bool" setter="" getter="" default="true">
- If [code]true[/code], enables warnings when calling an expression that has no effect on the surrounding code, such as writing [code]2 + 2[/code] as a statement.
+ <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.
</member>
- <member name="debug/gdscript/warnings/standalone_ternary" type="bool" setter="" getter="" default="true">
- If [code]true[/code], enables warnings 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 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.
</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.
</member>
- <member name="debug/gdscript/warnings/unassigned_variable" type="bool" setter="" getter="" default="true">
- If [code]true[/code], enables warnings when using a variable that wasn't previously assigned.
+ <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.
+ </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.
</member>
- <member name="debug/gdscript/warnings/unassigned_variable_op_assign" type="bool" setter="" getter="" default="true">
- If [code]true[/code], enables warnings when assigning a variable using an assignment operator like [code]+=[/code] if the variable wasn't previously assigned.
+ <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).
</member>
- <member name="debug/gdscript/warnings/unreachable_code" type="bool" setter="" getter="" default="true">
- If [code]true[/code], enables warnings when unreachable code is detected (such as after a [code]return[/code] statement that will always be executed).
+ <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.
</member>
- <member name="debug/gdscript/warnings/unreachable_pattern" type="bool" setter="" getter="" default="true">
+ <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.
</member>
- <member name="debug/gdscript/warnings/unsafe_call_argument" type="bool" setter="" getter="" default="false">
- If [code]true[/code], enables warnings when using an expression whose type may not be compatible with the function parameter expected.
+ <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.
</member>
- <member name="debug/gdscript/warnings/unsafe_cast" type="bool" setter="" getter="" default="false">
- If [code]true[/code], enables warnings when performing an unsafe cast.
+ <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.
</member>
- <member name="debug/gdscript/warnings/unsafe_method_access" type="bool" setter="" getter="" default="false">
- If [code]true[/code], enables warnings when calling a method whose presence is not guaranteed at compile-time in the class.
+ <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.
</member>
- <member name="debug/gdscript/warnings/unsafe_property_access" type="bool" setter="" getter="" default="false">
- If [code]true[/code], enables warnings when accessing a property whose presence is not guaranteed at compile-time in the class.
+ <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.
</member>
- <member name="debug/gdscript/warnings/unused_local_constant" type="bool" setter="" getter="" default="true">
+ <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.
</member>
- <member name="debug/gdscript/warnings/unused_parameter" type="bool" setter="" getter="" default="true">
+ <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.
</member>
- <member name="debug/gdscript/warnings/unused_private_class_variable" type="bool" setter="" getter="" default="true">
+ <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.
</member>
- <member name="debug/gdscript/warnings/unused_signal" type="bool" setter="" getter="" default="true">
- If [code]true[/code], enables warnings when a signal is unused.
+ <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.
</member>
- <member name="debug/gdscript/warnings/unused_variable" type="bool" setter="" getter="" default="true">
- If [code]true[/code], enables warnings when a local variable is unused.
+ <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.
</member>
- <member name="debug/gdscript/warnings/void_assignment" type="bool" setter="" getter="" default="true">
- If [code]true[/code], enables warnings when assigning the result of a function that returns [code]void[/code] to a variable.
+ <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.
</member>
- <member name="debug/settings/crash_handler/message" type="String" setter="" getter="" default="&quot;Please include this when reporting the bug on https://github.com/godotengine/godot/issues&quot;">
- Message to be displayed before the backtrace when the engine crashes.
+ <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.
@@ -443,7 +454,7 @@
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.
@@ -453,9 +464,6 @@
<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.
- </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.
</member>
@@ -471,9 +479,45 @@
<member name="debug/shapes/navigation/disabled_geometry_color" type="Color" setter="" getter="" default="Color(1, 0.7, 0.1, 0.4)">
Color of the disabled navigation geometry, visible when "Visible Navigation" is enabled in the Debug menu.
</member>
+ <member name="debug/shapes/navigation/edge_connection_color" type="Color" setter="" getter="" default="Color(1, 0, 1, 1)">
+ Color to display edge connections between navigation regions, visible when "Visible Navigation" is enabled in the Debug menu.
+ </member>
+ <member name="debug/shapes/navigation/enable_edge_connections" type="bool" setter="" getter="" default="true">
+ If enabled, displays edge connections between navigation regions when "Visible Navigation" is enabled in the Debug menu.
+ </member>
+ <member name="debug/shapes/navigation/enable_edge_connections_xray" type="bool" setter="" getter="" default="true">
+ If enabled, displays edge connections between navigation regions through geometry when "Visible Navigation" is enabled in the Debug menu.
+ </member>
+ <member name="debug/shapes/navigation/enable_edge_lines" type="bool" setter="" getter="" default="true">
+ If enabled, displays navigation mesh polygon edges when "Visible Navigation" is enabled in the Debug menu.
+ </member>
+ <member name="debug/shapes/navigation/enable_edge_lines_xray" type="bool" setter="" getter="" default="true">
+ If enabled, displays navigation mesh polygon edges through geometry when "Visible Navigation" is enabled in the Debug menu.
+ </member>
+ <member name="debug/shapes/navigation/enable_geometry_face_random_color" type="bool" setter="" getter="" default="true">
+ If enabled, colorizes each navigation mesh polygon face with a random color when "Visible Navigation" is enabled in the Debug menu.
+ </member>
<member name="debug/shapes/navigation/geometry_color" type="Color" setter="" getter="" default="Color(0.1, 1, 0.7, 0.4)">
Color of the navigation geometry, visible when "Visible Navigation" is enabled in the Debug menu.
</member>
+ <member name="debug/shapes/navigation/geometry_edge_color" type="Color" setter="" getter="" default="Color(0.5, 1, 1, 1)">
+ Color to display enabled navigation mesh polygon edges, visible when "Visible Navigation" is enabled in the Debug menu.
+ </member>
+ <member name="debug/shapes/navigation/geometry_edge_disabled_color" type="Color" setter="" getter="" default="Color(0.5, 0.5, 0.5, 1)">
+ Color to display disabled navigation mesh polygon edges, visible when "Visible Navigation" is enabled in the Debug menu.
+ </member>
+ <member name="debug/shapes/navigation/geometry_face_color" type="Color" setter="" getter="" default="Color(0.5, 1, 1, 0.4)">
+ Color to display enabled navigation mesh polygon faces, visible when "Visible Navigation" is enabled in the Debug menu.
+ </member>
+ <member name="debug/shapes/navigation/geometry_face_disabled_color" type="Color" setter="" getter="" default="Color(0.5, 0.5, 0.5, 0.4)">
+ Color to display disabled navigation mesh polygon faces, visible when "Visible Navigation" is enabled in the Debug menu.
+ </member>
+ <member name="debug/shapes/paths/geometry_color" type="Color" setter="" getter="" default="Color(0.1, 1, 0.7, 0.4)">
+ Color of the curve path geometry, visible when "Visible Paths" is enabled in the Debug menu.
+ </member>
+ <member name="debug/shapes/paths/geometry_width" type="float" setter="" getter="" default="2.0">
+ Line width of the curve path geometry, visible when "Visible Paths" is enabled in the Debug menu.
+ </member>
<member name="display/mouse_cursor/custom_image" type="String" setter="" getter="" default="&quot;&quot;">
Custom image for the mouse cursor (limited to 256×256).
</member>
@@ -490,6 +534,9 @@
<member name="display/window/energy_saving/keep_screen_on" type="bool" setter="" getter="" default="true">
If [code]true[/code], keeps the screen on (even in case of inactivity), so the screensaver does not take over. Works on desktop and mobile platforms.
</member>
+ <member name="display/window/energy_saving/keep_screen_on.editor" type="bool" setter="" getter="" default="false">
+ Editor-only override for [member display/window/energy_saving/keep_screen_on]. Does not affect exported projects in debug or release mode.
+ </member>
<member name="display/window/handheld/orientation" type="int" setter="" getter="" default="0">
The default screen orientation to use on mobile devices. See [enum DisplayServer.ScreenOrientation] for possible values.
[b]Note:[/b] When set to a portrait orientation, this project setting does not flip the project resolution's width and height automatically. Instead, you have to set [member display/window/size/viewport_width] and [member display/window/size/viewport_height] accordingly.
@@ -514,25 +561,51 @@
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/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 HTML5.
</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 HTML5.
</member>
<member name="display/window/vsync/vsync_mode" type="int" setter="" getter="" default="1">
- Sets the VSync mode for the main game window.
+ Sets the V-Sync mode for the main game window.
See [enum DisplayServer.VSyncMode] for possible values and how they affect the behavior of your application.
Depending on the platform and used renderer, the engine will fall back to [code]Enabled[/code], if the desired mode is not supported.
</member>
+ <member name="editor/movie_writer/disable_vsync" type="bool" setter="" getter="" default="false">
+ If [code]true[/code], requests V-Sync to be disabled when writing a movie (similar to setting [member display/window/vsync/vsync_mode] to [b]Disabled[/b]). This can speed up video writing if the hardware is fast enough to render, encode and save the video at a framerate higher than the monitor's refresh rate.
+ [b]Note:[/b] [member editor/movie_writer/disable_vsync] has no effect if the operating system or graphics driver forces V-Sync with no way for applications to disable it.
+ </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.
+ </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.
+ </member>
+ <member name="editor/movie_writer/mjpeg_quality" type="float" setter="" getter="" default="0.75">
+ The JPEG quality to use when writing a video to an AVI file, 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.9[/code]. Even at quality [code]1.0[/code], JPEG compression remains lossy.
+ [b]Note:[/b] This does not affect the audio quality or writing PNG image sequences.
+ </member>
+ <member name="editor/movie_writer/movie_file" type="String" setter="" getter="" default="&quot;&quot;">
+ The output path for the movie. The file extension determines the [MovieWriter] that will be used.
+ 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.
+ If you need to encode to a different format or pipe a stream through third-party software, you can extend this [MovieWriter] class to create your own movie writers.
+ When using PNG output, the frame number will be appended at the end of the file name. It starts from 0 and is padded with 8 digits to ensure correct sorting and easier processing. For example, if the output path is [code]/tmp/hello.png[/code], the first two frames will be [code]/tmp/hello00000000.png[/code] and [code]/tmp/hello00000001.png[/code]. The audio will be saved at [code]/tmp/hello.wav[/code].
+ </member>
+ <member name="editor/movie_writer/speaker_mode" type="int" setter="" getter="" default="0">
+ The speaker mode to use in the recorded audio when writing a movie. See [enum AudioServer.SpeakerMode] for possible values.
+ </member>
<member name="editor/node_naming/name_casing" type="int" setter="" getter="" default="0">
When creating node names automatically, set the type of casing in this project. This is mostly an editor setting.
</member>
@@ -576,7 +649,7 @@
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 FontData.antialiased].
+ If set to [code]true[/code], default font uses 8-bit anitialiased glyph rendering. See [member FontFile.antialiased].
</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).
@@ -584,7 +657,7 @@
[b]Note:[/b] This setting does not affect custom [Font]s used within the project.
</member>
<member name="gui/theme/default_font_hinting" type="int" setter="" getter="" default="1">
- Default font hinting mode. See [member FontData.hinting].
+ Default font hinting mode. See [member FontFile.hinting].
</member>
<member name="gui/theme/default_font_multichannel_signed_distance_field" type="bool" setter="" getter="" default="false">
If set to [code]true[/code], the default font will use multichannel signed distance field (MSDF) for crisp rendering at any size. Since this approach does not rely on rasterizing the font every time its size changes, this allows for resizing the font in real-time without any performance penalty. Text will also not look grainy for [Control]s that are scaled down (or for [Label3D]s viewed from a long distance).
@@ -592,7 +665,7 @@
[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 FontData.subpixel_positioning].
+ Default font glyph sub-pixel positioning mode. See [member FontFile.subpixel_positioning].
</member>
<member name="gui/theme/default_theme_scale" type="float" setter="" getter="" default="1.0">
</member>
@@ -779,6 +852,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] command line argument.
</member>
<member name="input_devices/pen_tablet/driver.windows" type="String" setter="" getter="">
Override for [member input_devices/pen_tablet/driver] on Windows.
@@ -803,6 +877,12 @@
<member name="internationalization/locale/test" type="String" setter="" getter="" default="&quot;&quot;">
If non-empty, this locale will be used when running the project from the editor.
</member>
+ <member name="internationalization/locale/translation_remaps" type="PackedStringArray" setter="" getter="">
+ Locale-dependent resource remaps. Edit them in the "Localization" tab of Project Settings editor.
+ </member>
+ <member name="internationalization/locale/translations" type="PackedStringArray" setter="" getter="">
+ List of translation files available in the project. Edit them in the "Localization" tab of Project Settings editor.
+ </member>
<member name="internationalization/pseudolocalization/double_vowels" type="bool" setter="" getter="" default="false">
Double vowels in strings during pseudolocalization to simulate the lengthening of text due to localization.
</member>
@@ -836,6 +916,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] command line argument.
+ [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] command line argument.
</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".
@@ -1347,40 +1430,26 @@
<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/3d/default_cell_size" type="float" setter="" getter="" default="0.3">
+ <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.3">
+ <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="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.
@@ -1471,7 +1540,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].
@@ -1539,7 +1608,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].
@@ -1557,18 +1626,6 @@
[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.
</member>
- <member name="rendering/2d/opengl/batching_send_null" type="int" setter="" getter="" default="0">
- </member>
- <member name="rendering/2d/opengl/batching_stream" type="int" setter="" getter="" default="0">
- </member>
- <member name="rendering/2d/opengl/legacy_orphan_buffers" type="int" setter="" getter="" default="0">
- </member>
- <member name="rendering/2d/opengl/legacy_stream" type="int" setter="" getter="" default="0">
- </member>
- <member name="rendering/2d/options/ninepatch_mode" type="int" setter="" getter="" default="1">
- </member>
- <member name="rendering/2d/options/use_software_skinning" type="bool" setter="" getter="" default="true">
- </member>
<member name="rendering/2d/sdf/oversize" type="int" setter="" getter="" default="1">
</member>
<member name="rendering/2d/sdf/scale" type="int" setter="" getter="" default="1">
@@ -1583,43 +1640,21 @@
Sets the number of MSAA samples to use (as a power of two). MSAA is used to reduce aliasing around the edges of polygons. A higher MSAA value results in smoother edges but can be significantly slower on some hardware. See also bilinear scaling 3d [member rendering/scaling_3d/mode] for supersampling, which provides higher quality but is much more expensive.
</member>
<member name="rendering/anti_aliasing/quality/screen_space_aa" type="int" setter="" getter="" default="0">
- Sets the screen-space antialiasing mode for the default screen [Viewport]. Screen-space antialiasing works by selectively blurring edges in a post-process shader. It differs from MSAA which takes multiple coverage samples while rendering objects. Screen-space AA methods are typically faster than MSAA and will smooth out specular aliasing, but tend to make scenes appear blurry.
+ Sets the screen-space antialiasing mode for the default screen [Viewport]. Screen-space antialiasing works by selectively blurring edges in a post-process shader. It differs from MSAA which takes multiple coverage samples while rendering objects. Screen-space AA methods are typically faster than MSAA and will smooth out specular aliasing, but tend to make scenes appear blurry. The blurriness can be counteracted to an extent by using a negative mipmap LOD bias ([member rendering/textures/default_filters/texture_mipmap_bias]).
Another way to combat specular aliasing is to enable [member rendering/anti_aliasing/screen_space_roughness_limiter/enabled].
</member>
<member name="rendering/anti_aliasing/quality/use_debanding" type="bool" setter="" getter="" default="false">
</member>
+ <member name="rendering/anti_aliasing/quality/use_taa" type="bool" setter="" getter="" default="false">
+ Enables Temporal Anti-Aliasing for the default screen [Viewport]. TAA works by jittering the camera and accumulating the images of the last rendered frames, motion vector rendering is used to account for camera and object motion. Enabling TAA can make the image blurrier, which can be counteracted to an extent by using a negative mipmap LOD bias ([member rendering/textures/default_filters/texture_mipmap_bias]).
+ [b]Note:[/b] The implementation is not complete yet, some visual instances such as particles and skinned meshes may show artifacts.
+ </member>
<member name="rendering/anti_aliasing/screen_space_roughness_limiter/amount" type="float" setter="" getter="" default="0.25">
</member>
<member name="rendering/anti_aliasing/screen_space_roughness_limiter/enabled" type="bool" setter="" getter="" default="true">
</member>
<member name="rendering/anti_aliasing/screen_space_roughness_limiter/limit" type="float" setter="" getter="" default="0.18">
</member>
- <member name="rendering/batching/debug/diagnose_frame" type="bool" setter="" getter="" default="false">
- </member>
- <member name="rendering/batching/debug/flash_batching" type="bool" setter="" getter="" default="false">
- </member>
- <member name="rendering/batching/lights/max_join_items" type="int" setter="" getter="" default="32">
- </member>
- <member name="rendering/batching/lights/scissor_area_threshold" type="float" setter="" getter="" default="1.0">
- </member>
- <member name="rendering/batching/options/single_rect_fallback" type="bool" setter="" getter="" default="false">
- </member>
- <member name="rendering/batching/options/use_batching" type="bool" setter="" getter="" default="false">
- </member>
- <member name="rendering/batching/options/use_batching_in_editor" type="bool" setter="" getter="" default="false">
- </member>
- <member name="rendering/batching/parameters/batch_buffer_size" type="int" setter="" getter="" default="16384">
- </member>
- <member name="rendering/batching/parameters/colored_vertex_format_threshold" type="float" setter="" getter="" default="0.25">
- </member>
- <member name="rendering/batching/parameters/item_reordering_lookahead" type="int" setter="" getter="" default="4">
- </member>
- <member name="rendering/batching/parameters/max_join_item_commands" type="int" setter="" getter="" default="16">
- </member>
- <member name="rendering/batching/precision/uv_contract" type="bool" setter="" getter="" default="false">
- </member>
- <member name="rendering/batching/precision/uv_contract_amount" type="int" setter="" getter="" default="100">
- </member>
<member name="rendering/camera/depth_of_field/depth_of_field_bokeh_quality" type="int" setter="" getter="" default="1">
Sets the quality of the depth of field effect. Higher quality takes more samples, which is slower but looks smoother.
</member>
@@ -1629,13 +1664,16 @@
<member name="rendering/camera/depth_of_field/depth_of_field_use_jitter" type="bool" setter="" getter="" default="false">
If [code]true[/code], jitters DOF samples to make effect slightly blurrier and hide lines created from low sample rates. This can result in a slightly grainy appearance when used with a low number of samples.
</member>
+ <member name="rendering/driver/depth_prepass/disable_for_vendors" type="String" setter="" getter="" default="&quot;PowerVR,Mali,Adreno,Apple&quot;">
+ Disables [member rendering/driver/depth_prepass/enable] conditionally for certain vendors. By default, disables the depth prepass for mobile devices as mobile devices do not benefit from the depth prepass due to their unique architecture.
+ </member>
<member name="rendering/driver/depth_prepass/enable" type="bool" setter="" getter="" default="true">
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 (not Vulkan Mobile or OpenGL). When using Vulkan Mobile or OpenGL, there is no depth prepass performed.
+ [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 2D rendering is supported, and single-window mode is required for correct operation.
+ [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.
@@ -1715,10 +1753,6 @@
<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/gles2/compatibility/disable_half_float" type="bool" setter="" getter="" default="false">
- </member>
- <member name="rendering/gles2/compatibility/enable_high_float.Android" type="bool" setter="" getter="" default="false">
- </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.
@@ -1732,28 +1766,40 @@
<member name="rendering/global_illumination/voxel_gi/quality" type="int" setter="" getter="" default="0">
</member>
<member name="rendering/lightmapping/bake_performance/max_rays_per_pass" type="int" setter="" getter="" default="32">
+ The maximum number of rays that can be thrown per pass when baking lightmaps with [LightmapGI]. Depending on the scene, adjusting this value may result in higher GPU utilization when baking lightmaps, leading to faster bake times.
</member>
<member name="rendering/lightmapping/bake_performance/max_rays_per_probe_pass" type="int" setter="" getter="" default="64">
+ The maximum number of rays that can be thrown per pass when baking dynamic object lighting in [LightmapProbe]s with [LightmapGI]. Depending on the scene, adjusting this value may result in higher GPU utilization when baking lightmaps, leading to faster bake times.
</member>
<member name="rendering/lightmapping/bake_performance/region_size" type="int" setter="" getter="" default="512">
+ The region size to use when baking lightmaps with [LightmapGI].
</member>
<member name="rendering/lightmapping/bake_quality/high_quality_probe_ray_count" type="int" setter="" getter="" default="512">
+ The number of rays to use for baking dynamic object lighting in [LightmapProbe]s when [member LightmapGI.quality] is [constant LightmapGI.BAKE_QUALITY_HIGH].
</member>
<member name="rendering/lightmapping/bake_quality/high_quality_ray_count" type="int" setter="" getter="" default="256">
+ The number of rays to use for baking lightmaps with [LightmapGI] when [member LightmapGI.quality] is [constant LightmapGI.BAKE_QUALITY_HIGH].
</member>
<member name="rendering/lightmapping/bake_quality/low_quality_probe_ray_count" type="int" setter="" getter="" default="64">
+ The number of rays to use for baking dynamic object lighting in [LightmapProbe]s when [member LightmapGI.quality] is [constant LightmapGI.BAKE_QUALITY_LOW].
</member>
<member name="rendering/lightmapping/bake_quality/low_quality_ray_count" type="int" setter="" getter="" default="16">
+ The number of rays to use for baking lightmaps with [LightmapGI] when [member LightmapGI.quality] is [constant LightmapGI.BAKE_QUALITY_LOW].
</member>
<member name="rendering/lightmapping/bake_quality/medium_quality_probe_ray_count" type="int" setter="" getter="" default="256">
+ The number of rays to use for baking dynamic object lighting in [LightmapProbe]s when [member LightmapGI.quality] is [constant LightmapGI.BAKE_QUALITY_MEDIUM].
</member>
<member name="rendering/lightmapping/bake_quality/medium_quality_ray_count" type="int" setter="" getter="" default="64">
+ The number of rays to use for baking lightmaps with [LightmapGI] when [member LightmapGI.quality] is [constant LightmapGI.BAKE_QUALITY_MEDIUM].
</member>
<member name="rendering/lightmapping/bake_quality/ultra_quality_probe_ray_count" type="int" setter="" getter="" default="2048">
+ The number of rays to use for baking dynamic object lighting in [LightmapProbe]s when [member LightmapGI.quality] is [constant LightmapGI.BAKE_QUALITY_ULTRA].
</member>
<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/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/limits/cluster_builder/max_clustered_elements" type="float" setter="" getter="" default="512">
</member>
@@ -1761,6 +1807,15 @@
</member>
<member name="rendering/limits/global_shader_variables/buffer_size" type="int" setter="" getter="" default="65536">
</member>
+ <member name="rendering/limits/opengl/max_lights_per_object" type="int" setter="" getter="" default="8">
+ 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 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.
+ </member>
<member name="rendering/limits/spatial_indexer/threaded_cull_minimum_instances" type="int" setter="" getter="" default="1000">
</member>
<member name="rendering/limits/spatial_indexer/update_iterations_per_frame" type="int" setter="" getter="" default="10">
@@ -1809,9 +1864,6 @@
<member name="rendering/reflections/sky_reflections/texture_array_reflections.mobile" type="bool" setter="" getter="" default="false">
Lower-end override for [member rendering/reflections/sky_reflections/texture_array_reflections] on mobile devices, due to performance concerns or driver support.
</member>
- <member name="rendering/scaling_3d/fsr_mipmap_bias" type="float" setter="" getter="" default="0.0">
- Affects the final texture sharpness by reading from a lower or higher mipmap. Negative values make textures sharper, while positive values make textures blurrier. When using FSR, this value is used to adjust the mipmap bias calculated internally which is based on the selected quality. The formula for this is [code]-log2(1.0 / scale) + mipmap_bias[/code]
- </member>
<member name="rendering/scaling_3d/fsr_sharpness" type="float" setter="" getter="" default="0.2">
Determines how sharp the upscaled image will be when using the FSR upscaling mode. Sharpness halves with every whole number. Values go from 0.0 (sharpest) to 2.0. Values above 2.0 won't make a visible difference.
</member>
@@ -1851,53 +1903,62 @@
<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_quality" type="int" setter="" getter="" default="2">
+ <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_quality.mobile" type="int" setter="" getter="" default="0">
- Lower-end override for [member rendering/shadows/directional_shadow/soft_shadow_quality] on mobile devices, due to performance concerns or driver support.
+ <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/shadow_atlas/16_bits" type="bool" setter="" getter="" default="true">
+ <member name="rendering/shadows/positional_shadow/atlas_16_bits" type="bool" setter="" getter="" default="true">
</member>
- <member name="rendering/shadows/shadow_atlas/quadrant_0_subdiv" type="int" setter="" getter="" default="2">
+ <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/shadow_atlas/quadrant_1_subdiv" type="int" setter="" getter="" default="2">
+ <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/shadow_atlas/quadrant_2_subdiv" type="int" setter="" getter="" default="3">
+ <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/shadow_atlas/quadrant_3_subdiv" type="int" setter="" getter="" default="4">
+ <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/shadow_atlas/size" type="int" setter="" getter="" default="4096">
+ <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/shadow_atlas/size.mobile" type="int" setter="" getter="" default="2048">
- Lower-end override for [member rendering/shadows/shadow_atlas/size] on mobile devices, due to performance concerns or driver support.
+ <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/shadows/soft_shadow_quality" type="int" setter="" getter="" default="2">
+ <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/shadows/soft_shadow_quality.mobile" type="int" setter="" getter="" default="0">
- Lower-end override for [member rendering/shadows/shadows/soft_shadow_quality] on mobile devices, due to performance concerns or driver support.
+ <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] 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">
If [code]true[/code], uses nearest-neighbor mipmap filtering when using mipmaps (also called "bilinear filtering"), which will result in visible seams appearing between mipmap stages. This may increase performance in mobile as less memory bandwidth is used. If [code]false[/code], linear mipmap filtering (also called "trilinear filtering") is used.
[b]Note:[/b] This property is only read when the project starts. There is currently no way to change this setting at run-time.
</member>
<member name="rendering/textures/light_projectors/filter" type="int" setter="" getter="" default="3">
+ The filtering quality to use for [OmniLight3D] and [SpotLight3D] projectors. 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/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.
@@ -1921,6 +1982,12 @@
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/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">
@@ -1933,6 +2000,12 @@
</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">
+ </member>
+ <member name="threading/worker_pool/use_system_threads_for_low_priority_tasks" type="bool" setter="" getter="" default="true">
+ </member>
<member name="xr/openxr/default_action_map" type="String" setter="" getter="" default="&quot;res://openxr_action_map.tres&quot;">
Action map configuration to load by default.
</member>
diff --git a/doc/classes/Projection.xml b/doc/classes/Projection.xml
new file mode 100644
index 0000000000..5690ea5e95
--- /dev/null
+++ b/doc/classes/Projection.xml
@@ -0,0 +1,283 @@
+<?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>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <constructors>
+ <constructor name="Projection">
+ <return type="Projection" />
+ <description>
+ </description>
+ </constructor>
+ <constructor name="Projection">
+ <return type="Projection" />
+ <param index="0" name="from" type="Projection" />
+ <description>
+ </description>
+ </constructor>
+ <constructor name="Projection">
+ <return type="Projection" />
+ <param index="0" name="from" type="Transform3D" />
+ <description>
+ </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>
+ <methods>
+ <method name="create_depth_correction" qualifiers="static">
+ <return type="Projection" />
+ <param index="0" name="flip_y" type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="create_fit_aabb" qualifiers="static">
+ <return type="Projection" />
+ <param index="0" name="aabb" type="AABB" />
+ <description>
+ </description>
+ </method>
+ <method name="create_for_hmd" qualifiers="static">
+ <return type="Projection" />
+ <param index="0" name="eye" type="int" />
+ <param index="1" name="aspect" type="float" />
+ <param index="2" name="intraocular_dist" type="float" />
+ <param index="3" name="display_width" type="float" />
+ <param index="4" name="display_to_lens" type="float" />
+ <param index="5" name="oversample" type="float" />
+ <param index="6" name="z_near" type="float" />
+ <param index="7" name="z_far" type="float" />
+ <description>
+ </description>
+ </method>
+ <method name="create_frustum" qualifiers="static">
+ <return type="Projection" />
+ <param index="0" name="left" type="float" />
+ <param index="1" name="right" type="float" />
+ <param index="2" name="bottom" type="float" />
+ <param index="3" name="top" type="float" />
+ <param index="4" name="z_near" type="float" />
+ <param index="5" name="z_far" type="float" />
+ <description>
+ </description>
+ </method>
+ <method name="create_frustum_aspect" qualifiers="static">
+ <return type="Projection" />
+ <param index="0" name="size" type="float" />
+ <param index="1" name="aspect" type="float" />
+ <param index="2" name="offset" type="Vector2" />
+ <param index="3" name="z_near" type="float" />
+ <param index="4" name="z_far" type="float" />
+ <param index="5" name="flip_fov" type="bool" default="false" />
+ <description>
+ </description>
+ </method>
+ <method name="create_light_atlas_rect" qualifiers="static">
+ <return type="Projection" />
+ <param index="0" name="rect" type="Rect2" />
+ <description>
+ </description>
+ </method>
+ <method name="create_orthogonal" qualifiers="static">
+ <return type="Projection" />
+ <param index="0" name="left" type="float" />
+ <param index="1" name="right" type="float" />
+ <param index="2" name="bottom" type="float" />
+ <param index="3" name="top" type="float" />
+ <param index="4" name="z_near" type="float" />
+ <param index="5" name="z_far" type="float" />
+ <description>
+ </description>
+ </method>
+ <method name="create_orthogonal_aspect" qualifiers="static">
+ <return type="Projection" />
+ <param index="0" name="size" type="float" />
+ <param index="1" name="aspect" type="float" />
+ <param index="2" name="z_near" type="float" />
+ <param index="3" name="z_far" type="float" />
+ <param index="4" name="flip_fov" type="bool" default="false" />
+ <description>
+ </description>
+ </method>
+ <method name="create_perspective" qualifiers="static">
+ <return type="Projection" />
+ <param index="0" name="fovy" type="float" />
+ <param index="1" name="aspect" type="float" />
+ <param index="2" name="z_near" type="float" />
+ <param index="3" name="z_far" type="float" />
+ <param index="4" name="flip_fov" type="bool" default="false" />
+ <description>
+ </description>
+ </method>
+ <method name="create_perspective_hmd" qualifiers="static">
+ <return type="Projection" />
+ <param index="0" name="fovy" type="float" />
+ <param index="1" name="aspect" type="float" />
+ <param index="2" name="z_near" type="float" />
+ <param index="3" name="z_far" type="float" />
+ <param index="4" name="flip_fov" type="bool" />
+ <param index="5" name="eye" type="int" />
+ <param index="6" name="intraocular_dist" type="float" />
+ <param index="7" name=" convergence_dist" type="float" />
+ <description>
+ </description>
+ </method>
+ <method name="determinant" qualifiers="const">
+ <return type="float" />
+ <description>
+ </description>
+ </method>
+ <method name="flipped_y" qualifiers="const">
+ <return type="Projection" />
+ <description>
+ </description>
+ </method>
+ <method name="get_aspect" qualifiers="const">
+ <return type="float" />
+ <description>
+ </description>
+ </method>
+ <method name="get_far_plane_half_extents" qualifiers="const">
+ <return type="Vector2" />
+ <description>
+ </description>
+ </method>
+ <method name="get_fov" qualifiers="const">
+ <return type="float" />
+ <description>
+ </description>
+ </method>
+ <method name="get_fovy" qualifiers="static">
+ <return type="float" />
+ <param index="0" name="fovx" type="float" />
+ <param index="1" name="aspect" type="float" />
+ <description>
+ </description>
+ </method>
+ <method name="get_lod_multiplier" qualifiers="const">
+ <return type="float" />
+ <description>
+ </description>
+ </method>
+ <method name="get_pixels_per_meter" qualifiers="const">
+ <return type="int" />
+ <param index="0" name="for_pixel_width" type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="get_projection_plane" qualifiers="const">
+ <return type="Plane" />
+ <param index="0" name="plane" type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="get_viewport_half_extents" qualifiers="const">
+ <return type="Vector2" />
+ <description>
+ </description>
+ </method>
+ <method name="get_z_far" qualifiers="const">
+ <return type="float" />
+ <description>
+ </description>
+ </method>
+ <method name="get_z_near" qualifiers="const">
+ <return type="float" />
+ <description>
+ </description>
+ </method>
+ <method name="inverse" qualifiers="const">
+ <return type="Projection" />
+ <description>
+ </description>
+ </method>
+ <method name="is_orthogonal" qualifiers="const">
+ <return type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="jitter_offseted" qualifiers="const">
+ <return type="Projection" />
+ <param index="0" name="offset" type="Vector2" />
+ <description>
+ </description>
+ </method>
+ <method name="perspective_znear_adjusted" qualifiers="const">
+ <return type="Projection" />
+ <param index="0" name="new_znear" type="float" />
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="w" type="Vector4" setter="" getter="" default="Vector4(0, 0, 0, 1)">
+ </member>
+ <member name="x" type="Vector4" setter="" getter="" default="Vector4(1, 0, 0, 0)">
+ </member>
+ <member name="y" type="Vector4" setter="" getter="" default="Vector4(0, 1, 0, 0)">
+ </member>
+ <member name="z" type="Vector4" setter="" getter="" default="Vector4(0, 0, 1, 0)">
+ </member>
+ </members>
+ <constants>
+ <constant name="PLANE_NEAR" value="0">
+ </constant>
+ <constant name="PLANE_FAR" value="1">
+ </constant>
+ <constant name="PLANE_LEFT" value="2">
+ </constant>
+ <constant name="PLANE_TOP" value="3">
+ </constant>
+ <constant name="PLANE_RIGHT" value="4">
+ </constant>
+ <constant name="PLANE_BOTTOM" value="5">
+ </constant>
+ <constant name="IDENTITY" value="Projection(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)">
+ </constant>
+ <constant name="ZERO" value="Projection(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)">
+ </constant>
+ </constants>
+ <operators>
+ <operator name="operator !=">
+ <return type="bool" />
+ <param index="0" name="right" type="Projection" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator *">
+ <return type="Projection" />
+ <param index="0" name="right" type="Projection" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator *">
+ <return type="Vector4" />
+ <param index="0" name="right" type="Vector4" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator ==">
+ <return type="bool" />
+ <param index="0" name="right" type="Projection" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator []">
+ <return type="Vector4" />
+ <param index="0" name="index" type="int" />
+ <description>
+ </description>
+ </operator>
+ </operators>
+</class>
diff --git a/doc/classes/PropertyTweener.xml b/doc/classes/PropertyTweener.xml
index e0fbeec7c1..75d9c919aa 100644
--- a/doc/classes/PropertyTweener.xml
+++ b/doc/classes/PropertyTweener.xml
@@ -22,7 +22,7 @@
</method>
<method name="from">
<return type="PropertyTweener" />
- <argument index="0" name="value" type="Variant" />
+ <param index="0" name="value" type="Variant" />
<description>
Sets a custom initial value to the [PropertyTweener]. Example:
[codeblock]
@@ -43,21 +43,21 @@
</method>
<method name="set_delay">
<return type="PropertyTweener" />
- <argument index="0" name="delay" type="float" />
+ <param index="0" name="delay" type="float" />
<description>
Sets the time in seconds after which the [PropertyTweener] will start interpolating. By default there's no delay.
</description>
</method>
<method name="set_ease">
<return type="PropertyTweener" />
- <argument index="0" name="ease" type="int" enum="Tween.EaseType" />
+ <param index="0" name="ease" type="int" enum="Tween.EaseType" />
<description>
Sets the type of used easing from [enum Tween.EaseType]. If not set, the default easing is used from the [Tween] that contains this Tweener.
</description>
</method>
<method name="set_trans">
<return type="PropertyTweener" />
- <argument index="0" name="trans" type="int" enum="Tween.TransitionType" />
+ <param index="0" name="trans" type="int" enum="Tween.TransitionType" />
<description>
Sets the type of used transition from [enum Tween.TransitionType]. If not set, the default transition is used from the [Tween] that contains this Tweener.
</description>
diff --git a/doc/classes/QuadMesh.xml b/doc/classes/QuadMesh.xml
deleted file mode 100644
index d641ebaa1f..0000000000
--- a/doc/classes/QuadMesh.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<?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">
- <brief_description>
- Class representing a square mesh.
- </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.
- </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>
- </members>
-</class>
diff --git a/doc/classes/Quaternion.xml b/doc/classes/Quaternion.xml
index 48e6317b11..a521af5709 100644
--- a/doc/classes/Quaternion.xml
+++ b/doc/classes/Quaternion.xml
@@ -21,45 +21,45 @@
</constructor>
<constructor name="Quaternion">
<return type="Quaternion" />
- <argument index="0" name="from" type="Quaternion" />
+ <param index="0" name="from" type="Quaternion" />
<description>
Constructs a [Quaternion] as a copy of the given [Quaternion].
</description>
</constructor>
<constructor name="Quaternion">
<return type="Quaternion" />
- <argument index="0" name="arc_from" type="Vector3" />
- <argument index="1" name="arc_to" type="Vector3" />
+ <param index="0" name="arc_from" type="Vector3" />
+ <param index="1" name="arc_to" type="Vector3" />
<description>
</description>
</constructor>
<constructor name="Quaternion">
<return type="Quaternion" />
- <argument index="0" name="axis" type="Vector3" />
- <argument index="1" name="angle" type="float" />
+ <param index="0" name="axis" type="Vector3" />
+ <param index="1" name="angle" type="float" />
<description>
Constructs a quaternion that will rotate around the given axis by the specified angle. The axis must be a normalized vector.
</description>
</constructor>
<constructor name="Quaternion">
<return type="Quaternion" />
- <argument index="0" name="euler_yxz" type="Vector3" />
+ <param index="0" name="euler_yxz" type="Vector3" />
<description>
</description>
</constructor>
<constructor name="Quaternion">
<return type="Quaternion" />
- <argument index="0" name="from" type="Basis" />
+ <param index="0" name="from" type="Basis" />
<description>
Constructs a quaternion from the given [Basis].
</description>
</constructor>
<constructor name="Quaternion">
<return type="Quaternion" />
- <argument index="0" name="x" type="float" />
- <argument index="1" name="y" type="float" />
- <argument index="2" name="z" type="float" />
- <argument index="3" name="w" type="float" />
+ <param index="0" name="x" type="float" />
+ <param index="1" name="y" type="float" />
+ <param index="2" name="z" type="float" />
+ <param index="3" name="w" type="float" />
<description>
Constructs a quaternion defined by the given values.
</description>
@@ -68,25 +68,15 @@
<methods>
<method name="angle_to" qualifiers="const">
<return type="float" />
- <argument index="0" name="to" type="Quaternion" />
+ <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.
- </description>
- </method>
- <method name="cubic_slerp" qualifiers="const">
- <return type="Quaternion" />
- <argument index="0" name="b" type="Quaternion" />
- <argument index="1" name="pre_a" type="Quaternion" />
- <argument index="2" name="post_b" type="Quaternion" />
- <argument index="3" name="weight" type="float" />
- <description>
- Performs a cubic spherical interpolation between quaternions [code]pre_a[/code], this vector, [code]b[/code], and [code]post_b[/code], by the given amount [code]weight[/code].
+ 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] This method has an abnormally high number of floating-point errors, so methods such as [code]is_zero_approx[/code] will not work reliably.
</description>
</method>
<method name="dot" qualifiers="const">
<return type="float" />
- <argument index="0" name="with" type="Quaternion" />
+ <param index="0" name="with" type="Quaternion" />
<description>
Returns the dot product of two quaternions.
</description>
@@ -120,9 +110,9 @@
</method>
<method name="is_equal_approx" qualifiers="const">
<return type="bool" />
- <argument index="0" name="to" type="Quaternion" />
+ <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_normalized" qualifiers="const">
@@ -156,19 +146,43 @@
</method>
<method name="slerp" qualifiers="const">
<return type="Quaternion" />
- <argument index="0" name="to" type="Quaternion" />
- <argument index="1" name="weight" type="float" />
+ <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>
<method name="slerpni" qualifiers="const">
<return type="Quaternion" />
- <argument index="0" name="to" type="Quaternion" />
- <argument index="1" name="weight" type="float" />
+ <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 [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">
+ <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" />
+ <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].
+ </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>
- 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.
+ 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>
@@ -198,7 +212,7 @@
<operators>
<operator name="operator !=">
<return type="bool" />
- <argument index="0" name="right" type="Quaternion" />
+ <param index="0" name="right" type="Quaternion" />
<description>
Returns [code]true[/code] if the quaternions are not equal.
[b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.
@@ -206,63 +220,63 @@
</operator>
<operator name="operator *">
<return type="Quaternion" />
- <argument index="0" name="right" type="Quaternion" />
+ <param index="0" name="right" type="Quaternion" />
<description>
Composes these two quaternions by multiplying them together. This has the effect of rotating the second quaternion (the child) by the first quaternion (the parent).
</description>
</operator>
<operator name="operator *">
<return type="Vector3" />
- <argument index="0" name="right" type="Vector3" />
+ <param index="0" name="right" type="Vector3" />
<description>
Rotates (multiplies) the [Vector3] by the given [Quaternion].
</description>
</operator>
<operator name="operator *">
<return type="Quaternion" />
- <argument index="0" name="right" type="float" />
+ <param index="0" name="right" type="float" />
<description>
Multiplies each component of the [Quaternion] by the given value. This operation is not meaningful on its own, but it can be used as a part of a larger expression.
</description>
</operator>
<operator name="operator *">
<return type="Quaternion" />
- <argument index="0" name="right" type="int" />
+ <param index="0" name="right" type="int" />
<description>
Multiplies each component of the [Quaternion] by the given value. This operation is not meaningful on its own, but it can be used as a part of a larger expression.
</description>
</operator>
<operator name="operator +">
<return type="Quaternion" />
- <argument index="0" name="right" type="Quaternion" />
+ <param index="0" name="right" type="Quaternion" />
<description>
Adds each component of the left [Quaternion] to the right [Quaternion]. This operation is not meaningful on its own, but it can be used as a part of a larger expression, such as approximating an intermediate rotation between two nearby rotations.
</description>
</operator>
<operator name="operator -">
<return type="Quaternion" />
- <argument index="0" name="right" type="Quaternion" />
+ <param index="0" name="right" type="Quaternion" />
<description>
Subtracts each component of the left [Quaternion] by the right [Quaternion]. This operation is not meaningful on its own, but it can be used as a part of a larger expression.
</description>
</operator>
<operator name="operator /">
<return type="Quaternion" />
- <argument index="0" name="right" type="float" />
+ <param index="0" name="right" type="float" />
<description>
Divides each component of the [Quaternion] by the given value. This operation is not meaningful on its own, but it can be used as a part of a larger expression.
</description>
</operator>
<operator name="operator /">
<return type="Quaternion" />
- <argument index="0" name="right" type="int" />
+ <param index="0" name="right" type="int" />
<description>
Divides each component of the [Quaternion] by the given value. This operation is not meaningful on its own, but it can be used as a part of a larger expression.
</description>
</operator>
<operator name="operator ==">
<return type="bool" />
- <argument index="0" name="right" type="Quaternion" />
+ <param index="0" name="right" type="Quaternion" />
<description>
Returns [code]true[/code] if the quaternions are exactly equal.
[b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.
@@ -270,7 +284,7 @@
</operator>
<operator name="operator []">
<return type="float" />
- <argument index="0" name="index" type="int" />
+ <param index="0" name="index" type="int" />
<description>
Access quaternion components using their index. [code]q[0][/code] is equivalent to [code]q.x[/code], [code]q[1][/code] is equivalent to [code]q.y[/code], [code]q[2][/code] is equivalent to [code]q.z[/code], and [code]q[3][/code] is equivalent to [code]q.w[/code].
</description>
diff --git a/doc/classes/RDShaderFile.xml b/doc/classes/RDShaderFile.xml
index e719337f22..72bf6faaec 100644
--- a/doc/classes/RDShaderFile.xml
+++ b/doc/classes/RDShaderFile.xml
@@ -9,7 +9,7 @@
<methods>
<method name="get_spirv" qualifiers="const">
<return type="RDShaderSPIRV" />
- <argument index="0" name="version" type="StringName" default="&amp;&quot;&quot;" />
+ <param index="0" name="version" type="StringName" default="&amp;&quot;&quot;" />
<description>
</description>
</method>
@@ -20,8 +20,8 @@
</method>
<method name="set_bytecode">
<return type="void" />
- <argument index="0" name="bytecode" type="RDShaderSPIRV" />
- <argument index="1" name="version" type="StringName" default="&amp;&quot;&quot;" />
+ <param index="0" name="bytecode" type="RDShaderSPIRV" />
+ <param index="1" name="version" type="StringName" default="&amp;&quot;&quot;" />
<description>
</description>
</method>
diff --git a/doc/classes/RDShaderSPIRV.xml b/doc/classes/RDShaderSPIRV.xml
index 4453d7eb27..13dc2c6519 100644
--- a/doc/classes/RDShaderSPIRV.xml
+++ b/doc/classes/RDShaderSPIRV.xml
@@ -9,27 +9,27 @@
<methods>
<method name="get_stage_bytecode" qualifiers="const">
<return type="PackedByteArray" />
- <argument index="0" name="stage" type="int" enum="RenderingDevice.ShaderStage" />
+ <param index="0" name="stage" type="int" enum="RenderingDevice.ShaderStage" />
<description>
</description>
</method>
<method name="get_stage_compile_error" qualifiers="const">
<return type="String" />
- <argument index="0" name="stage" type="int" enum="RenderingDevice.ShaderStage" />
+ <param index="0" name="stage" type="int" enum="RenderingDevice.ShaderStage" />
<description>
</description>
</method>
<method name="set_stage_bytecode">
<return type="void" />
- <argument index="0" name="stage" type="int" enum="RenderingDevice.ShaderStage" />
- <argument index="1" name="bytecode" type="PackedByteArray" />
+ <param index="0" name="stage" type="int" enum="RenderingDevice.ShaderStage" />
+ <param index="1" name="bytecode" type="PackedByteArray" />
<description>
</description>
</method>
<method name="set_stage_compile_error">
<return type="void" />
- <argument index="0" name="stage" type="int" enum="RenderingDevice.ShaderStage" />
- <argument index="1" name="compile_error" type="String" />
+ <param index="0" name="stage" type="int" enum="RenderingDevice.ShaderStage" />
+ <param index="1" name="compile_error" type="String" />
<description>
</description>
</method>
diff --git a/doc/classes/RDShaderSource.xml b/doc/classes/RDShaderSource.xml
index 4c3c21bcb9..ddeae95e39 100644
--- a/doc/classes/RDShaderSource.xml
+++ b/doc/classes/RDShaderSource.xml
@@ -9,14 +9,14 @@
<methods>
<method name="get_stage_source" qualifiers="const">
<return type="String" />
- <argument index="0" name="stage" type="int" enum="RenderingDevice.ShaderStage" />
+ <param index="0" name="stage" type="int" enum="RenderingDevice.ShaderStage" />
<description>
</description>
</method>
<method name="set_stage_source">
<return type="void" />
- <argument index="0" name="stage" type="int" enum="RenderingDevice.ShaderStage" />
- <argument index="1" name="source" type="String" />
+ <param index="0" name="stage" type="int" enum="RenderingDevice.ShaderStage" />
+ <param index="1" name="source" type="String" />
<description>
</description>
</method>
diff --git a/doc/classes/RDTextureFormat.xml b/doc/classes/RDTextureFormat.xml
index fe2f6d7b1c..1b70303d2d 100644
--- a/doc/classes/RDTextureFormat.xml
+++ b/doc/classes/RDTextureFormat.xml
@@ -9,13 +9,13 @@
<methods>
<method name="add_shareable_format">
<return type="void" />
- <argument index="0" name="format" type="int" enum="RenderingDevice.DataFormat" />
+ <param index="0" name="format" type="int" enum="RenderingDevice.DataFormat" />
<description>
</description>
</method>
<method name="remove_shareable_format">
<return type="void" />
- <argument index="0" name="format" type="int" enum="RenderingDevice.DataFormat" />
+ <param index="0" name="format" type="int" enum="RenderingDevice.DataFormat" />
<description>
</description>
</method>
diff --git a/doc/classes/RDUniform.xml b/doc/classes/RDUniform.xml
index 29664d7c40..e4b7883f02 100644
--- a/doc/classes/RDUniform.xml
+++ b/doc/classes/RDUniform.xml
@@ -9,7 +9,7 @@
<methods>
<method name="add_id">
<return type="void" />
- <argument index="0" name="id" type="RID" />
+ <param index="0" name="id" type="RID" />
<description>
</description>
</method>
@@ -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/RID.xml b/doc/classes/RID.xml
index 39be605e1b..a6523e4c8b 100644
--- a/doc/classes/RID.xml
+++ b/doc/classes/RID.xml
@@ -17,7 +17,7 @@
</constructor>
<constructor name="RID">
<return type="RID" />
- <argument index="0" name="from" type="RID" />
+ <param index="0" name="from" type="RID" />
<description>
Constructs a [RID] as a copy of the given [RID].
</description>
@@ -40,37 +40,37 @@
<operators>
<operator name="operator !=">
<return type="bool" />
- <argument index="0" name="right" type="RID" />
+ <param index="0" name="right" type="RID" />
<description>
</description>
</operator>
<operator name="operator &lt;">
<return type="bool" />
- <argument index="0" name="right" type="RID" />
+ <param index="0" name="right" type="RID" />
<description>
</description>
</operator>
<operator name="operator &lt;=">
<return type="bool" />
- <argument index="0" name="right" type="RID" />
+ <param index="0" name="right" type="RID" />
<description>
</description>
</operator>
<operator name="operator ==">
<return type="bool" />
- <argument index="0" name="right" type="RID" />
+ <param index="0" name="right" type="RID" />
<description>
</description>
</operator>
<operator name="operator &gt;">
<return type="bool" />
- <argument index="0" name="right" type="RID" />
+ <param index="0" name="right" type="RID" />
<description>
</description>
</operator>
<operator name="operator &gt;=">
<return type="bool" />
- <argument index="0" name="right" type="RID" />
+ <param index="0" name="right" type="RID" />
<description>
</description>
</operator>
diff --git a/doc/classes/RandomNumberGenerator.xml b/doc/classes/RandomNumberGenerator.xml
index 28151e858e..b8a290381f 100644
--- a/doc/classes/RandomNumberGenerator.xml
+++ b/doc/classes/RandomNumberGenerator.xml
@@ -27,18 +27,18 @@
</method>
<method name="randf_range">
<return type="float" />
- <argument index="0" name="from" type="float" />
- <argument index="1" name="to" type="float" />
+ <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">
<return type="float" />
- <argument index="0" name="mean" type="float" default="0.0" />
- <argument index="1" name="deviation" type="float" default="1.0" />
+ <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">
@@ -49,10 +49,10 @@
</method>
<method name="randi_range">
<return type="int" />
- <argument index="0" name="from" type="int" />
- <argument index="1" name="to" type="int" />
+ <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 df6efd155a..16e6e86f9e 100644
--- a/doc/classes/Range.xml
+++ b/doc/classes/Range.xml
@@ -4,21 +4,21 @@
Abstract base class for range-based controls.
</brief_description>
<description>
- Range is a base class for [Control] nodes that change a floating-point [i]value[/i] between a [i]minimum[/i] and a [i]maximum[/i], using [i]step[/i] and [i]page[/i], for example a [ScrollBar].
+ Range is a base class for [Control] nodes that change a floating-point [member value] between a [member min_value] and [member max_value], using a configured [member step] and [member page] size. See e.g. [ScrollBar] and [Slider] for examples of higher level nodes using Range.
</description>
<tutorials>
</tutorials>
<methods>
<method name="_value_changed" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="new_value" type="float" />
+ <param index="0" name="new_value" type="float" />
<description>
Called when the [Range]'s value is changed (following the same conditions as [signal value_changed]).
</description>
</method>
<method name="share">
<return type="void" />
- <argument index="0" name="with" type="Node" />
+ <param index="0" name="with" type="Node" />
<description>
Binds two [Range]s together along with any ranges previously grouped with either of them. When any of range's member variables change, it will share the new value with all other ranges in its group.
</description>
@@ -69,10 +69,10 @@
</description>
</signal>
<signal name="value_changed">
- <argument index="0" name="value" type="float" />
+ <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 2a7d3502df..08627b0bd5 100644
--- a/doc/classes/RayCast2D.xml
+++ b/doc/classes/RayCast2D.xml
@@ -16,14 +16,14 @@
<methods>
<method name="add_exception">
<return type="void" />
- <argument index="0" name="node" type="CollisionObject2D" />
+ <param index="0" name="node" type="CollisionObject2D" />
<description>
Adds a collision exception so the ray does not report collisions with the specified [CollisionObject2D] node.
</description>
</method>
<method name="add_exception_rid">
<return type="void" />
- <argument index="0" name="rid" type="RID" />
+ <param index="0" name="rid" type="RID" />
<description>
Adds a collision exception so the ray does not report collisions with the specified [RID].
</description>
@@ -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>
@@ -55,9 +61,9 @@
</method>
<method name="get_collision_mask_value" qualifiers="const">
<return type="bool" />
- <argument index="0" name="layer_number" type="int" />
+ <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">
@@ -81,24 +87,24 @@
</method>
<method name="remove_exception">
<return type="void" />
- <argument index="0" name="node" type="CollisionObject2D" />
+ <param index="0" name="node" type="CollisionObject2D" />
<description>
Removes a collision exception so the ray does report collisions with the specified [CollisionObject2D] node.
</description>
</method>
<method name="remove_exception_rid">
<return type="void" />
- <argument index="0" name="rid" type="RID" />
+ <param index="0" name="rid" type="RID" />
<description>
Removes a collision exception so the ray does report collisions with the specified [RID].
</description>
</method>
<method name="set_collision_mask_value">
<return type="void" />
- <argument index="0" name="layer_number" type="int" />
- <argument index="1" name="value" type="bool" />
+ <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 65437daa79..1bcd6f1f31 100644
--- a/doc/classes/RayCast3D.xml
+++ b/doc/classes/RayCast3D.xml
@@ -17,14 +17,14 @@
<methods>
<method name="add_exception">
<return type="void" />
- <argument index="0" name="node" type="CollisionObject3D" />
+ <param index="0" name="node" type="CollisionObject3D" />
<description>
Adds a collision exception so the ray does not report collisions with the specified [CollisionObject3D] node.
</description>
</method>
<method name="add_exception_rid">
<return type="void" />
- <argument index="0" name="rid" type="RID" />
+ <param index="0" name="rid" type="RID" />
<description>
Adds a collision exception so the ray does not report collisions with the specified [RID].
</description>
@@ -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>
@@ -56,9 +62,9 @@
</method>
<method name="get_collision_mask_value" qualifiers="const">
<return type="bool" />
- <argument index="0" name="layer_number" type="int" />
+ <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">
@@ -82,24 +88,24 @@
</method>
<method name="remove_exception">
<return type="void" />
- <argument index="0" name="node" type="CollisionObject3D" />
+ <param index="0" name="node" type="CollisionObject3D" />
<description>
Removes a collision exception so the ray does report collisions with the specified [CollisionObject3D] node.
</description>
</method>
<method name="remove_exception_rid">
<return type="void" />
- <argument index="0" name="rid" type="RID" />
+ <param index="0" name="rid" type="RID" />
<description>
Removes a collision exception so the ray does report collisions with the specified [RID].
</description>
</method>
<method name="set_collision_mask_value">
<return type="void" />
- <argument index="0" name="layer_number" type="int" />
- <argument index="1" name="value" type="bool" />
+ <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 e4b66a9d53..7132f4f0b5 100644
--- a/doc/classes/Rect2.xml
+++ b/doc/classes/Rect2.xml
@@ -23,32 +23,32 @@
</constructor>
<constructor name="Rect2">
<return type="Rect2" />
- <argument index="0" name="from" type="Rect2" />
+ <param index="0" name="from" type="Rect2" />
<description>
Constructs a [Rect2] as a copy of the given [Rect2].
</description>
</constructor>
<constructor name="Rect2">
<return type="Rect2" />
- <argument index="0" name="from" type="Rect2i" />
+ <param index="0" name="from" type="Rect2i" />
<description>
Constructs a [Rect2] from a [Rect2i].
</description>
</constructor>
<constructor name="Rect2">
<return type="Rect2" />
- <argument index="0" name="position" type="Vector2" />
- <argument index="1" name="size" type="Vector2" />
+ <param index="0" name="position" type="Vector2" />
+ <param index="1" name="size" type="Vector2" />
<description>
Constructs a [Rect2] by position and size.
</description>
</constructor>
<constructor name="Rect2">
<return type="Rect2" />
- <argument index="0" name="x" type="float" />
- <argument index="1" name="y" type="float" />
- <argument index="2" name="width" type="float" />
- <argument index="3" name="height" type="float" />
+ <param index="0" name="x" type="float" />
+ <param index="1" name="y" type="float" />
+ <param index="2" name="width" type="float" />
+ <param index="3" name="height" type="float" />
<description>
Constructs a [Rect2] by x, y, width, and height.
</description>
@@ -63,14 +63,14 @@
</method>
<method name="encloses" qualifiers="const">
<return type="bool" />
- <argument index="0" name="b" type="Rect2" />
+ <param index="0" name="b" type="Rect2" />
<description>
Returns [code]true[/code] if this [Rect2] completely encloses another one.
</description>
</method>
<method name="expand" qualifiers="const">
<return type="Rect2" />
- <argument index="0" name="to" type="Vector2" />
+ <param index="0" name="to" type="Vector2" />
<description>
Returns a copy of this [Rect2] expanded to include a given point.
[b]Example:[/b]
@@ -104,27 +104,27 @@
</method>
<method name="grow" qualifiers="const">
<return type="Rect2" />
- <argument index="0" name="amount" type="float" />
+ <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">
<return type="Rect2" />
- <argument index="0" name="left" type="float" />
- <argument index="1" name="top" type="float" />
- <argument index="2" name="right" type="float" />
- <argument index="3" name="bottom" type="float" />
+ <param index="0" name="left" type="float" />
+ <param index="1" name="top" type="float" />
+ <param index="2" name="right" type="float" />
+ <param index="3" name="bottom" type="float" />
<description>
Returns a copy of the [Rect2] grown by the specified amount on each side individually.
</description>
</method>
<method name="grow_side" qualifiers="const">
<return type="Rect2" />
- <argument index="0" name="side" type="int" />
- <argument index="1" name="amount" type="float" />
+ <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">
@@ -136,7 +136,7 @@
</method>
<method name="has_point" qualifiers="const">
<return type="bool" />
- <argument index="0" name="point" type="Vector2" />
+ <param index="0" name="point" type="Vector2" />
<description>
Returns [code]true[/code] if the [Rect2] contains a point. By convention, the right and bottom edges of the [Rect2] are considered exclusive, so points on these edges are [b]not[/b] included.
[b]Note:[/b] This method is not reliable for [Rect2] with a [i]negative size[/i]. Use [method abs] to get a positive sized equivalent rectangle to check for contained points.
@@ -144,33 +144,33 @@
</method>
<method name="intersection" qualifiers="const">
<return type="Rect2" />
- <argument index="0" name="b" 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>
<method name="intersects" qualifiers="const">
<return type="bool" />
- <argument index="0" name="b" type="Rect2" />
- <argument index="1" name="include_borders" type="bool" default="false" />
+ <param index="0" name="b" type="Rect2" />
+ <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" />
- <argument index="0" name="rect" type="Rect2" />
+ <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="merge" qualifiers="const">
<return type="Rect2" />
- <argument index="0" name="b" 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>
@@ -189,7 +189,7 @@
<operators>
<operator name="operator !=">
<return type="bool" />
- <argument index="0" name="right" type="Rect2" />
+ <param index="0" name="right" type="Rect2" />
<description>
Returns [code]true[/code] if the rectangles are not equal.
[b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.
@@ -197,14 +197,14 @@
</operator>
<operator name="operator *">
<return type="Rect2" />
- <argument index="0" name="right" type="Transform2D" />
+ <param index="0" name="right" type="Transform2D" />
<description>
Inversely transforms (multiplies) the [Rect2] by the given [Transform2D] transformation matrix.
</description>
</operator>
<operator name="operator ==">
<return type="bool" />
- <argument index="0" name="right" type="Rect2" />
+ <param index="0" name="right" type="Rect2" />
<description>
Returns [code]true[/code] if the rectangles are exactly equal.
[b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.
diff --git a/doc/classes/Rect2i.xml b/doc/classes/Rect2i.xml
index c9ae685a15..d5d68bde31 100644
--- a/doc/classes/Rect2i.xml
+++ b/doc/classes/Rect2i.xml
@@ -21,32 +21,32 @@
</constructor>
<constructor name="Rect2i">
<return type="Rect2i" />
- <argument index="0" name="from" type="Rect2i" />
+ <param index="0" name="from" type="Rect2i" />
<description>
Constructs a [Rect2i] as a copy of the given [Rect2i].
</description>
</constructor>
<constructor name="Rect2i">
<return type="Rect2i" />
- <argument index="0" name="from" type="Rect2" />
+ <param index="0" name="from" type="Rect2" />
<description>
Constructs a new [Rect2i] from [Rect2]. The floating point coordinates will be truncated.
</description>
</constructor>
<constructor name="Rect2i">
<return type="Rect2i" />
- <argument index="0" name="position" type="Vector2i" />
- <argument index="1" name="size" type="Vector2i" />
+ <param index="0" name="position" type="Vector2i" />
+ <param index="1" name="size" type="Vector2i" />
<description>
Constructs a [Rect2i] by position and size.
</description>
</constructor>
<constructor name="Rect2i">
<return type="Rect2i" />
- <argument index="0" name="x" type="int" />
- <argument index="1" name="y" type="int" />
- <argument index="2" name="width" type="int" />
- <argument index="3" name="height" type="int" />
+ <param index="0" name="x" type="int" />
+ <param index="1" name="y" type="int" />
+ <param index="2" name="width" type="int" />
+ <param index="3" name="height" type="int" />
<description>
Constructs a [Rect2i] by x, y, width, and height.
</description>
@@ -61,14 +61,14 @@
</method>
<method name="encloses" qualifiers="const">
<return type="bool" />
- <argument index="0" name="b" type="Rect2i" />
+ <param index="0" name="b" type="Rect2i" />
<description>
Returns [code]true[/code] if this [Rect2i] completely encloses another one.
</description>
</method>
<method name="expand" qualifiers="const">
<return type="Rect2i" />
- <argument index="0" name="to" type="Vector2i" />
+ <param index="0" name="to" type="Vector2i" />
<description>
Returns a copy of this [Rect2i] expanded so that the borders align with the given point.
[codeblocks]
@@ -102,27 +102,27 @@
</method>
<method name="grow" qualifiers="const">
<return type="Rect2i" />
- <argument index="0" name="amount" type="int" />
+ <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">
<return type="Rect2i" />
- <argument index="0" name="left" type="int" />
- <argument index="1" name="top" type="int" />
- <argument index="2" name="right" type="int" />
- <argument index="3" name="bottom" type="int" />
+ <param index="0" name="left" type="int" />
+ <param index="1" name="top" type="int" />
+ <param index="2" name="right" type="int" />
+ <param index="3" name="bottom" type="int" />
<description>
Returns a copy of the [Rect2i] grown by the specified amount on each side individually.
</description>
</method>
<method name="grow_side" qualifiers="const">
<return type="Rect2i" />
- <argument index="0" name="side" type="int" />
- <argument index="1" name="amount" type="int" />
+ <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">
@@ -134,7 +134,7 @@
</method>
<method name="has_point" qualifiers="const">
<return type="bool" />
- <argument index="0" name="point" type="Vector2i" />
+ <param index="0" name="point" type="Vector2i" />
<description>
Returns [code]true[/code] if the [Rect2i] contains a point. By convention, the right and bottom edges of the [Rect2i] are considered exclusive, so points on these edges are [b]not[/b] included.
[b]Note:[/b] This method is not reliable for [Rect2i] with a [i]negative size[/i]. Use [method abs] to get a positive sized equivalent rectangle to check for contained points.
@@ -142,7 +142,7 @@
</method>
<method name="intersection" qualifiers="const">
<return type="Rect2i" />
- <argument index="0" name="b" type="Rect2i" />
+ <param index="0" name="b" type="Rect2i" />
<description>
Returns the intersection of this [Rect2i] and [code]b[/code].
If the rectangles do not intersect, an empty [Rect2i] is returned.
@@ -150,16 +150,16 @@
</method>
<method name="intersects" qualifiers="const">
<return type="bool" />
- <argument index="0" name="b" type="Rect2i" />
+ <param index="0" name="b" type="Rect2i" />
<description>
Returns [code]true[/code] if the [Rect2i] overlaps with [code]b[/code] (i.e. they have at least one point in common).
</description>
</method>
<method name="merge" qualifiers="const">
<return type="Rect2i" />
- <argument index="0" name="b" 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>
@@ -178,14 +178,14 @@
<operators>
<operator name="operator !=">
<return type="bool" />
- <argument index="0" name="right" type="Rect2i" />
+ <param index="0" name="right" type="Rect2i" />
<description>
Returns [code]true[/code] if the rectangles are not equal.
</description>
</operator>
<operator name="operator ==">
<return type="bool" />
- <argument index="0" name="right" type="Rect2i" />
+ <param index="0" name="right" type="Rect2i" />
<description>
Returns [code]true[/code] if the rectangles are equal.
</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 0d121a29d2..2f0b9dae72 100644
--- a/doc/classes/RenderingDevice.xml
+++ b/doc/classes/RenderingDevice.xml
@@ -9,102 +9,102 @@
<methods>
<method name="barrier">
<return type="void" />
- <argument index="0" name="from" type="int" default="7" />
- <argument index="1" name="to" type="int" default="7" />
+ <param index="0" name="from" type="int" default="7" />
+ <param index="1" name="to" type="int" default="7" />
<description>
</description>
</method>
<method name="buffer_clear">
<return type="int" enum="Error" />
- <argument index="0" name="buffer" type="RID" />
- <argument index="1" name="offset" type="int" />
- <argument index="2" name="size_bytes" type="int" />
- <argument index="3" name="post_barrier" type="int" default="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" />
<description>
</description>
</method>
<method name="buffer_get_data">
<return type="PackedByteArray" />
- <argument index="0" name="buffer" type="RID" />
+ <param index="0" name="buffer" type="RID" />
<description>
</description>
</method>
<method name="buffer_update">
<return type="int" enum="Error" />
- <argument index="0" name="buffer" type="RID" />
- <argument index="1" name="offset" type="int" />
- <argument index="2" name="size_bytes" type="int" />
- <argument index="3" name="data" type="PackedByteArray" />
- <argument index="4" name="post_barrier" type="int" default="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="data" type="PackedByteArray" />
+ <param index="4" name="post_barrier" type="int" default="7" />
<description>
</description>
</method>
<method name="capture_timestamp">
<return type="void" />
- <argument index="0" name="name" type="String" />
+ <param index="0" name="name" type="String" />
<description>
</description>
</method>
<method name="compute_list_add_barrier">
<return type="void" />
- <argument index="0" name="compute_list" type="int" />
+ <param index="0" name="compute_list" type="int" />
<description>
</description>
</method>
<method name="compute_list_begin">
<return type="int" />
- <argument index="0" name="allow_draw_overlap" type="bool" default="false" />
+ <param index="0" name="allow_draw_overlap" type="bool" default="false" />
<description>
</description>
</method>
<method name="compute_list_bind_compute_pipeline">
<return type="void" />
- <argument index="0" name="compute_list" type="int" />
- <argument index="1" name="compute_pipeline" type="RID" />
+ <param index="0" name="compute_list" type="int" />
+ <param index="1" name="compute_pipeline" type="RID" />
<description>
</description>
</method>
<method name="compute_list_bind_uniform_set">
<return type="void" />
- <argument index="0" name="compute_list" type="int" />
- <argument index="1" name="uniform_set" type="RID" />
- <argument index="2" name="set_index" type="int" />
+ <param index="0" name="compute_list" type="int" />
+ <param index="1" name="uniform_set" type="RID" />
+ <param index="2" name="set_index" type="int" />
<description>
</description>
</method>
<method name="compute_list_dispatch">
<return type="void" />
- <argument index="0" name="compute_list" type="int" />
- <argument index="1" name="x_groups" type="int" />
- <argument index="2" name="y_groups" type="int" />
- <argument index="3" name="z_groups" type="int" />
+ <param index="0" name="compute_list" type="int" />
+ <param index="1" name="x_groups" type="int" />
+ <param index="2" name="y_groups" type="int" />
+ <param index="3" name="z_groups" type="int" />
<description>
</description>
</method>
<method name="compute_list_end">
<return type="void" />
- <argument index="0" name="post_barrier" type="int" default="7" />
+ <param index="0" name="post_barrier" type="int" default="7" />
<description>
</description>
</method>
<method name="compute_list_set_push_constant">
<return type="void" />
- <argument index="0" name="compute_list" type="int" />
- <argument index="1" name="buffer" type="PackedByteArray" />
- <argument index="2" name="size_bytes" type="int" />
+ <param index="0" name="compute_list" type="int" />
+ <param index="1" name="buffer" type="PackedByteArray" />
+ <param index="2" name="size_bytes" type="int" />
<description>
</description>
</method>
<method name="compute_pipeline_create">
<return type="RID" />
- <argument index="0" name="shader" type="RID" />
- <argument index="1" name="specialization_constants" type="RDPipelineSpecializationConstant[]" default="[]" />
+ <param index="0" name="shader" type="RID" />
+ <param index="1" name="specialization_constants" type="RDPipelineSpecializationConstant[]" default="[]" />
<description>
</description>
</method>
<method name="compute_pipeline_is_valid">
<return type="bool" />
- <argument index="0" name="compute_pieline" type="RID" />
+ <param index="0" name="compute_pieline" type="RID" />
<description>
</description>
</method>
@@ -115,8 +115,8 @@
</method>
<method name="draw_command_begin_label">
<return type="void" />
- <argument index="0" name="name" type="String" />
- <argument index="1" name="color" type="Color" />
+ <param index="0" name="name" type="String" />
+ <param index="1" name="color" type="Color" />
<description>
</description>
</method>
@@ -127,111 +127,111 @@
</method>
<method name="draw_command_insert_label">
<return type="void" />
- <argument index="0" name="name" type="String" />
- <argument index="1" name="color" type="Color" />
+ <param index="0" name="name" type="String" />
+ <param index="1" name="color" type="Color" />
<description>
</description>
</method>
<method name="draw_list_begin">
<return type="int" />
- <argument index="0" name="framebuffer" type="RID" />
- <argument index="1" name="initial_color_action" type="int" enum="RenderingDevice.InitialAction" />
- <argument index="2" name="final_color_action" type="int" enum="RenderingDevice.FinalAction" />
- <argument index="3" name="initial_depth_action" type="int" enum="RenderingDevice.InitialAction" />
- <argument index="4" name="final_depth_action" type="int" enum="RenderingDevice.FinalAction" />
- <argument index="5" name="clear_color_values" type="PackedColorArray" default="PackedColorArray()" />
- <argument index="6" name="clear_depth" type="float" default="1.0" />
- <argument index="7" name="clear_stencil" type="int" default="0" />
- <argument index="8" name="region" type="Rect2" default="Rect2(0, 0, 0, 0)" />
- <argument index="9" name="storage_textures" type="Array" default="[]" />
+ <param index="0" name="framebuffer" type="RID" />
+ <param index="1" name="initial_color_action" type="int" enum="RenderingDevice.InitialAction" />
+ <param index="2" name="final_color_action" type="int" enum="RenderingDevice.FinalAction" />
+ <param index="3" name="initial_depth_action" type="int" enum="RenderingDevice.InitialAction" />
+ <param index="4" name="final_depth_action" type="int" enum="RenderingDevice.FinalAction" />
+ <param index="5" name="clear_color_values" type="PackedColorArray" default="PackedColorArray()" />
+ <param index="6" name="clear_depth" type="float" default="1.0" />
+ <param index="7" name="clear_stencil" type="int" default="0" />
+ <param index="8" name="region" type="Rect2" default="Rect2(0, 0, 0, 0)" />
+ <param index="9" name="storage_textures" type="Array" default="[]" />
<description>
</description>
</method>
<method name="draw_list_begin_for_screen">
<return type="int" />
- <argument index="0" name="screen" type="int" default="0" />
- <argument index="1" name="clear_color" type="Color" default="Color(0, 0, 0, 1)" />
+ <param index="0" name="screen" type="int" default="0" />
+ <param index="1" name="clear_color" type="Color" default="Color(0, 0, 0, 1)" />
<description>
</description>
</method>
<method name="draw_list_begin_split">
<return type="PackedInt64Array" />
- <argument index="0" name="framebuffer" type="RID" />
- <argument index="1" name="splits" type="int" />
- <argument index="2" name="initial_color_action" type="int" enum="RenderingDevice.InitialAction" />
- <argument index="3" name="final_color_action" type="int" enum="RenderingDevice.FinalAction" />
- <argument index="4" name="initial_depth_action" type="int" enum="RenderingDevice.InitialAction" />
- <argument index="5" name="final_depth_action" type="int" enum="RenderingDevice.FinalAction" />
- <argument index="6" name="clear_color_values" type="PackedColorArray" default="PackedColorArray()" />
- <argument index="7" name="clear_depth" type="float" default="1.0" />
- <argument index="8" name="clear_stencil" type="int" default="0" />
- <argument index="9" name="region" type="Rect2" default="Rect2(0, 0, 0, 0)" />
- <argument index="10" name="storage_textures" type="RID[]" default="[]" />
+ <param index="0" name="framebuffer" type="RID" />
+ <param index="1" name="splits" type="int" />
+ <param index="2" name="initial_color_action" type="int" enum="RenderingDevice.InitialAction" />
+ <param index="3" name="final_color_action" type="int" enum="RenderingDevice.FinalAction" />
+ <param index="4" name="initial_depth_action" type="int" enum="RenderingDevice.InitialAction" />
+ <param index="5" name="final_depth_action" type="int" enum="RenderingDevice.FinalAction" />
+ <param index="6" name="clear_color_values" type="PackedColorArray" default="PackedColorArray()" />
+ <param index="7" name="clear_depth" type="float" default="1.0" />
+ <param index="8" name="clear_stencil" type="int" default="0" />
+ <param index="9" name="region" type="Rect2" default="Rect2(0, 0, 0, 0)" />
+ <param index="10" name="storage_textures" type="RID[]" default="[]" />
<description>
</description>
</method>
<method name="draw_list_bind_index_array">
<return type="void" />
- <argument index="0" name="draw_list" type="int" />
- <argument index="1" name="index_array" type="RID" />
+ <param index="0" name="draw_list" type="int" />
+ <param index="1" name="index_array" type="RID" />
<description>
</description>
</method>
<method name="draw_list_bind_render_pipeline">
<return type="void" />
- <argument index="0" name="draw_list" type="int" />
- <argument index="1" name="render_pipeline" type="RID" />
+ <param index="0" name="draw_list" type="int" />
+ <param index="1" name="render_pipeline" type="RID" />
<description>
</description>
</method>
<method name="draw_list_bind_uniform_set">
<return type="void" />
- <argument index="0" name="draw_list" type="int" />
- <argument index="1" name="uniform_set" type="RID" />
- <argument index="2" name="set_index" type="int" />
+ <param index="0" name="draw_list" type="int" />
+ <param index="1" name="uniform_set" type="RID" />
+ <param index="2" name="set_index" type="int" />
<description>
</description>
</method>
<method name="draw_list_bind_vertex_array">
<return type="void" />
- <argument index="0" name="draw_list" type="int" />
- <argument index="1" name="vertex_array" type="RID" />
+ <param index="0" name="draw_list" type="int" />
+ <param index="1" name="vertex_array" type="RID" />
<description>
</description>
</method>
<method name="draw_list_disable_scissor">
<return type="void" />
- <argument index="0" name="draw_list" type="int" />
+ <param index="0" name="draw_list" type="int" />
<description>
</description>
</method>
<method name="draw_list_draw">
<return type="void" />
- <argument index="0" name="draw_list" type="int" />
- <argument index="1" name="use_indices" type="bool" />
- <argument index="2" name="instances" type="int" />
- <argument index="3" name="procedural_vertex_count" type="int" default="0" />
+ <param index="0" name="draw_list" type="int" />
+ <param index="1" name="use_indices" type="bool" />
+ <param index="2" name="instances" type="int" />
+ <param index="3" name="procedural_vertex_count" type="int" default="0" />
<description>
</description>
</method>
<method name="draw_list_enable_scissor">
<return type="void" />
- <argument index="0" name="draw_list" type="int" />
- <argument index="1" name="rect" type="Rect2" default="Rect2(0, 0, 0, 0)" />
+ <param index="0" name="draw_list" type="int" />
+ <param index="1" name="rect" type="Rect2" default="Rect2(0, 0, 0, 0)" />
<description>
</description>
</method>
<method name="draw_list_end">
<return type="void" />
- <argument index="0" name="post_barrier" type="int" default="7" />
+ <param index="0" name="post_barrier" type="int" default="7" />
<description>
</description>
</method>
<method name="draw_list_set_push_constant">
<return type="void" />
- <argument index="0" name="draw_list" type="int" />
- <argument index="1" name="buffer" type="PackedByteArray" />
- <argument index="2" name="size_bytes" type="int" />
+ <param index="0" name="draw_list" type="int" />
+ <param index="1" name="buffer" type="PackedByteArray" />
+ <param index="2" name="size_bytes" type="int" />
<description>
</description>
</method>
@@ -242,72 +242,78 @@
</method>
<method name="draw_list_switch_to_next_pass_split">
<return type="PackedInt64Array" />
- <argument index="0" name="splits" type="int" />
+ <param index="0" name="splits" type="int" />
<description>
</description>
</method>
<method name="framebuffer_create">
<return type="RID" />
- <argument index="0" name="textures" type="RID[]" />
- <argument index="1" name="validate_with_format" type="int" default="-1" />
- <argument index="2" name="view_count" type="int" default="1" />
+ <param index="0" name="textures" type="RID[]" />
+ <param index="1" name="validate_with_format" type="int" default="-1" />
+ <param index="2" name="view_count" type="int" default="1" />
<description>
</description>
</method>
<method name="framebuffer_create_empty">
<return type="RID" />
- <argument index="0" name="size" type="Vector2i" />
- <argument index="1" name="samples" type="int" enum="RenderingDevice.TextureSamples" default="0" />
- <argument index="2" name="validate_with_format" type="int" default="-1" />
+ <param index="0" name="size" type="Vector2i" />
+ <param index="1" name="samples" type="int" enum="RenderingDevice.TextureSamples" default="0" />
+ <param index="2" name="validate_with_format" type="int" default="-1" />
<description>
</description>
</method>
<method name="framebuffer_create_multipass">
<return type="RID" />
- <argument index="0" name="textures" type="RID[]" />
- <argument index="1" name="passes" type="RDFramebufferPass[]" />
- <argument index="2" name="validate_with_format" type="int" default="-1" />
- <argument index="3" name="view_count" type="int" default="1" />
+ <param index="0" name="textures" type="RID[]" />
+ <param index="1" name="passes" type="RDFramebufferPass[]" />
+ <param index="2" name="validate_with_format" type="int" default="-1" />
+ <param index="3" name="view_count" type="int" default="1" />
<description>
</description>
</method>
<method name="framebuffer_format_create">
<return type="int" />
- <argument index="0" name="attachments" type="RDAttachmentFormat[]" />
- <argument index="1" name="view_count" type="int" default="1" />
+ <param index="0" name="attachments" type="RDAttachmentFormat[]" />
+ <param index="1" name="view_count" type="int" default="1" />
<description>
</description>
</method>
<method name="framebuffer_format_create_empty">
<return type="int" />
- <argument index="0" name="samples" type="int" enum="RenderingDevice.TextureSamples" default="0" />
+ <param index="0" name="samples" type="int" enum="RenderingDevice.TextureSamples" default="0" />
<description>
</description>
</method>
<method name="framebuffer_format_create_multipass">
<return type="int" />
- <argument index="0" name="attachments" type="RDAttachmentFormat[]" />
- <argument index="1" name="passes" type="RDFramebufferPass[]" />
- <argument index="2" name="view_count" type="int" default="1" />
+ <param index="0" name="attachments" type="RDAttachmentFormat[]" />
+ <param index="1" name="passes" type="RDFramebufferPass[]" />
+ <param index="2" name="view_count" type="int" default="1" />
<description>
</description>
</method>
<method name="framebuffer_format_get_texture_samples">
<return type="int" enum="RenderingDevice.TextureSamples" />
- <argument index="0" name="format" type="int" />
- <argument index="1" name="render_pass" type="int" default="0" />
+ <param index="0" name="format" type="int" />
+ <param index="1" name="render_pass" type="int" default="0" />
<description>
</description>
</method>
<method name="framebuffer_get_format">
<return type="int" />
- <argument index="0" name="framebuffer" type="RID" />
+ <param index="0" name="framebuffer" type="RID" />
+ <description>
+ </description>
+ </method>
+ <method name="framebuffer_is_valid" qualifiers="const">
+ <return type="bool" />
+ <param index="0" name="framebuffer" type="RID" />
<description>
</description>
</method>
<method name="free_rid">
<return type="void" />
- <argument index="0" name="rid" type="RID" />
+ <param index="0" name="rid" type="RID" />
<description>
</description>
</method>
@@ -318,19 +324,19 @@
</method>
<method name="get_captured_timestamp_cpu_time" qualifiers="const">
<return type="int" />
- <argument index="0" name="index" type="int" />
+ <param index="0" name="index" type="int" />
<description>
</description>
</method>
<method name="get_captured_timestamp_gpu_time" qualifiers="const">
<return type="int" />
- <argument index="0" name="index" type="int" />
+ <param index="0" name="index" type="int" />
<description>
</description>
</method>
<method name="get_captured_timestamp_name" qualifiers="const">
<return type="String" />
- <argument index="0" name="index" type="int" />
+ <param index="0" name="index" type="int" />
<description>
</description>
</method>
@@ -361,9 +367,9 @@
</method>
<method name="get_driver_resource">
<return type="int" />
- <argument index="0" name="resource" type="int" enum="RenderingDevice.DriverResource" />
- <argument index="1" name="rid" type="RID" />
- <argument index="2" name="index" type="int" />
+ <param index="0" name="resource" type="int" enum="RenderingDevice.DriverResource" />
+ <param index="1" name="rid" type="RID" />
+ <param index="2" name="index" type="int" />
<description>
</description>
</method>
@@ -374,58 +380,58 @@
</method>
<method name="get_memory_usage" qualifiers="const">
<return type="int" />
- <argument index="0" name="type" type="int" enum="RenderingDevice.MemoryType" />
+ <param index="0" name="type" type="int" enum="RenderingDevice.MemoryType" />
<description>
</description>
</method>
<method name="index_array_create">
<return type="RID" />
- <argument index="0" name="index_buffer" type="RID" />
- <argument index="1" name="index_offset" type="int" />
- <argument index="2" name="index_count" type="int" />
+ <param index="0" name="index_buffer" type="RID" />
+ <param index="1" name="index_offset" type="int" />
+ <param index="2" name="index_count" type="int" />
<description>
</description>
</method>
<method name="index_buffer_create">
<return type="RID" />
- <argument index="0" name="size_indices" type="int" />
- <argument index="1" name="format" type="int" enum="RenderingDevice.IndexBufferFormat" />
- <argument index="2" name="data" type="PackedByteArray" default="PackedByteArray()" />
- <argument index="3" name="use_restart_indices" type="bool" default="false" />
+ <param index="0" name="size_indices" type="int" />
+ <param index="1" name="format" type="int" enum="RenderingDevice.IndexBufferFormat" />
+ <param index="2" name="data" type="PackedByteArray" default="PackedByteArray()" />
+ <param index="3" name="use_restart_indices" type="bool" default="false" />
<description>
</description>
</method>
- <method name="limit_get">
+ <method name="limit_get" qualifiers="const">
<return type="int" />
- <argument index="0" name="limit" type="int" enum="RenderingDevice.Limit" />
+ <param index="0" name="limit" type="int" enum="RenderingDevice.Limit" />
<description>
</description>
</method>
<method name="render_pipeline_create">
<return type="RID" />
- <argument index="0" name="shader" type="RID" />
- <argument index="1" name="framebuffer_format" type="int" />
- <argument index="2" name="vertex_format" type="int" />
- <argument index="3" name="primitive" type="int" enum="RenderingDevice.RenderPrimitive" />
- <argument index="4" name="rasterization_state" type="RDPipelineRasterizationState" />
- <argument index="5" name="multisample_state" type="RDPipelineMultisampleState" />
- <argument index="6" name="stencil_state" type="RDPipelineDepthStencilState" />
- <argument index="7" name="color_blend_state" type="RDPipelineColorBlendState" />
- <argument index="8" name="dynamic_state_flags" type="int" default="0" />
- <argument index="9" name="for_render_pass" type="int" default="0" />
- <argument index="10" name="specialization_constants" type="RDPipelineSpecializationConstant[]" default="[]" />
+ <param index="0" name="shader" type="RID" />
+ <param index="1" name="framebuffer_format" type="int" />
+ <param index="2" name="vertex_format" type="int" />
+ <param index="3" name="primitive" type="int" enum="RenderingDevice.RenderPrimitive" />
+ <param index="4" name="rasterization_state" type="RDPipelineRasterizationState" />
+ <param index="5" name="multisample_state" type="RDPipelineMultisampleState" />
+ <param index="6" name="stencil_state" type="RDPipelineDepthStencilState" />
+ <param index="7" name="color_blend_state" type="RDPipelineColorBlendState" />
+ <param index="8" name="dynamic_state_flags" type="int" default="0" />
+ <param index="9" name="for_render_pass" type="int" default="0" />
+ <param index="10" name="specialization_constants" type="RDPipelineSpecializationConstant[]" default="[]" />
<description>
</description>
</method>
<method name="render_pipeline_is_valid">
<return type="bool" />
- <argument index="0" name="render_pipeline" type="RID" />
+ <param index="0" name="render_pipeline" type="RID" />
<description>
</description>
</method>
<method name="sampler_create">
<return type="RID" />
- <argument index="0" name="state" type="RDSamplerState" />
+ <param index="0" name="state" type="RDSamplerState" />
<description>
</description>
</method>
@@ -436,61 +442,61 @@
</method>
<method name="screen_get_height" qualifiers="const">
<return type="int" />
- <argument index="0" name="screen" type="int" default="0" />
+ <param index="0" name="screen" type="int" default="0" />
<description>
</description>
</method>
<method name="screen_get_width" qualifiers="const">
<return type="int" />
- <argument index="0" name="screen" type="int" default="0" />
+ <param index="0" name="screen" type="int" default="0" />
<description>
</description>
</method>
<method name="set_resource_name">
<return type="void" />
- <argument index="0" name="id" type="RID" />
- <argument index="1" name="name" type="String" />
+ <param index="0" name="id" type="RID" />
+ <param index="1" name="name" type="String" />
<description>
</description>
</method>
<method name="shader_compile_binary_from_spirv">
<return type="PackedByteArray" />
- <argument index="0" name="spirv_data" type="RDShaderSPIRV" />
- <argument index="1" name="name" type="String" default="&quot;&quot;" />
+ <param index="0" name="spirv_data" type="RDShaderSPIRV" />
+ <param index="1" name="name" type="String" default="&quot;&quot;" />
<description>
</description>
</method>
<method name="shader_compile_spirv_from_source">
<return type="RDShaderSPIRV" />
- <argument index="0" name="shader_source" type="RDShaderSource" />
- <argument index="1" name="allow_cache" type="bool" default="true" />
+ <param index="0" name="shader_source" type="RDShaderSource" />
+ <param index="1" name="allow_cache" type="bool" default="true" />
<description>
</description>
</method>
<method name="shader_create_from_bytecode">
<return type="RID" />
- <argument index="0" name="binary_data" type="PackedByteArray" />
+ <param index="0" name="binary_data" type="PackedByteArray" />
<description>
</description>
</method>
<method name="shader_create_from_spirv">
<return type="RID" />
- <argument index="0" name="spirv_data" type="RDShaderSPIRV" />
- <argument index="1" name="name" type="String" default="&quot;&quot;" />
+ <param index="0" name="spirv_data" type="RDShaderSPIRV" />
+ <param index="1" name="name" type="String" default="&quot;&quot;" />
<description>
</description>
</method>
<method name="shader_get_vertex_input_attribute_mask">
<return type="int" />
- <argument index="0" name="shader" type="RID" />
+ <param index="0" name="shader" type="RID" />
<description>
</description>
</method>
<method name="storage_buffer_create">
<return type="RID" />
- <argument index="0" name="size_bytes" type="int" />
- <argument index="1" name="data" type="PackedByteArray" default="PackedByteArray()" />
- <argument index="2" name="usage" type="int" default="0" />
+ <param index="0" name="size_bytes" type="int" />
+ <param index="1" name="data" type="PackedByteArray" default="PackedByteArray()" />
+ <param index="2" name="usage" type="int" default="0" />
<description>
</description>
</method>
@@ -506,140 +512,140 @@
</method>
<method name="texture_buffer_create">
<return type="RID" />
- <argument index="0" name="size_bytes" type="int" />
- <argument index="1" name="format" type="int" enum="RenderingDevice.DataFormat" />
- <argument index="2" name="data" type="PackedByteArray" default="PackedByteArray()" />
+ <param index="0" name="size_bytes" type="int" />
+ <param index="1" name="format" type="int" enum="RenderingDevice.DataFormat" />
+ <param index="2" name="data" type="PackedByteArray" default="PackedByteArray()" />
<description>
</description>
</method>
<method name="texture_clear">
<return type="int" enum="Error" />
- <argument index="0" name="texture" type="RID" />
- <argument index="1" name="color" type="Color" />
- <argument index="2" name="base_mipmap" type="int" />
- <argument index="3" name="mipmap_count" type="int" />
- <argument index="4" name="base_layer" type="int" />
- <argument index="5" name="layer_count" type="int" />
- <argument index="6" name="post_barrier" type="int" default="7" />
+ <param index="0" name="texture" type="RID" />
+ <param index="1" name="color" type="Color" />
+ <param index="2" name="base_mipmap" type="int" />
+ <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" />
<description>
</description>
</method>
<method name="texture_copy">
<return type="int" enum="Error" />
- <argument index="0" name="from_texture" type="RID" />
- <argument index="1" name="to_texture" type="RID" />
- <argument index="2" name="from_pos" type="Vector3" />
- <argument index="3" name="to_pos" type="Vector3" />
- <argument index="4" name="size" type="Vector3" />
- <argument index="5" name="src_mipmap" type="int" />
- <argument index="6" name="dst_mipmap" type="int" />
- <argument index="7" name="src_layer" type="int" />
- <argument index="8" name="dst_layer" type="int" />
- <argument index="9" name="post_barrier" type="int" default="7" />
+ <param index="0" name="from_texture" type="RID" />
+ <param index="1" name="to_texture" type="RID" />
+ <param index="2" name="from_pos" type="Vector3" />
+ <param index="3" name="to_pos" type="Vector3" />
+ <param index="4" name="size" type="Vector3" />
+ <param index="5" name="src_mipmap" type="int" />
+ <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" />
<description>
</description>
</method>
<method name="texture_create">
<return type="RID" />
- <argument index="0" name="format" type="RDTextureFormat" />
- <argument index="1" name="view" type="RDTextureView" />
- <argument index="2" name="data" type="PackedByteArray[]" default="[]" />
+ <param index="0" name="format" type="RDTextureFormat" />
+ <param index="1" name="view" type="RDTextureView" />
+ <param index="2" name="data" type="PackedByteArray[]" default="[]" />
<description>
</description>
</method>
<method name="texture_create_shared">
<return type="RID" />
- <argument index="0" name="view" type="RDTextureView" />
- <argument index="1" name="with_texture" type="RID" />
+ <param index="0" name="view" type="RDTextureView" />
+ <param index="1" name="with_texture" type="RID" />
<description>
</description>
</method>
<method name="texture_create_shared_from_slice">
<return type="RID" />
- <argument index="0" name="view" type="RDTextureView" />
- <argument index="1" name="with_texture" type="RID" />
- <argument index="2" name="layer" type="int" />
- <argument index="3" name="mipmap" type="int" />
- <argument index="4" name="mipmaps" type="int" default="1" />
- <argument index="5" name="slice_type" type="int" enum="RenderingDevice.TextureSliceType" default="0" />
+ <param index="0" name="view" type="RDTextureView" />
+ <param index="1" name="with_texture" type="RID" />
+ <param index="2" name="layer" type="int" />
+ <param index="3" name="mipmap" type="int" />
+ <param index="4" name="mipmaps" type="int" default="1" />
+ <param index="5" name="slice_type" type="int" enum="RenderingDevice.TextureSliceType" default="0" />
<description>
</description>
</method>
<method name="texture_get_data">
<return type="PackedByteArray" />
- <argument index="0" name="texture" type="RID" />
- <argument index="1" name="layer" type="int" />
+ <param index="0" name="texture" type="RID" />
+ <param index="1" name="layer" type="int" />
<description>
</description>
</method>
<method name="texture_is_format_supported_for_usage" qualifiers="const">
<return type="bool" />
- <argument index="0" name="format" type="int" enum="RenderingDevice.DataFormat" />
- <argument index="1" name="usage_flags" type="int" />
+ <param index="0" name="format" type="int" enum="RenderingDevice.DataFormat" />
+ <param index="1" name="usage_flags" type="int" />
<description>
</description>
</method>
<method name="texture_is_shared">
<return type="bool" />
- <argument index="0" name="texture" type="RID" />
+ <param index="0" name="texture" type="RID" />
<description>
</description>
</method>
<method name="texture_is_valid">
<return type="bool" />
- <argument index="0" name="texture" type="RID" />
+ <param index="0" name="texture" type="RID" />
<description>
</description>
</method>
<method name="texture_resolve_multisample">
<return type="int" enum="Error" />
- <argument index="0" name="from_texture" type="RID" />
- <argument index="1" name="to_texture" type="RID" />
- <argument index="2" name="post_barrier" type="int" default="7" />
+ <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" />
<description>
</description>
</method>
<method name="texture_update">
<return type="int" enum="Error" />
- <argument index="0" name="texture" type="RID" />
- <argument index="1" name="layer" type="int" />
- <argument index="2" name="data" type="PackedByteArray" />
- <argument index="3" name="post_barrier" type="int" default="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" />
<description>
</description>
</method>
<method name="uniform_buffer_create">
<return type="RID" />
- <argument index="0" name="size_bytes" type="int" />
- <argument index="1" name="data" type="PackedByteArray" default="PackedByteArray()" />
+ <param index="0" name="size_bytes" type="int" />
+ <param index="1" name="data" type="PackedByteArray" default="PackedByteArray()" />
<description>
</description>
</method>
<method name="uniform_set_create">
<return type="RID" />
- <argument index="0" name="uniforms" type="Array" />
- <argument index="1" name="shader" type="RID" />
- <argument index="2" name="shader_set" type="int" />
+ <param index="0" name="uniforms" type="Array" />
+ <param index="1" name="shader" type="RID" />
+ <param index="2" name="shader_set" type="int" />
<description>
</description>
</method>
<method name="uniform_set_is_valid">
<return type="bool" />
- <argument index="0" name="uniform_set" type="RID" />
+ <param index="0" name="uniform_set" type="RID" />
<description>
</description>
</method>
<method name="vertex_buffer_create">
<return type="RID" />
- <argument index="0" name="size_bytes" type="int" />
- <argument index="1" name="data" type="PackedByteArray" default="PackedByteArray()" />
- <argument index="2" name="use_as_storage" type="bool" default="false" />
+ <param index="0" name="size_bytes" type="int" />
+ <param index="1" name="data" type="PackedByteArray" default="PackedByteArray()" />
+ <param index="2" name="use_as_storage" type="bool" default="false" />
<description>
</description>
</method>
<method name="vertex_format_create">
<return type="int" />
- <argument index="0" name="vertex_descriptions" type="RDVertexAttribute[]" />
+ <param index="0" name="vertex_descriptions" type="RDVertexAttribute[]" />
<description>
</description>
</method>
diff --git a/doc/classes/RenderingServer.xml b/doc/classes/RenderingServer.xml
index 5bb83c8ffd..a12bd71454 100644
--- a/doc/classes/RenderingServer.xml
+++ b/doc/classes/RenderingServer.xml
@@ -20,9 +20,9 @@
<methods>
<method name="bake_render_uv2">
<return type="Image[]" />
- <argument index="0" name="base" type="RID" />
- <argument index="1" name="material_overrides" type="Array" />
- <argument index="2" name="image_size" type="Vector2i" />
+ <param index="0" name="base" type="RID" />
+ <param index="1" name="material_overrides" type="Array" />
+ <param index="2" name="image_size" type="Vector2i" />
<description>
</description>
</method>
@@ -40,104 +40,104 @@
</method>
<method name="camera_effects_set_custom_exposure">
<return type="void" />
- <argument index="0" name="camera_effects" type="RID" />
- <argument index="1" name="enable" type="bool" />
- <argument index="2" name="exposure" type="float" />
+ <param index="0" name="camera_effects" type="RID" />
+ <param index="1" name="enable" type="bool" />
+ <param index="2" name="exposure" type="float" />
<description>
</description>
</method>
<method name="camera_effects_set_dof_blur">
<return type="void" />
- <argument index="0" name="camera_effects" type="RID" />
- <argument index="1" name="far_enable" type="bool" />
- <argument index="2" name="far_distance" type="float" />
- <argument index="3" name="far_transition" type="float" />
- <argument index="4" name="near_enable" type="bool" />
- <argument index="5" name="near_distance" type="float" />
- <argument index="6" name="near_transition" type="float" />
- <argument index="7" name="amount" type="float" />
+ <param index="0" name="camera_effects" 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" />
+ <param index="4" name="near_enable" type="bool" />
+ <param index="5" name="near_distance" type="float" />
+ <param index="6" name="near_transition" type="float" />
+ <param index="7" name="amount" type="float" />
<description>
</description>
</method>
<method name="camera_effects_set_dof_blur_bokeh_shape">
<return type="void" />
- <argument index="0" name="shape" type="int" enum="RenderingServer.DOFBokehShape" />
+ <param index="0" name="shape" type="int" enum="RenderingServer.DOFBokehShape" />
<description>
</description>
</method>
<method name="camera_effects_set_dof_blur_quality">
<return type="void" />
- <argument index="0" name="quality" type="int" enum="RenderingServer.DOFBlurQuality" />
- <argument index="1" name="use_jitter" type="bool" />
+ <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">
<return type="void" />
- <argument index="0" name="camera" type="RID" />
- <argument index="1" name="effects" type="RID" />
+ <param index="0" name="camera" type="RID" />
+ <param index="1" name="effects" type="RID" />
<description>
</description>
</method>
<method name="camera_set_cull_mask">
<return type="void" />
- <argument index="0" name="camera" type="RID" />
- <argument index="1" name="layers" type="int" />
+ <param index="0" name="camera" type="RID" />
+ <param index="1" name="layers" type="int" />
<description>
Sets the cull mask associated with this camera. The cull mask describes which 3D layers are rendered by this camera. Equivalent to [member Camera3D.cull_mask].
</description>
</method>
<method name="camera_set_environment">
<return type="void" />
- <argument index="0" name="camera" type="RID" />
- <argument index="1" name="env" type="RID" />
+ <param index="0" name="camera" type="RID" />
+ <param index="1" name="env" type="RID" />
<description>
Sets the environment used by this camera. Equivalent to [member Camera3D.environment].
</description>
</method>
<method name="camera_set_frustum">
<return type="void" />
- <argument index="0" name="camera" type="RID" />
- <argument index="1" name="size" type="float" />
- <argument index="2" name="offset" type="Vector2" />
- <argument index="3" name="z_near" type="float" />
- <argument index="4" name="z_far" type="float" />
+ <param index="0" name="camera" type="RID" />
+ <param index="1" name="size" type="float" />
+ <param index="2" name="offset" type="Vector2" />
+ <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">
<return type="void" />
- <argument index="0" name="camera" type="RID" />
- <argument index="1" name="size" type="float" />
- <argument index="2" name="z_near" type="float" />
- <argument index="3" name="z_far" type="float" />
+ <param index="0" name="camera" type="RID" />
+ <param index="1" name="size" type="float" />
+ <param index="2" name="z_near" type="float" />
+ <param index="3" name="z_far" type="float" />
<description>
Sets camera to use orthogonal projection, also known as orthographic projection. Objects remain the same size on the screen no matter how far away they are.
</description>
</method>
<method name="camera_set_perspective">
<return type="void" />
- <argument index="0" name="camera" type="RID" />
- <argument index="1" name="fovy_degrees" type="float" />
- <argument index="2" name="z_near" type="float" />
- <argument index="3" name="z_far" type="float" />
+ <param index="0" name="camera" type="RID" />
+ <param index="1" name="fovy_degrees" type="float" />
+ <param index="2" name="z_near" type="float" />
+ <param index="3" name="z_far" type="float" />
<description>
Sets camera to use perspective projection. Objects on the screen becomes smaller when they are far away.
</description>
</method>
<method name="camera_set_transform">
<return type="void" />
- <argument index="0" name="camera" type="RID" />
- <argument index="1" name="transform" type="Transform3D" />
+ <param index="0" name="camera" type="RID" />
+ <param index="1" name="transform" type="Transform3D" />
<description>
Sets [Transform3D] of camera.
</description>
</method>
<method name="camera_set_use_vertical_aspect">
<return type="void" />
- <argument index="0" name="camera" type="RID" />
- <argument index="1" name="enable" type="bool" />
+ <param index="0" name="camera" type="RID" />
+ <param index="1" name="enable" type="bool" />
<description>
If [code]true[/code], preserves the horizontal aspect ratio which is equivalent to [constant Camera3D.KEEP_WIDTH]. If [code]false[/code], preserves the vertical aspect ratio which is equivalent to [constant Camera3D.KEEP_HEIGHT].
</description>
@@ -151,181 +151,181 @@
</method>
<method name="canvas_item_add_animation_slice">
<return type="void" />
- <argument index="0" name="item" type="RID" />
- <argument index="1" name="animation_length" type="float" />
- <argument index="2" name="slice_begin" type="float" />
- <argument index="3" name="slice_end" type="float" />
- <argument index="4" name="offset" type="float" default="0.0" />
+ <param index="0" name="item" type="RID" />
+ <param index="1" name="animation_length" type="float" />
+ <param index="2" name="slice_begin" type="float" />
+ <param index="3" name="slice_end" type="float" />
+ <param index="4" name="offset" type="float" default="0.0" />
<description>
Subsequent drawing commands will be ignored unless they fall within the specified animation slice. This is a faster way to implement animations that loop on background rather than redrawing constantly.
</description>
</method>
<method name="canvas_item_add_circle">
<return type="void" />
- <argument index="0" name="item" type="RID" />
- <argument index="1" name="pos" type="Vector2" />
- <argument index="2" name="radius" type="float" />
- <argument index="3" name="color" type="Color" />
+ <param index="0" name="item" type="RID" />
+ <param index="1" name="pos" type="Vector2" />
+ <param index="2" name="radius" type="float" />
+ <param index="3" name="color" type="Color" />
<description>
</description>
</method>
<method name="canvas_item_add_clip_ignore">
<return type="void" />
- <argument index="0" name="item" type="RID" />
- <argument index="1" name="ignore" type="bool" />
+ <param index="0" name="item" type="RID" />
+ <param index="1" name="ignore" type="bool" />
<description>
</description>
</method>
<method name="canvas_item_add_line">
<return type="void" />
- <argument index="0" name="item" type="RID" />
- <argument index="1" name="from" type="Vector2" />
- <argument index="2" name="to" type="Vector2" />
- <argument index="3" name="color" type="Color" />
- <argument index="4" name="width" type="float" default="1.0" />
- <argument index="5" name="antialiased" type="bool" default="false" />
+ <param index="0" name="item" type="RID" />
+ <param index="1" name="from" type="Vector2" />
+ <param index="2" name="to" type="Vector2" />
+ <param index="3" name="color" type="Color" />
+ <param index="4" name="width" type="float" default="1.0" />
+ <param index="5" name="antialiased" type="bool" default="false" />
<description>
</description>
</method>
<method name="canvas_item_add_mesh">
<return type="void" />
- <argument index="0" name="item" type="RID" />
- <argument index="1" name="mesh" type="RID" />
- <argument index="2" name="transform" type="Transform2D" default="Transform2D(1, 0, 0, 1, 0, 0)" />
- <argument index="3" name="modulate" type="Color" default="Color(1, 1, 1, 1)" />
- <argument index="4" name="texture" type="RID" />
+ <param index="0" name="item" type="RID" />
+ <param index="1" name="mesh" type="RID" />
+ <param index="2" name="transform" type="Transform2D" default="Transform2D(1, 0, 0, 1, 0, 0)" />
+ <param index="3" name="modulate" type="Color" default="Color(1, 1, 1, 1)" />
+ <param index="4" name="texture" type="RID" />
<description>
</description>
</method>
<method name="canvas_item_add_msdf_texture_rect_region">
<return type="void" />
- <argument index="0" name="item" type="RID" />
- <argument index="1" name="rect" type="Rect2" />
- <argument index="2" name="texture" type="RID" />
- <argument index="3" name="src_rect" type="Rect2" />
- <argument index="4" name="modulate" type="Color" default="Color(1, 1, 1, 1)" />
- <argument index="5" name="outline_size" type="int" default="0" />
- <argument index="6" name="px_range" type="float" default="1.0" />
+ <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" default="Color(1, 1, 1, 1)" />
+ <param index="5" name="outline_size" type="int" default="0" />
+ <param index="6" name="px_range" type="float" default="1.0" />
<description>
</description>
</method>
<method name="canvas_item_add_multimesh">
<return type="void" />
- <argument index="0" name="item" type="RID" />
- <argument index="1" name="mesh" type="RID" />
- <argument index="2" name="texture" type="RID" />
+ <param index="0" name="item" type="RID" />
+ <param index="1" name="mesh" type="RID" />
+ <param index="2" name="texture" type="RID" />
<description>
</description>
</method>
<method name="canvas_item_add_nine_patch">
<return type="void" />
- <argument index="0" name="item" type="RID" />
- <argument index="1" name="rect" type="Rect2" />
- <argument index="2" name="source" type="Rect2" />
- <argument index="3" name="texture" type="RID" />
- <argument index="4" name="topleft" type="Vector2" />
- <argument index="5" name="bottomright" type="Vector2" />
- <argument index="6" name="x_axis_mode" type="int" enum="RenderingServer.NinePatchAxisMode" default="0" />
- <argument index="7" name="y_axis_mode" type="int" enum="RenderingServer.NinePatchAxisMode" default="0" />
- <argument index="8" name="draw_center" type="bool" default="true" />
- <argument index="9" name="modulate" type="Color" default="Color(1, 1, 1, 1)" />
+ <param index="0" name="item" type="RID" />
+ <param index="1" name="rect" type="Rect2" />
+ <param index="2" name="source" type="Rect2" />
+ <param index="3" name="texture" type="RID" />
+ <param index="4" name="topleft" type="Vector2" />
+ <param index="5" name="bottomright" type="Vector2" />
+ <param index="6" name="x_axis_mode" type="int" enum="RenderingServer.NinePatchAxisMode" default="0" />
+ <param index="7" name="y_axis_mode" type="int" enum="RenderingServer.NinePatchAxisMode" default="0" />
+ <param index="8" name="draw_center" type="bool" default="true" />
+ <param index="9" name="modulate" type="Color" default="Color(1, 1, 1, 1)" />
<description>
</description>
</method>
<method name="canvas_item_add_particles">
<return type="void" />
- <argument index="0" name="item" type="RID" />
- <argument index="1" name="particles" type="RID" />
- <argument index="2" name="texture" type="RID" />
+ <param index="0" name="item" type="RID" />
+ <param index="1" name="particles" type="RID" />
+ <param index="2" name="texture" type="RID" />
<description>
</description>
</method>
<method name="canvas_item_add_polygon">
<return type="void" />
- <argument index="0" name="item" type="RID" />
- <argument index="1" name="points" type="PackedVector2Array" />
- <argument index="2" name="colors" type="PackedColorArray" />
- <argument index="3" name="uvs" type="PackedVector2Array" default="PackedVector2Array()" />
- <argument index="4" name="texture" type="RID" />
+ <param index="0" name="item" type="RID" />
+ <param index="1" name="points" type="PackedVector2Array" />
+ <param index="2" name="colors" type="PackedColorArray" />
+ <param index="3" name="uvs" type="PackedVector2Array" default="PackedVector2Array()" />
+ <param index="4" name="texture" type="RID" />
<description>
</description>
</method>
<method name="canvas_item_add_polyline">
<return type="void" />
- <argument index="0" name="item" type="RID" />
- <argument index="1" name="points" type="PackedVector2Array" />
- <argument index="2" name="colors" type="PackedColorArray" />
- <argument index="3" name="width" type="float" default="1.0" />
- <argument index="4" name="antialiased" type="bool" default="false" />
+ <param index="0" name="item" type="RID" />
+ <param index="1" name="points" type="PackedVector2Array" />
+ <param index="2" name="colors" type="PackedColorArray" />
+ <param index="3" name="width" type="float" default="1.0" />
+ <param index="4" name="antialiased" type="bool" default="false" />
<description>
</description>
</method>
<method name="canvas_item_add_primitive">
<return type="void" />
- <argument index="0" name="item" type="RID" />
- <argument index="1" name="points" type="PackedVector2Array" />
- <argument index="2" name="colors" type="PackedColorArray" />
- <argument index="3" name="uvs" type="PackedVector2Array" />
- <argument index="4" name="texture" type="RID" />
- <argument index="5" name="width" type="float" default="1.0" />
+ <param index="0" name="item" type="RID" />
+ <param index="1" name="points" type="PackedVector2Array" />
+ <param index="2" name="colors" type="PackedColorArray" />
+ <param index="3" name="uvs" type="PackedVector2Array" />
+ <param index="4" name="texture" type="RID" />
+ <param index="5" name="width" type="float" default="1.0" />
<description>
</description>
</method>
<method name="canvas_item_add_rect">
<return type="void" />
- <argument index="0" name="item" type="RID" />
- <argument index="1" name="rect" type="Rect2" />
- <argument index="2" name="color" type="Color" />
+ <param index="0" name="item" type="RID" />
+ <param index="1" name="rect" type="Rect2" />
+ <param index="2" name="color" type="Color" />
<description>
</description>
</method>
<method name="canvas_item_add_set_transform">
<return type="void" />
- <argument index="0" name="item" type="RID" />
- <argument index="1" name="transform" type="Transform2D" />
+ <param index="0" name="item" type="RID" />
+ <param index="1" name="transform" type="Transform2D" />
<description>
</description>
</method>
<method name="canvas_item_add_texture_rect">
<return type="void" />
- <argument index="0" name="item" type="RID" />
- <argument index="1" name="rect" type="Rect2" />
- <argument index="2" name="texture" type="RID" />
- <argument index="3" name="tile" type="bool" default="false" />
- <argument index="4" name="modulate" type="Color" default="Color(1, 1, 1, 1)" />
- <argument index="5" name="transpose" type="bool" default="false" />
+ <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="tile" type="bool" default="false" />
+ <param index="4" name="modulate" type="Color" default="Color(1, 1, 1, 1)" />
+ <param index="5" name="transpose" type="bool" default="false" />
<description>
</description>
</method>
<method name="canvas_item_add_texture_rect_region">
<return type="void" />
- <argument index="0" name="item" type="RID" />
- <argument index="1" name="rect" type="Rect2" />
- <argument index="2" name="texture" type="RID" />
- <argument index="3" name="src_rect" type="Rect2" />
- <argument index="4" name="modulate" type="Color" default="Color(1, 1, 1, 1)" />
- <argument index="5" name="transpose" type="bool" default="false" />
- <argument index="6" name="clip_uv" type="bool" default="true" />
+ <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" default="Color(1, 1, 1, 1)" />
+ <param index="5" name="transpose" type="bool" default="false" />
+ <param index="6" name="clip_uv" type="bool" default="true" />
<description>
</description>
</method>
<method name="canvas_item_add_triangle_array">
<return type="void" />
- <argument index="0" name="item" type="RID" />
- <argument index="1" name="indices" type="PackedInt32Array" />
- <argument index="2" name="points" type="PackedVector2Array" />
- <argument index="3" name="colors" type="PackedColorArray" />
- <argument index="4" name="uvs" type="PackedVector2Array" default="PackedVector2Array()" />
- <argument index="5" name="bones" type="PackedInt32Array" default="PackedInt32Array()" />
- <argument index="6" name="weights" type="PackedFloat32Array" default="PackedFloat32Array()" />
- <argument index="7" name="texture" type="RID" />
- <argument index="8" name="count" type="int" default="-1" />
+ <param index="0" name="item" type="RID" />
+ <param index="1" name="indices" type="PackedInt32Array" />
+ <param index="2" name="points" type="PackedVector2Array" />
+ <param index="3" name="colors" type="PackedColorArray" />
+ <param index="4" name="uvs" type="PackedVector2Array" default="PackedVector2Array()" />
+ <param index="5" name="bones" type="PackedInt32Array" default="PackedInt32Array()" />
+ <param index="6" name="weights" type="PackedFloat32Array" default="PackedFloat32Array()" />
+ <param index="7" name="texture" type="RID" />
+ <param index="8" name="count" type="int" default="-1" />
<description>
</description>
</method>
<method name="canvas_item_clear">
<return type="void" />
- <argument index="0" name="item" type="RID" />
+ <param index="0" name="item" type="RID" />
<description>
Clears the [CanvasItem] and removes all commands in it.
</description>
@@ -337,170 +337,170 @@
</method>
<method name="canvas_item_set_canvas_group_mode">
<return type="void" />
- <argument index="0" name="item" type="RID" />
- <argument index="1" name="mode" type="int" enum="RenderingServer.CanvasGroupMode" />
- <argument index="2" name="clear_margin" type="float" default="5.0" />
- <argument index="3" name="fit_empty" type="bool" default="false" />
- <argument index="4" name="fit_margin" type="float" default="0.0" />
- <argument index="5" name="blur_mipmaps" type="bool" default="false" />
+ <param index="0" name="item" type="RID" />
+ <param index="1" name="mode" type="int" enum="RenderingServer.CanvasGroupMode" />
+ <param index="2" name="clear_margin" type="float" default="5.0" />
+ <param index="3" name="fit_empty" type="bool" default="false" />
+ <param index="4" name="fit_margin" type="float" default="0.0" />
+ <param index="5" name="blur_mipmaps" type="bool" default="false" />
<description>
</description>
</method>
<method name="canvas_item_set_clip">
<return type="void" />
- <argument index="0" name="item" type="RID" />
- <argument index="1" name="clip" type="bool" />
+ <param index="0" name="item" type="RID" />
+ <param index="1" name="clip" type="bool" />
<description>
</description>
</method>
<method name="canvas_item_set_copy_to_backbuffer">
<return type="void" />
- <argument index="0" name="item" type="RID" />
- <argument index="1" name="enabled" type="bool" />
- <argument index="2" name="rect" type="Rect2" />
+ <param index="0" name="item" type="RID" />
+ <param index="1" name="enabled" type="bool" />
+ <param index="2" name="rect" type="Rect2" />
<description>
Sets the [CanvasItem] to copy a rect to the backbuffer.
</description>
</method>
<method name="canvas_item_set_custom_rect">
<return type="void" />
- <argument index="0" name="item" type="RID" />
- <argument index="1" name="use_custom_rect" type="bool" />
- <argument index="2" name="rect" type="Rect2" default="Rect2(0, 0, 0, 0)" />
+ <param index="0" name="item" type="RID" />
+ <param index="1" name="use_custom_rect" type="bool" />
+ <param index="2" name="rect" type="Rect2" default="Rect2(0, 0, 0, 0)" />
<description>
</description>
</method>
<method name="canvas_item_set_default_texture_filter">
<return type="void" />
- <argument index="0" name="item" type="RID" />
- <argument index="1" name="filter" type="int" enum="RenderingServer.CanvasItemTextureFilter" />
+ <param index="0" name="item" type="RID" />
+ <param index="1" name="filter" type="int" enum="RenderingServer.CanvasItemTextureFilter" />
<description>
</description>
</method>
<method name="canvas_item_set_default_texture_repeat">
<return type="void" />
- <argument index="0" name="item" type="RID" />
- <argument index="1" name="repeat" type="int" enum="RenderingServer.CanvasItemTextureRepeat" />
+ <param index="0" name="item" type="RID" />
+ <param index="1" name="repeat" type="int" enum="RenderingServer.CanvasItemTextureRepeat" />
<description>
</description>
</method>
<method name="canvas_item_set_distance_field_mode">
<return type="void" />
- <argument index="0" name="item" type="RID" />
- <argument index="1" name="enabled" type="bool" />
+ <param index="0" name="item" type="RID" />
+ <param index="1" name="enabled" type="bool" />
<description>
</description>
</method>
<method name="canvas_item_set_draw_behind_parent">
<return type="void" />
- <argument index="0" name="item" type="RID" />
- <argument index="1" name="enabled" type="bool" />
+ <param index="0" name="item" type="RID" />
+ <param index="1" name="enabled" type="bool" />
<description>
</description>
</method>
<method name="canvas_item_set_draw_index">
<return type="void" />
- <argument index="0" name="item" type="RID" />
- <argument index="1" name="index" type="int" />
+ <param index="0" name="item" type="RID" />
+ <param index="1" name="index" type="int" />
<description>
Sets the index for the [CanvasItem].
</description>
</method>
<method name="canvas_item_set_light_mask">
<return type="void" />
- <argument index="0" name="item" type="RID" />
- <argument index="1" name="mask" type="int" />
+ <param index="0" name="item" type="RID" />
+ <param index="1" name="mask" type="int" />
<description>
</description>
</method>
<method name="canvas_item_set_material">
<return type="void" />
- <argument index="0" name="item" type="RID" />
- <argument index="1" name="material" type="RID" />
+ <param index="0" name="item" type="RID" />
+ <param index="1" name="material" type="RID" />
<description>
Sets a new material to the [CanvasItem].
</description>
</method>
<method name="canvas_item_set_modulate">
<return type="void" />
- <argument index="0" name="item" type="RID" />
- <argument index="1" name="color" type="Color" />
+ <param index="0" name="item" type="RID" />
+ <param index="1" name="color" type="Color" />
<description>
</description>
</method>
<method name="canvas_item_set_parent">
<return type="void" />
- <argument index="0" name="item" type="RID" />
- <argument index="1" name="parent" type="RID" />
+ <param index="0" name="item" type="RID" />
+ <param index="1" name="parent" type="RID" />
<description>
</description>
</method>
<method name="canvas_item_set_self_modulate">
<return type="void" />
- <argument index="0" name="item" type="RID" />
- <argument index="1" name="color" type="Color" />
+ <param index="0" name="item" type="RID" />
+ <param index="1" name="color" type="Color" />
<description>
</description>
</method>
<method name="canvas_item_set_sort_children_by_y">
<return type="void" />
- <argument index="0" name="item" type="RID" />
- <argument index="1" name="enabled" type="bool" />
+ <param index="0" name="item" type="RID" />
+ <param index="1" name="enabled" type="bool" />
<description>
</description>
</method>
<method name="canvas_item_set_transform">
<return type="void" />
- <argument index="0" name="item" type="RID" />
- <argument index="1" name="transform" type="Transform2D" />
+ <param index="0" name="item" type="RID" />
+ <param index="1" name="transform" type="Transform2D" />
<description>
</description>
</method>
<method name="canvas_item_set_use_parent_material">
<return type="void" />
- <argument index="0" name="item" type="RID" />
- <argument index="1" name="enabled" type="bool" />
+ <param index="0" name="item" type="RID" />
+ <param index="1" name="enabled" type="bool" />
<description>
Sets if the [CanvasItem] uses its parent's material.
</description>
</method>
<method name="canvas_item_set_visibility_notifier">
<return type="void" />
- <argument index="0" name="item" type="RID" />
- <argument index="1" name="enable" type="bool" />
- <argument index="2" name="area" type="Rect2" />
- <argument index="3" name="enter_callable" type="Callable" />
- <argument index="4" name="exit_callable" type="Callable" />
+ <param index="0" name="item" type="RID" />
+ <param index="1" name="enable" type="bool" />
+ <param index="2" name="area" type="Rect2" />
+ <param index="3" name="enter_callable" type="Callable" />
+ <param index="4" name="exit_callable" type="Callable" />
<description>
</description>
</method>
<method name="canvas_item_set_visible">
<return type="void" />
- <argument index="0" name="item" type="RID" />
- <argument index="1" name="visible" type="bool" />
+ <param index="0" name="item" type="RID" />
+ <param index="1" name="visible" type="bool" />
<description>
</description>
</method>
<method name="canvas_item_set_z_as_relative_to_parent">
<return type="void" />
- <argument index="0" name="item" type="RID" />
- <argument index="1" name="enabled" type="bool" />
+ <param index="0" name="item" type="RID" />
+ <param index="1" name="enabled" type="bool" />
<description>
If this is enabled, the Z index of the parent will be added to the children's Z index.
</description>
</method>
<method name="canvas_item_set_z_index">
<return type="void" />
- <argument index="0" name="item" type="RID" />
- <argument index="1" name="z_index" type="int" />
+ <param index="0" name="item" type="RID" />
+ <param index="1" name="z_index" type="int" />
<description>
Sets the [CanvasItem]'s Z index, i.e. its draw order (lower indexes are drawn first).
</description>
</method>
<method name="canvas_light_attach_to_canvas">
<return type="void" />
- <argument index="0" name="light" type="RID" />
- <argument index="1" name="canvas" type="RID" />
+ <param index="0" name="light" type="RID" />
+ <param index="1" name="canvas" type="RID" />
<description>
Attaches the canvas light to the canvas. Removes it from its previous canvas.
</description>
@@ -514,8 +514,8 @@
</method>
<method name="canvas_light_occluder_attach_to_canvas">
<return type="void" />
- <argument index="0" name="occluder" type="RID" />
- <argument index="1" name="canvas" type="RID" />
+ <param index="0" name="occluder" type="RID" />
+ <param index="1" name="canvas" type="RID" />
<description>
Attaches a light occluder to the canvas. Removes it from its previous canvas.
</description>
@@ -529,177 +529,177 @@
</method>
<method name="canvas_light_occluder_set_as_sdf_collision">
<return type="void" />
- <argument index="0" name="occluder" type="RID" />
- <argument index="1" name="enable" type="bool" />
+ <param index="0" name="occluder" type="RID" />
+ <param index="1" name="enable" type="bool" />
<description>
</description>
</method>
<method name="canvas_light_occluder_set_enabled">
<return type="void" />
- <argument index="0" name="occluder" type="RID" />
- <argument index="1" name="enabled" type="bool" />
+ <param index="0" name="occluder" type="RID" />
+ <param index="1" name="enabled" type="bool" />
<description>
Enables or disables light occluder.
</description>
</method>
<method name="canvas_light_occluder_set_light_mask">
<return type="void" />
- <argument index="0" name="occluder" type="RID" />
- <argument index="1" name="mask" type="int" />
+ <param index="0" name="occluder" type="RID" />
+ <param index="1" name="mask" type="int" />
<description>
The light mask. See [LightOccluder2D] for more information on light masks.
</description>
</method>
<method name="canvas_light_occluder_set_polygon">
<return type="void" />
- <argument index="0" name="occluder" type="RID" />
- <argument index="1" name="polygon" type="RID" />
+ <param index="0" name="occluder" type="RID" />
+ <param index="1" name="polygon" type="RID" />
<description>
Sets a light occluder's polygon.
</description>
</method>
<method name="canvas_light_occluder_set_transform">
<return type="void" />
- <argument index="0" name="occluder" type="RID" />
- <argument index="1" name="transform" type="Transform2D" />
+ <param index="0" name="occluder" type="RID" />
+ <param index="1" name="transform" type="Transform2D" />
<description>
Sets a light occluder's [Transform2D].
</description>
</method>
<method name="canvas_light_set_color">
<return type="void" />
- <argument index="0" name="light" type="RID" />
- <argument index="1" name="color" type="Color" />
+ <param index="0" name="light" type="RID" />
+ <param index="1" name="color" type="Color" />
<description>
Sets the color for a light.
</description>
</method>
<method name="canvas_light_set_enabled">
<return type="void" />
- <argument index="0" name="light" type="RID" />
- <argument index="1" name="enabled" type="bool" />
+ <param index="0" name="light" type="RID" />
+ <param index="1" name="enabled" type="bool" />
<description>
Enables or disables a canvas light.
</description>
</method>
<method name="canvas_light_set_energy">
<return type="void" />
- <argument index="0" name="light" type="RID" />
- <argument index="1" name="energy" type="float" />
+ <param index="0" name="light" type="RID" />
+ <param index="1" name="energy" type="float" />
<description>
Sets a canvas light's energy.
</description>
</method>
<method name="canvas_light_set_height">
<return type="void" />
- <argument index="0" name="light" type="RID" />
- <argument index="1" name="height" type="float" />
+ <param index="0" name="light" type="RID" />
+ <param index="1" name="height" type="float" />
<description>
Sets a canvas light's height.
</description>
</method>
<method name="canvas_light_set_item_cull_mask">
<return type="void" />
- <argument index="0" name="light" type="RID" />
- <argument index="1" name="mask" type="int" />
+ <param index="0" name="light" type="RID" />
+ <param index="1" name="mask" type="int" />
<description>
The light mask. See [LightOccluder2D] for more information on light masks.
</description>
</method>
<method name="canvas_light_set_item_shadow_cull_mask">
<return type="void" />
- <argument index="0" name="light" type="RID" />
- <argument index="1" name="mask" type="int" />
+ <param index="0" name="light" type="RID" />
+ <param index="1" name="mask" type="int" />
<description>
The binary mask used to determine which layers this canvas light's shadows affects. See [LightOccluder2D] for more information on light masks.
</description>
</method>
<method name="canvas_light_set_layer_range">
<return type="void" />
- <argument index="0" name="light" type="RID" />
- <argument index="1" name="min_layer" type="int" />
- <argument index="2" name="max_layer" type="int" />
+ <param index="0" name="light" type="RID" />
+ <param index="1" name="min_layer" type="int" />
+ <param index="2" name="max_layer" type="int" />
<description>
The layer range that gets rendered with this light.
</description>
</method>
<method name="canvas_light_set_mode">
<return type="void" />
- <argument index="0" name="light" type="RID" />
- <argument index="1" name="mode" type="int" enum="RenderingServer.CanvasLightMode" />
+ <param index="0" name="light" type="RID" />
+ <param index="1" name="mode" type="int" enum="RenderingServer.CanvasLightMode" />
<description>
The mode of the light, see [enum CanvasLightMode] constants.
</description>
</method>
<method name="canvas_light_set_shadow_color">
<return type="void" />
- <argument index="0" name="light" type="RID" />
- <argument index="1" name="color" type="Color" />
+ <param index="0" name="light" type="RID" />
+ <param index="1" name="color" type="Color" />
<description>
Sets the color of the canvas light's shadow.
</description>
</method>
<method name="canvas_light_set_shadow_enabled">
<return type="void" />
- <argument index="0" name="light" type="RID" />
- <argument index="1" name="enabled" type="bool" />
+ <param index="0" name="light" type="RID" />
+ <param index="1" name="enabled" type="bool" />
<description>
Enables or disables the canvas light's shadow.
</description>
</method>
<method name="canvas_light_set_shadow_filter">
<return type="void" />
- <argument index="0" name="light" type="RID" />
- <argument index="1" name="filter" type="int" enum="RenderingServer.CanvasLightShadowFilter" />
+ <param index="0" name="light" type="RID" />
+ <param index="1" name="filter" type="int" enum="RenderingServer.CanvasLightShadowFilter" />
<description>
Sets the canvas light's shadow's filter, see [enum CanvasLightShadowFilter] constants.
</description>
</method>
<method name="canvas_light_set_shadow_smooth">
<return type="void" />
- <argument index="0" name="light" type="RID" />
- <argument index="1" name="smooth" type="float" />
+ <param index="0" name="light" type="RID" />
+ <param index="1" name="smooth" type="float" />
<description>
Smoothens the shadow. The lower, the smoother.
</description>
</method>
<method name="canvas_light_set_texture">
<return type="void" />
- <argument index="0" name="light" type="RID" />
- <argument index="1" name="texture" type="RID" />
+ <param index="0" name="light" type="RID" />
+ <param index="1" name="texture" type="RID" />
<description>
Sets the texture to be used by a [PointLight2D]. Equivalent to [member PointLight2D.texture].
</description>
</method>
<method name="canvas_light_set_texture_offset">
<return type="void" />
- <argument index="0" name="light" type="RID" />
- <argument index="1" name="offset" type="Vector2" />
+ <param index="0" name="light" type="RID" />
+ <param index="1" name="offset" type="Vector2" />
<description>
Sets the offset of a [PointLight2D]'s texture. Equivalent to [member PointLight2D.offset].
</description>
</method>
<method name="canvas_light_set_texture_scale">
<return type="void" />
- <argument index="0" name="light" type="RID" />
- <argument index="1" name="scale" type="float" />
+ <param index="0" name="light" type="RID" />
+ <param index="1" name="scale" type="float" />
<description>
Sets the scale factor of a [PointLight2D]'s texture. Equivalent to [member PointLight2D.texture_scale].
</description>
</method>
<method name="canvas_light_set_transform">
<return type="void" />
- <argument index="0" name="light" type="RID" />
- <argument index="1" name="transform" type="Transform2D" />
+ <param index="0" name="light" type="RID" />
+ <param index="1" name="transform" type="Transform2D" />
<description>
Sets the canvas light's [Transform2D].
</description>
</method>
<method name="canvas_light_set_z_range">
<return type="void" />
- <argument index="0" name="light" type="RID" />
- <argument index="1" name="min_z" type="int" />
- <argument index="2" name="max_z" type="int" />
+ <param index="0" name="light" type="RID" />
+ <param index="1" name="min_z" type="int" />
+ <param index="2" name="max_z" type="int" />
<description>
Sets the Z range of objects that will be affected by this light. Equivalent to [member Light2D.range_z_min] and [member Light2D.range_z_max].
</description>
@@ -713,47 +713,47 @@
</method>
<method name="canvas_occluder_polygon_set_cull_mode">
<return type="void" />
- <argument index="0" name="occluder_polygon" type="RID" />
- <argument index="1" name="mode" type="int" enum="RenderingServer.CanvasOccluderPolygonCullMode" />
+ <param index="0" name="occluder_polygon" type="RID" />
+ <param index="1" name="mode" type="int" enum="RenderingServer.CanvasOccluderPolygonCullMode" />
<description>
Sets an occluder polygons cull mode. See [enum CanvasOccluderPolygonCullMode] constants.
</description>
</method>
<method name="canvas_occluder_polygon_set_shape">
<return type="void" />
- <argument index="0" name="occluder_polygon" type="RID" />
- <argument index="1" name="shape" type="PackedVector2Array" />
- <argument index="2" name="closed" type="bool" />
+ <param index="0" name="occluder_polygon" type="RID" />
+ <param index="1" name="shape" type="PackedVector2Array" />
+ <param index="2" name="closed" type="bool" />
<description>
Sets the shape of the occluder polygon.
</description>
</method>
<method name="canvas_set_disable_scale">
<return type="void" />
- <argument index="0" name="disable" type="bool" />
+ <param index="0" name="disable" type="bool" />
<description>
</description>
</method>
<method name="canvas_set_item_mirroring">
<return type="void" />
- <argument index="0" name="canvas" type="RID" />
- <argument index="1" name="item" type="RID" />
- <argument index="2" name="mirroring" type="Vector2" />
+ <param index="0" name="canvas" type="RID" />
+ <param index="1" name="item" type="RID" />
+ <param index="2" name="mirroring" type="Vector2" />
<description>
A copy of the canvas item will be drawn with a local offset of the mirroring [Vector2].
</description>
</method>
<method name="canvas_set_modulate">
<return type="void" />
- <argument index="0" name="canvas" type="RID" />
- <argument index="1" name="color" type="Color" />
+ <param index="0" name="canvas" type="RID" />
+ <param index="1" name="color" type="Color" />
<description>
Modulates all colors in the given canvas.
</description>
</method>
<method name="canvas_set_shadow_texture_size">
<return type="void" />
- <argument index="0" name="size" type="int" />
+ <param index="0" name="size" type="int" />
<description>
</description>
</method>
@@ -764,31 +764,31 @@
</method>
<method name="canvas_texture_set_channel">
<return type="void" />
- <argument index="0" name="canvas_texture" type="RID" />
- <argument index="1" name="channel" type="int" enum="RenderingServer.CanvasTextureChannel" />
- <argument index="2" name="texture" type="RID" />
+ <param index="0" name="canvas_texture" type="RID" />
+ <param index="1" name="channel" type="int" enum="RenderingServer.CanvasTextureChannel" />
+ <param index="2" name="texture" type="RID" />
<description>
</description>
</method>
<method name="canvas_texture_set_shading_parameters">
<return type="void" />
- <argument index="0" name="canvas_texture" type="RID" />
- <argument index="1" name="base_color" type="Color" />
- <argument index="2" name="shininess" type="float" />
+ <param index="0" name="canvas_texture" type="RID" />
+ <param index="1" name="base_color" type="Color" />
+ <param index="2" name="shininess" type="float" />
<description>
</description>
</method>
<method name="canvas_texture_set_texture_filter">
<return type="void" />
- <argument index="0" name="canvas_texture" type="RID" />
- <argument index="1" name="filter" type="int" enum="RenderingServer.CanvasItemTextureFilter" />
+ <param index="0" name="canvas_texture" type="RID" />
+ <param index="1" name="filter" type="int" enum="RenderingServer.CanvasItemTextureFilter" />
<description>
</description>
</method>
<method name="canvas_texture_set_texture_repeat">
<return type="void" />
- <argument index="0" name="canvas_texture" type="RID" />
- <argument index="1" name="repeat" type="int" enum="RenderingServer.CanvasItemTextureRepeat" />
+ <param index="0" name="canvas_texture" type="RID" />
+ <param index="1" name="repeat" type="int" enum="RenderingServer.CanvasItemTextureRepeat" />
<description>
</description>
</method>
@@ -804,74 +804,74 @@
</method>
<method name="decal_set_albedo_mix">
<return type="void" />
- <argument index="0" name="decal" type="RID" />
- <argument index="1" name="albedo_mix" type="float" />
+ <param index="0" name="decal" type="RID" />
+ <param index="1" name="albedo_mix" type="float" />
<description>
</description>
</method>
<method name="decal_set_cull_mask">
<return type="void" />
- <argument index="0" name="decal" type="RID" />
- <argument index="1" name="mask" type="int" />
+ <param index="0" name="decal" type="RID" />
+ <param index="1" name="mask" type="int" />
<description>
</description>
</method>
<method name="decal_set_distance_fade">
<return type="void" />
- <argument index="0" name="decal" type="RID" />
- <argument index="1" name="enabled" type="bool" />
- <argument index="2" name="begin" type="float" />
- <argument index="3" name="length" type="float" />
+ <param index="0" name="decal" type="RID" />
+ <param index="1" name="enabled" type="bool" />
+ <param index="2" name="begin" type="float" />
+ <param index="3" name="length" type="float" />
<description>
</description>
</method>
<method name="decal_set_emission_energy">
<return type="void" />
- <argument index="0" name="decal" type="RID" />
- <argument index="1" name="energy" type="float" />
+ <param index="0" name="decal" type="RID" />
+ <param index="1" name="energy" type="float" />
<description>
</description>
</method>
<method name="decal_set_extents">
<return type="void" />
- <argument index="0" name="decal" type="RID" />
- <argument index="1" name="extents" type="Vector3" />
+ <param index="0" name="decal" type="RID" />
+ <param index="1" name="extents" type="Vector3" />
<description>
</description>
</method>
<method name="decal_set_fade">
<return type="void" />
- <argument index="0" name="decal" type="RID" />
- <argument index="1" name="above" type="float" />
- <argument index="2" name="below" type="float" />
+ <param index="0" name="decal" type="RID" />
+ <param index="1" name="above" type="float" />
+ <param index="2" name="below" type="float" />
<description>
</description>
</method>
<method name="decal_set_modulate">
<return type="void" />
- <argument index="0" name="decal" type="RID" />
- <argument index="1" name="color" type="Color" />
+ <param index="0" name="decal" type="RID" />
+ <param index="1" name="color" type="Color" />
<description>
</description>
</method>
<method name="decal_set_normal_fade">
<return type="void" />
- <argument index="0" name="decal" type="RID" />
- <argument index="1" name="fade" type="float" />
+ <param index="0" name="decal" type="RID" />
+ <param index="1" name="fade" type="float" />
<description>
</description>
</method>
<method name="decal_set_texture">
<return type="void" />
- <argument index="0" name="decal" type="RID" />
- <argument index="1" name="type" type="int" enum="RenderingServer.DecalTexture" />
- <argument index="2" name="texture" type="RID" />
+ <param index="0" name="decal" type="RID" />
+ <param index="1" name="type" type="int" enum="RenderingServer.DecalTexture" />
+ <param index="2" name="texture" type="RID" />
<description>
</description>
</method>
<method name="decals_set_filter">
<return type="void" />
- <argument index="0" name="filter" type="int" enum="RenderingServer.DecalFilter" />
+ <param index="0" name="filter" type="int" enum="RenderingServer.DecalFilter" />
<description>
</description>
</method>
@@ -885,22 +885,22 @@
</method>
<method name="directional_shadow_atlas_set_size">
<return type="void" />
- <argument index="0" name="size" type="int" />
- <argument index="1" name="is_16bits" type="bool" />
+ <param index="0" name="size" type="int" />
+ <param index="1" name="is_16bits" type="bool" />
<description>
</description>
</method>
- <method name="directional_shadow_quality_set">
+ <method name="directional_soft_shadow_filter_set_quality">
<return type="void" />
- <argument index="0" name="quality" type="int" enum="RenderingServer.ShadowQuality" />
+ <param index="0" name="quality" type="int" enum="RenderingServer.ShadowQuality" />
<description>
</description>
</method>
<method name="environment_bake_panorama">
<return type="Image" />
- <argument index="0" name="environment" type="RID" />
- <argument index="1" name="bake_irradiance" type="bool" />
- <argument index="2" name="size" type="Vector2i" />
+ <param index="0" name="environment" type="RID" />
+ <param index="1" name="bake_irradiance" type="bool" />
+ <param index="2" name="size" type="Vector2i" />
<description>
</description>
</method>
@@ -913,266 +913,266 @@
</method>
<method name="environment_glow_set_use_bicubic_upscale">
<return type="void" />
- <argument index="0" name="enable" type="bool" />
+ <param index="0" name="enable" type="bool" />
<description>
</description>
</method>
<method name="environment_glow_set_use_high_quality">
<return type="void" />
- <argument index="0" name="enable" type="bool" />
+ <param index="0" name="enable" type="bool" />
<description>
</description>
</method>
<method name="environment_set_adjustment">
<return type="void" />
- <argument index="0" name="env" type="RID" />
- <argument index="1" name="enable" type="bool" />
- <argument index="2" name="brightness" type="float" />
- <argument index="3" name="contrast" type="float" />
- <argument index="4" name="saturation" type="float" />
- <argument index="5" name="use_1d_color_correction" type="bool" />
- <argument index="6" name="color_correction" type="RID" />
+ <param index="0" name="env" type="RID" />
+ <param index="1" name="enable" type="bool" />
+ <param index="2" name="brightness" type="float" />
+ <param index="3" name="contrast" type="float" />
+ <param index="4" name="saturation" type="float" />
+ <param index="5" name="use_1d_color_correction" type="bool" />
+ <param index="6" name="color_correction" type="RID" />
<description>
Sets the values to be used with the "Adjustment" post-process effect. See [Environment] for more details.
</description>
</method>
<method name="environment_set_ambient_light">
<return type="void" />
- <argument index="0" name="env" type="RID" />
- <argument index="1" name="color" type="Color" />
- <argument index="2" name="ambient" type="int" enum="RenderingServer.EnvironmentAmbientSource" default="0" />
- <argument index="3" name="energy" type="float" default="1.0" />
- <argument index="4" name="sky_contibution" type="float" default="0.0" />
- <argument index="5" name="reflection_source" type="int" enum="RenderingServer.EnvironmentReflectionSource" default="0" />
+ <param index="0" name="env" type="RID" />
+ <param index="1" name="color" type="Color" />
+ <param index="2" name="ambient" type="int" enum="RenderingServer.EnvironmentAmbientSource" default="0" />
+ <param index="3" name="energy" type="float" default="1.0" />
+ <param index="4" name="sky_contibution" type="float" default="0.0" />
+ <param index="5" name="reflection_source" type="int" enum="RenderingServer.EnvironmentReflectionSource" default="0" />
<description>
</description>
</method>
<method name="environment_set_background">
<return type="void" />
- <argument index="0" name="env" type="RID" />
- <argument index="1" name="bg" type="int" enum="RenderingServer.EnvironmentBG" />
+ <param index="0" name="env" type="RID" />
+ <param index="1" name="bg" type="int" enum="RenderingServer.EnvironmentBG" />
<description>
Sets the [i]BGMode[/i] of the environment. Equivalent to [member Environment.background_mode].
</description>
</method>
<method name="environment_set_bg_color">
<return type="void" />
- <argument index="0" name="env" type="RID" />
- <argument index="1" name="color" type="Color" />
+ <param index="0" name="env" type="RID" />
+ <param index="1" name="color" type="Color" />
<description>
Color displayed for clear areas of the scene (if using Custom color or Color+Sky background modes).
</description>
</method>
<method name="environment_set_bg_energy">
<return type="void" />
- <argument index="0" name="env" type="RID" />
- <argument index="1" name="energy" type="float" />
+ <param index="0" name="env" type="RID" />
+ <param index="1" name="energy" type="float" />
<description>
Sets the intensity of the background color.
</description>
</method>
<method name="environment_set_canvas_max_layer">
<return type="void" />
- <argument index="0" name="env" type="RID" />
- <argument index="1" name="max_layer" type="int" />
+ <param index="0" name="env" type="RID" />
+ <param index="1" name="max_layer" type="int" />
<description>
Sets the maximum layer to use if using Canvas background mode.
</description>
</method>
<method name="environment_set_fog">
<return type="void" />
- <argument index="0" name="env" type="RID" />
- <argument index="1" name="enable" type="bool" />
- <argument index="2" name="light_color" type="Color" />
- <argument index="3" name="light_energy" type="float" />
- <argument index="4" name="sun_scatter" type="float" />
- <argument index="5" name="density" type="float" />
- <argument index="6" name="height" type="float" />
- <argument index="7" name="height_density" type="float" />
- <argument index="8" name="aerial_perspective" type="float" />
+ <param index="0" name="env" type="RID" />
+ <param index="1" name="enable" type="bool" />
+ <param index="2" name="light_color" type="Color" />
+ <param index="3" name="light_energy" type="float" />
+ <param index="4" name="sun_scatter" type="float" />
+ <param index="5" name="density" type="float" />
+ <param index="6" name="height" type="float" />
+ <param index="7" name="height_density" type="float" />
+ <param index="8" name="aerial_perspective" type="float" />
<description>
</description>
</method>
<method name="environment_set_glow">
<return type="void" />
- <argument index="0" name="env" type="RID" />
- <argument index="1" name="enable" type="bool" />
- <argument index="2" name="levels" type="PackedFloat32Array" />
- <argument index="3" name="intensity" type="float" />
- <argument index="4" name="strength" type="float" />
- <argument index="5" name="mix" type="float" />
- <argument index="6" name="bloom_threshold" type="float" />
- <argument index="7" name="blend_mode" type="int" enum="RenderingServer.EnvironmentGlowBlendMode" />
- <argument index="8" name="hdr_bleed_threshold" type="float" />
- <argument index="9" name="hdr_bleed_scale" type="float" />
- <argument index="10" name="hdr_luminance_cap" type="float" />
- <argument index="11" name="glow_map_strength" type="float" />
- <argument index="12" name="glow_map" type="RID" />
+ <param index="0" name="env" type="RID" />
+ <param index="1" name="enable" type="bool" />
+ <param index="2" name="levels" type="PackedFloat32Array" />
+ <param index="3" name="intensity" type="float" />
+ <param index="4" name="strength" type="float" />
+ <param index="5" name="mix" type="float" />
+ <param index="6" name="bloom_threshold" type="float" />
+ <param index="7" name="blend_mode" type="int" enum="RenderingServer.EnvironmentGlowBlendMode" />
+ <param index="8" name="hdr_bleed_threshold" type="float" />
+ <param index="9" name="hdr_bleed_scale" type="float" />
+ <param index="10" name="hdr_luminance_cap" type="float" />
+ <param index="11" name="glow_map_strength" type="float" />
+ <param index="12" name="glow_map" type="RID" />
<description>
</description>
</method>
<method name="environment_set_sdfgi">
<return type="void" />
- <argument index="0" name="env" type="RID" />
- <argument index="1" name="enable" type="bool" />
- <argument index="2" name="cascades" type="int" />
- <argument index="3" name="min_cell_size" type="float" />
- <argument index="4" name="y_scale" type="int" enum="RenderingServer.EnvironmentSDFGIYScale" />
- <argument index="5" name="use_occlusion" type="bool" />
- <argument index="6" name="bounce_feedback" type="float" />
- <argument index="7" name="read_sky" type="bool" />
- <argument index="8" name="energy" type="float" />
- <argument index="9" name="normal_bias" type="float" />
- <argument index="10" name="probe_bias" type="float" />
+ <param index="0" name="env" type="RID" />
+ <param index="1" name="enable" type="bool" />
+ <param index="2" name="cascades" type="int" />
+ <param index="3" name="min_cell_size" type="float" />
+ <param index="4" name="y_scale" type="int" enum="RenderingServer.EnvironmentSDFGIYScale" />
+ <param index="5" name="use_occlusion" type="bool" />
+ <param index="6" name="bounce_feedback" type="float" />
+ <param index="7" name="read_sky" type="bool" />
+ <param index="8" name="energy" type="float" />
+ <param index="9" name="normal_bias" type="float" />
+ <param index="10" name="probe_bias" type="float" />
<description>
</description>
</method>
<method name="environment_set_sdfgi_frames_to_converge">
<return type="void" />
- <argument index="0" name="frames" type="int" enum="RenderingServer.EnvironmentSDFGIFramesToConverge" />
+ <param index="0" name="frames" type="int" enum="RenderingServer.EnvironmentSDFGIFramesToConverge" />
<description>
</description>
</method>
<method name="environment_set_sdfgi_frames_to_update_light">
<return type="void" />
- <argument index="0" name="frames" type="int" enum="RenderingServer.EnvironmentSDFGIFramesToUpdateLight" />
+ <param index="0" name="frames" type="int" enum="RenderingServer.EnvironmentSDFGIFramesToUpdateLight" />
<description>
</description>
</method>
<method name="environment_set_sdfgi_ray_count">
<return type="void" />
- <argument index="0" name="ray_count" type="int" enum="RenderingServer.EnvironmentSDFGIRayCount" />
+ <param index="0" name="ray_count" type="int" enum="RenderingServer.EnvironmentSDFGIRayCount" />
<description>
</description>
</method>
<method name="environment_set_sky">
<return type="void" />
- <argument index="0" name="env" type="RID" />
- <argument index="1" name="sky" type="RID" />
+ <param index="0" name="env" type="RID" />
+ <param index="1" name="sky" type="RID" />
<description>
Sets the [Sky] to be used as the environment's background when using [i]BGMode[/i] sky. Equivalent to [member Environment.sky].
</description>
</method>
<method name="environment_set_sky_custom_fov">
<return type="void" />
- <argument index="0" name="env" type="RID" />
- <argument index="1" name="scale" type="float" />
+ <param index="0" name="env" type="RID" />
+ <param index="1" name="scale" type="float" />
<description>
Sets a custom field of view for the background [Sky]. Equivalent to [member Environment.sky_custom_fov].
</description>
</method>
<method name="environment_set_sky_orientation">
<return type="void" />
- <argument index="0" name="env" type="RID" />
- <argument index="1" name="orientation" type="Basis" />
+ <param index="0" name="env" type="RID" />
+ <param index="1" name="orientation" type="Basis" />
<description>
Sets the rotation of the background [Sky] expressed as a [Basis]. Equivalent to [member Environment.sky_rotation], where the rotation vector is used to construct the [Basis].
</description>
</method>
<method name="environment_set_ssao">
<return type="void" />
- <argument index="0" name="env" type="RID" />
- <argument index="1" name="enable" type="bool" />
- <argument index="2" name="radius" type="float" />
- <argument index="3" name="intensity" type="float" />
- <argument index="4" name="power" type="float" />
- <argument index="5" name="detail" type="float" />
- <argument index="6" name="horizon" type="float" />
- <argument index="7" name="sharpness" type="float" />
- <argument index="8" name="light_affect" type="float" />
- <argument index="9" name="ao_channel_affect" type="float" />
+ <param index="0" name="env" type="RID" />
+ <param index="1" name="enable" type="bool" />
+ <param index="2" name="radius" type="float" />
+ <param index="3" name="intensity" type="float" />
+ <param index="4" name="power" type="float" />
+ <param index="5" name="detail" type="float" />
+ <param index="6" name="horizon" type="float" />
+ <param index="7" name="sharpness" type="float" />
+ <param index="8" name="light_affect" type="float" />
+ <param index="9" name="ao_channel_affect" type="float" />
<description>
Sets the variables to be used with the screen-space ambient occlusion (SSAO) post-process effect. See [Environment] for more details.
</description>
</method>
<method name="environment_set_ssao_quality">
<return type="void" />
- <argument index="0" name="quality" type="int" enum="RenderingServer.EnvironmentSSAOQuality" />
- <argument index="1" name="half_size" type="bool" />
- <argument index="2" name="adaptive_target" type="float" />
- <argument index="3" name="blur_passes" type="int" />
- <argument index="4" name="fadeout_from" type="float" />
- <argument index="5" name="fadeout_to" type="float" />
+ <param index="0" name="quality" type="int" enum="RenderingServer.EnvironmentSSAOQuality" />
+ <param index="1" name="half_size" type="bool" />
+ <param index="2" name="adaptive_target" type="float" />
+ <param index="3" name="blur_passes" type="int" />
+ <param index="4" name="fadeout_from" type="float" />
+ <param index="5" name="fadeout_to" type="float" />
<description>
Sets the quality level of the screen-space ambient occlusion (SSAO) post-process effect. See [Environment] for more details.
</description>
</method>
<method name="environment_set_ssil_quality">
<return type="void" />
- <argument index="0" name="quality" type="int" enum="RenderingServer.EnvironmentSSILQuality" />
- <argument index="1" name="half_size" type="bool" />
- <argument index="2" name="adaptive_target" type="float" />
- <argument index="3" name="blur_passes" type="int" />
- <argument index="4" name="fadeout_from" type="float" />
- <argument index="5" name="fadeout_to" type="float" />
+ <param index="0" name="quality" type="int" enum="RenderingServer.EnvironmentSSILQuality" />
+ <param index="1" name="half_size" type="bool" />
+ <param index="2" name="adaptive_target" type="float" />
+ <param index="3" name="blur_passes" type="int" />
+ <param index="4" name="fadeout_from" type="float" />
+ <param index="5" name="fadeout_to" type="float" />
<description>
Sets the quality level of the screen-space indirect lighting (SSIL) post-process effect. See [Environment] for more details.
</description>
</method>
<method name="environment_set_ssr">
<return type="void" />
- <argument index="0" name="env" type="RID" />
- <argument index="1" name="enable" type="bool" />
- <argument index="2" name="max_steps" type="int" />
- <argument index="3" name="fade_in" type="float" />
- <argument index="4" name="fade_out" type="float" />
- <argument index="5" name="depth_tolerance" type="float" />
+ <param index="0" name="env" type="RID" />
+ <param index="1" name="enable" type="bool" />
+ <param index="2" name="max_steps" type="int" />
+ <param index="3" name="fade_in" type="float" />
+ <param index="4" name="fade_out" type="float" />
+ <param index="5" name="depth_tolerance" type="float" />
<description>
Sets the variables to be used with the "screen space reflections" post-process effect. See [Environment] for more details.
</description>
</method>
<method name="environment_set_ssr_roughness_quality">
<return type="void" />
- <argument index="0" name="quality" type="int" enum="RenderingServer.EnvironmentSSRRoughnessQuality" />
+ <param index="0" name="quality" type="int" enum="RenderingServer.EnvironmentSSRRoughnessQuality" />
<description>
</description>
</method>
<method name="environment_set_tonemap">
<return type="void" />
- <argument index="0" name="env" type="RID" />
- <argument index="1" name="tone_mapper" type="int" enum="RenderingServer.EnvironmentToneMapper" />
- <argument index="2" name="exposure" type="float" />
- <argument index="3" name="white" type="float" />
- <argument index="4" name="auto_exposure" type="bool" />
- <argument index="5" name="min_luminance" type="float" />
- <argument index="6" name="max_luminance" type="float" />
- <argument index="7" name="auto_exp_speed" type="float" />
- <argument index="8" name="auto_exp_grey" type="float" />
+ <param index="0" name="env" type="RID" />
+ <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>
</method>
<method name="environment_set_volumetric_fog">
<return type="void" />
- <argument index="0" name="env" type="RID" />
- <argument index="1" name="enable" type="bool" />
- <argument index="2" name="density" type="float" />
- <argument index="3" name="albedo" type="Color" />
- <argument index="4" name="emission" type="Color" />
- <argument index="5" name="emission_energy" type="float" />
- <argument index="6" name="anisotropy" type="float" />
- <argument index="7" name="length" type="float" />
- <argument index="8" name="p_detail_spread" type="float" />
- <argument index="9" name="gi_inject" type="float" />
- <argument index="10" name="temporal_reprojection" type="bool" />
- <argument index="11" name="temporal_reprojection_amount" type="float" />
- <argument index="12" name="ambient_inject" type="float" />
+ <param index="0" name="env" type="RID" />
+ <param index="1" name="enable" type="bool" />
+ <param index="2" name="density" type="float" />
+ <param index="3" name="albedo" type="Color" />
+ <param index="4" name="emission" type="Color" />
+ <param index="5" name="emission_energy" type="float" />
+ <param index="6" name="anisotropy" type="float" />
+ <param index="7" name="length" type="float" />
+ <param index="8" name="p_detail_spread" type="float" />
+ <param index="9" name="gi_inject" type="float" />
+ <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" />
<description>
</description>
</method>
<method name="environment_set_volumetric_fog_filter_active">
<return type="void" />
- <argument index="0" name="active" type="bool" />
+ <param index="0" name="active" type="bool" />
<description>
Enables filtering of the volumetric fog scattering buffer. This results in much smoother volumes with very few under-sampling artifacts.
</description>
</method>
<method name="environment_set_volumetric_fog_volume_size">
<return type="void" />
- <argument index="0" name="size" type="int" />
- <argument index="1" name="depth" type="int" />
+ <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">
@@ -1183,32 +1183,32 @@
</method>
<method name="fog_volume_set_extents">
<return type="void" />
- <argument index="0" name="fog_volume" type="RID" />
- <argument index="1" name="extents" type="Vector3" />
+ <param index="0" name="fog_volume" type="RID" />
+ <param index="1" name="extents" type="Vector3" />
<description>
- Sets the size of the fog volume when shape is [constant FOG_VOLUME_SHAPE_ELLIPSOID] or [constant FOG_VOLUME_SHAPE_BOX].
+ Sets the size of the fog volume when 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].
</description>
</method>
<method name="fog_volume_set_material">
<return type="void" />
- <argument index="0" name="fog_volume" type="RID" />
- <argument index="1" name="material" type="RID" />
+ <param index="0" name="fog_volume" type="RID" />
+ <param index="1" name="material" type="RID" />
<description>
Sets the [Material] of the fog volume. Can be either a [FogMaterial] or a custom [ShaderMaterial].
</description>
</method>
<method name="fog_volume_set_shape">
<return type="void" />
- <argument index="0" name="fog_volume" type="RID" />
- <argument index="1" name="shape" type="int" enum="RenderingServer.FogVolumeShape" />
+ <param index="0" name="fog_volume" type="RID" />
+ <param index="1" name="shape" type="int" enum="RenderingServer.FogVolumeShape" />
<description>
- Sets the shape of the fog volume to either [constant RenderingServer.FOG_VOLUME_SHAPE_ELLIPSOID], [constant RenderingServer.FOG_VOLUME_SHAPE_BOX], or [constant RenderingServer.FOG_VOLUME_SHAPE_ELLIPSOID] or [constant RenderingServer.FOG_VOLUME_SHAPE_WORLD].
+ Sets the shape of the fog volume 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].
</description>
</method>
<method name="force_draw">
<return type="void" />
- <argument index="0" name="swap_buffers" type="bool" default="true" />
- <argument index="1" name="frame_step" type="float" default="0.0" />
+ <param index="0" name="swap_buffers" type="bool" default="true" />
+ <param index="1" name="frame_step" type="float" default="0.0" />
<description>
</description>
</method>
@@ -1219,7 +1219,7 @@
</method>
<method name="free_rid">
<return type="void" />
- <argument index="0" name="rid" type="RID" />
+ <param index="0" name="rid" type="RID" />
<description>
Tries to free an object in the RenderingServer.
</description>
@@ -1236,7 +1236,7 @@
</method>
<method name="get_rendering_info">
<return type="int" />
- <argument index="0" name="info" type="int" enum="RenderingServer.RenderingInfo" />
+ <param index="0" name="info" type="int" enum="RenderingServer.RenderingInfo" />
<description>
</description>
</method>
@@ -1252,6 +1252,13 @@
Returns the id of the test texture. Creates one if none exists.
</description>
</method>
+ <method name="get_video_adapter_api_version" qualifiers="const">
+ <return type="String" />
+ <description>
+ Returns the version of the graphics video adapter [i]currently in use[/i] (e.g. "1.2.189" for Vulkan, "3.3.0 NVIDIA 510.60.02" for OpenGL). This version may be different from the actual latest version supported by the hardware, as Godot may not always request the latest version.
+ [b]Note:[/b] When running a headless or server binary, this function returns an empty string.
+ </description>
+ </method>
<method name="get_video_adapter_name" qualifiers="const">
<return type="String" />
<description>
@@ -1281,53 +1288,53 @@
</method>
<method name="gi_set_use_half_resolution">
<return type="void" />
- <argument index="0" name="half_resolution" type="bool" />
+ <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_variable_add">
+ <method name="global_shader_uniform_add">
<return type="void" />
- <argument index="0" name="name" type="StringName" />
- <argument index="1" name="type" type="int" enum="RenderingServer.GlobalVariableType" />
- <argument index="2" name="default_value" type="Variant" />
+ <param index="0" name="name" type="StringName" />
+ <param index="1" name="type" type="int" enum="RenderingServer.GlobalShaderUniformType" />
+ <param index="2" name="default_value" type="Variant" />
<description>
</description>
</method>
- <method name="global_variable_get" qualifiers="const">
+ <method name="global_shader_uniform_get" qualifiers="const">
<return type="Variant" />
- <argument index="0" name="name" type="StringName" />
+ <param index="0" name="name" type="StringName" />
<description>
</description>
</method>
- <method name="global_variable_get_list" qualifiers="const">
+ <method name="global_shader_uniform_get_list" qualifiers="const">
<return type="PackedStringArray" />
<description>
</description>
</method>
- <method name="global_variable_get_type" qualifiers="const">
- <return type="int" enum="RenderingServer.GlobalVariableType" />
- <argument index="0" name="name" type="StringName" />
+ <method name="global_shader_uniform_get_type" qualifiers="const">
+ <return type="int" enum="RenderingServer.GlobalShaderUniformType" />
+ <param index="0" name="name" type="StringName" />
<description>
</description>
</method>
- <method name="global_variable_remove">
+ <method name="global_shader_uniform_remove">
<return type="void" />
- <argument index="0" name="name" type="StringName" />
+ <param index="0" name="name" type="StringName" />
<description>
</description>
</method>
- <method name="global_variable_set">
+ <method name="global_shader_uniform_set">
<return type="void" />
- <argument index="0" name="name" type="StringName" />
- <argument index="1" name="value" type="Variant" />
+ <param index="0" name="name" type="StringName" />
+ <param index="1" name="value" type="Variant" />
<description>
</description>
</method>
- <method name="global_variable_set_override">
+ <method name="global_shader_uniform_set_override">
<return type="void" />
- <argument index="0" name="name" type="StringName" />
- <argument index="1" name="value" type="Variant" />
+ <param index="0" name="name" type="StringName" />
+ <param index="1" name="value" type="Variant" />
<description>
</description>
</method>
@@ -1339,30 +1346,30 @@
</method>
<method name="has_feature" qualifiers="const">
<return type="bool" />
- <argument index="0" name="feature" type="int" enum="RenderingServer.Features" />
+ <param index="0" name="feature" type="int" enum="RenderingServer.Features" />
<description>
Not yet implemented. Always returns [code]false[/code].
</description>
</method>
<method name="has_os_feature" qualifiers="const">
<return type="bool" />
- <argument index="0" name="feature" type="String" />
+ <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">
<return type="void" />
- <argument index="0" name="instance" type="RID" />
- <argument index="1" name="id" type="int" />
+ <param index="0" name="instance" type="RID" />
+ <param index="1" name="id" type="int" />
<description>
Attaches a unique Object ID to instance. Object ID must be attached to instance for proper culling with [method instances_cull_aabb], [method instances_cull_convex], and [method instances_cull_ray].
</description>
</method>
<method name="instance_attach_skeleton">
<return type="void" />
- <argument index="0" name="instance" type="RID" />
- <argument index="1" name="skeleton" type="RID" />
+ <param index="0" name="instance" type="RID" />
+ <param index="1" name="skeleton" type="RID" />
<description>
Attaches a skeleton to an instance. Removes the previous skeleton from the instance.
</description>
@@ -1377,225 +1384,225 @@
</method>
<method name="instance_create2">
<return type="RID" />
- <argument index="0" name="base" type="RID" />
- <argument index="1" name="scenario" type="RID" />
+ <param index="0" name="base" type="RID" />
+ <param index="1" name="scenario" type="RID" />
<description>
Creates a visual instance, adds it to the RenderingServer, and sets both base and scenario. It can be accessed with the RID that is returned. This RID will be used in all [code]instance_*[/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="instance_geometry_get_shader_parameter" qualifiers="const">
+ <method name="instance_geometry_get_shader_uniform" qualifiers="const">
<return type="Variant" />
- <argument index="0" name="instance" type="RID" />
- <argument index="1" name="parameter" type="StringName" />
+ <param index="0" name="instance" type="RID" />
+ <param index="1" name="parameter" type="StringName" />
<description>
</description>
</method>
- <method name="instance_geometry_get_shader_parameter_default_value" qualifiers="const">
+ <method name="instance_geometry_get_shader_uniform_default_value" qualifiers="const">
<return type="Variant" />
- <argument index="0" name="instance" type="RID" />
- <argument index="1" name="parameter" type="StringName" />
+ <param index="0" name="instance" type="RID" />
+ <param index="1" name="parameter" type="StringName" />
<description>
</description>
</method>
- <method name="instance_geometry_get_shader_parameter_list" qualifiers="const">
- <return type="Array" />
- <argument index="0" name="instance" type="RID" />
+ <method name="instance_geometry_get_shader_uniform_list" qualifiers="const">
+ <return type="Dictionary[]" />
+ <param index="0" name="instance" type="RID" />
<description>
</description>
</method>
<method name="instance_geometry_set_cast_shadows_setting">
<return type="void" />
- <argument index="0" name="instance" type="RID" />
- <argument index="1" name="shadow_casting_setting" type="int" enum="RenderingServer.ShadowCastingSetting" />
+ <param index="0" name="instance" type="RID" />
+ <param index="1" name="shadow_casting_setting" type="int" enum="RenderingServer.ShadowCastingSetting" />
<description>
Sets the shadow casting setting to one of [enum ShadowCastingSetting]. Equivalent to [member GeometryInstance3D.cast_shadow].
</description>
</method>
<method name="instance_geometry_set_flag">
<return type="void" />
- <argument index="0" name="instance" type="RID" />
- <argument index="1" name="flag" type="int" enum="RenderingServer.InstanceFlags" />
- <argument index="2" name="enabled" type="bool" />
+ <param index="0" name="instance" type="RID" />
+ <param index="1" name="flag" type="int" enum="RenderingServer.InstanceFlags" />
+ <param index="2" name="enabled" type="bool" />
<description>
Sets the flag for a given [enum InstanceFlags]. See [enum InstanceFlags] for more details.
</description>
</method>
<method name="instance_geometry_set_lightmap">
<return type="void" />
- <argument index="0" name="instance" type="RID" />
- <argument index="1" name="lightmap" type="RID" />
- <argument index="2" name="lightmap_uv_scale" type="Rect2" />
- <argument index="3" name="lightmap_slice" type="int" />
+ <param index="0" name="instance" type="RID" />
+ <param index="1" name="lightmap" type="RID" />
+ <param index="2" name="lightmap_uv_scale" type="Rect2" />
+ <param index="3" name="lightmap_slice" type="int" />
<description>
</description>
</method>
<method name="instance_geometry_set_lod_bias">
<return type="void" />
- <argument index="0" name="instance" type="RID" />
- <argument index="1" name="lod_bias" type="float" />
+ <param index="0" name="instance" type="RID" />
+ <param index="1" name="lod_bias" type="float" />
<description>
</description>
</method>
<method name="instance_geometry_set_material_overlay">
<return type="void" />
- <argument index="0" name="instance" type="RID" />
- <argument index="1" name="material" type="RID" />
+ <param index="0" name="instance" type="RID" />
+ <param index="1" name="material" type="RID" />
<description>
Sets a material that will be rendered for all surfaces on top of active materials for the mesh associated with this instance. Equivalent to [member GeometryInstance3D.material_overlay].
</description>
</method>
<method name="instance_geometry_set_material_override">
<return type="void" />
- <argument index="0" name="instance" type="RID" />
- <argument index="1" name="material" type="RID" />
+ <param index="0" name="instance" type="RID" />
+ <param index="1" name="material" type="RID" />
<description>
Sets a material that will override the material for all surfaces on the mesh associated with this instance. Equivalent to [member GeometryInstance3D.material_override].
</description>
</method>
- <method name="instance_geometry_set_shader_parameter">
+ <method name="instance_geometry_set_shader_uniform">
<return type="void" />
- <argument index="0" name="instance" type="RID" />
- <argument index="1" name="parameter" type="StringName" />
- <argument index="2" name="value" type="Variant" />
+ <param index="0" name="instance" type="RID" />
+ <param index="1" name="parameter" type="StringName" />
+ <param index="2" name="value" type="Variant" />
<description>
</description>
</method>
<method name="instance_geometry_set_transparency">
<return type="void" />
- <argument index="0" name="instance" type="RID" />
- <argument index="1" name="transparency" type="float" />
+ <param index="0" name="instance" type="RID" />
+ <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">
<return type="void" />
- <argument index="0" name="instance" type="RID" />
- <argument index="1" name="min" type="float" />
- <argument index="2" name="max" type="float" />
- <argument index="3" name="min_margin" type="float" />
- <argument index="4" name="max_margin" type="float" />
- <argument index="5" name="fade_mode" type="int" enum="RenderingServer.VisibilityRangeFadeMode" />
+ <param index="0" name="instance" type="RID" />
+ <param index="1" name="min" type="float" />
+ <param index="2" name="max" type="float" />
+ <param index="3" name="min_margin" type="float" />
+ <param index="4" name="max_margin" type="float" />
+ <param index="5" name="fade_mode" type="int" enum="RenderingServer.VisibilityRangeFadeMode" />
<description>
Sets the visibility range values for the given geometry instance. Equivalent to [member GeometryInstance3D.visibility_range_begin] and related properties.
</description>
</method>
<method name="instance_set_base">
<return type="void" />
- <argument index="0" name="instance" type="RID" />
- <argument index="1" name="base" type="RID" />
+ <param index="0" name="instance" type="RID" />
+ <param index="1" name="base" type="RID" />
<description>
Sets the base of the instance. A base can be any of the 3D objects that are created in the RenderingServer that can be displayed. For example, any of the light types, mesh, multimesh, immediate geometry, particle system, reflection probe, lightmap, and the GI probe are all types that can be set as the base of an instance in order to be displayed in the scenario.
</description>
</method>
<method name="instance_set_blend_shape_weight">
<return type="void" />
- <argument index="0" name="instance" type="RID" />
- <argument index="1" name="shape" type="int" />
- <argument index="2" name="weight" type="float" />
+ <param index="0" name="instance" type="RID" />
+ <param index="1" name="shape" type="int" />
+ <param index="2" name="weight" type="float" />
<description>
Sets the weight for a given blend shape associated with this instance.
</description>
</method>
<method name="instance_set_custom_aabb">
<return type="void" />
- <argument index="0" name="instance" type="RID" />
- <argument index="1" name="aabb" type="AABB" />
+ <param index="0" name="instance" type="RID" />
+ <param index="1" name="aabb" type="AABB" />
<description>
Sets a custom AABB to use when culling objects from the view frustum. Equivalent to [method GeometryInstance3D.set_custom_aabb].
</description>
</method>
<method name="instance_set_extra_visibility_margin">
<return type="void" />
- <argument index="0" name="instance" type="RID" />
- <argument index="1" name="margin" type="float" />
+ <param index="0" name="instance" type="RID" />
+ <param index="1" name="margin" type="float" />
<description>
Sets a margin to increase the size of the AABB when culling objects from the view frustum. This allows you to avoid culling objects that fall outside the view frustum. Equivalent to [member GeometryInstance3D.extra_cull_margin].
</description>
</method>
<method name="instance_set_ignore_culling">
<return type="void" />
- <argument index="0" name="instance" type="RID" />
- <argument index="1" name="enabled" type="bool" />
+ <param index="0" name="instance" type="RID" />
+ <param index="1" name="enabled" type="bool" />
<description>
</description>
</method>
<method name="instance_set_layer_mask">
<return type="void" />
- <argument index="0" name="instance" type="RID" />
- <argument index="1" name="mask" type="int" />
+ <param index="0" name="instance" type="RID" />
+ <param index="1" name="mask" type="int" />
<description>
Sets the render layers that this instance will be drawn to. Equivalent to [member VisualInstance3D.layers].
</description>
</method>
<method name="instance_set_scenario">
<return type="void" />
- <argument index="0" name="instance" type="RID" />
- <argument index="1" name="scenario" type="RID" />
+ <param index="0" name="instance" type="RID" />
+ <param index="1" name="scenario" type="RID" />
<description>
Sets the scenario that the instance is in. The scenario is the 3D world that the objects will be displayed in.
</description>
</method>
<method name="instance_set_surface_override_material">
<return type="void" />
- <argument index="0" name="instance" type="RID" />
- <argument index="1" name="surface" type="int" />
- <argument index="2" name="material" type="RID" />
+ <param index="0" name="instance" type="RID" />
+ <param index="1" name="surface" type="int" />
+ <param index="2" name="material" type="RID" />
<description>
Sets the override material of a specific surface. Equivalent to [method MeshInstance3D.set_surface_override_material].
</description>
</method>
<method name="instance_set_transform">
<return type="void" />
- <argument index="0" name="instance" type="RID" />
- <argument index="1" name="transform" type="Transform3D" />
+ <param index="0" name="instance" type="RID" />
+ <param index="1" name="transform" type="Transform3D" />
<description>
Sets the world space transform of the instance. Equivalent to [member Node3D.transform].
</description>
</method>
<method name="instance_set_visibility_parent">
<return type="void" />
- <argument index="0" name="instance" type="RID" />
- <argument index="1" name="parent" type="RID" />
+ <param index="0" name="instance" type="RID" />
+ <param index="1" name="parent" type="RID" />
<description>
Sets the visibility parent for the given instance. Equivalent to [member Node3D.visibility_parent].
</description>
</method>
<method name="instance_set_visible">
<return type="void" />
- <argument index="0" name="instance" type="RID" />
- <argument index="1" name="visible" type="bool" />
+ <param index="0" name="instance" type="RID" />
+ <param index="1" name="visible" type="bool" />
<description>
Sets whether an instance is drawn or not. Equivalent to [member Node3D.visible].
</description>
</method>
<method name="instances_cull_aabb" qualifiers="const">
- <return type="Array" />
- <argument index="0" name="aabb" type="AABB" />
- <argument index="1" name="scenario" type="RID" />
+ <return type="PackedInt64Array" />
+ <param index="0" name="aabb" type="AABB" />
+ <param index="1" name="scenario" type="RID" />
<description>
Returns an array of object IDs intersecting with the provided AABB. 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.
[b]Warning:[/b] This function is primarily intended for editor usage. For in-game use cases, prefer physics collision.
</description>
</method>
<method name="instances_cull_convex" qualifiers="const">
- <return type="Array" />
- <argument index="0" name="convex" type="Array" />
- <argument index="1" name="scenario" type="RID" />
+ <return type="PackedInt64Array" />
+ <param index="0" name="convex" type="Array" />
+ <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.
[b]Warning:[/b] This function is primarily intended for editor usage. For in-game use cases, prefer physics collision.
</description>
</method>
<method name="instances_cull_ray" qualifiers="const">
- <return type="Array" />
- <argument index="0" name="from" type="Vector3" />
- <argument index="1" name="to" type="Vector3" />
- <argument index="2" name="scenario" type="RID" />
+ <return type="PackedInt64Array" />
+ <param index="0" name="from" type="Vector3" />
+ <param index="1" name="to" type="Vector3" />
+ <param index="2" name="scenario" type="RID" />
<description>
Returns an array of object IDs intersecting with the provided 3D ray. 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.
[b]Warning:[/b] This function is primarily intended for editor usage. For in-game use cases, prefer physics collision.
@@ -1603,120 +1610,120 @@
</method>
<method name="light_directional_set_blend_splits">
<return type="void" />
- <argument index="0" name="light" type="RID" />
- <argument index="1" name="enable" type="bool" />
+ <param index="0" name="light" type="RID" />
+ <param index="1" name="enable" type="bool" />
<description>
If [code]true[/code], this directional light will blend between shadow map splits resulting in a smoother transition between them. Equivalent to [member DirectionalLight3D.directional_shadow_blend_splits].
</description>
</method>
<method name="light_directional_set_shadow_mode">
<return type="void" />
- <argument index="0" name="light" type="RID" />
- <argument index="1" name="mode" type="int" enum="RenderingServer.LightDirectionalShadowMode" />
+ <param index="0" name="light" type="RID" />
+ <param index="1" name="mode" type="int" enum="RenderingServer.LightDirectionalShadowMode" />
<description>
Sets the shadow mode for this directional light. Equivalent to [member DirectionalLight3D.directional_shadow_mode]. See [enum LightDirectionalShadowMode] for options.
</description>
</method>
<method name="light_directional_set_sky_mode">
<return type="void" />
- <argument index="0" name="light" type="RID" />
- <argument index="1" name="mode" type="int" enum="RenderingServer.LightDirectionalSkyMode" />
+ <param index="0" name="light" type="RID" />
+ <param index="1" name="mode" type="int" enum="RenderingServer.LightDirectionalSkyMode" />
<description>
If [code]true[/code], this light will not be used for anything except sky shaders. Use this for lights that impact your sky shader that you may want to hide from affecting the rest of the scene. For example, you may want to enable this when the sun in your sky shader falls below the horizon.
</description>
</method>
<method name="light_omni_set_shadow_mode">
<return type="void" />
- <argument index="0" name="light" type="RID" />
- <argument index="1" name="mode" type="int" enum="RenderingServer.LightOmniShadowMode" />
+ <param index="0" name="light" type="RID" />
+ <param index="1" name="mode" type="int" enum="RenderingServer.LightOmniShadowMode" />
<description>
Sets whether to use a dual paraboloid or a cubemap for the shadow map. Dual paraboloid is faster but may suffer from artifacts. Equivalent to [member OmniLight3D.omni_shadow_mode].
</description>
</method>
<method name="light_projectors_set_filter">
<return type="void" />
- <argument index="0" name="filter" type="int" enum="RenderingServer.LightProjectorFilter" />
+ <param index="0" name="filter" type="int" enum="RenderingServer.LightProjectorFilter" />
<description>
</description>
</method>
<method name="light_set_bake_mode">
<return type="void" />
- <argument index="0" name="light" type="RID" />
- <argument index="1" name="bake_mode" type="int" enum="RenderingServer.LightBakeMode" />
+ <param index="0" name="light" type="RID" />
+ <param index="1" name="bake_mode" type="int" enum="RenderingServer.LightBakeMode" />
<description>
</description>
</method>
<method name="light_set_color">
<return type="void" />
- <argument index="0" name="light" type="RID" />
- <argument index="1" name="color" type="Color" />
+ <param index="0" name="light" type="RID" />
+ <param index="1" name="color" type="Color" />
<description>
Sets the color of the light. Equivalent to [member Light3D.light_color].
</description>
</method>
<method name="light_set_cull_mask">
<return type="void" />
- <argument index="0" name="light" type="RID" />
- <argument index="1" name="mask" type="int" />
+ <param index="0" name="light" type="RID" />
+ <param index="1" name="mask" type="int" />
<description>
Sets the cull mask for this Light3D. Lights only affect objects in the selected layers. Equivalent to [member Light3D.light_cull_mask].
</description>
</method>
<method name="light_set_distance_fade">
<return type="void" />
- <argument index="0" name="decal" type="RID" />
- <argument index="1" name="enabled" type="bool" />
- <argument index="2" name="begin" type="float" />
- <argument index="3" name="shadow" type="float" />
- <argument index="4" name="length" type="float" />
+ <param index="0" name="decal" type="RID" />
+ <param index="1" name="enabled" type="bool" />
+ <param index="2" name="begin" type="float" />
+ <param index="3" name="shadow" type="float" />
+ <param index="4" name="length" type="float" />
<description>
Sets the distance fade for this Light3D. This acts as a form of level of detail (LOD) and can be used to improve performance. Equivalent to [member Light3D.distance_fade_enabled], [member Light3D.distance_fade_begin], [member Light3D.distance_fade_shadow], and [member Light3D.distance_fade_length].
</description>
</method>
<method name="light_set_max_sdfgi_cascade">
<return type="void" />
- <argument index="0" name="light" type="RID" />
- <argument index="1" name="cascade" type="int" />
+ <param index="0" name="light" type="RID" />
+ <param index="1" name="cascade" type="int" />
<description>
</description>
</method>
<method name="light_set_negative">
<return type="void" />
- <argument index="0" name="light" type="RID" />
- <argument index="1" name="enable" type="bool" />
+ <param index="0" name="light" type="RID" />
+ <param index="1" name="enable" type="bool" />
<description>
If [code]true[/code], light will subtract light instead of adding light. Equivalent to [member Light3D.light_negative].
</description>
</method>
<method name="light_set_param">
<return type="void" />
- <argument index="0" name="light" type="RID" />
- <argument index="1" name="param" type="int" enum="RenderingServer.LightParam" />
- <argument index="2" name="value" type="float" />
+ <param index="0" name="light" type="RID" />
+ <param index="1" name="param" type="int" enum="RenderingServer.LightParam" />
+ <param index="2" name="value" type="float" />
<description>
Sets the specified light parameter. See [enum LightParam] for options. Equivalent to [method Light3D.set_param].
</description>
</method>
<method name="light_set_projector">
<return type="void" />
- <argument index="0" name="light" type="RID" />
- <argument index="1" name="texture" type="RID" />
+ <param index="0" name="light" type="RID" />
+ <param index="1" name="texture" type="RID" />
<description>
Not implemented in Godot 3.x.
</description>
</method>
<method name="light_set_reverse_cull_face_mode">
<return type="void" />
- <argument index="0" name="light" type="RID" />
- <argument index="1" name="enabled" type="bool" />
+ <param index="0" name="light" type="RID" />
+ <param index="1" name="enabled" type="bool" />
<description>
If [code]true[/code], reverses the backface culling of the mesh. This can be useful when you have a flat mesh that has a light behind it. If you need to cast a shadow on both sides of the mesh, set the mesh to use double-sided shadows with [method instance_geometry_set_cast_shadows_setting]. Equivalent to [member Light3D.shadow_reverse_cull_face].
</description>
</method>
<method name="light_set_shadow">
<return type="void" />
- <argument index="0" name="light" type="RID" />
- <argument index="1" name="enabled" type="bool" />
+ <param index="0" name="light" type="RID" />
+ <param index="1" name="enabled" type="bool" />
<description>
If [code]true[/code], light will cast shadows. Equivalent to [member Light3D.shadow_enabled].
</description>
@@ -1728,73 +1735,73 @@
</method>
<method name="lightmap_get_probe_capture_bsp_tree" qualifiers="const">
<return type="PackedInt32Array" />
- <argument index="0" name="lightmap" type="RID" />
+ <param index="0" name="lightmap" type="RID" />
<description>
</description>
</method>
<method name="lightmap_get_probe_capture_points" qualifiers="const">
<return type="PackedVector3Array" />
- <argument index="0" name="lightmap" type="RID" />
+ <param index="0" name="lightmap" type="RID" />
<description>
</description>
</method>
<method name="lightmap_get_probe_capture_sh" qualifiers="const">
<return type="PackedColorArray" />
- <argument index="0" name="lightmap" type="RID" />
+ <param index="0" name="lightmap" type="RID" />
<description>
</description>
</method>
<method name="lightmap_get_probe_capture_tetrahedra" qualifiers="const">
<return type="PackedInt32Array" />
- <argument index="0" name="lightmap" type="RID" />
+ <param index="0" name="lightmap" type="RID" />
<description>
</description>
</method>
<method name="lightmap_set_probe_bounds">
<return type="void" />
- <argument index="0" name="lightmap" type="RID" />
- <argument index="1" name="bounds" type="AABB" />
+ <param index="0" name="lightmap" type="RID" />
+ <param index="1" name="bounds" type="AABB" />
<description>
</description>
</method>
<method name="lightmap_set_probe_capture_data">
<return type="void" />
- <argument index="0" name="lightmap" type="RID" />
- <argument index="1" name="points" type="PackedVector3Array" />
- <argument index="2" name="point_sh" type="PackedColorArray" />
- <argument index="3" name="tetrahedra" type="PackedInt32Array" />
- <argument index="4" name="bsp_tree" type="PackedInt32Array" />
+ <param index="0" name="lightmap" type="RID" />
+ <param index="1" name="points" type="PackedVector3Array" />
+ <param index="2" name="point_sh" type="PackedColorArray" />
+ <param index="3" name="tetrahedra" type="PackedInt32Array" />
+ <param index="4" name="bsp_tree" type="PackedInt32Array" />
<description>
</description>
</method>
<method name="lightmap_set_probe_capture_update_speed">
<return type="void" />
- <argument index="0" name="speed" type="float" />
+ <param index="0" name="speed" type="float" />
<description>
</description>
</method>
<method name="lightmap_set_probe_interior">
<return type="void" />
- <argument index="0" name="lightmap" type="RID" />
- <argument index="1" name="interior" type="bool" />
+ <param index="0" name="lightmap" type="RID" />
+ <param index="1" name="interior" type="bool" />
<description>
</description>
</method>
<method name="lightmap_set_textures">
<return type="void" />
- <argument index="0" name="lightmap" type="RID" />
- <argument index="1" name="light" type="RID" />
- <argument index="2" name="uses_sh" type="bool" />
+ <param index="0" name="lightmap" type="RID" />
+ <param index="1" name="light" type="RID" />
+ <param index="2" name="uses_sh" type="bool" />
<description>
</description>
</method>
<method name="make_sphere_mesh">
<return type="RID" />
- <argument index="0" name="latitudes" type="int" />
- <argument index="1" name="longitudes" type="int" />
- <argument index="2" name="radius" type="float" />
+ <param index="0" name="latitudes" type="int" />
+ <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">
@@ -1806,66 +1813,66 @@
</method>
<method name="material_get_param" qualifiers="const">
<return type="Variant" />
- <argument index="0" name="material" type="RID" />
- <argument index="1" name="parameter" type="StringName" />
+ <param index="0" name="material" type="RID" />
+ <param index="1" name="parameter" type="StringName" />
<description>
Returns the value of a certain material's parameter.
</description>
</method>
<method name="material_set_next_pass">
<return type="void" />
- <argument index="0" name="material" type="RID" />
- <argument index="1" name="next_material" type="RID" />
+ <param index="0" name="material" type="RID" />
+ <param index="1" name="next_material" type="RID" />
<description>
Sets an object's next material.
</description>
</method>
<method name="material_set_param">
<return type="void" />
- <argument index="0" name="material" type="RID" />
- <argument index="1" name="parameter" type="StringName" />
- <argument index="2" name="value" type="Variant" />
+ <param index="0" name="material" type="RID" />
+ <param index="1" name="parameter" type="StringName" />
+ <param index="2" name="value" type="Variant" />
<description>
Sets a material's parameter.
</description>
</method>
<method name="material_set_render_priority">
<return type="void" />
- <argument index="0" name="material" type="RID" />
- <argument index="1" name="priority" type="int" />
+ <param index="0" name="material" type="RID" />
+ <param index="1" name="priority" type="int" />
<description>
Sets a material's render priority.
</description>
</method>
<method name="material_set_shader">
<return type="void" />
- <argument index="0" name="shader_material" type="RID" />
- <argument index="1" name="shader" type="RID" />
+ <param index="0" name="shader_material" type="RID" />
+ <param index="1" name="shader" type="RID" />
<description>
Sets a shader material's shader.
</description>
</method>
<method name="mesh_add_surface">
<return type="void" />
- <argument index="0" name="mesh" type="RID" />
- <argument index="1" name="surface" type="Dictionary" />
+ <param index="0" name="mesh" type="RID" />
+ <param index="1" name="surface" type="Dictionary" />
<description>
</description>
</method>
<method name="mesh_add_surface_from_arrays">
<return type="void" />
- <argument index="0" name="mesh" type="RID" />
- <argument index="1" name="primitive" type="int" enum="RenderingServer.PrimitiveType" />
- <argument index="2" name="arrays" type="Array" />
- <argument index="3" name="blend_shapes" type="Array" default="[]" />
- <argument index="4" name="lods" type="Dictionary" default="{}" />
- <argument index="5" name="compress_format" type="int" default="0" />
+ <param index="0" name="mesh" type="RID" />
+ <param index="1" name="primitive" type="int" enum="RenderingServer.PrimitiveType" />
+ <param index="2" name="arrays" type="Array" />
+ <param index="3" name="blend_shapes" type="Array" default="[]" />
+ <param index="4" name="lods" type="Dictionary" default="{}" />
+ <param index="5" name="compress_format" type="int" default="0" />
<description>
</description>
</method>
<method name="mesh_clear">
<return type="void" />
- <argument index="0" name="mesh" type="RID" />
+ <param index="0" name="mesh" type="RID" />
<description>
Removes all surfaces from a mesh.
</description>
@@ -1880,165 +1887,165 @@
</method>
<method name="mesh_create_from_surfaces">
<return type="RID" />
- <argument index="0" name="surfaces" type="Dictionary[]" />
- <argument index="1" name="blend_shape_count" type="int" default="0" />
+ <param index="0" name="surfaces" type="Dictionary[]" />
+ <param index="1" name="blend_shape_count" type="int" default="0" />
<description>
</description>
</method>
<method name="mesh_get_blend_shape_count" qualifiers="const">
<return type="int" />
- <argument index="0" name="mesh" type="RID" />
+ <param index="0" name="mesh" type="RID" />
<description>
Returns a mesh's blend shape count.
</description>
</method>
<method name="mesh_get_blend_shape_mode" qualifiers="const">
<return type="int" enum="RenderingServer.BlendShapeMode" />
- <argument index="0" name="mesh" type="RID" />
+ <param index="0" name="mesh" type="RID" />
<description>
Returns a mesh's blend shape mode.
</description>
</method>
<method name="mesh_get_custom_aabb" qualifiers="const">
<return type="AABB" />
- <argument index="0" name="mesh" type="RID" />
+ <param index="0" name="mesh" type="RID" />
<description>
Returns a mesh's custom aabb.
</description>
</method>
<method name="mesh_get_surface">
<return type="Dictionary" />
- <argument index="0" name="mesh" type="RID" />
- <argument index="1" name="surface" type="int" />
+ <param index="0" name="mesh" type="RID" />
+ <param index="1" name="surface" type="int" />
<description>
</description>
</method>
<method name="mesh_get_surface_count" qualifiers="const">
<return type="int" />
- <argument index="0" name="mesh" type="RID" />
+ <param index="0" name="mesh" type="RID" />
<description>
Returns a mesh's number of surfaces.
</description>
</method>
<method name="mesh_set_blend_shape_mode">
<return type="void" />
- <argument index="0" name="mesh" type="RID" />
- <argument index="1" name="mode" type="int" enum="RenderingServer.BlendShapeMode" />
+ <param index="0" name="mesh" type="RID" />
+ <param index="1" name="mode" type="int" enum="RenderingServer.BlendShapeMode" />
<description>
Sets a mesh's blend shape mode.
</description>
</method>
<method name="mesh_set_custom_aabb">
<return type="void" />
- <argument index="0" name="mesh" type="RID" />
- <argument index="1" name="aabb" type="AABB" />
+ <param index="0" name="mesh" type="RID" />
+ <param index="1" name="aabb" type="AABB" />
<description>
Sets a mesh's custom aabb.
</description>
</method>
<method name="mesh_set_shadow_mesh">
<return type="void" />
- <argument index="0" name="mesh" type="RID" />
- <argument index="1" name="shadow_mesh" type="RID" />
+ <param index="0" name="mesh" type="RID" />
+ <param index="1" name="shadow_mesh" type="RID" />
<description>
</description>
</method>
<method name="mesh_surface_get_arrays" qualifiers="const">
<return type="Array" />
- <argument index="0" name="mesh" type="RID" />
- <argument index="1" name="surface" type="int" />
+ <param index="0" name="mesh" type="RID" />
+ <param index="1" name="surface" type="int" />
<description>
Returns a mesh's surface's buffer arrays.
</description>
</method>
<method name="mesh_surface_get_blend_shape_arrays" qualifiers="const">
- <return type="Array" />
- <argument index="0" name="mesh" type="RID" />
- <argument index="1" name="surface" type="int" />
+ <return type="Array[]" />
+ <param index="0" name="mesh" type="RID" />
+ <param index="1" name="surface" type="int" />
<description>
Returns a mesh's surface's arrays for blend shapes.
</description>
</method>
<method name="mesh_surface_get_format_attribute_stride" qualifiers="const">
<return type="int" />
- <argument index="0" name="format" type="int" />
- <argument index="1" name="vertex_count" type="int" />
+ <param index="0" name="format" type="int" />
+ <param index="1" name="vertex_count" type="int" />
<description>
</description>
</method>
<method name="mesh_surface_get_format_offset" qualifiers="const">
<return type="int" />
- <argument index="0" name="format" type="int" />
- <argument index="1" name="vertex_count" type="int" />
- <argument index="2" name="array_index" type="int" />
+ <param index="0" name="format" type="int" />
+ <param index="1" name="vertex_count" type="int" />
+ <param index="2" name="array_index" type="int" />
<description>
</description>
</method>
<method name="mesh_surface_get_format_skin_stride" qualifiers="const">
<return type="int" />
- <argument index="0" name="format" type="int" />
- <argument index="1" name="vertex_count" type="int" />
+ <param index="0" name="format" type="int" />
+ <param index="1" name="vertex_count" type="int" />
<description>
</description>
</method>
<method name="mesh_surface_get_format_vertex_stride" qualifiers="const">
<return type="int" />
- <argument index="0" name="format" type="int" />
- <argument index="1" name="vertex_count" type="int" />
+ <param index="0" name="format" type="int" />
+ <param index="1" name="vertex_count" type="int" />
<description>
</description>
</method>
<method name="mesh_surface_get_material" qualifiers="const">
<return type="RID" />
- <argument index="0" name="mesh" type="RID" />
- <argument index="1" name="surface" type="int" />
+ <param index="0" name="mesh" type="RID" />
+ <param index="1" name="surface" type="int" />
<description>
Returns a mesh's surface's material.
</description>
</method>
<method name="mesh_surface_set_material">
<return type="void" />
- <argument index="0" name="mesh" type="RID" />
- <argument index="1" name="surface" type="int" />
- <argument index="2" name="material" type="RID" />
+ <param index="0" name="mesh" type="RID" />
+ <param index="1" name="surface" type="int" />
+ <param index="2" name="material" type="RID" />
<description>
Sets a mesh's surface's material.
</description>
</method>
<method name="mesh_surface_update_attribute_region">
<return type="void" />
- <argument index="0" name="mesh" type="RID" />
- <argument index="1" name="surface" type="int" />
- <argument index="2" name="offset" type="int" />
- <argument index="3" name="data" type="PackedByteArray" />
+ <param index="0" name="mesh" type="RID" />
+ <param index="1" name="surface" type="int" />
+ <param index="2" name="offset" type="int" />
+ <param index="3" name="data" type="PackedByteArray" />
<description>
</description>
</method>
<method name="mesh_surface_update_skin_region">
<return type="void" />
- <argument index="0" name="mesh" type="RID" />
- <argument index="1" name="surface" type="int" />
- <argument index="2" name="offset" type="int" />
- <argument index="3" name="data" type="PackedByteArray" />
+ <param index="0" name="mesh" type="RID" />
+ <param index="1" name="surface" type="int" />
+ <param index="2" name="offset" type="int" />
+ <param index="3" name="data" type="PackedByteArray" />
<description>
</description>
</method>
<method name="mesh_surface_update_vertex_region">
<return type="void" />
- <argument index="0" name="mesh" type="RID" />
- <argument index="1" name="surface" type="int" />
- <argument index="2" name="offset" type="int" />
- <argument index="3" name="data" type="PackedByteArray" />
+ <param index="0" name="mesh" type="RID" />
+ <param index="1" name="surface" type="int" />
+ <param index="2" name="offset" type="int" />
+ <param index="3" name="data" type="PackedByteArray" />
<description>
</description>
</method>
<method name="multimesh_allocate_data">
<return type="void" />
- <argument index="0" name="multimesh" type="RID" />
- <argument index="1" name="instances" type="int" />
- <argument index="2" name="transform_format" type="int" enum="RenderingServer.MultimeshTransformFormat" />
- <argument index="3" name="color_format" type="bool" default="false" />
- <argument index="4" name="custom_data_format" type="bool" default="false" />
+ <param index="0" name="multimesh" type="RID" />
+ <param index="1" name="instances" type="int" />
+ <param index="2" name="transform_format" type="int" enum="RenderingServer.MultimeshTransformFormat" />
+ <param index="3" name="color_format" type="bool" default="false" />
+ <param index="4" name="custom_data_format" type="bool" default="false" />
<description>
</description>
</method>
@@ -2052,125 +2059,125 @@
</method>
<method name="multimesh_get_aabb" qualifiers="const">
<return type="AABB" />
- <argument index="0" name="multimesh" type="RID" />
+ <param index="0" name="multimesh" type="RID" />
<description>
Calculates and returns the axis-aligned bounding box that encloses all instances within the multimesh.
</description>
</method>
<method name="multimesh_get_buffer" qualifiers="const">
<return type="PackedFloat32Array" />
- <argument index="0" name="multimesh" type="RID" />
+ <param index="0" name="multimesh" type="RID" />
<description>
</description>
</method>
<method name="multimesh_get_instance_count" qualifiers="const">
<return type="int" />
- <argument index="0" name="multimesh" type="RID" />
+ <param index="0" name="multimesh" type="RID" />
<description>
Returns the number of instances allocated for this multimesh.
</description>
</method>
<method name="multimesh_get_mesh" qualifiers="const">
<return type="RID" />
- <argument index="0" name="multimesh" type="RID" />
+ <param index="0" name="multimesh" type="RID" />
<description>
Returns the RID of the mesh that will be used in drawing this multimesh.
</description>
</method>
<method name="multimesh_get_visible_instances" qualifiers="const">
<return type="int" />
- <argument index="0" name="multimesh" type="RID" />
+ <param index="0" name="multimesh" type="RID" />
<description>
Returns the number of visible instances for this multimesh.
</description>
</method>
<method name="multimesh_instance_get_color" qualifiers="const">
<return type="Color" />
- <argument index="0" name="multimesh" type="RID" />
- <argument index="1" name="index" type="int" />
+ <param index="0" name="multimesh" type="RID" />
+ <param index="1" name="index" type="int" />
<description>
Returns the color by which the specified instance will be modulated.
</description>
</method>
<method name="multimesh_instance_get_custom_data" qualifiers="const">
<return type="Color" />
- <argument index="0" name="multimesh" type="RID" />
- <argument index="1" name="index" type="int" />
+ <param index="0" name="multimesh" type="RID" />
+ <param index="1" name="index" type="int" />
<description>
Returns the custom data associated with the specified instance.
</description>
</method>
<method name="multimesh_instance_get_transform" qualifiers="const">
<return type="Transform3D" />
- <argument index="0" name="multimesh" type="RID" />
- <argument index="1" name="index" type="int" />
+ <param index="0" name="multimesh" type="RID" />
+ <param index="1" name="index" type="int" />
<description>
Returns the [Transform3D] of the specified instance.
</description>
</method>
<method name="multimesh_instance_get_transform_2d" qualifiers="const">
<return type="Transform2D" />
- <argument index="0" name="multimesh" type="RID" />
- <argument index="1" name="index" type="int" />
+ <param index="0" name="multimesh" type="RID" />
+ <param index="1" name="index" type="int" />
<description>
Returns the [Transform2D] of the specified instance. For use when the multimesh is set to use 2D transforms.
</description>
</method>
<method name="multimesh_instance_set_color">
<return type="void" />
- <argument index="0" name="multimesh" type="RID" />
- <argument index="1" name="index" type="int" />
- <argument index="2" name="color" type="Color" />
+ <param index="0" name="multimesh" type="RID" />
+ <param index="1" name="index" type="int" />
+ <param index="2" name="color" type="Color" />
<description>
Sets the color by which this instance will be modulated. Equivalent to [method MultiMesh.set_instance_color].
</description>
</method>
<method name="multimesh_instance_set_custom_data">
<return type="void" />
- <argument index="0" name="multimesh" type="RID" />
- <argument index="1" name="index" type="int" />
- <argument index="2" name="custom_data" type="Color" />
+ <param index="0" name="multimesh" type="RID" />
+ <param index="1" name="index" type="int" />
+ <param index="2" name="custom_data" type="Color" />
<description>
Sets the custom data for this instance. Custom data is passed as a [Color], but is interpreted as a [code]vec4[/code] in the shader. Equivalent to [method MultiMesh.set_instance_custom_data].
</description>
</method>
<method name="multimesh_instance_set_transform">
<return type="void" />
- <argument index="0" name="multimesh" type="RID" />
- <argument index="1" name="index" type="int" />
- <argument index="2" name="transform" type="Transform3D" />
+ <param index="0" name="multimesh" type="RID" />
+ <param index="1" name="index" type="int" />
+ <param index="2" name="transform" type="Transform3D" />
<description>
Sets the [Transform3D] for this instance. Equivalent to [method MultiMesh.set_instance_transform].
</description>
</method>
<method name="multimesh_instance_set_transform_2d">
<return type="void" />
- <argument index="0" name="multimesh" type="RID" />
- <argument index="1" name="index" type="int" />
- <argument index="2" name="transform" type="Transform2D" />
+ <param index="0" name="multimesh" type="RID" />
+ <param index="1" name="index" type="int" />
+ <param index="2" name="transform" type="Transform2D" />
<description>
Sets the [Transform2D] for this instance. For use when multimesh is used in 2D. Equivalent to [method MultiMesh.set_instance_transform_2d].
</description>
</method>
<method name="multimesh_set_buffer">
<return type="void" />
- <argument index="0" name="multimesh" type="RID" />
- <argument index="1" name="buffer" type="PackedFloat32Array" />
+ <param index="0" name="multimesh" type="RID" />
+ <param index="1" name="buffer" type="PackedFloat32Array" />
<description>
</description>
</method>
<method name="multimesh_set_mesh">
<return type="void" />
- <argument index="0" name="multimesh" type="RID" />
- <argument index="1" name="mesh" type="RID" />
+ <param index="0" name="multimesh" type="RID" />
+ <param index="1" name="mesh" type="RID" />
<description>
Sets the mesh to be drawn by the multimesh. Equivalent to [member MultiMesh.mesh].
</description>
</method>
<method name="multimesh_set_visible_instances">
<return type="void" />
- <argument index="0" name="multimesh" type="RID" />
- <argument index="1" name="visible" type="int" />
+ <param index="0" name="multimesh" type="RID" />
+ <param index="1" name="visible" type="int" />
<description>
Sets the number of instances visible at a given time. If -1, all instances that have been allocated are drawn. Equivalent to [member MultiMesh.visible_instance_count].
</description>
@@ -2182,9 +2189,9 @@
</method>
<method name="occluder_set_mesh">
<return type="void" />
- <argument index="0" name="occluder" type="RID" />
- <argument index="1" name="vertices" type="PackedVector3Array" />
- <argument index="2" name="indices" type="PackedInt32Array" />
+ <param index="0" name="occluder" type="RID" />
+ <param index="1" name="vertices" type="PackedVector3Array" />
+ <param index="2" name="indices" type="PackedInt32Array" />
<description>
</description>
</method>
@@ -2203,70 +2210,70 @@
</method>
<method name="particles_collision_height_field_update">
<return type="void" />
- <argument index="0" name="particles_collision" type="RID" />
+ <param index="0" name="particles_collision" type="RID" />
<description>
</description>
</method>
<method name="particles_collision_set_attractor_attenuation">
<return type="void" />
- <argument index="0" name="particles_collision" type="RID" />
- <argument index="1" name="curve" type="float" />
+ <param index="0" name="particles_collision" type="RID" />
+ <param index="1" name="curve" type="float" />
<description>
</description>
</method>
<method name="particles_collision_set_attractor_directionality">
<return type="void" />
- <argument index="0" name="particles_collision" type="RID" />
- <argument index="1" name="amount" type="float" />
+ <param index="0" name="particles_collision" type="RID" />
+ <param index="1" name="amount" type="float" />
<description>
</description>
</method>
<method name="particles_collision_set_attractor_strength">
<return type="void" />
- <argument index="0" name="particles_collision" type="RID" />
- <argument index="1" name="setrngth" type="float" />
+ <param index="0" name="particles_collision" type="RID" />
+ <param index="1" name="setrngth" type="float" />
<description>
</description>
</method>
<method name="particles_collision_set_box_extents">
<return type="void" />
- <argument index="0" name="particles_collision" type="RID" />
- <argument index="1" name="extents" type="Vector3" />
+ <param index="0" name="particles_collision" type="RID" />
+ <param index="1" name="extents" type="Vector3" />
<description>
</description>
</method>
<method name="particles_collision_set_collision_type">
<return type="void" />
- <argument index="0" name="particles_collision" type="RID" />
- <argument index="1" name="type" type="int" enum="RenderingServer.ParticlesCollisionType" />
+ <param index="0" name="particles_collision" type="RID" />
+ <param index="1" name="type" type="int" enum="RenderingServer.ParticlesCollisionType" />
<description>
</description>
</method>
<method name="particles_collision_set_cull_mask">
<return type="void" />
- <argument index="0" name="particles_collision" type="RID" />
- <argument index="1" name="mask" type="int" />
+ <param index="0" name="particles_collision" type="RID" />
+ <param index="1" name="mask" type="int" />
<description>
</description>
</method>
<method name="particles_collision_set_field_texture">
<return type="void" />
- <argument index="0" name="particles_collision" type="RID" />
- <argument index="1" name="texture" type="RID" />
+ <param index="0" name="particles_collision" type="RID" />
+ <param index="1" name="texture" type="RID" />
<description>
</description>
</method>
<method name="particles_collision_set_height_field_resolution">
<return type="void" />
- <argument index="0" name="particles_collision" type="RID" />
- <argument index="1" name="resolution" type="int" enum="RenderingServer.ParticlesCollisionHeightfieldResolution" />
+ <param index="0" name="particles_collision" type="RID" />
+ <param index="1" name="resolution" type="int" enum="RenderingServer.ParticlesCollisionHeightfieldResolution" />
<description>
</description>
</method>
<method name="particles_collision_set_sphere_radius">
<return type="void" />
- <argument index="0" name="particles_collision" type="RID" />
- <argument index="1" name="radius" type="float" />
+ <param index="0" name="particles_collision" type="RID" />
+ <param index="1" name="radius" type="float" />
<description>
</description>
</method>
@@ -2280,180 +2287,180 @@
</method>
<method name="particles_emit">
<return type="void" />
- <argument index="0" name="particles" type="RID" />
- <argument index="1" name="transform" type="Transform3D" />
- <argument index="2" name="velocity" type="Vector3" />
- <argument index="3" name="color" type="Color" />
- <argument index="4" name="custom" type="Color" />
- <argument index="5" name="emit_flags" type="int" />
+ <param index="0" name="particles" type="RID" />
+ <param index="1" name="transform" type="Transform3D" />
+ <param index="2" name="velocity" type="Vector3" />
+ <param index="3" name="color" type="Color" />
+ <param index="4" name="custom" type="Color" />
+ <param index="5" name="emit_flags" type="int" />
<description>
</description>
</method>
<method name="particles_get_current_aabb">
<return type="AABB" />
- <argument index="0" name="particles" type="RID" />
+ <param index="0" name="particles" type="RID" />
<description>
Calculates and returns the axis-aligned bounding box that contains all the particles. Equivalent to [method GPUParticles3D.capture_aabb].
</description>
</method>
<method name="particles_get_emitting">
<return type="bool" />
- <argument index="0" name="particles" type="RID" />
+ <param index="0" name="particles" type="RID" />
<description>
Returns [code]true[/code] if particles are currently set to emitting.
</description>
</method>
<method name="particles_is_inactive">
<return type="bool" />
- <argument index="0" name="particles" type="RID" />
+ <param index="0" name="particles" type="RID" />
<description>
Returns [code]true[/code] if particles are not emitting and particles are set to inactive.
</description>
</method>
<method name="particles_request_process">
<return type="void" />
- <argument index="0" name="particles" type="RID" />
+ <param index="0" name="particles" type="RID" />
<description>
Add particle system to list of particle systems that need to be updated. Update will take place on the next frame, or on the next call to [method instances_cull_aabb], [method instances_cull_convex], or [method instances_cull_ray].
</description>
</method>
<method name="particles_restart">
<return type="void" />
- <argument index="0" name="particles" type="RID" />
+ <param index="0" name="particles" type="RID" />
<description>
Reset the particles on the next update. Equivalent to [method GPUParticles3D.restart].
</description>
</method>
<method name="particles_set_amount">
<return type="void" />
- <argument index="0" name="particles" type="RID" />
- <argument index="1" name="amount" type="int" />
+ <param index="0" name="particles" type="RID" />
+ <param index="1" name="amount" type="int" />
<description>
Sets the number of particles to be drawn and allocates the memory for them. Equivalent to [member GPUParticles3D.amount].
</description>
</method>
<method name="particles_set_collision_base_size">
<return type="void" />
- <argument index="0" name="particles" type="RID" />
- <argument index="1" name="size" type="float" />
+ <param index="0" name="particles" type="RID" />
+ <param index="1" name="size" type="float" />
<description>
</description>
</method>
<method name="particles_set_custom_aabb">
<return type="void" />
- <argument index="0" name="particles" type="RID" />
- <argument index="1" name="aabb" type="AABB" />
+ <param index="0" name="particles" type="RID" />
+ <param index="1" name="aabb" type="AABB" />
<description>
Sets a custom axis-aligned bounding box for the particle system. Equivalent to [member GPUParticles3D.visibility_aabb].
</description>
</method>
<method name="particles_set_draw_order">
<return type="void" />
- <argument index="0" name="particles" type="RID" />
- <argument index="1" name="order" type="int" enum="RenderingServer.ParticlesDrawOrder" />
+ <param index="0" name="particles" type="RID" />
+ <param index="1" name="order" type="int" enum="RenderingServer.ParticlesDrawOrder" />
<description>
Sets the draw order of the particles to one of the named enums from [enum ParticlesDrawOrder]. See [enum ParticlesDrawOrder] for options. Equivalent to [member GPUParticles3D.draw_order].
</description>
</method>
<method name="particles_set_draw_pass_mesh">
<return type="void" />
- <argument index="0" name="particles" type="RID" />
- <argument index="1" name="pass" type="int" />
- <argument index="2" name="mesh" type="RID" />
+ <param index="0" name="particles" type="RID" />
+ <param index="1" name="pass" type="int" />
+ <param index="2" name="mesh" type="RID" />
<description>
Sets the mesh to be used for the specified draw pass. Equivalent to [member GPUParticles3D.draw_pass_1], [member GPUParticles3D.draw_pass_2], [member GPUParticles3D.draw_pass_3], and [member GPUParticles3D.draw_pass_4].
</description>
</method>
<method name="particles_set_draw_passes">
<return type="void" />
- <argument index="0" name="particles" type="RID" />
- <argument index="1" name="count" type="int" />
+ <param index="0" name="particles" type="RID" />
+ <param index="1" name="count" type="int" />
<description>
Sets the number of draw passes to use. Equivalent to [member GPUParticles3D.draw_passes].
</description>
</method>
<method name="particles_set_emission_transform">
<return type="void" />
- <argument index="0" name="particles" type="RID" />
- <argument index="1" name="transform" type="Transform3D" />
+ <param index="0" name="particles" type="RID" />
+ <param index="1" name="transform" type="Transform3D" />
<description>
Sets the [Transform3D] that will be used by the particles when they first emit.
</description>
</method>
<method name="particles_set_emitting">
<return type="void" />
- <argument index="0" name="particles" type="RID" />
- <argument index="1" name="emitting" type="bool" />
+ <param index="0" name="particles" type="RID" />
+ <param index="1" name="emitting" type="bool" />
<description>
If [code]true[/code], particles will emit over time. Setting to false does not reset the particles, but only stops their emission. Equivalent to [member GPUParticles3D.emitting].
</description>
</method>
<method name="particles_set_explosiveness_ratio">
<return type="void" />
- <argument index="0" name="particles" type="RID" />
- <argument index="1" name="ratio" type="float" />
+ <param index="0" name="particles" type="RID" />
+ <param index="1" name="ratio" type="float" />
<description>
Sets the explosiveness ratio. Equivalent to [member GPUParticles3D.explosiveness].
</description>
</method>
<method name="particles_set_fixed_fps">
<return type="void" />
- <argument index="0" name="particles" type="RID" />
- <argument index="1" name="fps" type="int" />
+ <param index="0" name="particles" type="RID" />
+ <param index="1" name="fps" type="int" />
<description>
Sets the frame rate that the particle system rendering will be fixed to. Equivalent to [member GPUParticles3D.fixed_fps].
</description>
</method>
<method name="particles_set_fractional_delta">
<return type="void" />
- <argument index="0" name="particles" type="RID" />
- <argument index="1" name="enable" type="bool" />
+ <param index="0" name="particles" type="RID" />
+ <param index="1" name="enable" type="bool" />
<description>
If [code]true[/code], uses fractional delta which smooths the movement of the particles. Equivalent to [member GPUParticles3D.fract_delta].
</description>
</method>
<method name="particles_set_interpolate">
<return type="void" />
- <argument index="0" name="particles" type="RID" />
- <argument index="1" name="enable" type="bool" />
+ <param index="0" name="particles" type="RID" />
+ <param index="1" name="enable" type="bool" />
<description>
</description>
</method>
<method name="particles_set_lifetime">
<return type="void" />
- <argument index="0" name="particles" type="RID" />
- <argument index="1" name="lifetime" type="float" />
+ <param index="0" name="particles" type="RID" />
+ <param index="1" name="lifetime" type="float" />
<description>
Sets the lifetime of each particle in the system. Equivalent to [member GPUParticles3D.lifetime].
</description>
</method>
<method name="particles_set_mode">
<return type="void" />
- <argument index="0" name="particles" type="RID" />
- <argument index="1" name="mode" type="int" enum="RenderingServer.ParticlesMode" />
+ <param index="0" name="particles" type="RID" />
+ <param index="1" name="mode" type="int" enum="RenderingServer.ParticlesMode" />
<description>
</description>
</method>
<method name="particles_set_one_shot">
<return type="void" />
- <argument index="0" name="particles" type="RID" />
- <argument index="1" name="one_shot" type="bool" />
+ <param index="0" name="particles" type="RID" />
+ <param index="1" name="one_shot" type="bool" />
<description>
If [code]true[/code], particles will emit once and then stop. Equivalent to [member GPUParticles3D.one_shot].
</description>
</method>
<method name="particles_set_pre_process_time">
<return type="void" />
- <argument index="0" name="particles" type="RID" />
- <argument index="1" name="time" type="float" />
+ <param index="0" name="particles" type="RID" />
+ <param index="1" name="time" type="float" />
<description>
Sets the preprocess time for the particles' animation. This lets you delay starting an animation until after the particles have begun emitting. Equivalent to [member GPUParticles3D.preprocess].
</description>
</method>
<method name="particles_set_process_material">
<return type="void" />
- <argument index="0" name="particles" type="RID" />
- <argument index="1" name="material" type="RID" />
+ <param index="0" name="particles" type="RID" />
+ <param index="1" name="material" type="RID" />
<description>
Sets the material for processing the particles.
[b]Note:[/b] This is not the material used to draw the materials. Equivalent to [member GPUParticles3D.process_material].
@@ -2461,57 +2468,63 @@
</method>
<method name="particles_set_randomness_ratio">
<return type="void" />
- <argument index="0" name="particles" type="RID" />
- <argument index="1" name="ratio" type="float" />
+ <param index="0" name="particles" type="RID" />
+ <param index="1" name="ratio" type="float" />
<description>
Sets the emission randomness ratio. This randomizes the emission of particles within their phase. Equivalent to [member GPUParticles3D.randomness].
</description>
</method>
<method name="particles_set_speed_scale">
<return type="void" />
- <argument index="0" name="particles" type="RID" />
- <argument index="1" name="scale" type="float" />
+ <param index="0" name="particles" type="RID" />
+ <param index="1" name="scale" type="float" />
<description>
Sets the speed scale of the particle system. Equivalent to [member GPUParticles3D.speed_scale].
</description>
</method>
<method name="particles_set_subemitter">
<return type="void" />
- <argument index="0" name="particles" type="RID" />
- <argument index="1" name="subemitter_particles" type="RID" />
+ <param index="0" name="particles" type="RID" />
+ <param index="1" name="subemitter_particles" type="RID" />
<description>
</description>
</method>
<method name="particles_set_trail_bind_poses">
<return type="void" />
- <argument index="0" name="particles" type="RID" />
- <argument index="1" name="bind_poses" type="Transform3D[]" />
+ <param index="0" name="particles" type="RID" />
+ <param index="1" name="bind_poses" type="Transform3D[]" />
<description>
</description>
</method>
<method name="particles_set_trails">
<return type="void" />
- <argument index="0" name="particles" type="RID" />
- <argument index="1" name="enable" type="bool" />
- <argument index="2" name="length_sec" type="float" />
+ <param index="0" name="particles" type="RID" />
+ <param index="1" name="enable" type="bool" />
+ <param index="2" name="length_sec" type="float" />
<description>
</description>
</method>
<method name="particles_set_transform_align">
<return type="void" />
- <argument index="0" name="particles" type="RID" />
- <argument index="1" name="align" type="int" enum="RenderingServer.ParticlesTransformAlign" />
+ <param index="0" name="particles" type="RID" />
+ <param index="1" name="align" type="int" enum="RenderingServer.ParticlesTransformAlign" />
<description>
</description>
</method>
<method name="particles_set_use_local_coordinates">
<return type="void" />
- <argument index="0" name="particles" type="RID" />
- <argument index="1" name="enable" type="bool" />
+ <param index="0" name="particles" type="RID" />
+ <param index="1" name="enable" type="bool" />
<description>
If [code]true[/code], particles use local coordinates. If [code]false[/code] they use global coordinates. Equivalent to [member GPUParticles3D.local_coords].
</description>
</method>
+ <method name="positional_soft_shadow_filter_set_quality">
+ <return type="void" />
+ <param index="0" name="quality" type="int" enum="RenderingServer.ShadowQuality" />
+ <description>
+ </description>
+ </method>
<method name="reflection_probe_create">
<return type="RID" />
<description>
@@ -2522,114 +2535,114 @@
</method>
<method name="reflection_probe_set_ambient_color">
<return type="void" />
- <argument index="0" name="probe" type="RID" />
- <argument index="1" name="color" type="Color" />
+ <param index="0" name="probe" type="RID" />
+ <param index="1" name="color" type="Color" />
<description>
</description>
</method>
<method name="reflection_probe_set_ambient_energy">
<return type="void" />
- <argument index="0" name="probe" type="RID" />
- <argument index="1" name="energy" type="float" />
+ <param index="0" name="probe" type="RID" />
+ <param index="1" name="energy" type="float" />
<description>
</description>
</method>
<method name="reflection_probe_set_ambient_mode">
<return type="void" />
- <argument index="0" name="probe" type="RID" />
- <argument index="1" name="mode" type="int" enum="RenderingServer.ReflectionProbeAmbientMode" />
+ <param index="0" name="probe" type="RID" />
+ <param index="1" name="mode" type="int" enum="RenderingServer.ReflectionProbeAmbientMode" />
<description>
</description>
</method>
<method name="reflection_probe_set_as_interior">
<return type="void" />
- <argument index="0" name="probe" type="RID" />
- <argument index="1" name="enable" type="bool" />
+ <param index="0" name="probe" type="RID" />
+ <param index="1" name="enable" type="bool" />
<description>
If [code]true[/code], reflections will ignore sky contribution. Equivalent to [member ReflectionProbe.interior].
</description>
</method>
<method name="reflection_probe_set_cull_mask">
<return type="void" />
- <argument index="0" name="probe" type="RID" />
- <argument index="1" name="layers" type="int" />
+ <param index="0" name="probe" type="RID" />
+ <param index="1" name="layers" type="int" />
<description>
Sets the render cull mask for this reflection probe. Only instances with a matching cull mask will be rendered by this probe. Equivalent to [member ReflectionProbe.cull_mask].
</description>
</method>
<method name="reflection_probe_set_enable_box_projection">
<return type="void" />
- <argument index="0" name="probe" type="RID" />
- <argument index="1" name="enable" type="bool" />
+ <param index="0" name="probe" type="RID" />
+ <param index="1" name="enable" type="bool" />
<description>
If [code]true[/code], uses box projection. This can make reflections look more correct in certain situations. Equivalent to [member ReflectionProbe.box_projection].
</description>
</method>
<method name="reflection_probe_set_enable_shadows">
<return type="void" />
- <argument index="0" name="probe" type="RID" />
- <argument index="1" name="enable" type="bool" />
+ <param index="0" name="probe" type="RID" />
+ <param index="1" name="enable" type="bool" />
<description>
If [code]true[/code], computes shadows in the reflection probe. This makes the reflection much slower to compute. Equivalent to [member ReflectionProbe.enable_shadows].
</description>
</method>
<method name="reflection_probe_set_extents">
<return type="void" />
- <argument index="0" name="probe" type="RID" />
- <argument index="1" name="extents" type="Vector3" />
+ <param index="0" name="probe" type="RID" />
+ <param index="1" name="extents" type="Vector3" />
<description>
Sets the size of the area that the reflection probe will capture. Equivalent to [member ReflectionProbe.extents].
</description>
</method>
<method name="reflection_probe_set_intensity">
<return type="void" />
- <argument index="0" name="probe" type="RID" />
- <argument index="1" name="intensity" type="float" />
+ <param index="0" name="probe" type="RID" />
+ <param index="1" name="intensity" type="float" />
<description>
Sets the intensity of the reflection probe. Intensity modulates the strength of the reflection. Equivalent to [member ReflectionProbe.intensity].
</description>
</method>
<method name="reflection_probe_set_max_distance">
<return type="void" />
- <argument index="0" name="probe" type="RID" />
- <argument index="1" name="distance" type="float" />
+ <param index="0" name="probe" type="RID" />
+ <param index="1" name="distance" type="float" />
<description>
Sets the max distance away from the probe an object can be before it is culled. Equivalent to [member ReflectionProbe.max_distance].
</description>
</method>
<method name="reflection_probe_set_mesh_lod_threshold">
<return type="void" />
- <argument index="0" name="probe" type="RID" />
- <argument index="1" name="pixels" type="float" />
+ <param index="0" name="probe" type="RID" />
+ <param index="1" name="pixels" type="float" />
<description>
</description>
</method>
<method name="reflection_probe_set_origin_offset">
<return type="void" />
- <argument index="0" name="probe" type="RID" />
- <argument index="1" name="offset" type="Vector3" />
+ <param index="0" name="probe" type="RID" />
+ <param index="1" name="offset" type="Vector3" />
<description>
Sets the origin offset to be used when this reflection probe is in box project mode. Equivalent to [member ReflectionProbe.origin_offset].
</description>
</method>
<method name="reflection_probe_set_resolution">
<return type="void" />
- <argument index="0" name="probe" type="RID" />
- <argument index="1" name="resolution" type="int" />
+ <param index="0" name="probe" type="RID" />
+ <param index="1" name="resolution" type="int" />
<description>
</description>
</method>
<method name="reflection_probe_set_update_mode">
<return type="void" />
- <argument index="0" name="probe" type="RID" />
- <argument index="1" name="mode" type="int" enum="RenderingServer.ReflectionProbeUpdateMode" />
+ <param index="0" name="probe" type="RID" />
+ <param index="1" name="mode" type="int" enum="RenderingServer.ReflectionProbeUpdateMode" />
<description>
Sets how often the reflection probe updates. Can either be once or every frame. See [enum ReflectionProbeUpdateMode] for options.
</description>
</method>
<method name="request_frame_drawn_callback">
<return type="void" />
- <argument index="0" name="callable" type="Callable" />
+ <param index="0" name="callable" type="Callable" />
<description>
Schedules a callback to the given callable after a frame has been drawn.
</description>
@@ -2644,55 +2657,55 @@
</method>
<method name="scenario_set_camera_effects">
<return type="void" />
- <argument index="0" name="scenario" type="RID" />
- <argument index="1" name="effects" type="RID" />
+ <param index="0" name="scenario" type="RID" />
+ <param index="1" name="effects" type="RID" />
<description>
</description>
</method>
<method name="scenario_set_environment">
<return type="void" />
- <argument index="0" name="scenario" type="RID" />
- <argument index="1" name="environment" type="RID" />
+ <param index="0" name="scenario" type="RID" />
+ <param index="1" name="environment" type="RID" />
<description>
Sets the environment that will be used with this scenario.
</description>
</method>
<method name="scenario_set_fallback_environment">
<return type="void" />
- <argument index="0" name="scenario" type="RID" />
- <argument index="1" name="environment" type="RID" />
+ <param index="0" name="scenario" type="RID" />
+ <param index="1" name="environment" type="RID" />
<description>
Sets the fallback environment to be used by this scenario. The fallback environment is used if no environment is set. Internally, this is used by the editor to provide a default environment.
</description>
</method>
<method name="screen_space_roughness_limiter_set_active">
<return type="void" />
- <argument index="0" name="enable" type="bool" />
- <argument index="1" name="amount" type="float" />
- <argument index="2" name="limit" type="float" />
+ <param index="0" name="enable" type="bool" />
+ <param index="1" name="amount" type="float" />
+ <param index="2" name="limit" type="float" />
<description>
</description>
</method>
<method name="set_boot_image">
<return type="void" />
- <argument index="0" name="image" type="Image" />
- <argument index="1" name="color" type="Color" />
- <argument index="2" name="scale" type="bool" />
- <argument index="3" name="use_filter" type="bool" default="true" />
+ <param index="0" name="image" type="Image" />
+ <param index="1" name="color" type="Color" />
+ <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">
<return type="void" />
- <argument index="0" name="generate" type="bool" />
+ <param index="0" name="generate" type="bool" />
<description>
If [code]true[/code], the engine will generate wireframes for use with the wireframe debug mode.
</description>
</method>
<method name="set_default_clear_color">
<return type="void" />
- <argument index="0" name="color" type="Color" />
+ <param index="0" name="color" type="Color" />
<description>
Sets the default clear color which is used when a specific clear color has not been selected.
</description>
@@ -2706,90 +2719,98 @@
</method>
<method name="shader_get_code" qualifiers="const">
<return type="String" />
- <argument index="0" name="shader" type="RID" />
+ <param index="0" name="shader" type="RID" />
<description>
Returns a shader's code.
</description>
</method>
<method name="shader_get_default_texture_param" qualifiers="const">
<return type="RID" />
- <argument index="0" name="shader" type="RID" />
- <argument index="1" name="param" type="StringName" />
- <argument index="2" name="index" type="int" default="0" />
+ <param index="0" name="shader" type="RID" />
+ <param index="1" name="param" 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">
<return type="Variant" />
- <argument index="0" name="shader" type="RID" />
- <argument index="1" name="param" type="StringName" />
+ <param index="0" name="shader" type="RID" />
+ <param index="1" name="param" type="StringName" />
<description>
</description>
</method>
- <method name="shader_get_param_list" qualifiers="const">
+ <method name="shader_get_shader_uniform_list" qualifiers="const">
<return type="Dictionary[]" />
- <argument index="0" name="shader" type="RID" />
+ <param index="0" name="shader" type="RID" />
<description>
Returns the parameters of a shader.
</description>
</method>
+ <method name="shader_set_code">
+ <return type="void" />
+ <param index="0" name="shader" type="RID" />
+ <param index="1" name="code" type="String" />
+ <description>
+ </description>
+ </method>
<method name="shader_set_default_texture_param">
<return type="void" />
- <argument index="0" name="shader" type="RID" />
- <argument index="1" name="param" type="StringName" />
- <argument index="2" name="texture" type="RID" />
- <argument index="3" name="index" type="int" default="0" />
+ <param index="0" name="shader" type="RID" />
+ <param index="1" name="param" 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="shadows_quality_set">
+ <method name="shader_set_path_hint">
<return type="void" />
- <argument index="0" name="quality" type="int" enum="RenderingServer.ShadowQuality" />
+ <param index="0" name="shader" type="RID" />
+ <param index="1" name="path" type="String" />
<description>
</description>
</method>
<method name="skeleton_allocate_data">
<return type="void" />
- <argument index="0" name="skeleton" type="RID" />
- <argument index="1" name="bones" type="int" />
- <argument index="2" name="is_2d_skeleton" type="bool" default="false" />
+ <param index="0" name="skeleton" type="RID" />
+ <param index="1" name="bones" type="int" />
+ <param index="2" name="is_2d_skeleton" type="bool" default="false" />
<description>
</description>
</method>
<method name="skeleton_bone_get_transform" qualifiers="const">
<return type="Transform3D" />
- <argument index="0" name="skeleton" type="RID" />
- <argument index="1" name="bone" type="int" />
+ <param index="0" name="skeleton" type="RID" />
+ <param index="1" name="bone" type="int" />
<description>
Returns the [Transform3D] set for a specific bone of this skeleton.
</description>
</method>
<method name="skeleton_bone_get_transform_2d" qualifiers="const">
<return type="Transform2D" />
- <argument index="0" name="skeleton" type="RID" />
- <argument index="1" name="bone" type="int" />
+ <param index="0" name="skeleton" type="RID" />
+ <param index="1" name="bone" type="int" />
<description>
Returns the [Transform2D] set for a specific bone of this skeleton.
</description>
</method>
<method name="skeleton_bone_set_transform">
<return type="void" />
- <argument index="0" name="skeleton" type="RID" />
- <argument index="1" name="bone" type="int" />
- <argument index="2" name="transform" type="Transform3D" />
+ <param index="0" name="skeleton" type="RID" />
+ <param index="1" name="bone" type="int" />
+ <param index="2" name="transform" type="Transform3D" />
<description>
Sets the [Transform3D] for a specific bone of this skeleton.
</description>
</method>
<method name="skeleton_bone_set_transform_2d">
<return type="void" />
- <argument index="0" name="skeleton" type="RID" />
- <argument index="1" name="bone" type="int" />
- <argument index="2" name="transform" type="Transform2D" />
+ <param index="0" name="skeleton" type="RID" />
+ <param index="1" name="bone" type="int" />
+ <param index="2" name="transform" type="Transform2D" />
<description>
Sets the [Transform2D] for a specific bone of this skeleton.
</description>
@@ -2803,24 +2824,24 @@
</method>
<method name="skeleton_get_bone_count" qualifiers="const">
<return type="int" />
- <argument index="0" name="skeleton" type="RID" />
+ <param index="0" name="skeleton" type="RID" />
<description>
Returns the number of bones allocated for this skeleton.
</description>
</method>
<method name="skeleton_set_base_transform_2d">
<return type="void" />
- <argument index="0" name="skeleton" type="RID" />
- <argument index="1" name="base_transform" type="Transform2D" />
+ <param index="0" name="skeleton" type="RID" />
+ <param index="1" name="base_transform" type="Transform2D" />
<description>
</description>
</method>
<method name="sky_bake_panorama">
<return type="Image" />
- <argument index="0" name="sky" type="RID" />
- <argument index="1" name="energy" type="float" />
- <argument index="2" name="bake_irradiance" type="bool" />
- <argument index="3" name="size" type="Vector2i" />
+ <param index="0" name="sky" type="RID" />
+ <param index="1" name="energy" type="float" />
+ <param index="2" name="bake_irradiance" type="bool" />
+ <param index="3" name="size" type="Vector2i" />
<description>
</description>
</method>
@@ -2833,23 +2854,23 @@
</method>
<method name="sky_set_material">
<return type="void" />
- <argument index="0" name="sky" type="RID" />
- <argument index="1" name="material" type="RID" />
+ <param index="0" name="sky" type="RID" />
+ <param index="1" name="material" type="RID" />
<description>
Sets the material that the sky uses to render the background and reflection maps.
</description>
</method>
<method name="sky_set_mode">
<return type="void" />
- <argument index="0" name="sky" type="RID" />
- <argument index="1" name="mode" type="int" enum="RenderingServer.SkyMode" />
+ <param index="0" name="sky" type="RID" />
+ <param index="1" name="mode" type="int" enum="RenderingServer.SkyMode" />
<description>
</description>
</method>
<method name="sky_set_radiance_size">
<return type="void" />
- <argument index="0" name="sky" type="RID" />
- <argument index="1" name="radiance_size" type="int" />
+ <param index="0" name="sky" type="RID" />
+ <param index="1" name="radiance_size" type="int" />
<description>
</description>
</method>
@@ -2863,46 +2884,46 @@
</method>
<method name="sub_surface_scattering_set_quality">
<return type="void" />
- <argument index="0" name="quality" type="int" enum="RenderingServer.SubSurfaceScatteringQuality" />
+ <param index="0" name="quality" type="int" enum="RenderingServer.SubSurfaceScatteringQuality" />
<description>
</description>
</method>
<method name="sub_surface_scattering_set_scale">
<return type="void" />
- <argument index="0" name="scale" type="float" />
- <argument index="1" name="depth_scale" type="float" />
+ <param index="0" name="scale" type="float" />
+ <param index="1" name="depth_scale" type="float" />
<description>
</description>
</method>
<method name="texture_2d_create">
<return type="RID" />
- <argument index="0" name="image" type="Image" />
+ <param index="0" name="image" type="Image" />
<description>
</description>
</method>
<method name="texture_2d_get" qualifiers="const">
<return type="Image" />
- <argument index="0" name="texture" type="RID" />
+ <param index="0" name="texture" type="RID" />
<description>
</description>
</method>
<method name="texture_2d_layer_get" qualifiers="const">
<return type="Image" />
- <argument index="0" name="texture" type="RID" />
- <argument index="1" name="layer" type="int" />
+ <param index="0" name="texture" type="RID" />
+ <param index="1" name="layer" type="int" />
<description>
</description>
</method>
<method name="texture_2d_layered_create">
<return type="RID" />
- <argument index="0" name="layers" type="Image[]" />
- <argument index="1" name="layered_type" type="int" enum="RenderingServer.TextureLayeredType" />
+ <param index="0" name="layers" type="Image[]" />
+ <param index="1" name="layered_type" type="int" enum="RenderingServer.TextureLayeredType" />
<description>
</description>
</method>
<method name="texture_2d_layered_placeholder_create">
<return type="RID" />
- <argument index="0" name="layered_type" type="int" enum="RenderingServer.TextureLayeredType" />
+ <param index="0" name="layered_type" type="int" enum="RenderingServer.TextureLayeredType" />
<description>
</description>
</method>
@@ -2913,26 +2934,26 @@
</method>
<method name="texture_2d_update">
<return type="void" />
- <argument index="0" name="texture" type="RID" />
- <argument index="1" name="image" type="Image" />
- <argument index="2" name="layer" type="int" />
+ <param index="0" name="texture" type="RID" />
+ <param index="1" name="image" type="Image" />
+ <param index="2" name="layer" type="int" />
<description>
</description>
</method>
<method name="texture_3d_create">
<return type="RID" />
- <argument index="0" name="format" type="int" enum="Image.Format" />
- <argument index="1" name="width" type="int" />
- <argument index="2" name="height" type="int" />
- <argument index="3" name="depth" type="int" />
- <argument index="4" name="mipmaps" type="bool" />
- <argument index="5" name="data" type="Image[]" />
+ <param index="0" name="format" type="int" enum="Image.Format" />
+ <param index="1" name="width" type="int" />
+ <param index="2" name="height" type="int" />
+ <param index="3" name="depth" type="int" />
+ <param index="4" name="mipmaps" type="bool" />
+ <param index="5" name="data" type="Image[]" />
<description>
</description>
</method>
<method name="texture_3d_get" qualifiers="const">
<return type="Image[]" />
- <argument index="0" name="texture" type="RID" />
+ <param index="0" name="texture" type="RID" />
<description>
</description>
</method>
@@ -2943,82 +2964,82 @@
</method>
<method name="texture_3d_update">
<return type="void" />
- <argument index="0" name="texture" type="RID" />
- <argument index="1" name="data" type="Image[]" />
+ <param index="0" name="texture" type="RID" />
+ <param index="1" name="data" type="Image[]" />
<description>
</description>
</method>
<method name="texture_get_path" qualifiers="const">
<return type="String" />
- <argument index="0" name="texture" type="RID" />
+ <param index="0" name="texture" type="RID" />
<description>
</description>
</method>
<method name="texture_proxy_create">
<return type="RID" />
- <argument index="0" name="base" type="RID" />
+ <param index="0" name="base" type="RID" />
<description>
</description>
</method>
<method name="texture_proxy_update">
<return type="void" />
- <argument index="0" name="texture" type="RID" />
- <argument index="1" name="proxy_to" type="RID" />
+ <param index="0" name="texture" type="RID" />
+ <param index="1" name="proxy_to" type="RID" />
<description>
</description>
</method>
<method name="texture_replace">
<return type="void" />
- <argument index="0" name="texture" type="RID" />
- <argument index="1" name="by_texture" type="RID" />
+ <param index="0" name="texture" type="RID" />
+ <param index="1" name="by_texture" type="RID" />
<description>
</description>
</method>
<method name="texture_set_force_redraw_if_visible">
<return type="void" />
- <argument index="0" name="texture" type="RID" />
- <argument index="1" name="enable" type="bool" />
+ <param index="0" name="texture" type="RID" />
+ <param index="1" name="enable" type="bool" />
<description>
</description>
</method>
<method name="texture_set_path">
<return type="void" />
- <argument index="0" name="texture" type="RID" />
- <argument index="1" name="path" type="String" />
+ <param index="0" name="texture" type="RID" />
+ <param index="1" name="path" type="String" />
<description>
</description>
</method>
<method name="texture_set_size_override">
<return type="void" />
- <argument index="0" name="texture" type="RID" />
- <argument index="1" name="width" type="int" />
- <argument index="2" name="height" type="int" />
+ <param index="0" name="texture" type="RID" />
+ <param index="1" name="width" type="int" />
+ <param index="2" name="height" type="int" />
<description>
</description>
</method>
<method name="viewport_attach_camera">
<return type="void" />
- <argument index="0" name="viewport" type="RID" />
- <argument index="1" name="camera" type="RID" />
+ <param index="0" name="viewport" type="RID" />
+ <param index="1" name="camera" type="RID" />
<description>
Sets a viewport's camera.
</description>
</method>
<method name="viewport_attach_canvas">
<return type="void" />
- <argument index="0" name="viewport" type="RID" />
- <argument index="1" name="canvas" type="RID" />
+ <param index="0" name="viewport" type="RID" />
+ <param index="1" name="canvas" type="RID" />
<description>
Sets a viewport's canvas.
</description>
</method>
<method name="viewport_attach_to_screen">
<return type="void" />
- <argument index="0" name="viewport" type="RID" />
- <argument index="1" name="rect" type="Rect2" default="Rect2(0, 0, 0, 0)" />
- <argument index="2" name="screen" type="int" default="0" />
+ <param index="0" name="viewport" type="RID" />
+ <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]
@@ -3028,7 +3049,7 @@
$Viewport.set_attach_to_screen_rect(Rect2(0, 0, 600, 600))
[/gdscript]
[/codeblocks]
- Using this can result in significant optimization, especially on lower-end devices. However, it comes at the cost of having to manage your viewports manually. For a further optimization see, [method viewport_set_render_direct_to_screen].
+ Using this can result in significant optimization, especially on lower-end devices. However, it comes at the cost of having to manage your viewports manually. For further optimization, see [method viewport_set_render_direct_to_screen].
</description>
</method>
<method name="viewport_create">
@@ -3040,199 +3061,210 @@
</method>
<method name="viewport_get_measured_render_time_cpu" qualifiers="const">
<return type="float" />
- <argument index="0" name="viewport" type="RID" />
+ <param index="0" name="viewport" type="RID" />
<description>
</description>
</method>
<method name="viewport_get_measured_render_time_gpu" qualifiers="const">
<return type="float" />
- <argument index="0" name="viewport" type="RID" />
+ <param index="0" name="viewport" type="RID" />
<description>
</description>
</method>
<method name="viewport_get_render_info">
<return type="int" />
- <argument index="0" name="viewport" type="RID" />
- <argument index="1" name="type" type="int" enum="RenderingServer.ViewportRenderInfoType" />
- <argument index="2" name="info" type="int" enum="RenderingServer.ViewportRenderInfo" />
+ <param index="0" name="viewport" type="RID" />
+ <param index="1" name="type" type="int" enum="RenderingServer.ViewportRenderInfoType" />
+ <param index="2" name="info" type="int" enum="RenderingServer.ViewportRenderInfo" />
<description>
</description>
</method>
<method name="viewport_get_texture" qualifiers="const">
<return type="RID" />
- <argument index="0" name="viewport" type="RID" />
+ <param index="0" name="viewport" type="RID" />
<description>
Returns the viewport's last rendered frame.
</description>
</method>
<method name="viewport_remove_canvas">
<return type="void" />
- <argument index="0" name="viewport" type="RID" />
- <argument index="1" name="canvas" type="RID" />
+ <param index="0" name="viewport" type="RID" />
+ <param index="1" name="canvas" type="RID" />
<description>
Detaches a viewport from a canvas and vice versa.
</description>
</method>
<method name="viewport_set_active">
<return type="void" />
- <argument index="0" name="viewport" type="RID" />
- <argument index="1" name="active" type="bool" />
+ <param index="0" name="viewport" type="RID" />
+ <param index="1" name="active" type="bool" />
<description>
If [code]true[/code], sets the viewport active, else sets it inactive.
</description>
</method>
<method name="viewport_set_canvas_stacking">
<return type="void" />
- <argument index="0" name="viewport" type="RID" />
- <argument index="1" name="canvas" type="RID" />
- <argument index="2" name="layer" type="int" />
- <argument index="3" name="sublayer" type="int" />
+ <param index="0" name="viewport" type="RID" />
+ <param index="1" name="canvas" type="RID" />
+ <param index="2" name="layer" type="int" />
+ <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">
<return type="void" />
- <argument index="0" name="viewport" type="RID" />
- <argument index="1" name="canvas" type="RID" />
- <argument index="2" name="offset" type="Transform2D" />
+ <param index="0" name="viewport" type="RID" />
+ <param index="1" name="canvas" type="RID" />
+ <param index="2" name="offset" type="Transform2D" />
<description>
Sets the transformation of a viewport's canvas.
</description>
</method>
<method name="viewport_set_clear_mode">
<return type="void" />
- <argument index="0" name="viewport" type="RID" />
- <argument index="1" name="clear_mode" type="int" enum="RenderingServer.ViewportClearMode" />
+ <param index="0" name="viewport" type="RID" />
+ <param index="1" name="clear_mode" type="int" enum="RenderingServer.ViewportClearMode" />
<description>
Sets the clear mode of a viewport. See [enum ViewportClearMode] for options.
</description>
</method>
<method name="viewport_set_debug_draw">
<return type="void" />
- <argument index="0" name="viewport" type="RID" />
- <argument index="1" name="draw" type="int" enum="RenderingServer.ViewportDebugDraw" />
+ <param index="0" name="viewport" type="RID" />
+ <param index="1" name="draw" type="int" enum="RenderingServer.ViewportDebugDraw" />
<description>
Sets the debug draw mode of a viewport. See [enum ViewportDebugDraw] for options.
</description>
</method>
<method name="viewport_set_default_canvas_item_texture_filter">
<return type="void" />
- <argument index="0" name="viewport" type="RID" />
- <argument index="1" name="filter" type="int" enum="RenderingServer.CanvasItemTextureFilter" />
+ <param index="0" name="viewport" type="RID" />
+ <param index="1" name="filter" type="int" enum="RenderingServer.CanvasItemTextureFilter" />
<description>
</description>
</method>
<method name="viewport_set_default_canvas_item_texture_repeat">
<return type="void" />
- <argument index="0" name="viewport" type="RID" />
- <argument index="1" name="repeat" type="int" enum="RenderingServer.CanvasItemTextureRepeat" />
+ <param index="0" name="viewport" type="RID" />
+ <param index="1" name="repeat" type="int" enum="RenderingServer.CanvasItemTextureRepeat" />
<description>
</description>
</method>
<method name="viewport_set_disable_2d">
<return type="void" />
- <argument index="0" name="viewport" type="RID" />
- <argument index="1" name="disable" type="bool" />
+ <param index="0" name="viewport" type="RID" />
+ <param index="1" name="disable" type="bool" />
<description>
If [code]true[/code], the viewport's canvas is not rendered.
</description>
</method>
<method name="viewport_set_disable_3d">
<return type="void" />
- <argument index="0" name="viewport" type="RID" />
- <argument index="1" name="disable" type="bool" />
+ <param index="0" name="viewport" type="RID" />
+ <param index="1" name="disable" type="bool" />
<description>
</description>
</method>
<method name="viewport_set_disable_environment">
<return type="void" />
- <argument index="0" name="viewport" type="RID" />
- <argument index="1" name="disabled" type="bool" />
+ <param index="0" name="viewport" type="RID" />
+ <param index="1" name="disabled" type="bool" />
<description>
If [code]true[/code], rendering of a viewport's environment is disabled.
</description>
</method>
- <method name="viewport_set_fsr_mipmap_bias">
- <return type="void" />
- <argument index="0" name="viewport" type="RID" />
- <argument index="1" name="mipmap_bias" type="float" />
- <description>
- Affects the final texture sharpness by reading from a lower or higher mipmap. Negative values make textures sharper, while positive values make textures blurrier. When using FSR, this value is used to adjust the mipmap bias calculated internally which is based on the selected quality. The formula for this is [code]-log2(1.0 / scale) + mipmap_bias[/code]
- </description>
- </method>
<method name="viewport_set_fsr_sharpness">
<return type="void" />
- <argument index="0" name="viewport" type="RID" />
- <argument index="1" name="sharpness" type="float" />
+ <param index="0" name="viewport" type="RID" />
+ <param index="1" name="sharpness" type="float" />
<description>
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.
</description>
</method>
<method name="viewport_set_global_canvas_transform">
<return type="void" />
- <argument index="0" name="viewport" type="RID" />
- <argument index="1" name="transform" type="Transform2D" />
+ <param index="0" name="viewport" type="RID" />
+ <param index="1" name="transform" type="Transform2D" />
<description>
Sets the viewport's global transformation matrix.
</description>
</method>
<method name="viewport_set_measure_render_time">
<return type="void" />
- <argument index="0" name="viewport" type="RID" />
- <argument index="1" name="enable" type="bool" />
+ <param index="0" name="viewport" type="RID" />
+ <param index="1" name="enable" type="bool" />
<description>
</description>
</method>
<method name="viewport_set_msaa">
<return type="void" />
- <argument index="0" name="viewport" type="RID" />
- <argument index="1" name="msaa" type="int" enum="RenderingServer.ViewportMSAA" />
+ <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.
</description>
</method>
<method name="viewport_set_occlusion_culling_build_quality">
<return type="void" />
- <argument index="0" name="quality" type="int" enum="RenderingServer.ViewportOcclusionCullingBuildQuality" />
+ <param index="0" name="quality" type="int" enum="RenderingServer.ViewportOcclusionCullingBuildQuality" />
<description>
</description>
</method>
<method name="viewport_set_occlusion_rays_per_thread">
<return type="void" />
- <argument index="0" name="rays_per_thread" type="int" />
+ <param index="0" name="rays_per_thread" type="int" />
<description>
</description>
</method>
<method name="viewport_set_parent_viewport">
<return type="void" />
- <argument index="0" name="viewport" type="RID" />
- <argument index="1" name="parent_viewport" type="RID" />
+ <param index="0" name="viewport" type="RID" />
+ <param index="1" name="parent_viewport" type="RID" />
<description>
Sets the viewport's parent to another viewport.
</description>
</method>
+ <method name="viewport_set_positional_shadow_atlas_quadrant_subdivision">
+ <return type="void" />
+ <param index="0" name="viewport" type="RID" />
+ <param index="1" name="quadrant" type="int" />
+ <param index="2" name="subdivision" type="int" />
+ <description>
+ Sets the shadow atlas quadrant's subdivision.
+ </description>
+ </method>
+ <method name="viewport_set_positional_shadow_atlas_size">
+ <return type="void" />
+ <param index="0" name="viewport" type="RID" />
+ <param index="1" name="size" type="int" />
+ <param index="2" name="use_16_bits" type="bool" default="false" />
+ <description>
+ Sets the size of the shadow atlas's images (used for omni and spot lights). The value will be rounded up to the nearest power of 2.
+ [b]Note:[/b] If this is set to [code]0[/code], no shadows will be visible at all (including directional shadows).
+ </description>
+ </method>
<method name="viewport_set_render_direct_to_screen">
<return type="void" />
- <argument index="0" name="viewport" type="RID" />
- <argument index="1" name="enabled" type="bool" />
+ <param index="0" name="viewport" type="RID" />
+ <param index="1" name="enabled" type="bool" />
<description>
If [code]true[/code], render the contents of the viewport directly to screen. This allows a low-level optimization where you can skip drawing a viewport to the root viewport. While this optimization can result in a significant increase in speed (especially on older devices), it comes at a cost of usability. When this is enabled, you cannot read from the viewport or from the [code]SCREEN_TEXTURE[/code]. You also lose the benefit of certain window settings, such as the various stretch modes. Another consequence to be aware of is that in 2D the rendering happens in window coordinates, so if you have a viewport that is double the size of the window, and you set this, then only the portion that fits within the window will be drawn, no automatic scaling is possible, even if your game scene is significantly larger than the window size.
</description>
</method>
<method name="viewport_set_scaling_3d_mode">
<return type="void" />
- <argument index="0" name="viewport" type="RID" />
- <argument index="1" name="scaling_3d_mode" type="int" enum="RenderingServer.ViewportScaling3DMode" />
+ <param index="0" name="viewport" type="RID" />
+ <param index="1" name="scaling_3d_mode" type="int" enum="RenderingServer.ViewportScaling3DMode" />
<description>
Sets 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.
</description>
</method>
<method name="viewport_set_scaling_3d_scale">
<return type="void" />
- <argument index="0" name="viewport" type="RID" />
- <argument index="1" name="scale" type="float" />
+ <param index="0" name="viewport" type="RID" />
+ <param index="1" name="scale" type="float" />
<description>
Scales the 3D render buffer based on the viewport size uses an image filter specified in [enum ViewportScaling3DMode] 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 [enum ViewportMSAA] for multi-sample antialiasing, which is significantly cheaper but only smoothens 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.
@@ -3240,8 +3272,8 @@
</method>
<method name="viewport_set_scenario">
<return type="void" />
- <argument index="0" name="viewport" type="RID" />
- <argument index="1" name="scenario" type="RID" />
+ <param index="0" name="viewport" type="RID" />
+ <param index="1" name="scenario" type="RID" />
<description>
Sets a viewport's scenario.
The scenario contains information about environment information, reflection atlas etc.
@@ -3249,98 +3281,113 @@
</method>
<method name="viewport_set_screen_space_aa">
<return type="void" />
- <argument index="0" name="viewport" type="RID" />
- <argument index="1" name="mode" type="int" enum="RenderingServer.ViewportScreenSpaceAA" />
+ <param index="0" name="viewport" type="RID" />
+ <param index="1" name="mode" type="int" enum="RenderingServer.ViewportScreenSpaceAA" />
<description>
</description>
</method>
<method name="viewport_set_sdf_oversize_and_scale">
<return type="void" />
- <argument index="0" name="viewport" type="RID" />
- <argument index="1" name="oversize" type="int" enum="RenderingServer.ViewportSDFOversize" />
- <argument index="2" name="scale" type="int" enum="RenderingServer.ViewportSDFScale" />
- <description>
- </description>
- </method>
- <method name="viewport_set_shadow_atlas_quadrant_subdivision">
- <return type="void" />
- <argument index="0" name="viewport" type="RID" />
- <argument index="1" name="quadrant" type="int" />
- <argument index="2" name="subdivision" type="int" />
+ <param index="0" name="viewport" type="RID" />
+ <param index="1" name="oversize" type="int" enum="RenderingServer.ViewportSDFOversize" />
+ <param index="2" name="scale" type="int" enum="RenderingServer.ViewportSDFScale" />
<description>
- Sets the shadow atlas quadrant's subdivision.
- </description>
- </method>
- <method name="viewport_set_shadow_atlas_size">
- <return type="void" />
- <argument index="0" name="viewport" type="RID" />
- <argument index="1" name="size" type="int" />
- <argument index="2" name="use_16_bits" type="bool" default="false" />
- <description>
- Sets the size of the shadow atlas's images (used for omni and spot lights). The value will be rounded up to the nearest power of 2.
</description>
</method>
<method name="viewport_set_size">
<return type="void" />
- <argument index="0" name="viewport" type="RID" />
- <argument index="1" name="width" type="int" />
- <argument index="2" name="height" type="int" />
+ <param index="0" name="viewport" type="RID" />
+ <param index="1" name="width" type="int" />
+ <param index="2" name="height" type="int" />
<description>
Sets the viewport's width and height.
</description>
</method>
<method name="viewport_set_snap_2d_transforms_to_pixel">
<return type="void" />
- <argument index="0" name="viewport" type="RID" />
- <argument index="1" name="enabled" type="bool" />
+ <param index="0" name="viewport" type="RID" />
+ <param index="1" name="enabled" type="bool" />
<description>
</description>
</method>
<method name="viewport_set_snap_2d_vertices_to_pixel">
<return type="void" />
- <argument index="0" name="viewport" type="RID" />
- <argument index="1" name="enabled" type="bool" />
+ <param index="0" name="viewport" type="RID" />
+ <param index="1" name="enabled" type="bool" />
+ <description>
+ </description>
+ </method>
+ <method name="viewport_set_texture_mipmap_bias">
+ <return type="void" />
+ <param index="0" name="viewport" type="RID" />
+ <param index="1" name="mipmap_bias" type="float" />
<description>
+ Affects the final texture sharpness by reading from a lower or higher mipmap (also called "texture LOD bias"). Negative values make mipmapped textures sharper but grainier when viewed at a distance, while positive values make mipmapped textures blurrier (even when up close). To get sharper textures at a distance without introducing too much graininess, set this between [code]-0.75[/code] and [code]0.0[/code]. Enabling temporal antialiasing ([member ProjectSettings.rendering/anti_aliasing/quality/use_taa]) can help reduce the graininess visible when using negative mipmap bias.
+ [b]Note:[/b] When the 3D scaling mode is set to FSR 1.0, this value is used to adjust the automatic mipmap bias which is calculated internally based on the scale factor. The formula for this is [code]-log2(1.0 / scale) + mipmap_bias[/code].
</description>
</method>
<method name="viewport_set_transparent_background">
<return type="void" />
- <argument index="0" name="viewport" type="RID" />
- <argument index="1" name="enabled" type="bool" />
+ <param index="0" name="viewport" type="RID" />
+ <param index="1" name="enabled" type="bool" />
<description>
If [code]true[/code], the viewport renders its background as transparent.
</description>
</method>
<method name="viewport_set_update_mode">
<return type="void" />
- <argument index="0" name="viewport" type="RID" />
- <argument index="1" name="update_mode" type="int" enum="RenderingServer.ViewportUpdateMode" />
+ <param index="0" name="viewport" type="RID" />
+ <param index="1" name="update_mode" type="int" enum="RenderingServer.ViewportUpdateMode" />
<description>
Sets when the viewport should be updated. See [enum ViewportUpdateMode] constants for options.
</description>
</method>
<method name="viewport_set_use_debanding">
<return type="void" />
- <argument index="0" name="viewport" type="RID" />
- <argument index="1" name="enable" type="bool" />
+ <param index="0" name="viewport" type="RID" />
+ <param index="1" name="enable" type="bool" />
<description>
</description>
</method>
<method name="viewport_set_use_occlusion_culling">
<return type="void" />
- <argument index="0" name="viewport" type="RID" />
- <argument index="1" name="enable" type="bool" />
+ <param index="0" name="viewport" type="RID" />
+ <param index="1" name="enable" type="bool" />
<description>
</description>
</method>
+ <method name="viewport_set_use_taa">
+ <return type="void" />
+ <param index="0" name="viewport" type="RID" />
+ <param index="1" name="enable" type="bool" />
+ <description>
+ If [code]true[/code], use Temporal Anti-Aliasing.
+ </description>
+ </method>
<method name="viewport_set_use_xr">
<return type="void" />
- <argument index="0" name="viewport" type="RID" />
- <argument index="1" name="use_xr" type="bool" />
+ <param index="0" name="viewport" type="RID" />
+ <param index="1" name="use_xr" type="bool" />
<description>
If [code]true[/code], the viewport uses augmented or virtual reality technologies. See [XRInterface].
</description>
</method>
+ <method name="viewport_set_vrs_mode">
+ <return type="void" />
+ <param index="0" name="viewport" type="RID" />
+ <param index="1" name="mode" type="int" enum="RenderingServer.ViewportVRSMode" />
+ <description>
+ Sets the Variable Rate Shading (VRS) mode for the viewport. Note, if hardware does not support VRS this property is ignored.
+ </description>
+ </method>
+ <method name="viewport_set_vrs_texture">
+ <return type="void" />
+ <param index="0" name="viewport" type="RID" />
+ <param index="1" name="texture" type="RID" />
+ <description>
+ Texture to use when the VRS mode is set to [constant RenderingServer.VIEWPORT_VRS_TEXTURE].
+ </description>
+ </method>
<method name="visibility_notifier_create">
<return type="RID" />
<description>
@@ -3348,29 +3395,29 @@
</method>
<method name="visibility_notifier_set_aabb">
<return type="void" />
- <argument index="0" name="notifier" type="RID" />
- <argument index="1" name="aabb" type="AABB" />
+ <param index="0" name="notifier" type="RID" />
+ <param index="1" name="aabb" type="AABB" />
<description>
</description>
</method>
<method name="visibility_notifier_set_callbacks">
<return type="void" />
- <argument index="0" name="notifier" type="RID" />
- <argument index="1" name="enter_callable" type="Callable" />
- <argument index="2" name="exit_callable" type="Callable" />
+ <param index="0" name="notifier" type="RID" />
+ <param index="1" name="enter_callable" type="Callable" />
+ <param index="2" name="exit_callable" type="Callable" />
<description>
</description>
</method>
<method name="voxel_gi_allocate_data">
<return type="void" />
- <argument index="0" name="voxel_gi" type="RID" />
- <argument index="1" name="to_cell_xform" type="Transform3D" />
- <argument index="2" name="aabb" type="AABB" />
- <argument index="3" name="octree_size" type="Vector3i" />
- <argument index="4" name="octree_cells" type="PackedByteArray" />
- <argument index="5" name="data_cells" type="PackedByteArray" />
- <argument index="6" name="distance_field" type="PackedByteArray" />
- <argument index="7" name="level_counts" type="PackedInt32Array" />
+ <param index="0" name="voxel_gi" type="RID" />
+ <param index="1" name="to_cell_xform" type="Transform3D" />
+ <param index="2" name="aabb" type="AABB" />
+ <param index="3" name="octree_size" type="Vector3i" />
+ <param index="4" name="octree_cells" type="PackedByteArray" />
+ <param index="5" name="data_cells" type="PackedByteArray" />
+ <param index="6" name="distance_field" type="PackedByteArray" />
+ <param index="7" name="level_counts" type="PackedInt32Array" />
<description>
</description>
</method>
@@ -3381,92 +3428,92 @@
</method>
<method name="voxel_gi_get_data_cells" qualifiers="const">
<return type="PackedByteArray" />
- <argument index="0" name="voxel_gi" type="RID" />
+ <param index="0" name="voxel_gi" type="RID" />
<description>
</description>
</method>
<method name="voxel_gi_get_distance_field" qualifiers="const">
<return type="PackedByteArray" />
- <argument index="0" name="voxel_gi" type="RID" />
+ <param index="0" name="voxel_gi" type="RID" />
<description>
</description>
</method>
<method name="voxel_gi_get_level_counts" qualifiers="const">
<return type="PackedInt32Array" />
- <argument index="0" name="voxel_gi" type="RID" />
+ <param index="0" name="voxel_gi" type="RID" />
<description>
</description>
</method>
<method name="voxel_gi_get_octree_cells" qualifiers="const">
<return type="PackedByteArray" />
- <argument index="0" name="voxel_gi" type="RID" />
+ <param index="0" name="voxel_gi" type="RID" />
<description>
</description>
</method>
<method name="voxel_gi_get_octree_size" qualifiers="const">
<return type="Vector3i" />
- <argument index="0" name="voxel_gi" type="RID" />
+ <param index="0" name="voxel_gi" type="RID" />
<description>
</description>
</method>
<method name="voxel_gi_get_to_cell_xform" qualifiers="const">
<return type="Transform3D" />
- <argument index="0" name="voxel_gi" type="RID" />
+ <param index="0" name="voxel_gi" type="RID" />
<description>
</description>
</method>
<method name="voxel_gi_set_bias">
<return type="void" />
- <argument index="0" name="voxel_gi" type="RID" />
- <argument index="1" name="bias" type="float" />
+ <param index="0" name="voxel_gi" type="RID" />
+ <param index="1" name="bias" type="float" />
<description>
</description>
</method>
<method name="voxel_gi_set_dynamic_range">
<return type="void" />
- <argument index="0" name="voxel_gi" type="RID" />
- <argument index="1" name="range" type="float" />
+ <param index="0" name="voxel_gi" type="RID" />
+ <param index="1" name="range" type="float" />
<description>
</description>
</method>
<method name="voxel_gi_set_energy">
<return type="void" />
- <argument index="0" name="voxel_gi" type="RID" />
- <argument index="1" name="energy" type="float" />
+ <param index="0" name="voxel_gi" type="RID" />
+ <param index="1" name="energy" type="float" />
<description>
</description>
</method>
<method name="voxel_gi_set_interior">
<return type="void" />
- <argument index="0" name="voxel_gi" type="RID" />
- <argument index="1" name="enable" type="bool" />
+ <param index="0" name="voxel_gi" type="RID" />
+ <param index="1" name="enable" type="bool" />
<description>
</description>
</method>
<method name="voxel_gi_set_normal_bias">
<return type="void" />
- <argument index="0" name="voxel_gi" type="RID" />
- <argument index="1" name="bias" type="float" />
+ <param index="0" name="voxel_gi" type="RID" />
+ <param index="1" name="bias" type="float" />
<description>
</description>
</method>
<method name="voxel_gi_set_propagation">
<return type="void" />
- <argument index="0" name="voxel_gi" type="RID" />
- <argument index="1" name="amount" type="float" />
+ <param index="0" name="voxel_gi" type="RID" />
+ <param index="1" name="amount" type="float" />
<description>
</description>
</method>
<method name="voxel_gi_set_quality">
<return type="void" />
- <argument index="0" name="quality" type="int" enum="RenderingServer.VoxelGIQuality" />
+ <param index="0" name="quality" type="int" enum="RenderingServer.VoxelGIQuality" />
<description>
</description>
</method>
<method name="voxel_gi_set_use_two_bounces">
<return type="void" />
- <argument index="0" name="voxel_gi" type="RID" />
- <argument index="1" name="enable" type="bool" />
+ <param index="0" name="voxel_gi" type="RID" />
+ <param index="1" name="enable" type="bool" />
<description>
</description>
</method>
@@ -3700,14 +3747,22 @@
Use [Transform3D] to store MultiMesh transform.
</constant>
<constant name="LIGHT_PROJECTOR_FILTER_NEAREST" value="0" enum="LightProjectorFilter">
+ Nearest-neighbor filter for light projectors (use for pixel art light projectors). No mipmaps are used for rendering, which means light projectors at a distance will look sharp but grainy. This has roughly the same performance cost as using mipmaps.
</constant>
- <constant name="LIGHT_PROJECTOR_FILTER_NEAREST_MIPMAPS" value="1" enum="LightProjectorFilter">
+ <constant name="LIGHT_PROJECTOR_FILTER_LINEAR" value="1" enum="LightProjectorFilter">
+ Linear filter for light projectors (use for non-pixel art light projectors). No mipmaps are used for rendering, which means light projectors at a distance will look smooth but blurry. This has roughly the same performance cost as using mipmaps.
</constant>
- <constant name="LIGHT_PROJECTOR_FILTER_LINEAR" value="2" enum="LightProjectorFilter">
+ <constant name="LIGHT_PROJECTOR_FILTER_NEAREST_MIPMAPS" value="2" enum="LightProjectorFilter">
+ Nearest-neighbor filter for light projectors (use for pixel art light projectors). Isotropic mipmaps are used for rendering, which means light projectors at a distance will look smooth but blurry. This has roughly the same performance cost as not using mipmaps.
</constant>
<constant name="LIGHT_PROJECTOR_FILTER_LINEAR_MIPMAPS" value="3" enum="LightProjectorFilter">
+ Linear filter for light projectors (use for non-pixel art light projectors). Isotropic mipmaps are used for rendering, which means light projectors at a distance will look smooth but blurry. This has roughly the same performance cost as not using mipmaps.
+ </constant>
+ <constant name="LIGHT_PROJECTOR_FILTER_NEAREST_MIPMAPS_ANISOTROPIC" value="4" enum="LightProjectorFilter">
+ Nearest-neighbor filter for light projectors (use for pixel art light projectors). Anisotropic mipmaps are used for rendering, which means light projectors at a distance will look smooth and sharp when viewed from oblique angles. This looks better compared to isotropic mipmaps, but is slower. The level of anisotropic filtering is defined by [member ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level].
</constant>
- <constant name="LIGHT_PROJECTOR_FILTER_LINEAR_MIPMAPS_ANISOTROPIC" value="4" enum="LightProjectorFilter">
+ <constant name="LIGHT_PROJECTOR_FILTER_LINEAR_MIPMAPS_ANISOTROPIC" value="5" enum="LightProjectorFilter">
+ Linear filter for light projectors (use for non-pixel art light projectors). Anisotropic mipmaps are used for rendering, which means light projectors at a distance will look smooth and sharp when viewed from oblique angles. This looks better compared to isotropic mipmaps, but is slower. The level of anisotropic filtering is defined by [member ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level].
</constant>
<constant name="LIGHT_DIRECTIONAL" value="0" enum="LightType">
Is a directional (sun) light.
@@ -3722,6 +3777,7 @@
The light's energy.
</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">
The light's influence on specularity.
@@ -3765,14 +3821,17 @@
<constant name="LIGHT_PARAM_SHADOW_PANCAKE_SIZE" value="15" 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_BLUR" value="16" enum="LightParam">
+ <constant name="LIGHT_PARAM_SHADOW_OPACITY" value="16" 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">
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="17" enum="LightParam">
+ <constant name="LIGHT_PARAM_SHADOW_VOLUMETRIC_FOG_FADE" value="18" enum="LightParam">
</constant>
- <constant name="LIGHT_PARAM_TRANSMITTANCE_BIAS" value="18" enum="LightParam">
+ <constant name="LIGHT_PARAM_TRANSMITTANCE_BIAS" value="19" enum="LightParam">
</constant>
- <constant name="LIGHT_PARAM_MAX" value="19" enum="LightParam">
+ <constant name="LIGHT_PARAM_MAX" value="20" enum="LightParam">
Represents the size of the [enum LightParam] enum.
</constant>
<constant name="LIGHT_BAKE_DISABLED" value="0" enum="LightBakeMode">
@@ -3849,14 +3908,22 @@
<constant name="DECAL_TEXTURE_MAX" value="4" enum="DecalTexture">
</constant>
<constant name="DECAL_FILTER_NEAREST" value="0" enum="DecalFilter">
+ Nearest-neighbor filter for decals (use for pixel art decals). No mipmaps are used for rendering, which means decals at a distance will look sharp but grainy. This has roughly the same performance cost as using mipmaps.
</constant>
- <constant name="DECAL_FILTER_NEAREST_MIPMAPS" value="1" enum="DecalFilter">
+ <constant name="DECAL_FILTER_LINEAR" value="1" enum="DecalFilter">
+ Linear filter for decals (use for non-pixel art decals). No mipmaps are used for rendering, which means decals at a distance will look smooth but blurry. This has roughly the same performance cost as using mipmaps.
</constant>
- <constant name="DECAL_FILTER_LINEAR" value="2" enum="DecalFilter">
+ <constant name="DECAL_FILTER_NEAREST_MIPMAPS" value="2" enum="DecalFilter">
+ Nearest-neighbor filter for decals (use for pixel art decals). Isotropic mipmaps are used for rendering, which means decals at a distance will look smooth but blurry. This has roughly the same performance cost as not using mipmaps.
</constant>
<constant name="DECAL_FILTER_LINEAR_MIPMAPS" value="3" enum="DecalFilter">
+ Linear filter for decals (use for non-pixel art decals). Isotropic mipmaps are used for rendering, which means decals at a distance will look smooth but blurry. This has roughly the same performance cost as not using mipmaps.
+ </constant>
+ <constant name="DECAL_FILTER_NEAREST_MIPMAPS_ANISOTROPIC" value="4" enum="DecalFilter">
+ Nearest-neighbor filter for decals (use for pixel art decals). Anisotropic mipmaps are used for rendering, which means decals at a distance will look smooth and sharp when viewed from oblique angles. This looks better compared to isotropic mipmaps, but is slower. The level of anisotropic filtering is defined by [member ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level].
</constant>
- <constant name="DECAL_FILTER_LINEAR_MIPMAPS_ANISOTROPIC" value="4" enum="DecalFilter">
+ <constant name="DECAL_FILTER_LINEAR_MIPMAPS_ANISOTROPIC" value="5" enum="DecalFilter">
+ Linear filter for decals (use for non-pixel art decals). Anisotropic mipmaps are used for rendering, which means decals at a distance will look smooth and sharp when viewed from oblique angles. This looks better compared to isotropic mipmaps, but is slower. The level of anisotropic filtering is defined by [member ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level].
</constant>
<constant name="VOXEL_GI_QUALITY_LOW" value="0" enum="VoxelGIQuality">
</constant>
@@ -3924,14 +3991,22 @@
<constant name="PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_MAX" value="6" enum="ParticlesCollisionHeightfieldResolution">
</constant>
<constant name="FOG_VOLUME_SHAPE_ELLIPSOID" value="0" enum="FogVolumeShape">
- [FogVolume] will be shaped like an ellipsoid.
+ [FogVolume] will be shaped like an ellipsoid (stretched sphere).
</constant>
- <constant name="FOG_VOLUME_SHAPE_BOX" value="1" enum="FogVolumeShape">
+ <constant name="FOG_VOLUME_SHAPE_CONE" value="1" enum="FogVolumeShape">
+ [FogVolume] will be shaped like a cone pointing upwards (in local coordinates). The cone's angle is set automatically to fill the extents. The cone will be adjusted to fit within the extents. Rotate the [FogVolume] node to reorient the cone. Non-uniform scaling via extents is not supported (scale the [FogVolume] node instead).
+ </constant>
+ <constant name="FOG_VOLUME_SHAPE_CYLINDER" value="2" enum="FogVolumeShape">
+ [FogVolume] will be shaped like an upright cylinder (in local coordinates). Rotate the [FogVolume] node to reorient the cylinder. The cylinder will be adjusted to fit within the extents. Non-uniform scaling via extents is not supported (scale the [FogVolume] node instead).
+ </constant>
+ <constant name="FOG_VOLUME_SHAPE_BOX" value="3" enum="FogVolumeShape">
[FogVolume] will be shaped like a box.
</constant>
- <constant name="FOG_VOLUME_SHAPE_WORLD" value="2" enum="FogVolumeShape">
+ <constant name="FOG_VOLUME_SHAPE_WORLD" value="4" enum="FogVolumeShape">
[FogVolume] will have no shape, will cover the whole world and will not be culled.
</constant>
+ <constant name="FOG_VOLUME_SHAPE_MAX" value="5" enum="FogVolumeShape">
+ </constant>
<constant name="VIEWPORT_SCALING_3D_MODE_BILINEAR" value="0" enum="ViewportScaling3DMode">
Use bilinear scaling for the viewport's 3D buffer. The amount of scaling can be set using [member Viewport.scaling_3d_scale]. Values less then [code]1.0[/code] will result in undersampling while values greater than [code]1.0[/code] will result in supersampling. A value of [code]1.0[/code] disables scaling.
</constant>
@@ -4090,6 +4165,20 @@
</constant>
<constant name="VIEWPORT_DEBUG_DRAW_OCCLUDERS" value="24" enum="ViewportDebugDraw">
</constant>
+ <constant name="VIEWPORT_DEBUG_DRAW_MOTION_VECTORS" value="25" enum="ViewportDebugDraw">
+ </constant>
+ <constant name="VIEWPORT_VRS_DISABLED" value="0" enum="ViewportVRSMode">
+ VRS is disabled.
+ </constant>
+ <constant name="VIEWPORT_VRS_TEXTURE" value="1" enum="ViewportVRSMode">
+ VRS uses a texture. Note, for stereoscopic use a texture atlas with a texture for each view.
+ </constant>
+ <constant name="VIEWPORT_VRS_XR" value="2" enum="ViewportVRSMode">
+ VRS texture is supplied by the primary [XRInterface].
+ </constant>
+ <constant name="VIEWPORT_VRS_MAX" value="3" enum="ViewportVRSMode">
+ Represents the size of the [enum ViewportVRSMode] enum.
+ </constant>
<constant name="SKY_MODE_AUTOMATIC" value="0" enum="SkyMode">
</constant>
<constant name="SKY_MODE_QUALITY" value="1" enum="SkyMode">
@@ -4159,16 +4248,17 @@
Mixes the glow with the underlying color to avoid increasing brightness as much while still maintaining a glow effect.
</constant>
<constant name="ENV_TONE_MAPPER_LINEAR" value="0" enum="EnvironmentToneMapper">
- Output color as they came in.
+ Output color as they came in. This can cause bright lighting to look blown out, with noticeable clipping in the output colors.
</constant>
<constant name="ENV_TONE_MAPPER_REINHARD" value="1" enum="EnvironmentToneMapper">
- Use the Reinhard tonemapper.
+ Use the Reinhard tonemapper. Performs a variation on rendered pixels' colors by this formula: [code]color = color / (1 + color)[/code]. This avoids clipping bright highlights, but the resulting image can look a bit dull.
</constant>
<constant name="ENV_TONE_MAPPER_FILMIC" value="2" enum="EnvironmentToneMapper">
- Use the filmic tonemapper.
+ Use the filmic tonemapper. This avoids clipping bright highlights, with a resulting image that usually looks more vivid than [constant ENV_TONE_MAPPER_REINHARD].
</constant>
<constant name="ENV_TONE_MAPPER_ACES" value="3" enum="EnvironmentToneMapper">
- Use the ACES tonemapper.
+ Use the Academy Color Encoding System tonemapper. ACES is slightly more expensive than other options, but it handles bright lighting in a more realistic fashion by desaturating it as it becomes brighter. ACES typically has a more contrasted output compared to [constant ENV_TONE_MAPPER_REINHARD] and [constant ENV_TONE_MAPPER_FILMIC].
+ [b]Note:[/b] This tonemapping operator is called "ACES Fitted" in Godot 3.x.
</constant>
<constant name="ENV_SSR_ROUGHNESS_QUALITY_DISABLED" value="0" enum="EnvironmentSSRRoughnessQuality">
Lowest quality of roughness filter for screen-space reflections. Rough materials will not have blurrier screen-space reflections compared to smooth (non-rough) materials. This is the fastest option.
@@ -4467,63 +4557,63 @@
<constant name="CANVAS_OCCLUDER_POLYGON_CULL_COUNTER_CLOCKWISE" value="2" enum="CanvasOccluderPolygonCullMode">
Culling of the canvas occluder is counterclockwise.
</constant>
- <constant name="GLOBAL_VAR_TYPE_BOOL" value="0" enum="GlobalVariableType">
+ <constant name="GLOBAL_VAR_TYPE_BOOL" value="0" enum="GlobalShaderUniformType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_BVEC2" value="1" enum="GlobalVariableType">
+ <constant name="GLOBAL_VAR_TYPE_BVEC2" value="1" enum="GlobalShaderUniformType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_BVEC3" value="2" enum="GlobalVariableType">
+ <constant name="GLOBAL_VAR_TYPE_BVEC3" value="2" enum="GlobalShaderUniformType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_BVEC4" value="3" enum="GlobalVariableType">
+ <constant name="GLOBAL_VAR_TYPE_BVEC4" value="3" enum="GlobalShaderUniformType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_INT" value="4" enum="GlobalVariableType">
+ <constant name="GLOBAL_VAR_TYPE_INT" value="4" enum="GlobalShaderUniformType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_IVEC2" value="5" enum="GlobalVariableType">
+ <constant name="GLOBAL_VAR_TYPE_IVEC2" value="5" enum="GlobalShaderUniformType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_IVEC3" value="6" enum="GlobalVariableType">
+ <constant name="GLOBAL_VAR_TYPE_IVEC3" value="6" enum="GlobalShaderUniformType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_IVEC4" value="7" enum="GlobalVariableType">
+ <constant name="GLOBAL_VAR_TYPE_IVEC4" value="7" enum="GlobalShaderUniformType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_RECT2I" value="8" enum="GlobalVariableType">
+ <constant name="GLOBAL_VAR_TYPE_RECT2I" value="8" enum="GlobalShaderUniformType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_UINT" value="9" enum="GlobalVariableType">
+ <constant name="GLOBAL_VAR_TYPE_UINT" value="9" enum="GlobalShaderUniformType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_UVEC2" value="10" enum="GlobalVariableType">
+ <constant name="GLOBAL_VAR_TYPE_UVEC2" value="10" enum="GlobalShaderUniformType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_UVEC3" value="11" enum="GlobalVariableType">
+ <constant name="GLOBAL_VAR_TYPE_UVEC3" value="11" enum="GlobalShaderUniformType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_UVEC4" value="12" enum="GlobalVariableType">
+ <constant name="GLOBAL_VAR_TYPE_UVEC4" value="12" enum="GlobalShaderUniformType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_FLOAT" value="13" enum="GlobalVariableType">
+ <constant name="GLOBAL_VAR_TYPE_FLOAT" value="13" enum="GlobalShaderUniformType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_VEC2" value="14" enum="GlobalVariableType">
+ <constant name="GLOBAL_VAR_TYPE_VEC2" value="14" enum="GlobalShaderUniformType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_VEC3" value="15" enum="GlobalVariableType">
+ <constant name="GLOBAL_VAR_TYPE_VEC3" value="15" enum="GlobalShaderUniformType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_VEC4" value="16" enum="GlobalVariableType">
+ <constant name="GLOBAL_VAR_TYPE_VEC4" value="16" enum="GlobalShaderUniformType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_COLOR" value="17" enum="GlobalVariableType">
+ <constant name="GLOBAL_VAR_TYPE_COLOR" value="17" enum="GlobalShaderUniformType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_RECT2" value="18" enum="GlobalVariableType">
+ <constant name="GLOBAL_VAR_TYPE_RECT2" value="18" enum="GlobalShaderUniformType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_MAT2" value="19" enum="GlobalVariableType">
+ <constant name="GLOBAL_VAR_TYPE_MAT2" value="19" enum="GlobalShaderUniformType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_MAT3" value="20" enum="GlobalVariableType">
+ <constant name="GLOBAL_VAR_TYPE_MAT3" value="20" enum="GlobalShaderUniformType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_MAT4" value="21" enum="GlobalVariableType">
+ <constant name="GLOBAL_VAR_TYPE_MAT4" value="21" enum="GlobalShaderUniformType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_TRANSFORM_2D" value="22" enum="GlobalVariableType">
+ <constant name="GLOBAL_VAR_TYPE_TRANSFORM_2D" value="22" enum="GlobalShaderUniformType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_TRANSFORM" value="23" enum="GlobalVariableType">
+ <constant name="GLOBAL_VAR_TYPE_TRANSFORM" value="23" enum="GlobalShaderUniformType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_SAMPLER2D" value="24" enum="GlobalVariableType">
+ <constant name="GLOBAL_VAR_TYPE_SAMPLER2D" value="24" enum="GlobalShaderUniformType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_SAMPLER2DARRAY" value="25" enum="GlobalVariableType">
+ <constant name="GLOBAL_VAR_TYPE_SAMPLER2DARRAY" value="25" enum="GlobalShaderUniformType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_SAMPLER3D" value="26" enum="GlobalVariableType">
+ <constant name="GLOBAL_VAR_TYPE_SAMPLER3D" value="26" enum="GlobalShaderUniformType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_SAMPLERCUBE" value="27" enum="GlobalVariableType">
+ <constant name="GLOBAL_VAR_TYPE_SAMPLERCUBE" value="27" enum="GlobalShaderUniformType">
</constant>
- <constant name="GLOBAL_VAR_TYPE_MAX" value="28" enum="GlobalVariableType">
+ <constant name="GLOBAL_VAR_TYPE_MAX" value="28" enum="GlobalShaderUniformType">
</constant>
<constant name="RENDERING_INFO_TOTAL_OBJECTS_IN_FRAME" value="0" enum="RenderingInfo">
</constant>
diff --git a/doc/classes/Resource.xml b/doc/classes/Resource.xml
index b08b1540ab..3adf10da2d 100644
--- a/doc/classes/Resource.xml
+++ b/doc/classes/Resource.xml
@@ -19,11 +19,11 @@
</method>
<method name="duplicate" qualifiers="const">
<return type="Resource" />
- <argument index="0" name="subresources" type="bool" default="false" />
+ <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.
+ By default, sub-resources are shared between resource copies for efficiency. This can be changed by passing [code]true[/code] to the [param subresources] argument which will copy the subresources.
+ [b]Note:[/b] If [param subresources] is [code]true[/code], this method will only perform a shallow copy. Nested resources within subresources will not be duplicated and will still be shared.
[b]Note:[/b] When duplicating a resource, only [code]export[/code]ed properties are copied. Other properties will be set to their default value in the new resource.
</description>
</method>
@@ -60,7 +60,7 @@
</method>
<method name="take_over_path">
<return type="void" />
- <argument index="0" name="path" type="String" />
+ <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.
</description>
diff --git a/doc/classes/ResourceFormatLoader.xml b/doc/classes/ResourceFormatLoader.xml
index 36b64f5a86..9b8c8d4d9d 100644
--- a/doc/classes/ResourceFormatLoader.xml
+++ b/doc/classes/ResourceFormatLoader.xml
@@ -13,16 +13,22 @@
<methods>
<method name="_exists" qualifiers="virtual const">
<return type="bool" />
- <argument index="0" name="path" type="String" />
+ <param index="0" name="path" type="String" />
+ <description>
+ </description>
+ </method>
+ <method name="_get_classes_used" qualifiers="virtual const">
+ <return type="PackedStringArray" />
+ <param index="0" name="path" type="String" />
<description>
</description>
</method>
<method name="_get_dependencies" qualifiers="virtual const">
<return type="PackedStringArray" />
- <argument index="0" name="path" type="String" />
- <argument index="1" name="add_types" type="bool" />
+ <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>
@@ -34,7 +40,7 @@
</method>
<method name="_get_resource_type" qualifiers="virtual const">
<return type="String" />
- <argument index="0" name="path" type="String" />
+ <param index="0" name="path" type="String" />
<description>
Gets the class name of the resource associated with the given path. If the loader cannot handle it, it should return [code]""[/code].
[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.
@@ -42,13 +48,13 @@
</method>
<method name="_get_resource_uid" qualifiers="virtual const">
<return type="int" />
- <argument index="0" name="path" type="String" />
+ <param index="0" name="path" type="String" />
<description>
</description>
</method>
<method name="_handles_type" qualifiers="virtual const">
<return type="bool" />
- <argument index="0" name="type" type="StringName" />
+ <param index="0" name="type" type="StringName" />
<description>
Tells which resource class this loader can load.
[b]Note:[/b] Custom resource types defined by scripts aren't known by the [ClassDB], so you might just handle [code]"Resource"[/code] for them.
@@ -56,21 +62,21 @@
</method>
<method name="_load" qualifiers="virtual const">
<return type="Variant" />
- <argument index="0" name="path" type="String" />
- <argument index="1" name="original_path" type="String" />
- <argument index="2" name="use_sub_threads" type="bool" />
- <argument index="3" name="cache_mode" type="int" />
+ <param index="0" name="path" type="String" />
+ <param index="1" name="original_path" type="String" />
+ <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="_rename_dependencies" qualifiers="virtual const">
<return type="int" />
- <argument index="0" name="path" type="String" />
- <argument index="1" name="renames" type="Dictionary" />
+ <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 c156814a1d..05bfcf3446 100644
--- a/doc/classes/ResourceFormatSaver.xml
+++ b/doc/classes/ResourceFormatSaver.xml
@@ -12,25 +12,25 @@
<methods>
<method name="_get_recognized_extensions" qualifiers="virtual const">
<return type="PackedStringArray" />
- <argument index="0" name="resource" type="Resource" />
+ <param index="0" name="resource" type="Resource" />
<description>
Returns the list of extensions available for saving the resource object, provided it is recognized (see [method _recognize]).
</description>
</method>
<method name="_recognize" qualifiers="virtual const">
<return type="bool" />
- <argument index="0" name="resource" type="Resource" />
+ <param index="0" name="resource" type="Resource" />
<description>
Returns whether the given resource object can be saved by this saver.
</description>
</method>
<method name="_save" qualifiers="virtual">
<return type="int" />
- <argument index="0" name="path" type="String" />
- <argument index="1" name="resource" type="Resource" />
- <argument index="2" name="flags" type="int" />
+ <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 1ffb0dba5c..d51a5293ec 100644
--- a/doc/classes/ResourceLoader.xml
+++ b/doc/classes/ResourceLoader.xml
@@ -6,66 +6,76 @@
<description>
Singleton used to load resource files from the filesystem.
It uses the many [ResourceFormatLoader] classes registered in the engine (either built-in or from a plugin) to load files into memory and convert them to a format that can be used by the engine.
+ [b]Note:[/b] You have to import the files into the engine first to load them using [method load]. If you want to load [Image]s at run-time, you may use [method Image.load]. If you want to import audio files, you can use the snippet described in [member AudioStreamMP3.data].
</description>
<tutorials>
<link title="OS Test Demo">https://godotengine.org/asset-library/asset/677</link>
</tutorials>
<methods>
+ <method name="add_resource_format_loader">
+ <return type="void" />
+ <param index="0" name="format_loader" type="ResourceFormatLoader" />
+ <param index="1" name="at_front" type="bool" default="false" />
+ <description>
+ Registers a new [ResourceFormatLoader]. The ResourceLoader will use the ResourceFormatLoader as described in [method load].
+ This method is performed implicitly for ResourceFormatLoaders written in GDScript (see [ResourceFormatLoader] for more information).
+ </description>
+ </method>
<method name="exists">
<return type="bool" />
- <argument index="0" name="path" type="String" />
- <argument index="1" name="type_hint" type="String" default="&quot;&quot;" />
+ <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" />
- <argument index="0" name="path" type="String" />
+ <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">
<return type="PackedStringArray" />
- <argument index="0" name="type" type="String" />
+ <param index="0" name="type" type="String" />
<description>
Returns the list of recognized extensions for a resource type.
</description>
</method>
<method name="get_resource_uid">
<return type="int" />
- <argument index="0" name="path" type="String" />
+ <param index="0" name="path" type="String" />
<description>
Returns the ID associated with a given resource path, or [code]-1[/code] when no such ID exists.
</description>
</method>
<method name="has_cached">
<return type="bool" />
- <argument index="0" name="path" type="String" />
+ <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>
<method name="load">
<return type="Resource" />
- <argument index="0" name="path" type="String" />
- <argument index="1" name="type_hint" type="String" default="&quot;&quot;" />
- <argument index="2" name="cache_mode" type="int" enum="ResourceLoader.CacheMode" default="1" />
+ <param index="0" name="path" type="String" />
+ <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>
</method>
<method name="load_threaded_get">
<return type="Resource" />
- <argument index="0" name="path" type="String" />
+ <param index="0" name="path" type="String" />
<description>
Returns the resource loaded by [method load_threaded_request].
If this is called before the loading thread is done (i.e. [method load_threaded_get_status] is not [constant THREAD_LOAD_LOADED]), the calling thread will be blocked until the resource has finished loading.
@@ -73,25 +83,34 @@
</method>
<method name="load_threaded_get_status">
<return type="int" enum="ResourceLoader.ThreadLoadStatus" />
- <argument index="0" name="path" type="String" />
- <argument index="1" name="progress" type="Array" default="[]" />
+ <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">
<return type="int" enum="Error" />
- <argument index="0" name="path" type="String" />
- <argument index="1" name="type_hint" type="String" default="&quot;&quot;" />
- <argument index="2" name="use_sub_threads" type="bool" default="false" />
+ <param index="0" name="path" type="String" />
+ <param index="1" name="type_hint" type="String" default="&quot;&quot;" />
+ <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 [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">
+ <return type="void" />
+ <param index="0" name="format_loader" type="ResourceFormatLoader" />
<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).
+ Unregisters the given [ResourceFormatLoader].
</description>
</method>
<method name="set_abort_on_missing_resources">
<return type="void" />
- <argument index="0" name="abort" type="bool" />
+ <param index="0" name="abort" type="bool" />
<description>
Changes the behavior on missing sub-resources. The default behavior is to abort loading.
</description>
diff --git a/doc/classes/ResourcePreloader.xml b/doc/classes/ResourcePreloader.xml
index 63db131cec..17904697e6 100644
--- a/doc/classes/ResourcePreloader.xml
+++ b/doc/classes/ResourcePreloader.xml
@@ -12,17 +12,17 @@
<methods>
<method name="add_resource">
<return type="void" />
- <argument index="0" name="name" type="StringName" />
- <argument index="1" name="resource" type="Resource" />
+ <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" />
- <argument index="0" name="name" type="StringName" />
+ <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">
@@ -33,24 +33,24 @@
</method>
<method name="has_resource" qualifiers="const">
<return type="bool" />
- <argument index="0" name="name" type="StringName" />
+ <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" />
- <argument index="0" name="name" type="StringName" />
+ <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">
<return type="void" />
- <argument index="0" name="name" type="StringName" />
- <argument index="1" name="newname" type="StringName" />
+ <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 a029fb9acf..b0c9056cbc 100644
--- a/doc/classes/ResourceSaver.xml
+++ b/doc/classes/ResourceSaver.xml
@@ -10,48 +10,64 @@
<tutorials>
</tutorials>
<methods>
+ <method name="add_resource_format_saver">
+ <return type="void" />
+ <param index="0" name="format_saver" type="ResourceFormatSaver" />
+ <param index="1" name="at_front" type="bool" default="false" />
+ <description>
+ Registers a new [ResourceFormatSaver]. The ResourceSaver will use the ResourceFormatSaver as described in [method save].
+ This method is performed implicitly for ResourceFormatSavers written in GDScript (see [ResourceFormatSaver] for more information).
+ </description>
+ </method>
<method name="get_recognized_extensions">
<return type="PackedStringArray" />
- <argument index="0" name="type" type="Resource" />
+ <param index="0" name="type" type="Resource" />
<description>
Returns the list of extensions available for saving a resource of a given type.
</description>
</method>
+ <method name="remove_resource_format_saver">
+ <return type="void" />
+ <param index="0" name="format_saver" type="ResourceFormatSaver" />
+ <description>
+ Unregisters the given [ResourceFormatSaver].
+ </description>
+ </method>
<method name="save">
<return type="int" enum="Error" />
- <argument index="0" name="path" type="String" />
- <argument index="1" name="resource" type="Resource" />
- <argument index="2" name="flags" type="int" default="0" />
+ <param index="0" name="resource" type="Resource" />
+ <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.
- 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>
</methods>
<constants>
- <constant name="FLAG_NONE" value="0" enum="SaverFlags">
+ <constant name="FLAG_NONE" value="0" enum="SaverFlags" is_bitfield="true">
No resource saving option.
</constant>
- <constant name="FLAG_RELATIVE_PATHS" value="1" enum="SaverFlags">
+ <constant name="FLAG_RELATIVE_PATHS" value="1" enum="SaverFlags" is_bitfield="true">
Save the resource with a path relative to the scene which uses it.
</constant>
- <constant name="FLAG_BUNDLE_RESOURCES" value="2" enum="SaverFlags">
+ <constant name="FLAG_BUNDLE_RESOURCES" value="2" enum="SaverFlags" is_bitfield="true">
Bundles external resources.
</constant>
- <constant name="FLAG_CHANGE_PATH" value="4" enum="SaverFlags">
+ <constant name="FLAG_CHANGE_PATH" value="4" enum="SaverFlags" is_bitfield="true">
Changes the [member Resource.resource_path] of the saved resource to match its new location.
</constant>
- <constant name="FLAG_OMIT_EDITOR_PROPERTIES" value="8" enum="SaverFlags">
+ <constant name="FLAG_OMIT_EDITOR_PROPERTIES" value="8" enum="SaverFlags" is_bitfield="true">
Do not save editor-specific metadata (identified by their [code]__editor[/code] prefix).
</constant>
- <constant name="FLAG_SAVE_BIG_ENDIAN" value="16" enum="SaverFlags">
+ <constant name="FLAG_SAVE_BIG_ENDIAN" value="16" enum="SaverFlags" is_bitfield="true">
Save as big endian (see [member File.big_endian]).
</constant>
- <constant name="FLAG_COMPRESS" value="32" enum="SaverFlags">
+ <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.
</constant>
- <constant name="FLAG_REPLACE_SUBRESOURCE_PATHS" value="64" enum="SaverFlags">
+ <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]).
</constant>
</constants>
diff --git a/doc/classes/ResourceUID.xml b/doc/classes/ResourceUID.xml
index f91c39b512..7ac5dd58a8 100644
--- a/doc/classes/ResourceUID.xml
+++ b/doc/classes/ResourceUID.xml
@@ -1,64 +1,83 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="ResourceUID" inherits="Object" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
+ Singleton for managing a cache of resource UIDs within a project.
</brief_description>
<description>
+ Resources can not only be referenced using their resource paths [code]res://[/code], but alternatively through a unique identifier specified via [code]uid://[/code].
+ Using UIDs allows for the engine to keep references between resources intact, even if the files get renamed or moved.
+ This singleton is responsible for keeping track of all registered resource UIDs of a project, generating new UIDs and converting between the string and integer representation.
</description>
<tutorials>
</tutorials>
<methods>
<method name="add_id">
<return type="void" />
- <argument index="0" name="id" type="int" />
- <argument index="1" name="path" type="String" />
+ <param index="0" name="id" type="int" />
+ <param index="1" name="path" type="String" />
<description>
+ Adds a new UID value which is mapped to the given resource path.
+ Fails with an error if the UID already exists, so be sure to check [method has_id] beforehand, or use [method set_id] instead.
</description>
</method>
<method name="create_id">
<return type="int" />
<description>
+ Generates a random resource UID which is guaranteed to be unique within the list of currently loaded UIDs.
+ In order for this UID to be registered, you must call [method add_id] or [method set_id].
</description>
</method>
<method name="get_id_path" qualifiers="const">
<return type="String" />
- <argument index="0" name="id" type="int" />
+ <param index="0" name="id" type="int" />
<description>
+ Returns the path that the given UID value refers to.
+ Fails with an error if the UID does not exist, so be sure to check [method has_id] beforehand.
</description>
</method>
<method name="has_id" qualifiers="const">
<return type="bool" />
- <argument index="0" name="id" type="int" />
+ <param index="0" name="id" type="int" />
<description>
+ Returns whether the given UID value is known to the cache.
</description>
</method>
<method name="id_to_text" qualifiers="const">
<return type="String" />
- <argument index="0" name="id" type="int" />
+ <param index="0" name="id" type="int" />
<description>
+ Converts the given UID to a [code]uid://[/code] string value.
</description>
</method>
<method name="remove_id">
<return type="void" />
- <argument index="0" name="id" type="int" />
+ <param index="0" name="id" type="int" />
<description>
+ Removes a loaded UID value from the cache.
+ Fails with an error if the UID does not exist, so be sure to check [method has_id] beforehand.
</description>
</method>
<method name="set_id">
<return type="void" />
- <argument index="0" name="id" type="int" />
- <argument index="1" name="path" type="String" />
+ <param index="0" name="id" type="int" />
+ <param index="1" name="path" type="String" />
<description>
+ Updates the resource path of an existing UID.
+ Fails with an error if the UID does not exist, so be sure to check [method has_id] beforehand, or use [method add_id] instead.
</description>
</method>
<method name="text_to_id" qualifiers="const">
<return type="int" />
- <argument index="0" name="text_id" type="String" />
+ <param index="0" name="text_id" type="String" />
<description>
+ Extracts the UID value from the given [code]uid://[/code] string.
</description>
</method>
</methods>
<constants>
<constant name="INVALID_ID" value="-1">
+ The value to use for an invalid UID, for example if the resource could not be loaded.
+ Its text representation is [code]uid://&lt;invalid&gt;[/code].
</constant>
</constants>
</class>
diff --git a/doc/classes/RichTextEffect.xml b/doc/classes/RichTextEffect.xml
index 2256839378..c01546524d 100644
--- a/doc/classes/RichTextEffect.xml
+++ b/doc/classes/RichTextEffect.xml
@@ -25,9 +25,9 @@
<methods>
<method name="_process_custom_fx" qualifiers="virtual const">
<return type="bool" />
- <argument index="0" name="char_fx" type="CharFXTransform" />
+ <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 62a692d4a7..f96e136a57 100644
--- a/doc/classes/RichTextLabel.xml
+++ b/doc/classes/RichTextLabel.xml
@@ -18,28 +18,28 @@
<methods>
<method name="add_image">
<return type="void" />
- <argument index="0" name="image" type="Texture2D" />
- <argument index="1" name="width" type="int" default="0" />
- <argument index="2" name="height" type="int" default="0" />
- <argument index="3" name="color" type="Color" default="Color(1, 1, 1, 1)" />
- <argument index="4" name="inline_align" type="int" enum="InlineAlignment" default="5" />
+ <param index="0" name="image" type="Texture2D" />
+ <param index="1" name="width" type="int" default="0" />
+ <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" />
<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 and a [param color] to tint 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.
</description>
</method>
<method name="add_text">
<return type="void" />
- <argument index="0" name="text" type="String" />
+ <param index="0" name="text" type="String" />
<description>
Adds raw non-BBCode-parsed text to the tag stack.
</description>
</method>
<method name="append_text">
<return type="void" />
- <argument index="0" name="bbcode" type="String" />
+ <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>
@@ -57,41 +57,47 @@
</method>
<method name="get_character_line">
<return type="int" />
- <argument index="0" name="character" type="int" />
+ <param index="0" name="character" type="int" />
<description>
Returns the line number of the character position provided.
+ [b]Note:[/b] If [member threaded] is enabled, this method returns a value for the loaded part of the document. Use [method is_ready] or [signal finished] to determine whether document is fully loaded.
</description>
</method>
<method name="get_character_paragraph">
<return type="int" />
- <argument index="0" name="character" type="int" />
+ <param index="0" name="character" type="int" />
<description>
Returns the paragraph number of the character position provided.
+ [b]Note:[/b] If [member threaded] is enabled, this method returns a value for the loaded part of the document. Use [method is_ready] or [signal finished] to determine whether document is fully loaded.
</description>
</method>
<method name="get_content_height" qualifiers="const">
<return type="int" />
<description>
Returns the height of the content.
+ [b]Note:[/b] If [member threaded] is enabled, this method returns a value for the loaded part of the document. Use [method is_ready] or [signal finished] to determine whether document is fully loaded.
</description>
</method>
<method name="get_content_width" qualifiers="const">
<return type="int" />
<description>
Returns the width of the content.
+ [b]Note:[/b] If [member threaded] is enabled, this method returns a value for the loaded part of the document. Use [method is_ready] or [signal finished] to determine whether document is fully loaded.
</description>
</method>
<method name="get_line_count" qualifiers="const">
<return type="int" />
<description>
Returns the total number of lines in the text. Wrapped text is counted as multiple lines.
+ [b]Note:[/b] If [member threaded] is enabled, this method returns a value for the loaded part of the document. Use [method is_ready] or [signal finished] to determine whether document is fully loaded.
</description>
</method>
<method name="get_line_offset">
<return type="float" />
- <argument index="0" name="line" type="int" />
+ <param index="0" name="line" type="int" />
<description>
Returns the vertical offset of the line found at the provided index.
+ [b]Note:[/b] If [member threaded] is enabled, this method returns a value for the loaded part of the document. Use [method is_ready] or [signal finished] to determine whether document is fully loaded.
</description>
</method>
<method name="get_menu" qualifiers="const">
@@ -109,9 +115,10 @@
</method>
<method name="get_paragraph_offset">
<return type="float" />
- <argument index="0" name="paragraph" type="int" />
+ <param index="0" name="paragraph" type="int" />
<description>
Returns the vertical offset of the paragraph found at the provided index.
+ [b]Note:[/b] If [member threaded] is enabled, this method returns a value for the loaded part of the document. Use [method is_ready] or [signal finished] to determine whether document is fully loaded.
</description>
</method>
<method name="get_parsed_text" qualifiers="const">
@@ -155,19 +162,21 @@
<return type="int" />
<description>
Returns the number of visible lines.
+ [b]Note:[/b] If [member threaded] is enabled, this method returns a value for the loaded part of the document. Use [method is_ready] or [signal finished] to determine whether document is fully loaded.
</description>
</method>
<method name="get_visible_paragraph_count" qualifiers="const">
<return type="int" />
<description>
Returns the number of visible paragraphs. A paragraph is considered visible if at least one of its lines is visible.
+ [b]Note:[/b] If [member threaded] is enabled, this method returns a value for the loaded part of the document. Use [method is_ready] or [signal finished] to determine whether document is fully loaded.
</description>
</method>
<method name="install_effect">
<return type="void" />
- <argument index="0" name="effect" type="Variant" />
+ <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">
@@ -176,6 +185,12 @@
Returns whether the menu is visible. Use this instead of [code]get_menu().visible[/code] to improve performance (so the creation of the menu is avoided).
</description>
</method>
+ <method name="is_ready" qualifiers="const">
+ <return type="bool" />
+ <description>
+ If [member threaded] is enabled, returns [code]true[/code] if the background thread has finished text processing, otherwise always return [code]true[/code].
+ </description>
+ </method>
<method name="newline">
<return type="void" />
<description>
@@ -184,16 +199,16 @@
</method>
<method name="parse_bbcode">
<return type="void" />
- <argument index="0" name="bbcode" type="String" />
+ <param index="0" name="bbcode" type="String" />
<description>
The assignment version of [method append_text]. Clears the tag stack and inserts the new content.
</description>
</method>
<method name="parse_expressions_for_values">
<return type="Dictionary" />
- <argument index="0" name="expressions" type="PackedStringArray" />
+ <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">
@@ -204,7 +219,7 @@
</method>
<method name="push_bgcolor">
<return type="void" />
- <argument index="0" name="bgcolor" type="Color" />
+ <param index="0" name="bgcolor" type="Color" />
<description>
Adds a [code][bgcolor][/code] tag to the tag stack.
</description>
@@ -229,64 +244,57 @@
</method>
<method name="push_color">
<return type="void" />
- <argument index="0" name="color" type="Color" />
+ <param index="0" name="color" type="Color" />
<description>
Adds a [code][color][/code] tag to the tag stack.
</description>
</method>
<method name="push_dropcap">
<return type="void" />
- <argument index="0" name="string" type="String" />
- <argument index="1" name="font" type="Font" />
- <argument index="2" name="size" type="int" />
- <argument index="3" name="dropcap_margins" type="Rect2" default="Rect2(0, 0, 0, 0)" />
- <argument index="4" name="color" type="Color" default="Color(1, 1, 1, 1)" />
- <argument index="5" name="outline_size" type="int" default="0" />
- <argument index="6" name="outline_color" type="Color" default="Color(0, 0, 0, 0)" />
+ <param index="0" name="string" type="String" />
+ <param index="1" name="font" type="Font" />
+ <param index="2" name="size" type="int" />
+ <param index="3" name="dropcap_margins" type="Rect2" default="Rect2(0, 0, 0, 0)" />
+ <param index="4" name="color" type="Color" default="Color(1, 1, 1, 1)" />
+ <param index="5" name="outline_size" type="int" default="0" />
+ <param index="6" name="outline_color" type="Color" default="Color(0, 0, 0, 0)" />
<description>
Adds a [code][dropcap][/code] tag to the tag stack. Drop cap (dropped capital) is a decorative element at the beginning of a paragraph that is larger than the rest of the text.
</description>
</method>
<method name="push_fgcolor">
<return type="void" />
- <argument index="0" name="fgcolor" type="Color" />
+ <param index="0" name="fgcolor" type="Color" />
<description>
Adds a [code][fgcolor][/code] tag to the tag stack.
</description>
</method>
<method name="push_font">
<return type="void" />
- <argument index="0" name="font" type="Font" />
+ <param index="0" name="font" type="Font" />
+ <param index="1" name="font_size" type="int" />
<description>
Adds a [code][font][/code] tag to the tag stack. Overrides default fonts for its duration.
</description>
</method>
- <method name="push_font_features">
- <return type="void" />
- <argument index="0" name="opentype_features" type="Dictionary" />
- <description>
- Adds a [code][ot_feature][/code] tag to the tag stack. Overrides default OpenType font feature for its duration.
- </description>
- </method>
<method name="push_font_size">
<return type="void" />
- <argument index="0" name="font_size" type="int" />
+ <param index="0" name="font_size" type="int" />
<description>
- Adds a [code][font_size][/code] tag to the tag stack. Overrides default font size for its duration.
</description>
</method>
<method name="push_hint">
<return type="void" />
- <argument index="0" name="description" type="String" />
+ <param index="0" name="description" type="String" />
<description>
Adds a [code][hint][/code] tag to the tag stack. Same as BBCode [code][hint=something]{text}[/hint][/code].
</description>
</method>
<method name="push_indent">
<return type="void" />
- <argument index="0" name="level" type="int" />
+ <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">
@@ -297,16 +305,16 @@
</method>
<method name="push_list">
<return type="void" />
- <argument index="0" name="level" type="int" />
- <argument index="1" name="type" type="int" enum="RichTextLabel.ListType" />
- <argument index="2" name="capitalize" type="bool" />
+ <param index="0" name="level" type="int" />
+ <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">
<return type="void" />
- <argument index="0" name="data" type="Variant" />
+ <param index="0" name="data" type="Variant" />
<description>
Adds a [code][meta][/code] tag to the tag stack. Similar to the BBCode [code][url=something]{text}[/url][/code], but supports non-[String] metadata types.
</description>
@@ -325,24 +333,24 @@
</method>
<method name="push_outline_color">
<return type="void" />
- <argument index="0" name="color" type="Color" />
+ <param index="0" name="color" type="Color" />
<description>
Adds a [code][outline_color][/code] tag to the tag stack. Adds text outline for its duration.
</description>
</method>
<method name="push_outline_size">
<return type="void" />
- <argument index="0" name="outline_size" type="int" />
+ <param index="0" name="outline_size" type="int" />
<description>
Adds a [code][outline_size][/code] tag to the tag stack. Overrides default text outline size for its duration.
</description>
</method>
<method name="push_paragraph">
<return type="void" />
- <argument index="0" name="alignment" type="int" enum="HorizontalAlignment" />
- <argument index="1" name="base_direction" type="int" enum="Control.TextDirection" default="0" />
- <argument index="2" name="language" type="String" default="&quot;&quot;" />
- <argument index="3" name="st_parser" type="int" enum="TextServer.StructuredTextParser" default="0" />
+ <param index="0" name="alignment" type="int" enum="HorizontalAlignment" />
+ <param index="1" name="base_direction" type="int" enum="Control.TextDirection" default="0" />
+ <param index="2" name="language" type="String" default="&quot;&quot;" />
+ <param index="3" name="st_parser" type="int" enum="TextServer.StructuredTextParser" default="0" />
<description>
Adds a [code][p][/code] tag to the tag stack.
</description>
@@ -355,8 +363,8 @@
</method>
<method name="push_table">
<return type="void" />
- <argument index="0" name="columns" type="int" />
- <argument index="1" name="inline_align" type="int" enum="InlineAlignment" default="0" />
+ <param index="0" name="columns" type="int" />
+ <param index="1" name="inline_align" type="int" enum="InlineAlignment" default="0" />
<description>
Adds a [code][table=columns,inline_align][/code] tag to the tag stack.
</description>
@@ -369,24 +377,24 @@
</method>
<method name="remove_line">
<return type="bool" />
- <argument index="0" name="line" type="int" />
+ <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" />
- <argument index="0" name="line" type="int" />
+ <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" />
- <argument index="0" name="paragraph" type="int" />
+ <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">
@@ -398,49 +406,49 @@
</method>
<method name="set_cell_border_color">
<return type="void" />
- <argument index="0" name="color" type="Color" />
+ <param index="0" name="color" type="Color" />
<description>
Sets color of a table cell border.
</description>
</method>
<method name="set_cell_padding">
<return type="void" />
- <argument index="0" name="padding" type="Rect2" />
+ <param index="0" name="padding" type="Rect2" />
<description>
Sets inner padding of a table cell.
</description>
</method>
<method name="set_cell_row_background_color">
<return type="void" />
- <argument index="0" name="odd_row_bg" type="Color" />
- <argument index="1" name="even_row_bg" type="Color" />
+ <param index="0" name="odd_row_bg" type="Color" />
+ <param index="1" name="even_row_bg" type="Color" />
<description>
Sets color of a table cell. Separate colors for alternating rows can be specified.
</description>
</method>
<method name="set_cell_size_override">
<return type="void" />
- <argument index="0" name="min_size" type="Vector2" />
- <argument index="1" name="max_size" type="Vector2" />
+ <param index="0" name="min_size" type="Vector2" />
+ <param index="1" name="max_size" type="Vector2" />
<description>
Sets minimum and maximum size overrides for a table cell.
</description>
</method>
<method name="set_table_column_expand">
<return type="void" />
- <argument index="0" name="column" type="int" />
- <argument index="1" name="expand" type="bool" />
- <argument index="2" name="ratio" type="int" />
+ <param index="0" name="column" type="int" />
+ <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>
<members>
- <member name="autowrap_mode" type="int" setter="set_autowrap_mode" getter="get_autowrap_mode" enum="RichTextLabel.AutowrapMode" default="3">
- If set to something other than [constant AUTOWRAP_OFF], the text gets wrapped inside the node's bounding rectangle. To see how each mode behaves, see [enum AutowrapMode].
+ <member name="autowrap_mode" type="int" setter="set_autowrap_mode" getter="get_autowrap_mode" enum="TextServer.AutowrapMode" default="3">
+ If set to something other than [constant TextServer.AUTOWRAP_OFF], the text gets wrapped inside the node's bounding rectangle. To see how each mode behaves, see [enum TextServer.AutowrapMode].
</member>
<member name="bbcode_enabled" type="bool" setter="set_use_bbcode" getter="is_using_bbcode" default="false">
If [code]true[/code], the label uses BBCode formatting.
@@ -473,8 +481,12 @@
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].
+ 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>
+ <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.
</member>
<member name="scroll_active" type="bool" setter="set_scroll_active" getter="is_scroll_active" default="true">
If [code]true[/code], the scrollbar is visible. Setting this to [code]false[/code] does not block scrolling completely. See [method scroll_to_line].
@@ -504,47 +516,43 @@
<member name="text_direction" type="int" setter="set_text_direction" getter="get_text_direction" enum="Control.TextDirection" default="0">
Base text writing direction.
</member>
+ <member name="threaded" type="bool" setter="set_threaded" getter="is_threaded" default="false">
+ 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 percent_visible] accordingly.
</member>
- <member name="visible_characters_behavior" type="int" setter="set_visible_characters_behavior" getter="get_visible_characters_behavior" enum="RichTextLabel.VisibleCharactersBehavior" default="0">
- Sets the clipping behavior when [member visible_characters] or [member percent_visible] is set. See [enum VisibleCharactersBehavior] for more info.
+ <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.
</member>
</members>
<signals>
+ <signal name="finished">
+ <description>
+ Triggered when the document is fully loaded.
+ </description>
+ </signal>
<signal name="meta_clicked">
- <argument index="0" name="meta" type="Variant" />
+ <param index="0" name="meta" type="Variant" />
<description>
Triggered when the user clicks on content between meta tags. If the meta is defined in text, e.g. [code][url={"data"="hi"}]hi[/url][/code], then the parameter for this signal will be a [String] type. If a particular type or an object is desired, the [method push_meta] method must be used to manually insert the data into the tag stack.
</description>
</signal>
<signal name="meta_hover_ended">
- <argument index="0" name="meta" type="Variant" />
+ <param index="0" name="meta" type="Variant" />
<description>
Triggers when the mouse exits a meta tag.
</description>
</signal>
<signal name="meta_hover_started">
- <argument index="0" name="meta" type="Variant" />
+ <param index="0" name="meta" type="Variant" />
<description>
Triggers when the mouse enters a meta tag.
</description>
</signal>
</signals>
<constants>
- <constant name="AUTOWRAP_OFF" value="0" enum="AutowrapMode">
- Autowrap is disabled.
- </constant>
- <constant name="AUTOWRAP_ARBITRARY" value="1" enum="AutowrapMode">
- Wraps the text inside the node's bounding rectangle by allowing to break lines at arbitrary positions, which is useful when very limited space is available.
- </constant>
- <constant name="AUTOWRAP_WORD" value="2" enum="AutowrapMode">
- Wraps the text inside the node's bounding rectangle by soft-breaking between words.
- </constant>
- <constant name="AUTOWRAP_WORD_SMART" value="3" enum="AutowrapMode">
- Behaves similarly to [constant AUTOWRAP_WORD], but force-breaks a word if that single word does not fit in one line.
- </constant>
<constant name="LIST_NUMBERS" value="0" enum="ListType">
Each list item has a number marker.
</constant>
@@ -611,21 +619,6 @@
</constant>
<constant name="ITEM_CUSTOMFX" value="26" enum="ItemType">
</constant>
- <constant name="VC_CHARS_BEFORE_SHAPING" value="0" enum="VisibleCharactersBehavior">
- Trims text before the shaping. e.g, increasing [member visible_characters] value is visually identical to typing the text.
- </constant>
- <constant name="VC_CHARS_AFTER_SHAPING" value="1" enum="VisibleCharactersBehavior">
- Displays glyphs that are mapped to the first [member visible_characters] characters from the beginning of the text.
- </constant>
- <constant name="VC_GLYPHS_AUTO" value="2" enum="VisibleCharactersBehavior">
- Displays [member percent_visible] 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 percent_visible] glyphs, starting from the left.
- </constant>
- <constant name="VC_GLYPHS_RTL" value="4" enum="VisibleCharactersBehavior">
- Displays [member percent_visible] glyphs, starting from the right.
- </constant>
</constants>
<theme_items>
<theme_item name="default_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
diff --git a/doc/classes/RigidDynamicBody2D.xml b/doc/classes/RigidDynamicBody2D.xml
index 087156989e..1434affee1 100644
--- a/doc/classes/RigidDynamicBody2D.xml
+++ b/doc/classes/RigidDynamicBody2D.xml
@@ -17,14 +17,14 @@
<methods>
<method name="_integrate_forces" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="state" type="PhysicsDirectBodyState2D" />
+ <param index="0" name="state" type="PhysicsDirectBodyState2D" />
<description>
Allows you to read and safely modify the simulation state for the object. Use this instead of [method Node._physics_process] if you need to directly change the body's [code]position[/code] or other physics properties. By default, it works in addition to the usual physics behavior, but [member custom_integrator] allows you to disable the default behavior and write custom force integration for a body.
</description>
</method>
<method name="add_constant_central_force">
<return type="void" />
- <argument index="0" name="force" type="Vector2" />
+ <param index="0" name="force" type="Vector2" />
<description>
Adds a constant directional force without affecting rotation that keeps being applied over time until cleared with [code]constant_force = Vector2(0, 0)[/code].
This is equivalent to using [method add_constant_force] at the body's center of mass.
@@ -32,23 +32,23 @@
</method>
<method name="add_constant_force">
<return type="void" />
- <argument index="0" name="force" type="Vector2" />
- <argument index="1" name="position" type="Vector2" default="Vector2(0, 0)" />
+ <param index="0" name="force" type="Vector2" />
+ <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">
<return type="void" />
- <argument index="0" name="torque" type="float" />
+ <param index="0" name="torque" type="float" />
<description>
Adds a constant rotational force without affecting position that keeps being applied over time until cleared with [code]constant_torque = 0[/code].
</description>
</method>
<method name="apply_central_force">
<return type="void" />
- <argument index="0" name="force" type="Vector2" />
+ <param index="0" name="force" type="Vector2" />
<description>
Applies a directional force without affecting rotation. A force is time dependent and meant to be applied every physics update.
This is equivalent to using [method apply_force] at the body's center of mass.
@@ -56,7 +56,7 @@
</method>
<method name="apply_central_impulse">
<return type="void" />
- <argument index="0" name="impulse" type="Vector2" default="Vector2(0, 0)" />
+ <param index="0" name="impulse" type="Vector2" default="Vector2(0, 0)" />
<description>
Applies a directional impulse without affecting rotation.
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).
@@ -65,33 +65,33 @@
</method>
<method name="apply_force">
<return type="void" />
- <argument index="0" name="force" type="Vector2" />
- <argument index="1" name="position" type="Vector2" default="Vector2(0, 0)" />
+ <param index="0" name="force" type="Vector2" />
+ <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">
<return type="void" />
- <argument index="0" name="impulse" type="Vector2" />
- <argument index="1" name="position" type="Vector2" default="Vector2(0, 0)" />
+ <param index="0" name="impulse" type="Vector2" />
+ <param index="1" name="position" type="Vector2" default="Vector2(0, 0)" />
<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">
<return type="void" />
- <argument index="0" name="torque" type="float" />
+ <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.
</description>
</method>
<method name="apply_torque_impulse">
<return type="void" />
- <argument index="0" name="torque" type="float" />
+ <param index="0" name="torque" type="float" />
<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).
@@ -100,13 +100,20 @@
<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" />
- <argument index="0" name="axis_velocity" type="Vector2" />
+ <param index="0" name="axis_velocity" type="Vector2" />
<description>
Sets the body's velocity on the given axis. The velocity in the given vector axis will be set as the given vector length. This is useful for jumping behavior.
</description>
@@ -142,11 +149,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 body will emit signals when it collides with another RigidDynamicBody2D. 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).
+ If [code]true[/code], the RigidDynamicBody2D will emit signals when it collides with another RigidDynamicBody2D.
+ [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="int" setter="set_continuous_collision_detection_mode" getter="get_continuous_collision_detection_mode" enum="RigidDynamicBody2D.CCDMode" default="0">
Continuous collision detection mode.
@@ -187,6 +191,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.
@@ -197,43 +205,43 @@
</members>
<signals>
<signal name="body_entered">
- <argument index="0" name="body" type="Node" />
+ <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">
- <argument index="0" name="body" type="Node" />
+ <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">
- <argument index="0" name="body_rid" type="RID" />
- <argument index="1" name="body" type="Node" />
- <argument index="2" name="body_shape_index" type="int" />
- <argument index="3" name="local_shape_index" type="int" />
+ <param index="0" name="body_rid" type="RID" />
+ <param index="1" name="body" type="Node" />
+ <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 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 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 RigidDynamicBody2D 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">
- <argument index="0" name="body_rid" type="RID" />
- <argument index="1" name="body" type="Node" />
- <argument index="2" name="body_shape_index" type="int" />
- <argument index="3" name="local_shape_index" type="int" />
+ <param index="0" name="body_rid" type="RID" />
+ <param index="1" name="body" type="Node" />
+ <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 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 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 RigidDynamicBody2D 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/RigidDynamicBody3D.xml
index 285176b8b0..fb747177ae 100644
--- a/doc/classes/RigidDynamicBody3D.xml
+++ b/doc/classes/RigidDynamicBody3D.xml
@@ -17,14 +17,14 @@
<methods>
<method name="_integrate_forces" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="state" type="PhysicsDirectBodyState3D" />
+ <param index="0" name="state" type="PhysicsDirectBodyState3D" />
<description>
Called during physics processing, allowing you to read and safely modify the simulation state for the object. By default, it works in addition to the usual physics behavior, but the [member custom_integrator] property allows you to disable the default behavior and do fully custom force integration for a body.
</description>
</method>
<method name="add_constant_central_force">
<return type="void" />
- <argument index="0" name="force" type="Vector3" />
+ <param index="0" name="force" type="Vector3" />
<description>
Adds a constant directional force without affecting rotation that keeps being applied over time until cleared with [code]constant_force = Vector3(0, 0, 0)[/code].
This is equivalent to using [method add_constant_force] at the body's center of mass.
@@ -32,23 +32,23 @@
</method>
<method name="add_constant_force">
<return type="void" />
- <argument index="0" name="force" type="Vector3" />
- <argument index="1" name="position" type="Vector3" default="Vector3(0, 0, 0)" />
+ <param index="0" name="force" type="Vector3" />
+ <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">
<return type="void" />
- <argument index="0" name="torque" type="Vector3" />
+ <param index="0" name="torque" type="Vector3" />
<description>
Adds a constant rotational force without affecting position that keeps being applied over time until cleared with [code]constant_torque = Vector3(0, 0, 0)[/code].
</description>
</method>
<method name="apply_central_force">
<return type="void" />
- <argument index="0" name="force" type="Vector3" />
+ <param index="0" name="force" type="Vector3" />
<description>
Applies a directional force without affecting rotation. A force is time dependent and meant to be applied every physics update.
This is equivalent to using [method apply_force] at the body's center of mass.
@@ -56,7 +56,7 @@
</method>
<method name="apply_central_impulse">
<return type="void" />
- <argument index="0" name="impulse" type="Vector3" />
+ <param index="0" name="impulse" type="Vector3" />
<description>
Applies a directional impulse without affecting rotation.
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).
@@ -65,45 +65,52 @@
</method>
<method name="apply_force">
<return type="void" />
- <argument index="0" name="force" type="Vector3" />
- <argument index="1" name="position" type="Vector3" default="Vector3(0, 0, 0)" />
+ <param index="0" name="force" type="Vector3" />
+ <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">
<return type="void" />
- <argument index="0" name="impulse" type="Vector3" />
- <argument index="1" name="position" type="Vector3" default="Vector3(0, 0, 0)" />
+ <param index="0" name="impulse" type="Vector3" />
+ <param index="1" name="position" type="Vector3" default="Vector3(0, 0, 0)" />
<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">
<return type="void" />
- <argument index="0" name="torque" type="Vector3" />
+ <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.
</description>
</method>
<method name="apply_torque_impulse">
<return type="void" />
- <argument index="0" name="impulse" type="Vector3" />
+ <param index="0" name="impulse" type="Vector3" />
<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).
</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>
@@ -112,7 +119,7 @@
</method>
<method name="set_axis_velocity">
<return type="void" />
- <argument index="0" name="axis_velocity" type="Vector3" />
+ <param index="0" name="axis_velocity" type="Vector3" />
<description>
Sets an axis velocity. The velocity in the given vector axis will be set as the given vector length. This is useful for jumping behavior.
</description>
@@ -148,11 +155,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 RigidDynamicBody3D will emit signals when it collides with another RigidDynamicBody3D.
+ [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.
@@ -193,6 +197,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.
@@ -203,43 +211,43 @@
</members>
<signals>
<signal name="body_entered">
- <argument index="0" name="body" type="Node" />
+ <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">
- <argument index="0" name="body" type="Node" />
+ <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">
- <argument index="0" name="body_rid" type="RID" />
- <argument index="1" name="body" type="Node" />
- <argument index="2" name="body_shape_index" type="int" />
- <argument index="3" name="local_shape_index" type="int" />
+ <param index="0" name="body_rid" type="RID" />
+ <param index="1" name="body" type="Node" />
+ <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 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 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 RigidDynamicBody3D 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">
- <argument index="0" name="body_rid" type="RID" />
- <argument index="1" name="body" type="Node" />
- <argument index="2" name="body_shape_index" type="int" />
- <argument index="3" name="local_shape_index" type="int" />
+ <param index="0" name="body_rid" type="RID" />
+ <param index="1" name="body" type="Node" />
+ <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 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 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 RigidDynamicBody3D 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/RootMotionView.xml b/doc/classes/RootMotionView.xml
index 88b8f2cd03..3f3b00e2cb 100644
--- a/doc/classes/RootMotionView.xml
+++ b/doc/classes/RootMotionView.xml
@@ -5,25 +5,25 @@
</brief_description>
<description>
[i]Root motion[/i] refers to an animation technique where a mesh's skeleton is used to give impulse to a character. When working with 3D animations, a popular technique is for animators to use the root skeleton bone to give motion to the rest of the skeleton. This allows animating characters in a way where steps actually match the floor below. It also allows precise interaction with objects during cinematics. See also [AnimationTree].
- [b]Note:[/b] [RootMotionView] is only visible in the editor. It will be hidden automatically in the running project, and will also be converted to a plain [Node] in the running project. This means a script attached to a [RootMotionView] node [i]must[/i] have [code]extends Node[/code] instead of [code]extends RootMotionView[/code]. Additionally, it must not be a [code]@tool[/code] script.
+ [b]Note:[/b] [RootMotionView] is only visible in the editor. It will be hidden automatically in the running project.
</description>
<tutorials>
<link title="Using AnimationTree - Root motion">$DOCS_URL/tutorials/animation/animation_tree.html#root-motion</link>
</tutorials>
<members>
- <member name="animation_path" type="NodePath" setter="set_animation_path" getter="get_animation_path">
+ <member name="animation_path" type="NodePath" setter="set_animation_path" getter="get_animation_path" default="NodePath(&quot;&quot;)">
Path to an [AnimationTree] node to use as a basis for root motion.
</member>
- <member name="cell_size" type="float" setter="set_cell_size" getter="get_cell_size">
+ <member name="cell_size" type="float" setter="set_cell_size" getter="get_cell_size" default="1.0">
The grid's cell size in 3D units.
</member>
- <member name="color" type="Color" setter="set_color" getter="get_color">
+ <member name="color" type="Color" setter="set_color" getter="get_color" default="Color(0.5, 0.5, 1, 1)">
The grid's color.
</member>
- <member name="radius" type="float" setter="set_radius" getter="get_radius">
+ <member name="radius" type="float" setter="set_radius" getter="get_radius" default="10.0">
The grid's radius in 3D units. The grid's opacity will fade gradually as the distance from the origin increases until this [member radius] is reached.
</member>
- <member name="zero_y" type="bool" setter="set_zero_y" getter="get_zero_y">
+ <member name="zero_y" type="bool" setter="set_zero_y" getter="get_zero_y" default="true">
If [code]true[/code], the grid's points will all be on the same Y coordinate ([i]local[/i] Y = 0). If [code]false[/code], the points' original Y coordinate is preserved.
</member>
</members>
diff --git a/doc/classes/SceneReplicationConfig.xml b/doc/classes/SceneReplicationConfig.xml
deleted file mode 100644
index aade8ac3be..0000000000
--- a/doc/classes/SceneReplicationConfig.xml
+++ /dev/null
@@ -1,61 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SceneReplicationConfig" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <tutorials>
- </tutorials>
- <methods>
- <method name="add_property">
- <return type="void" />
- <argument index="0" name="path" type="NodePath" />
- <argument index="1" name="index" type="int" default="-1" />
- <description>
- </description>
- </method>
- <method name="get_properties" qualifiers="const">
- <return type="NodePath[]" />
- <description>
- </description>
- </method>
- <method name="property_get_index" qualifiers="const">
- <return type="int" />
- <argument index="0" name="path" type="NodePath" />
- <description>
- </description>
- </method>
- <method name="property_get_spawn">
- <return type="bool" />
- <argument index="0" name="path" type="NodePath" />
- <description>
- </description>
- </method>
- <method name="property_get_sync">
- <return type="bool" />
- <argument index="0" name="path" type="NodePath" />
- <description>
- </description>
- </method>
- <method name="property_set_spawn">
- <return type="void" />
- <argument index="0" name="path" type="NodePath" />
- <argument index="1" name="enabled" type="bool" />
- <description>
- </description>
- </method>
- <method name="property_set_sync">
- <return type="void" />
- <argument index="0" name="path" type="NodePath" />
- <argument index="1" name="enabled" type="bool" />
- <description>
- </description>
- </method>
- <method name="remove_property">
- <return type="void" />
- <argument index="0" name="path" type="NodePath" />
- <description>
- </description>
- </method>
- </methods>
-</class>
diff --git a/doc/classes/SceneState.xml b/doc/classes/SceneState.xml
index d226577a95..acb29838ba 100644
--- a/doc/classes/SceneState.xml
+++ b/doc/classes/SceneState.xml
@@ -12,9 +12,9 @@
<methods>
<method name="get_connection_binds" qualifiers="const">
<return type="Array" />
- <argument index="0" name="idx" type="int" />
+ <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">
@@ -26,44 +26,44 @@
</method>
<method name="get_connection_flags" qualifiers="const">
<return type="int" />
- <argument index="0" name="idx" 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" />
- <argument index="0" name="idx" type="int" />
+ <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" />
- <argument index="0" name="idx" type="int" />
+ <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" />
- <argument index="0" name="idx" type="int" />
+ <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" />
- <argument index="0" name="idx" type="int" />
+ <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" />
- <argument index="0" name="idx" 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">
@@ -75,91 +75,91 @@
</method>
<method name="get_node_groups" qualifiers="const">
<return type="PackedStringArray" />
- <argument index="0" name="idx" type="int" />
+ <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" />
- <argument index="0" name="idx" 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" />
- <argument index="0" name="idx" type="int" />
+ <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" />
- <argument index="0" name="idx" type="int" />
+ <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" />
- <argument index="0" name="idx" type="int" />
+ <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" />
- <argument index="0" name="idx" type="int" />
+ <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">
<return type="NodePath" />
- <argument index="0" name="idx" type="int" />
- <argument index="1" name="for_parent" type="bool" default="false" />
+ <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" />
- <argument index="0" name="idx" 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>
<method name="get_node_property_name" qualifiers="const">
<return type="StringName" />
- <argument index="0" name="idx" type="int" />
- <argument index="1" name="prop_idx" type="int" />
+ <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">
<return type="Variant" />
- <argument index="0" name="idx" type="int" />
- <argument index="1" name="prop_idx" type="int" />
+ <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" />
- <argument index="0" name="idx" type="int" />
+ <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" />
- <argument index="0" name="idx" type="int" />
+ <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 970f5125cd..417703ff01 100644
--- a/doc/classes/SceneTree.xml
+++ b/doc/classes/SceneTree.xml
@@ -15,40 +15,39 @@
<methods>
<method name="call_group" qualifiers="vararg">
<return type="void" />
- <argument index="0" name="group" type="StringName" />
- <argument index="1" name="method" type="StringName" />
+ <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. This method is equivalent of calling [method call_group_flags] with [constant GROUP_CALL_DEFAULT] flag.
- [b]Note:[/b] Due to design limitations, [method call_group] will fail silently if one of the arguments is [code]null[/code].
- [b]Note:[/b] [method call_group] will always call methods with an one-frame delay, in a way similar to [method Object.call_deferred]. To call methods immediately, use [method call_group_flags] with the [constant GROUP_CALL_REALTIME] flag.
+ 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>
<method name="call_group_flags" qualifiers="vararg">
<return type="void" />
- <argument index="0" name="flags" type="int" />
- <argument index="1" name="group" type="StringName" />
- <argument index="2" name="method" type="StringName" />
+ <param index="0" name="flags" type="int" />
+ <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.
- [b]Note:[/b] Due to design limitations, [method call_group_flags] will fail silently if one of the arguments is [code]null[/code].
+ 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 immediately and in reverse order.
- get_tree().call_group_flags(SceneTree.GROUP_CALL_REALTIME | SceneTree.GROUP_CALL_REVERSE, "bases", "destroy")
+ # 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 [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">
<return type="int" enum="Error" />
- <argument index="0" name="path" type="String" />
+ <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.
+ 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] call.
</description>
</method>
<method name="change_scene_to">
<return type="int" enum="Error" />
- <argument index="0" name="packed_scene" type="PackedScene" />
+ <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.
@@ -57,10 +56,10 @@
</method>
<method name="create_timer">
<return type="SceneTreeTimer" />
- <argument index="0" name="time_sec" type="float" />
- <argument index="1" name="process_always" type="bool" default="true" />
+ <param index="0" name="time_sec" type="float" />
+ <param index="1" name="process_always" type="bool" default="true" />
<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 [param process_always] is set to [code]false[/code], pausing the [SceneTree] will also pause the timer.
Commonly used to create a one-shot delay timer as in the following example:
[codeblocks]
[gdscript]
@@ -89,7 +88,7 @@
</method>
<method name="get_first_node_in_group">
<return type="Node" />
- <argument index="0" name="group" type="StringName" />
+ <param index="0" name="group" type="StringName" />
<description>
Returns the first node in the specified group, or [code]null[/code] if the group is empty or does not exist.
</description>
@@ -102,9 +101,9 @@
</method>
<method name="get_multiplayer" qualifiers="const">
<return type="MultiplayerAPI" />
- <argument index="0" name="for_path" type="NodePath" default="NodePath(&quot;&quot;)" />
+ <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">
@@ -114,54 +113,56 @@
</description>
</method>
<method name="get_nodes_in_group">
- <return type="Array" />
- <argument index="0" name="group" type="StringName" />
+ <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>
</method>
<method name="has_group" qualifiers="const">
<return type="bool" />
- <argument index="0" name="name" type="StringName" />
+ <param index="0" name="name" type="StringName" />
<description>
Returns [code]true[/code] if the given group exists.
</description>
</method>
<method name="notify_group">
<return type="void" />
- <argument index="0" name="group" type="StringName" />
- <argument index="1" name="notification" type="int" />
+ <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>
<method name="notify_group_flags">
<return type="void" />
- <argument index="0" name="call_flags" type="int" />
- <argument index="1" name="group" type="StringName" />
- <argument index="2" name="notification" type="int" />
+ <param index="0" name="call_flags" type="int" />
+ <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].
+ 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">
<return type="void" />
- <argument index="0" name="obj" type="Object" />
+ <param index="0" name="obj" type="Object" />
<description>
Queues the given object for deletion, delaying the call to [method Object.free] to after the current frame.
</description>
</method>
<method name="quit">
<return type="void" />
- <argument index="0" name="exit_code" type="int" default="0" />
+ <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.
@@ -174,59 +175,55 @@
Returns [constant OK] on success, [constant ERR_UNCONFIGURED] if no [member current_scene] was defined yet, [constant ERR_CANT_OPEN] if [member current_scene] cannot be loaded into a [PackedScene], or [constant ERR_CANT_CREATE] if the scene cannot be instantiated.
</description>
</method>
- <method name="set_auto_accept_quit">
- <return type="void" />
- <argument index="0" name="enabled" type="bool" />
- <description>
- If [code]true[/code], the application automatically accepts quitting. Enabled by default.
- For mobile platforms, see [method set_quit_on_go_back].
- </description>
- </method>
<method name="set_group">
<return type="void" />
- <argument index="0" name="group" type="StringName" />
- <argument index="1" name="property" type="String" />
- <argument index="2" name="value" type="Variant" />
+ <param index="0" name="group" type="StringName" />
+ <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>
<method name="set_group_flags">
<return type="void" />
- <argument index="0" name="call_flags" type="int" />
- <argument index="1" name="group" type="StringName" />
- <argument index="2" name="property" type="String" />
- <argument index="3" name="value" type="Variant" />
+ <param index="0" name="call_flags" type="int" />
+ <param index="1" name="group" type="StringName" />
+ <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].
+ 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">
<return type="void" />
- <argument index="0" name="multiplayer" type="MultiplayerAPI" />
- <argument index="1" name="root_path" type="NodePath" default="NodePath(&quot;&quot;)" />
+ <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.
- </description>
- </method>
- <method name="set_quit_on_go_back">
- <return type="void" />
- <argument index="0" name="enabled" type="bool" />
- <description>
- If [code]true[/code], the application quits automatically on going back (e.g. on Android). Enabled by default.
- To handle 'Go Back' button when this option is disabled, use [constant DisplayServer.WINDOW_EVENT_GO_BACK_REQUEST].
+ 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>
<members>
+ <member name="auto_accept_quit" type="bool" setter="set_auto_accept_quit" getter="is_auto_accept_quit" default="true">
+ If [code]true[/code], the application automatically accepts quitting.
+ For mobile platforms, see [member quit_on_go_back].
+ </member>
<member name="current_scene" type="Node" setter="set_current_scene" getter="get_current_scene">
The current scene.
</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.
@@ -240,31 +237,35 @@
- 2D and 3D physics will be stopped. This includes signals and collision detection.
- [method Node._process], [method Node._physics_process] and [method Node._input] will not be called anymore in nodes.
</member>
+ <member name="quit_on_go_back" type="bool" setter="set_quit_on_go_back" getter="is_quit_on_go_back" default="true">
+ If [code]true[/code], the application quits automatically on going back (e.g. on Android).
+ To handle 'Go Back' button when this option is disabled, use [constant DisplayServer.WINDOW_EVENT_GO_BACK_REQUEST].
+ </member>
<member name="root" type="Window" setter="" getter="get_root">
The [SceneTree]'s root [Window].
</member>
</members>
<signals>
<signal name="node_added">
- <argument index="0" name="node" type="Node" />
+ <param index="0" name="node" type="Node" />
<description>
Emitted whenever a node is added to the [SceneTree].
</description>
</signal>
<signal name="node_configuration_warning_changed">
- <argument index="0" name="node" type="Node" />
+ <param index="0" name="node" type="Node" />
<description>
Emitted when a node's configuration changed. Only emitted in [code]tool[/code] mode.
</description>
</signal>
<signal name="node_removed">
- <argument index="0" name="node" type="Node" />
+ <param index="0" name="node" type="Node" />
<description>
Emitted whenever a node is removed from the [SceneTree].
</description>
</signal>
<signal name="node_renamed">
- <argument index="0" name="node" type="Node" />
+ <param index="0" name="node" type="Node" />
<description>
Emitted whenever a node is renamed.
</description>
@@ -297,8 +298,8 @@
<constant name="GROUP_CALL_REVERSE" value="1" enum="GroupCallFlags">
Call a group in reverse scene order.
</constant>
- <constant name="GROUP_CALL_REALTIME" value="2" enum="GroupCallFlags">
- Call a group immediately (calls are normally made on idle).
+ <constant name="GROUP_CALL_DEFERRED" value="2" enum="GroupCallFlags">
+ Call a group with a one-frame delay (idle frame, not physics).
</constant>
<constant name="GROUP_CALL_UNIQUE" value="4" enum="GroupCallFlags">
Call a group only once even if the call is executed many times.
diff --git a/doc/classes/SceneTreeTimer.xml b/doc/classes/SceneTreeTimer.xml
index 427608ead3..f28e65c5bf 100644
--- a/doc/classes/SceneTreeTimer.xml
+++ b/doc/classes/SceneTreeTimer.xml
@@ -22,7 +22,7 @@
}
[/csharp]
[/codeblocks]
- The timer will be automatically freed after its time elapses.
+ The timer will be dereferenced after its time elapses. To preserve the timer, you can keep a reference to it. See [RefCounted].
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/Script.xml b/doc/classes/Script.xml
index cd8841c8c5..40ec8ed429 100644
--- a/doc/classes/Script.xml
+++ b/doc/classes/Script.xml
@@ -32,7 +32,7 @@
</method>
<method name="get_property_default_value">
<return type="Variant" />
- <argument index="0" name="property" type="StringName" />
+ <param index="0" name="property" type="StringName" />
<description>
Returns the default value of the specified property.
</description>
@@ -44,26 +44,26 @@
</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>
</method>
<method name="has_script_signal" qualifiers="const">
<return type="bool" />
- <argument index="0" name="signal_name" type="StringName" />
+ <param index="0" name="signal_name" type="StringName" />
<description>
Returns [code]true[/code] if the script, or a base class, defines a signal with the given name.
</description>
@@ -76,9 +76,9 @@
</method>
<method name="instance_has" qualifiers="const">
<return type="bool" />
- <argument index="0" name="base_object" type="Object" />
+ <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">
@@ -89,7 +89,7 @@
</method>
<method name="reload">
<return type="int" enum="Error" />
- <argument index="0" name="keep_state" type="bool" default="false" />
+ <param index="0" name="keep_state" type="bool" default="false" />
<description>
Reloads the script's class implementation. Returns an error code.
</description>
diff --git a/doc/classes/ScriptCreateDialog.xml b/doc/classes/ScriptCreateDialog.xml
index e21fac2d32..6b608aca4f 100644
--- a/doc/classes/ScriptCreateDialog.xml
+++ b/doc/classes/ScriptCreateDialog.xml
@@ -29,10 +29,10 @@
<methods>
<method name="config">
<return type="void" />
- <argument index="0" name="inherits" type="String" />
- <argument index="1" name="path" type="String" />
- <argument index="2" name="built_in_enabled" type="bool" default="true" />
- <argument index="3" name="load_enabled" type="bool" default="true" />
+ <param index="0" name="inherits" type="String" />
+ <param index="1" name="path" type="String" />
+ <param index="2" name="built_in_enabled" type="bool" default="true" />
+ <param index="3" name="load_enabled" type="bool" default="true" />
<description>
Prefills required fields to configure the ScriptCreateDialog for use.
</description>
@@ -40,11 +40,12 @@
</methods>
<members>
<member name="dialog_hide_on_ok" type="bool" setter="set_hide_on_ok" getter="get_hide_on_ok" overrides="AcceptDialog" default="false" />
+ <member name="ok_button_text" type="String" setter="set_ok_button_text" getter="get_ok_button_text" overrides="AcceptDialog" default="&quot;Create&quot;" />
<member name="title" type="String" setter="set_title" getter="get_title" overrides="Window" default="&quot;Attach Node Script&quot;" />
</members>
<signals>
<signal name="script_created">
- <argument index="0" name="script" type="Script" />
+ <param index="0" name="script" type="Script" />
<description>
Emitted when the user clicks the OK button.
</description>
diff --git a/doc/classes/ScriptEditor.xml b/doc/classes/ScriptEditor.xml
index 92488b2392..becaff975e 100644
--- a/doc/classes/ScriptEditor.xml
+++ b/doc/classes/ScriptEditor.xml
@@ -22,35 +22,35 @@
</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>
</method>
<method name="goto_line">
<return type="void" />
- <argument index="0" name="line_number" type="int" />
+ <param index="0" name="line_number" type="int" />
<description>
Goes to the specified line in the current script.
</description>
</method>
<method name="open_script_create_dialog">
<return type="void" />
- <argument index="0" name="base_name" type="String" />
- <argument index="1" name="base_path" type="String" />
+ <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">
<return type="void" />
- <argument index="0" name="syntax_highlighter" type="EditorSyntaxHighlighter" />
+ <param index="0" name="syntax_highlighter" type="EditorSyntaxHighlighter" />
<description>
Registers the [EditorSyntaxHighlighter] to the editor, the [EditorSyntaxHighlighter] will be available on all open scripts.
[b]Note:[/b] Does not apply to scripts that are already opened.
@@ -58,7 +58,7 @@
</method>
<method name="unregister_syntax_highlighter">
<return type="void" />
- <argument index="0" name="syntax_highlighter" type="EditorSyntaxHighlighter" />
+ <param index="0" name="syntax_highlighter" type="EditorSyntaxHighlighter" />
<description>
Unregisters the [EditorSyntaxHighlighter] from the editor.
[b]Note:[/b] The [EditorSyntaxHighlighter] will still be applied to scripts that are already opened.
@@ -67,13 +67,13 @@
</methods>
<signals>
<signal name="editor_script_changed">
- <argument index="0" name="script" type="Script" />
+ <param index="0" name="script" type="Script" />
<description>
Emitted when user changed active script. Argument is a freshly activated [Script].
</description>
</signal>
<signal name="script_close">
- <argument index="0" name="script" type="Script" />
+ <param index="0" name="script" type="Script" />
<description>
Emitted when editor is about to close the active script. Argument is a [Script] that is going to be closed.
</description>
diff --git a/doc/classes/ScriptEditorBase.xml b/doc/classes/ScriptEditorBase.xml
index 3bed1127ee..c365e0971b 100644
--- a/doc/classes/ScriptEditorBase.xml
+++ b/doc/classes/ScriptEditorBase.xml
@@ -11,7 +11,7 @@
<methods>
<method name="add_syntax_highlighter">
<return type="void" />
- <argument index="0" name="highlighter" type="EditorSyntaxHighlighter" />
+ <param index="0" name="highlighter" type="EditorSyntaxHighlighter" />
<description>
Adds a [EditorSyntaxHighlighter] to the open script.
</description>
@@ -30,7 +30,7 @@
</description>
</signal>
<signal name="go_to_help">
- <argument index="0" name="what" type="String" />
+ <param index="0" name="what" type="String" />
<description>
Emitted when the user requests a specific documentation page.
</description>
@@ -41,20 +41,20 @@
</description>
</signal>
<signal name="replace_in_files_requested">
- <argument index="0" name="text" type="String" />
+ <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.
</description>
</signal>
<signal name="request_help">
- <argument index="0" name="topic" type="String" />
+ <param index="0" name="topic" type="String" />
<description>
Emitted when the user requests contextual help.
</description>
</signal>
<signal name="request_open_script_at_line">
- <argument index="0" name="script" type="Object" />
- <argument index="1" name="line" type="int" />
+ <param index="0" name="script" type="Object" />
+ <param index="1" name="line" type="int" />
<description>
Emitted when the user requests a script.
</description>
@@ -65,7 +65,7 @@
</description>
</signal>
<signal name="search_in_files_requested">
- <argument index="0" name="text" type="String" />
+ <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.
</description>
diff --git a/doc/classes/ScriptExtension.xml b/doc/classes/ScriptExtension.xml
index 91fa6206d7..045eadda41 100644
--- a/doc/classes/ScriptExtension.xml
+++ b/doc/classes/ScriptExtension.xml
@@ -44,7 +44,7 @@
</method>
<method name="_get_member_line" qualifiers="virtual const">
<return type="int" />
- <argument index="0" name="member" type="StringName" />
+ <param index="0" name="member" type="StringName" />
<description>
</description>
</method>
@@ -55,18 +55,18 @@
</method>
<method name="_get_method_info" qualifiers="virtual const">
<return type="Dictionary" />
- <argument index="0" name="method" type="StringName" />
+ <param index="0" name="method" type="StringName" />
<description>
</description>
</method>
<method name="_get_property_default_value" qualifiers="virtual const">
<return type="Variant" />
- <argument index="0" name="property" type="StringName" />
+ <param index="0" name="property" type="StringName" />
<description>
</description>
</method>
- <method name="_get_rpc_methods" qualifiers="virtual const">
- <return type="Dictionary[]" />
+ <method name="_get_rpc_config" qualifiers="virtual const">
+ <return type="Variant" />
<description>
</description>
</method>
@@ -92,13 +92,19 @@
</method>
<method name="_has_method" qualifiers="virtual const">
<return type="bool" />
- <argument index="0" name="method" type="StringName" />
+ <param index="0" name="method" type="StringName" />
+ <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" />
- <argument index="0" name="signal" type="StringName" />
+ <param index="0" name="signal" type="StringName" />
<description>
</description>
</method>
@@ -109,19 +115,19 @@
</method>
<method name="_inherits_script" qualifiers="virtual const">
<return type="bool" />
- <argument index="0" name="script" type="Script" />
+ <param index="0" name="script" type="Script" />
<description>
</description>
</method>
<method name="_instance_create" qualifiers="virtual const">
<return type="void*" />
- <argument index="0" name="for_object" type="Object" />
+ <param index="0" name="for_object" type="Object" />
<description>
</description>
</method>
<method name="_instance_has" qualifiers="virtual const">
<return type="bool" />
- <argument index="0" name="object" type="Object" />
+ <param index="0" name="object" type="Object" />
<description>
</description>
</method>
@@ -142,25 +148,25 @@
</method>
<method name="_placeholder_erased" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="placeholder" type="void*" />
+ <param index="0" name="placeholder" type="void*" />
<description>
</description>
</method>
<method name="_placeholder_instance_create" qualifiers="virtual const">
<return type="void*" />
- <argument index="0" name="for_object" type="Object" />
+ <param index="0" name="for_object" type="Object" />
<description>
</description>
</method>
<method name="_reload" qualifiers="virtual">
<return type="int" enum="Error" />
- <argument index="0" name="keep_state" type="bool" />
+ <param index="0" name="keep_state" type="bool" />
<description>
</description>
</method>
<method name="_set_source_code" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="code" type="String" />
+ <param index="0" name="code" type="String" />
<description>
</description>
</method>
diff --git a/doc/classes/ScriptLanguageExtension.xml b/doc/classes/ScriptLanguageExtension.xml
index d66bb6a7c7..2d41f8e880 100644
--- a/doc/classes/ScriptLanguageExtension.xml
+++ b/doc/classes/ScriptLanguageExtension.xml
@@ -9,29 +9,29 @@
<methods>
<method name="_add_global_constant" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="name" type="StringName" />
- <argument index="1" name="value" type="Variant" />
+ <param index="0" name="name" type="StringName" />
+ <param index="1" name="value" type="Variant" />
<description>
</description>
</method>
<method name="_add_named_global_constant" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="name" type="StringName" />
- <argument index="1" name="value" type="Variant" />
+ <param index="0" name="name" type="StringName" />
+ <param index="1" name="value" type="Variant" />
<description>
</description>
</method>
<method name="_alloc_instance_binding_data" qualifiers="virtual">
<return type="void*" />
- <argument index="0" name="object" type="Object" />
+ <param index="0" name="object" type="Object" />
<description>
</description>
</method>
<method name="_auto_indent_code" qualifiers="virtual const">
<return type="String" />
- <argument index="0" name="code" type="String" />
- <argument index="1" name="from_line" type="int" />
- <argument index="2" name="to_line" type="int" />
+ <param index="0" name="code" type="String" />
+ <param index="1" name="from_line" type="int" />
+ <param index="2" name="to_line" type="int" />
<description>
</description>
</method>
@@ -42,9 +42,9 @@
</method>
<method name="_complete_code" qualifiers="virtual const">
<return type="Dictionary" />
- <argument index="0" name="code" type="String" />
- <argument index="1" name="path" type="String" />
- <argument index="2" name="owner" type="Object" />
+ <param index="0" name="code" type="String" />
+ <param index="1" name="path" type="String" />
+ <param index="2" name="owner" type="Object" />
<description>
</description>
</method>
@@ -65,8 +65,8 @@
</method>
<method name="_debug_get_globals" qualifiers="virtual">
<return type="Dictionary" />
- <argument index="0" name="max_subitems" type="int" />
- <argument index="1" name="max_depth" type="int" />
+ <param index="0" name="max_subitems" type="int" />
+ <param index="1" name="max_depth" type="int" />
<description>
</description>
</method>
@@ -77,57 +77,57 @@
</method>
<method name="_debug_get_stack_level_function" qualifiers="virtual const">
<return type="String" />
- <argument index="0" name="level" type="int" />
+ <param index="0" name="level" type="int" />
<description>
</description>
</method>
<method name="_debug_get_stack_level_instance" qualifiers="virtual">
<return type="void*" />
- <argument index="0" name="level" type="int" />
+ <param index="0" name="level" type="int" />
<description>
</description>
</method>
<method name="_debug_get_stack_level_line" qualifiers="virtual const">
<return type="int" />
- <argument index="0" name="level" type="int" />
+ <param index="0" name="level" type="int" />
<description>
</description>
</method>
<method name="_debug_get_stack_level_locals" qualifiers="virtual">
<return type="Dictionary" />
- <argument index="0" name="level" type="int" />
- <argument index="1" name="max_subitems" type="int" />
- <argument index="2" name="max_depth" type="int" />
+ <param index="0" name="level" type="int" />
+ <param index="1" name="max_subitems" type="int" />
+ <param index="2" name="max_depth" type="int" />
<description>
</description>
</method>
<method name="_debug_get_stack_level_members" qualifiers="virtual">
<return type="Dictionary" />
- <argument index="0" name="level" type="int" />
- <argument index="1" name="max_subitems" type="int" />
- <argument index="2" name="max_depth" type="int" />
+ <param index="0" name="level" type="int" />
+ <param index="1" name="max_subitems" type="int" />
+ <param index="2" name="max_depth" type="int" />
<description>
</description>
</method>
<method name="_debug_parse_stack_level_expression" qualifiers="virtual">
<return type="String" />
- <argument index="0" name="level" type="int" />
- <argument index="1" name="expression" type="String" />
- <argument index="2" name="max_subitems" type="int" />
- <argument index="3" name="max_depth" type="int" />
+ <param index="0" name="level" type="int" />
+ <param index="1" name="expression" type="String" />
+ <param index="2" name="max_subitems" type="int" />
+ <param index="3" name="max_depth" type="int" />
<description>
</description>
</method>
<method name="_execute_file" qualifiers="virtual">
<return type="int" enum="Error" />
- <argument index="0" name="path" type="String" />
+ <param index="0" name="path" type="String" />
<description>
</description>
</method>
<method name="_find_function" qualifiers="virtual const">
<return type="int" />
- <argument index="0" name="class_name" type="String" />
- <argument index="1" name="function_name" type="String" />
+ <param index="0" name="class_name" type="String" />
+ <param index="1" name="function_name" type="String" />
<description>
</description>
</method>
@@ -143,13 +143,13 @@
</method>
<method name="_free_instance_binding_data" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="data" type="void*" />
+ <param index="0" name="data" type="void*" />
<description>
</description>
</method>
<method name="_get_built_in_templates" qualifiers="virtual const">
<return type="Dictionary[]" />
- <argument index="0" name="object" type="StringName" />
+ <param index="0" name="object" type="StringName" />
<description>
</description>
</method>
@@ -165,7 +165,7 @@
</method>
<method name="_get_global_class_name" qualifiers="virtual const">
<return type="Dictionary" />
- <argument index="0" name="path" type="String" />
+ <param index="0" name="path" type="String" />
<description>
</description>
</method>
@@ -174,6 +174,11 @@
<description>
</description>
</method>
+ <method name="_get_public_annotations" qualifiers="virtual const">
+ <return type="Dictionary[]" />
+ <description>
+ </description>
+ </method>
<method name="_get_public_constants" qualifiers="virtual const">
<return type="Dictionary" />
<description>
@@ -206,7 +211,7 @@
</method>
<method name="_handles_global_class_type" qualifiers="virtual const">
<return type="bool" />
- <argument index="0" name="type" type="String" />
+ <param index="0" name="type" type="String" />
<description>
</description>
</method>
@@ -222,7 +227,7 @@
</method>
<method name="_is_control_flow_keyword" qualifiers="virtual const">
<return type="bool" />
- <argument index="0" name="keyword" type="String" />
+ <param index="0" name="keyword" type="String" />
<description>
</description>
</method>
@@ -233,34 +238,34 @@
</method>
<method name="_lookup_code" qualifiers="virtual const">
<return type="Dictionary" />
- <argument index="0" name="code" type="String" />
- <argument index="1" name="symbol" type="String" />
- <argument index="2" name="path" type="String" />
- <argument index="3" name="owner" type="Object" />
+ <param index="0" name="code" type="String" />
+ <param index="1" name="symbol" type="String" />
+ <param index="2" name="path" type="String" />
+ <param index="3" name="owner" type="Object" />
<description>
</description>
</method>
<method name="_make_function" qualifiers="virtual const">
<return type="String" />
- <argument index="0" name="class_name" type="String" />
- <argument index="1" name="function_name" type="String" />
- <argument index="2" name="function_args" type="PackedStringArray" />
+ <param index="0" name="class_name" type="String" />
+ <param index="1" name="function_name" type="String" />
+ <param index="2" name="function_args" type="PackedStringArray" />
<description>
</description>
</method>
<method name="_make_template" qualifiers="virtual const">
<return type="Script" />
- <argument index="0" name="template" type="String" />
- <argument index="1" name="class_name" type="String" />
- <argument index="2" name="base_class_name" type="String" />
+ <param index="0" name="template" type="String" />
+ <param index="1" name="class_name" type="String" />
+ <param index="2" name="base_class_name" type="String" />
<description>
</description>
</method>
<method name="_open_in_external_editor" qualifiers="virtual">
<return type="int" enum="Error" />
- <argument index="0" name="script" type="Script" />
- <argument index="1" name="line" type="int" />
- <argument index="2" name="column" type="int" />
+ <param index="0" name="script" type="Script" />
+ <param index="1" name="line" type="int" />
+ <param index="2" name="column" type="int" />
<description>
</description>
</method>
@@ -271,15 +276,15 @@
</method>
<method name="_profiling_get_accumulated_data" qualifiers="virtual">
<return type="int" />
- <argument index="0" name="info_array" type="ScriptLanguageExtensionProfilingInfo*" />
- <argument index="1" name="info_max" type="int" />
+ <param index="0" name="info_array" type="ScriptLanguageExtensionProfilingInfo*" />
+ <param index="1" name="info_max" type="int" />
<description>
</description>
</method>
<method name="_profiling_get_frame_data" qualifiers="virtual">
<return type="int" />
- <argument index="0" name="info_array" type="ScriptLanguageExtensionProfilingInfo*" />
- <argument index="1" name="info_max" type="int" />
+ <param index="0" name="info_array" type="ScriptLanguageExtensionProfilingInfo*" />
+ <param index="1" name="info_max" type="int" />
<description>
</description>
</method>
@@ -295,13 +300,13 @@
</method>
<method name="_refcount_decremented_instance_binding" qualifiers="virtual">
<return type="bool" />
- <argument index="0" name="object" type="Object" />
+ <param index="0" name="object" type="Object" />
<description>
</description>
</method>
<method name="_refcount_incremented_instance_binding" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="object" type="Object" />
+ <param index="0" name="object" type="Object" />
<description>
</description>
</method>
@@ -312,14 +317,14 @@
</method>
<method name="_reload_tool_script" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="script" type="Script" />
- <argument index="1" name="soft_reload" type="bool" />
+ <param index="0" name="script" type="Script" />
+ <param index="1" name="soft_reload" type="bool" />
<description>
</description>
</method>
<method name="_remove_named_global_constant" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="name" type="StringName" />
+ <param index="0" name="name" type="StringName" />
<description>
</description>
</method>
@@ -345,18 +350,18 @@
</method>
<method name="_validate" qualifiers="virtual const">
<return type="Dictionary" />
- <argument index="0" name="script" type="String" />
- <argument index="1" name="path" type="String" />
- <argument index="2" name="validate_functions" type="bool" />
- <argument index="3" name="validate_errors" type="bool" />
- <argument index="4" name="validate_warnings" type="bool" />
- <argument index="5" name="validate_safe_lines" type="bool" />
+ <param index="0" name="script" type="String" />
+ <param index="1" name="path" type="String" />
+ <param index="2" name="validate_functions" type="bool" />
+ <param index="3" name="validate_errors" type="bool" />
+ <param index="4" name="validate_warnings" type="bool" />
+ <param index="5" name="validate_safe_lines" type="bool" />
<description>
</description>
</method>
<method name="_validate_path" qualifiers="virtual const">
<return type="String" />
- <argument index="0" name="path" type="String" />
+ <param index="0" name="path" type="String" />
<description>
</description>
</method>
@@ -372,11 +377,15 @@
</constant>
<constant name="LOOKUP_RESULT_CLASS_METHOD" value="4" enum="LookupResultType">
</constant>
- <constant name="LOOKUP_RESULT_CLASS_ENUM" value="5" enum="LookupResultType">
+ <constant name="LOOKUP_RESULT_CLASS_SIGNAL" value="5" enum="LookupResultType">
+ </constant>
+ <constant name="LOOKUP_RESULT_CLASS_ENUM" value="6" enum="LookupResultType">
+ </constant>
+ <constant name="LOOKUP_RESULT_CLASS_TBD_GLOBALSCOPE" value="7" enum="LookupResultType">
</constant>
- <constant name="LOOKUP_RESULT_CLASS_TBD_GLOBALSCOPE" value="6" enum="LookupResultType">
+ <constant name="LOOKUP_RESULT_CLASS_ANNOTATION" value="8" enum="LookupResultType">
</constant>
- <constant name="LOOKUP_RESULT_MAX" value="7" enum="LookupResultType">
+ <constant name="LOOKUP_RESULT_MAX" value="9" enum="LookupResultType">
</constant>
<constant name="LOCATION_LOCAL" value="0" enum="CodeCompletionLocation">
The option is local to the location of the code completion query - e.g. a local variable.
diff --git a/doc/classes/ScrollContainer.xml b/doc/classes/ScrollContainer.xml
index 658793c4c0..de586fc3d0 100644
--- a/doc/classes/ScrollContainer.xml
+++ b/doc/classes/ScrollContainer.xml
@@ -5,7 +5,7 @@
</brief_description>
<description>
A ScrollContainer node meant to contain a [Control] child.
- ScrollContainers will automatically create a scrollbar child ([HScrollBar], [VScrollBar], or both) when needed and will only draw the Control within the ScrollContainer area. Scrollbars will automatically be drawn at the right (for vertical) or bottom (for horizontal) and will enable dragging to move the viewable Control (and its children) within the ScrollContainer. Scrollbars will also automatically resize the grabber based on the [member Control.minimum_size] of the Control relative to the ScrollContainer.
+ 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).
</description>
<tutorials>
@@ -14,9 +14,9 @@
<methods>
<method name="ensure_control_visible">
<return type="void" />
- <argument index="0" name="control" type="Control" />
+ <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)
diff --git a/doc/classes/Shader.xml b/doc/classes/Shader.xml
index 10deaf1c41..b7e6d80ccb 100644
--- a/doc/classes/Shader.xml
+++ b/doc/classes/Shader.xml
@@ -12,12 +12,12 @@
<methods>
<method name="get_default_texture_param" qualifiers="const">
<return type="Texture2D" />
- <argument index="0" name="param" type="StringName" />
- <argument index="1" name="index" type="int" default="0" />
+ <param index="0" name="param" 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 param] 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_param" qualifiers="const">
+ <method name="has_uniform" qualifiers="const">
<return type="bool" />
- <argument index="0" name="name" type="StringName" />
+ <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">
<return type="void" />
- <argument index="0" name="param" type="StringName" />
- <argument index="1" name="texture" type="Texture2D" />
- <argument index="2" name="index" type="int" default="0" />
+ <param index="0" name="param" 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 param] 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/ProxyTexture.xml b/doc/classes/ShaderInclude.xml
index 778e3f3f69..40072a933b 100644
--- a/doc/classes/ProxyTexture.xml
+++ b/doc/classes/ShaderInclude.xml
@@ -1,5 +1,5 @@
<?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">
+<class name="ShaderInclude" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
@@ -7,7 +7,7 @@
<tutorials>
</tutorials>
<members>
- <member name="base" type="Texture2D" setter="set_base" getter="get_base">
+ <member name="code" type="String" setter="set_code" getter="get_code" default="&quot;&quot;">
</member>
</members>
</class>
diff --git a/doc/classes/ShaderMaterial.xml b/doc/classes/ShaderMaterial.xml
index 672b660c34..8d4df87b39 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_param" qualifiers="const">
+ <method name="get_shader_uniform" qualifiers="const">
<return type="Variant" />
- <argument index="0" name="param" type="StringName" />
+ <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" />
- <argument 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" />
- <argument 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_param">
+ <method name="set_shader_uniform">
<return type="void" />
- <argument index="0" name="param" type="StringName" />
- <argument index="1" name="value" type="Variant" />
+ <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 03ff3cc188..34ca228795 100644
--- a/doc/classes/Shape2D.xml
+++ b/doc/classes/Shape2D.xml
@@ -12,54 +12,58 @@
<methods>
<method name="collide">
<return type="bool" />
- <argument index="0" name="local_xform" type="Transform2D" />
- <argument index="1" name="with_shape" type="Shape2D" />
- <argument index="2" name="shape_xform" type="Transform2D" />
+ <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 [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" />
- <argument index="0" name="local_xform" type="Transform2D" />
- <argument index="1" name="with_shape" type="Shape2D" />
- <argument index="2" name="shape_xform" type="Transform2D" />
+ <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 the points where this shape touches another. If there are no collisions the list is empty.
- 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]).
+ 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 [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 ([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">
<return type="bool" />
- <argument index="0" name="local_xform" type="Transform2D" />
- <argument index="1" name="local_motion" type="Vector2" />
- <argument index="2" name="with_shape" type="Shape2D" />
- <argument index="3" name="shape_xform" type="Transform2D" />
- <argument index="4" name="shape_motion" type="Vector2" />
+ <param index="0" name="local_xform" type="Transform2D" />
+ <param index="1" name="local_motion" type="Vector2" />
+ <param index="2" name="with_shape" type="Shape2D" />
+ <param index="3" name="shape_xform" type="Transform2D" />
+ <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" />
- <argument index="0" name="local_xform" type="Transform2D" />
- <argument index="1" name="local_motion" type="Vector2" />
- <argument index="2" name="with_shape" type="Shape2D" />
- <argument index="3" name="shape_xform" type="Transform2D" />
- <argument index="4" name="shape_motion" type="Vector2" />
+ <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" />
+ <param index="3" name="shape_xform" type="Transform2D" />
+ <param index="4" name="shape_motion" type="Vector2" />
<description>
- Returns a list of the points where this shape would touch another, if a given movement was applied. If there are no collisions the list is empty.
- 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]).
+ 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 [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 ([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">
<return type="void" />
- <argument index="0" name="canvas_item" type="RID" />
- <argument index="1" name="color" type="Color" />
+ <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>
</methods>
diff --git a/doc/classes/ShapeCast2D.xml b/doc/classes/ShapeCast2D.xml
index 5fcb60dd09..36c3beecb1 100644
--- a/doc/classes/ShapeCast2D.xml
+++ b/doc/classes/ShapeCast2D.xml
@@ -6,7 +6,7 @@
<description>
Shape casting allows to detect collision objects by sweeping the [member shape] along the cast direction determined by [member target_position] (useful for things like beam weapons).
Immediate collision overlaps can be done with the [member target_position] set to [code]Vector2(0, 0)[/code] and by calling [method force_shapecast_update] within the same [b]physics_frame[/b]. This also helps to overcome some limitations of [Area2D] when used as a continuous detection area, often requiring waiting a couple of frames before collision information is available to [Area2D] nodes, and when using the signals creates unnecessary complexity.
- The node can detect multiple collision objects, but usually the first detected collision
+ The node can detect multiple collision objects, but it's usually used to detect the first collision.
[b]Note:[/b] shape casting is more computationally expensive compared to ray casting.
</description>
<tutorials>
@@ -14,14 +14,14 @@
<methods>
<method name="add_exception">
<return type="void" />
- <argument index="0" name="node" type="CollisionObject2D" />
+ <param index="0" name="node" type="CollisionObject2D" />
<description>
Adds a collision exception so the shape does not report collisions with the specified [CollisionObject2D] node.
</description>
</method>
<method name="add_exception_rid">
<return type="void" />
- <argument index="0" name="rid" type="RID" />
+ <param index="0" name="rid" type="RID" />
<description>
Adds a collision exception so the shape does not report collisions with the specified [RID].
</description>
@@ -42,27 +42,27 @@
<method name="get_closest_collision_safe_fraction" qualifiers="const">
<return type="float" />
<description>
- The fraction of the motion (between 0 and 1) of how far the shape can move without triggering a collision. The motion is determined by [member target_position].
+ The fraction from the [ShapeCast2D]'s origin to its [member target_position] (between 0 and 1) of how far the shape can move without triggering a collision.
</description>
</method>
<method name="get_closest_collision_unsafe_fraction" qualifiers="const">
<return type="float" />
<description>
- The fraction of the motion (between 0 and 1) when the shape triggers a collision. The motion is determined by [member target_position].
+ The fraction from the [ShapeCast2D]'s origin to its [member target_position] (between 0 and 1) of how far the shape must move to trigger a collision.
</description>
</method>
<method name="get_collider" qualifiers="const">
<return type="Object" />
- <argument index="0" name="index" type="int" />
+ <param index="0" name="index" type="int" />
<description>
- Returns the [Object] of one of the multiple collisions at [code]index[/code], or [code]null[/code] if no object is intersecting the shape (i.e. [method is_colliding] returns [code]false[/code]).
+ Returns the collided [Object] of one of the multiple collisions at [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_shape" qualifiers="const">
<return type="int" />
- <argument index="0" name="index" type="int" />
+ <param index="0" name="index" type="int" />
<description>
- Returns the shape ID of one of the multiple collisions at [code]index[/code] that the shape intersects, or [code]0[/code] if no object is intersecting the shape (i.e. [method is_colliding] returns [code]false[/code]).
+ Returns the shape ID of the colliding shape of one of the multiple collisions at [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">
@@ -73,23 +73,23 @@
</method>
<method name="get_collision_mask_value" qualifiers="const">
<return type="bool" />
- <argument index="0" name="layer_number" type="int" />
+ <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" />
- <argument index="0" name="index" type="int" />
+ <param index="0" name="index" type="int" />
<description>
- Returns the normal containing one of the multiple collisions at [code]index[/code] of the intersecting object.
+ Returns the normal of one of the multiple collisions at [param index] of the intersecting object.
</description>
</method>
<method name="get_collision_point" qualifiers="const">
<return type="Vector2" />
- <argument index="0" name="index" type="int" />
+ <param index="0" name="index" type="int" />
<description>
- Returns the collision point containing one of the multiple collisions at [code]index[/code] at which the shape intersects the object.
+ Returns the collision point of one of the multiple collisions at [param index] where the shape intersects the colliding object.
[b]Note:[/b] this point is in the [b]global[/b] coordinate system.
</description>
</method>
@@ -101,24 +101,24 @@
</method>
<method name="remove_exception">
<return type="void" />
- <argument index="0" name="node" type="CollisionObject2D" />
+ <param index="0" name="node" type="CollisionObject2D" />
<description>
Removes a collision exception so the shape does report collisions with the specified [CollisionObject2D] node.
</description>
</method>
<method name="remove_exception_rid">
<return type="void" />
- <argument index="0" name="rid" type="RID" />
+ <param index="0" name="rid" type="RID" />
<description>
Removes a collision exception so the shape does report collisions with the specified [RID].
</description>
</method>
<method name="set_collision_mask_value">
<return type="void" />
- <argument index="0" name="layer_number" type="int" />
- <argument index="1" name="value" type="bool" />
+ <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>
@@ -133,7 +133,7 @@
The shape's collision mask. Only objects in at least one collision layer enabled in the mask will be detected.
</member>
<member name="collision_result" type="Array" setter="" getter="_get_collision_result" default="[]">
- A complete collision information. The data returned is the same as in the [method PhysicsDirectSpaceState2D.get_rest_info] method.
+ Returns the complete collision information from the collision sweep. The data returned is the same as in the [method PhysicsDirectSpaceState2D.get_rest_info] method.
</member>
<member name="enabled" type="bool" setter="set_enabled" getter="is_enabled" default="true">
If [code]true[/code], collisions will be reported.
@@ -148,7 +148,7 @@
The number of intersections can be limited with this parameter, to reduce the processing time.
</member>
<member name="shape" type="Shape2D" setter="set_shape" getter="get_shape">
- Any [Shape2D] derived shape used for collision queries.
+ The [Shape2D]-derived shape to be used for collision queries.
</member>
<member name="target_position" type="Vector2" setter="set_target_position" getter="get_target_position" default="Vector2(0, 50)">
The shape's destination point, relative to this node's [code]position[/code].
diff --git a/doc/classes/ShapeCast3D.xml b/doc/classes/ShapeCast3D.xml
new file mode 100644
index 0000000000..cbdf660133
--- /dev/null
+++ b/doc/classes/ShapeCast3D.xml
@@ -0,0 +1,168 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="ShapeCast3D" inherits="Node3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ Node for physics collision sweep and immediate overlap queries. Similar to the [RayCast3D] node.
+ </brief_description>
+ <description>
+ Shape casting allows to detect collision objects by sweeping the [member shape] along the cast direction determined by [member target_position] (useful for things like beam weapons).
+ Immediate collision overlaps can be done with the [member target_position] set to [code]Vector3(0, 0, 0)[/code] and by calling [method force_shapecast_update] within the same [b]physics_frame[/b]. This also helps to overcome some limitations of [Area3D] when used as a continuous detection area, often requiring waiting a couple of frames before collision information is available to [Area3D] nodes, and when using the signals creates unnecessary complexity.
+ The node can detect multiple collision objects, but it's usually used to detect the first collision.
+ [b]Note:[/b] Shape casting is more computationally expensive compared to ray casting.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="add_exception">
+ <return type="void" />
+ <param index="0" name="node" type="Object" />
+ <description>
+ Adds a collision exception so the shape does not report collisions with the specified [CollisionObject3D] node.
+ </description>
+ </method>
+ <method name="add_exception_rid">
+ <return type="void" />
+ <param index="0" name="rid" type="RID" />
+ <description>
+ Adds a collision exception so the shape does not report collisions with the specified [RID].
+ </description>
+ </method>
+ <method name="clear_exceptions">
+ <return type="void" />
+ <description>
+ Removes all collision exceptions for this [ShapeCast3D].
+ </description>
+ </method>
+ <method name="force_shapecast_update">
+ <return type="void" />
+ <description>
+ Updates the collision information for the shape. Use this method to update the collision information immediately instead of waiting for the next [code]_physics_process[/code] call, for example if the shape or its parent has changed state.
+ [b]Note:[/b] [code]enabled == true[/code] is not required for this to work.
+ </description>
+ </method>
+ <method name="get_closest_collision_safe_fraction" qualifiers="const">
+ <return type="float" />
+ <description>
+ The fraction from the [ShapeCast3D]'s origin to its [member target_position] (between 0 and 1) of how far the shape can move without triggering a collision.
+ </description>
+ </method>
+ <method name="get_closest_collision_unsafe_fraction" qualifiers="const">
+ <return type="float" />
+ <description>
+ The fraction from the [ShapeCast3D]'s origin to its [member target_position] (between 0 and 1) of how far the shape must move to trigger a collision.
+ </description>
+ </method>
+ <method name="get_collider" qualifiers="const">
+ <return type="Object" />
+ <param index="0" name="index" type="int" />
+ <description>
+ 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_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 [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">
+ <return type="int" />
+ <description>
+ The number of collisions detected at the point of impact. Use this to iterate over multiple collisions as provided by [method get_collider], [method get_collider_shape], [method get_collision_point], and [method get_collision_normal] methods.
+ </description>
+ </method>
+ <method name="get_collision_mask_value" qualifiers="const">
+ <return type="bool" />
+ <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 [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 [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 [param index] where the shape intersects the colliding object.
+ [b]Note:[/b] this point is in the [b]global[/b] coordinate system.
+ </description>
+ </method>
+ <method name="is_colliding" qualifiers="const">
+ <return type="bool" />
+ <description>
+ Returns whether any object is intersecting with the shape's vector (considering the vector length).
+ </description>
+ </method>
+ <method name="remove_exception">
+ <return type="void" />
+ <param index="0" name="node" type="Object" />
+ <description>
+ Removes a collision exception so the shape does report collisions with the specified [CollisionObject3D] node.
+ </description>
+ </method>
+ <method name="remove_exception_rid">
+ <return type="void" />
+ <param index="0" name="rid" type="RID" />
+ <description>
+ Removes a collision exception so the shape does report collisions with the specified [RID].
+ </description>
+ </method>
+ <method name="resource_changed">
+ <return type="void" />
+ <param index="0" name="resource" type="Resource" />
+ <description>
+ This method is used internally to update the debug gizmo in the editor. Any code placed in this function will be called whenever the [member shape] resource is modified.
+ </description>
+ </method>
+ <method name="set_collision_mask_value">
+ <return type="void" />
+ <param index="0" name="layer_number" type="int" />
+ <param index="1" name="value" type="bool" />
+ <description>
+ 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>
+ <members>
+ <member name="collide_with_areas" type="bool" setter="set_collide_with_areas" getter="is_collide_with_areas_enabled" default="false">
+ If [code]true[/code], collision with [Area3D]s will be reported.
+ </member>
+ <member name="collide_with_bodies" type="bool" setter="set_collide_with_bodies" getter="is_collide_with_bodies_enabled" default="true">
+ If [code]true[/code], collision with [PhysicsBody3D]s will be reported.
+ </member>
+ <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="1">
+ The shape's collision mask. Only objects in at least one collision layer enabled in the mask will be detected. See [url=$DOCS_URL/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information.
+ </member>
+ <member name="collision_result" type="Array" setter="" getter="_get_collision_result" default="[]">
+ Returns the complete collision information from the collision sweep. The data returned is the same as in the [method PhysicsDirectSpaceState3D.get_rest_info] method.
+ </member>
+ <member name="debug_shape_custom_color" type="Color" setter="set_debug_shape_custom_color" getter="get_debug_shape_custom_color" default="Color(0, 0, 0, 1)">
+ The custom color to use to draw the shape in the editor and at run-time if [b]Visible Collision Shapes[/b] is enabled in the [b]Debug[/b] menu. This color will be highlighted at run-time if the [ShapeCast3D] is colliding with something.
+ If set to [code]Color(0.0, 0.0, 0.0)[/code] (by default), the color set in [member ProjectSettings.debug/shapes/collision/shape_color] is used.
+ </member>
+ <member name="enabled" type="bool" setter="set_enabled" getter="is_enabled" default="true">
+ If [code]true[/code], collisions will be reported.
+ </member>
+ <member name="exclude_parent" type="bool" setter="set_exclude_parent_body" getter="get_exclude_parent_body" default="true">
+ If [code]true[/code], the parent node will be excluded from collision detection.
+ </member>
+ <member name="margin" type="float" setter="set_margin" getter="get_margin" default="0.0">
+ The collision margin for the shape. A larger margin helps detecting collisions more consistently, at the cost of precision.
+ </member>
+ <member name="max_results" type="int" setter="set_max_results" getter="get_max_results" default="32">
+ The number of intersections can be limited with this parameter, to reduce the processing time.
+ </member>
+ <member name="shape" type="Shape3D" setter="set_shape" getter="get_shape">
+ The [Shape3D]-derived shape to be used for collision queries.
+ </member>
+ <member name="target_position" type="Vector3" setter="set_target_position" getter="get_target_position" default="Vector3(0, -1, 0)">
+ The shape's destination point, relative to this node's [code]position[/code].
+ </member>
+ </members>
+</class>
diff --git a/doc/classes/Shortcut.xml b/doc/classes/Shortcut.xml
index 46524a1d74..f30a5a5e7c 100644
--- a/doc/classes/Shortcut.xml
+++ b/doc/classes/Shortcut.xml
@@ -24,9 +24,9 @@
</method>
<method name="matches_event" qualifiers="const">
<return type="bool" />
- <argument index="0" name="event" type="InputEvent" />
+ <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 049e7f8777..d99477ee95 100644
--- a/doc/classes/Signal.xml
+++ b/doc/classes/Signal.xml
@@ -18,25 +18,25 @@
</constructor>
<constructor name="Signal">
<return type="Signal" />
- <argument index="0" name="from" type="Signal" />
+ <param index="0" name="from" type="Signal" />
<description>
Constructs a [Signal] as a copy of the given [Signal].
</description>
</constructor>
<constructor name="Signal">
<return type="Signal" />
- <argument index="0" name="object" type="Object" />
- <argument index="1" name="signal" type="StringName" />
+ <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>
<methods>
<method name="connect">
<return type="int" />
- <argument index="0" name="callable" type="Callable" />
- <argument index="1" name="flags" type="int" default="0" />
+ <param index="0" name="callable" type="Callable" />
+ <param index="1" name="flags" type="int" default="0" />
<description>
Connects this signal to the specified [Callable], optionally providing connection flags. You can provide additional arguments to the connected method call by using [method Callable.bind].
[codeblock]
@@ -50,7 +50,7 @@
</method>
<method name="disconnect">
<return type="void" />
- <argument index="0" name="callable" type="Callable" />
+ <param index="0" name="callable" type="Callable" />
<description>
Disconnects this signal from the specified [Callable].
</description>
@@ -87,7 +87,7 @@
</method>
<method name="is_connected" qualifiers="const">
<return type="bool" />
- <argument index="0" name="callable" type="Callable" />
+ <param index="0" name="callable" type="Callable" />
<description>
Returns [code]true[/code] if the specified [Callable] is connected to this signal.
</description>
@@ -101,13 +101,13 @@
<operators>
<operator name="operator !=">
<return type="bool" />
- <argument index="0" name="right" type="Signal" />
+ <param index="0" name="right" type="Signal" />
<description>
</description>
</operator>
<operator name="operator ==">
<return type="bool" />
- <argument index="0" name="right" type="Signal" />
+ <param index="0" name="right" type="Signal" />
<description>
</description>
</operator>
diff --git a/doc/classes/Skeleton2D.xml b/doc/classes/Skeleton2D.xml
index 7867e5afa3..808f93b491 100644
--- a/doc/classes/Skeleton2D.xml
+++ b/doc/classes/Skeleton2D.xml
@@ -13,17 +13,17 @@
<methods>
<method name="execute_modifications">
<return type="void" />
- <argument index="0" name="delta" type="float" />
- <argument index="1" name="execution_mode" type="int" />
+ <param index="0" name="delta" type="float" />
+ <param index="1" name="execution_mode" type="int" />
<description>
Executes all the modifications on the [SkeletonModificationStack2D], if the Skeleton3D has one assigned.
</description>
</method>
<method name="get_bone">
<return type="Bone2D" />
- <argument index="0" name="idx" type="int" />
+ <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">
@@ -34,9 +34,9 @@
</method>
<method name="get_bone_local_pose_override">
<return type="Transform2D" />
- <argument index="0" name="bone_idx" type="int" />
+ <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">
@@ -53,19 +53,19 @@
</method>
<method name="set_bone_local_pose_override">
<return type="void" />
- <argument index="0" name="bone_idx" type="int" />
- <argument index="1" name="override_pose" type="Transform2D" />
- <argument index="2" name="strength" type="float" />
- <argument index="3" name="persistent" type="bool" />
+ <param index="0" name="bone_idx" type="int" />
+ <param index="1" name="override_pose" type="Transform2D" />
+ <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">
<return type="void" />
- <argument index="0" name="modification_stack" type="SkeletonModificationStack2D" />
+ <param index="0" name="modification_stack" type="SkeletonModificationStack2D" />
<description>
Sets the [SkeletonModificationStack2D] attached to this skeleton.
</description>
diff --git a/doc/classes/Skeleton3D.xml b/doc/classes/Skeleton3D.xml
index f271220989..75f7a37752 100644
--- a/doc/classes/Skeleton3D.xml
+++ b/doc/classes/Skeleton3D.xml
@@ -15,18 +15,9 @@
<methods>
<method name="add_bone">
<return type="void" />
- <argument index="0" name="name" type="String" />
+ <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" />
- <argument index="0" name="bone_idx" type="int" />
- <argument 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">
@@ -54,17 +45,17 @@
</method>
<method name="execute_modifications">
<return type="void" />
- <argument index="0" name="delta" type="float" />
- <argument index="1" name="execution_mode" type="int" />
+ <param index="0" name="delta" type="float" />
+ <param index="1" name="execution_mode" type="int" />
<description>
Executes all the modifications on the [SkeletonModificationStack3D], if the Skeleton3D has one assigned.
</description>
</method>
<method name="find_bone" qualifiers="const">
<return type="int" />
- <argument index="0" name="name" type="String" />
+ <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">
@@ -75,104 +66,104 @@
</method>
<method name="force_update_bone_child_transform">
<return type="void" />
- <argument index="0" name="bone_idx" type="int" />
+ <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">
<return type="PackedInt32Array" />
- <argument index="0" name="bone_idx" type="int" />
+ <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">
<return type="Transform3D" />
- <argument index="0" name="bone_idx" type="int" />
+ <param index="0" name="bone_idx" type="int" />
<description>
Returns the overall transform of the specified bone, with respect to the skeleton. Being relative to the skeleton frame, this is not the actual "global" transform of the bone.
</description>
</method>
<method name="get_bone_global_pose_no_override" qualifiers="const">
<return type="Transform3D" />
- <argument index="0" name="bone_idx" type="int" />
+ <param index="0" name="bone_idx" type="int" />
<description>
Returns the overall transform of the specified bone, with respect to the skeleton, but without any global pose overrides. Being relative to the skeleton frame, this is not the actual "global" transform of the bone.
</description>
</method>
<method name="get_bone_global_pose_override" qualifiers="const">
<return type="Transform3D" />
- <argument index="0" name="bone_idx" type="int" />
+ <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" />
- <argument index="0" name="bone_idx" type="int" />
+ <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" />
- <argument index="0" name="bone_idx" type="int" />
+ <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" />
- <argument index="0" name="bone_idx" type="int" />
+ <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" />
- <argument index="0" name="bone_idx" 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">
<return type="Transform3D" />
- <argument index="0" name="bone_idx" type="int" />
+ <param index="0" name="bone_idx" type="int" />
<description>
Returns the pose transform of the specified bone. Pose is applied on top of the custom pose, which is applied on top the rest pose.
</description>
</method>
<method name="get_bone_pose_position" qualifiers="const">
<return type="Vector3" />
- <argument index="0" name="bone_idx" type="int" />
+ <param index="0" name="bone_idx" type="int" />
<description>
</description>
</method>
<method name="get_bone_pose_rotation" qualifiers="const">
<return type="Quaternion" />
- <argument index="0" name="bone_idx" type="int" />
+ <param index="0" name="bone_idx" type="int" />
<description>
</description>
</method>
<method name="get_bone_pose_scale" qualifiers="const">
<return type="Vector3" />
- <argument index="0" name="bone_idx" type="int" />
+ <param index="0" name="bone_idx" type="int" />
<description>
</description>
</method>
<method name="get_bone_rest" qualifiers="const">
<return type="Transform3D" />
- <argument index="0" name="bone_idx" type="int" />
+ <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">
@@ -189,8 +180,8 @@
</method>
<method name="global_pose_to_local_pose">
<return type="Transform3D" />
- <argument index="0" name="bone_idx" type="int" />
- <argument index="1" name="global_pose" type="Transform3D" />
+ <param index="0" name="bone_idx" type="int" />
+ <param index="1" name="global_pose" type="Transform3D" />
<description>
Takes the passed-in global pose and converts it to local pose transform.
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].
@@ -198,7 +189,7 @@
</method>
<method name="global_pose_to_world_transform">
<return type="Transform3D" />
- <argument index="0" name="global_pose" type="Transform3D" />
+ <param index="0" name="global_pose" type="Transform3D" />
<description>
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.
@@ -206,26 +197,26 @@
</method>
<method name="global_pose_z_forward_to_bone_forward">
<return type="Basis" />
- <argument index="0" name="bone_idx" type="int" />
- <argument index="1" name="basis" 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>
<method name="is_bone_enabled" qualifiers="const">
<return type="bool" />
- <argument index="0" name="bone_idx" type="int" />
+ <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">
<return type="Transform3D" />
- <argument index="0" name="bone_idx" type="int" />
- <argument index="1" name="local_pose" 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>
@@ -237,7 +228,7 @@
</method>
<method name="physical_bones_add_collision_exception">
<return type="void" />
- <argument index="0" name="exception" type="RID" />
+ <param index="0" name="exception" type="RID" />
<description>
Adds a collision exception to the physical bone.
Works just like the [RigidDynamicBody3D] node.
@@ -245,7 +236,7 @@
</method>
<method name="physical_bones_remove_collision_exception">
<return type="void" />
- <argument index="0" name="exception" type="RID" />
+ <param index="0" name="exception" type="RID" />
<description>
Removes a collision exception to the physical bone.
Works just like the [RigidDynamicBody3D] node.
@@ -253,7 +244,7 @@
</method>
<method name="physical_bones_start_simulation">
<return type="void" />
- <argument index="0" name="bones" type="StringName[]" default="[]" />
+ <param index="0" name="bones" type="StringName[]" default="[]" />
<description>
Tells the [PhysicalBone3D] nodes in the Skeleton to start simulating and reacting to the physics world.
Optionally, a list of bone names can be passed-in, allowing only the passed-in bones to be simulated.
@@ -267,122 +258,118 @@
</method>
<method name="register_skin">
<return type="SkinReference" />
- <argument index="0" name="skin" type="Skin" />
+ <param index="0" name="skin" type="Skin" />
<description>
Binds the given Skin to the Skeleton.
</description>
</method>
- <method name="remove_bone_child">
+ <method name="reset_bone_pose">
<return type="void" />
- <argument index="0" name="bone_idx" type="int" />
- <argument index="1" name="child_bone_idx" type="int" />
+ <param index="0" name="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" />
- <argument index="0" name="bone_idx" type="int" />
- <argument 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">
<return type="void" />
- <argument index="0" name="bone_idx" type="int" />
- <argument index="1" name="enabled" type="bool" default="true" />
+ <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">
<return type="void" />
- <argument index="0" name="bone_idx" type="int" />
- <argument index="1" name="pose" type="Transform3D" />
- <argument index="2" name="amount" type="float" />
- <argument index="3" name="persistent" type="bool" default="false" />
+ <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 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.
+ 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! Use [method world_transform_to_global_pose] to convert a world transform, like one you can get from a [Node3D], to a global pose.
</description>
</method>
<method name="set_bone_local_pose_override">
<return type="void" />
- <argument index="0" name="bone_idx" type="int" />
- <argument index="1" name="pose" type="Transform3D" />
- <argument index="2" name="amount" type="float" />
- <argument index="3" name="persistent" type="bool" default="false" />
+ <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.
+ 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>
<method name="set_bone_name">
<return type="void" />
- <argument index="0" name="bone_idx" type="int" />
- <argument index="1" name="name" type="String" />
+ <param index="0" name="bone_idx" type="int" />
+ <param index="1" name="name" type="String" />
<description>
</description>
</method>
<method name="set_bone_parent">
<return type="void" />
- <argument index="0" name="bone_idx" type="int" />
- <argument index="1" name="parent_idx" type="int" />
+ <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">
<return type="void" />
- <argument index="0" name="bone_idx" type="int" />
- <argument index="1" name="position" type="Vector3" />
+ <param index="0" name="bone_idx" type="int" />
+ <param index="1" name="position" type="Vector3" />
<description>
</description>
</method>
<method name="set_bone_pose_rotation">
<return type="void" />
- <argument index="0" name="bone_idx" type="int" />
- <argument index="1" name="rotation" type="Quaternion" />
+ <param index="0" name="bone_idx" type="int" />
+ <param index="1" name="rotation" type="Quaternion" />
<description>
</description>
</method>
<method name="set_bone_pose_scale">
<return type="void" />
- <argument index="0" name="bone_idx" type="int" />
- <argument index="1" name="scale" type="Vector3" />
+ <param index="0" name="bone_idx" type="int" />
+ <param index="1" name="scale" type="Vector3" />
<description>
</description>
</method>
<method name="set_bone_rest">
<return type="void" />
- <argument index="0" name="bone_idx" type="int" />
- <argument index="1" name="rest" type="Transform3D" />
+ <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">
<return type="void" />
- <argument index="0" name="modification_stack" type="SkeletonModificationStack3D" />
+ <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" />
- <argument index="0" name="bone_idx" type="int" />
+ <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">
<return type="Transform3D" />
- <argument index="0" name="world_transform" type="Transform3D" />
+ <param index="0" name="world_transform" type="Transform3D" />
<description>
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.
@@ -392,17 +379,21 @@
<members>
<member name="animate_physical_bones" type="bool" setter="set_animate_physical_bones" getter="get_animate_physical_bones" default="true">
</member>
+ <member name="motion_scale" type="float" setter="set_motion_scale" getter="get_motion_scale" default="1.0">
+ Multiplies the position 3D track animation.
+ [b]Note:[/b] Unless this value is [code]1.0[/code], the key value in animation will not match the actual position value.
+ </member>
<member name="show_rest_only" type="bool" setter="set_show_rest_only" getter="is_show_rest_only" default="false">
</member>
</members>
<signals>
<signal name="bone_enabled_changed">
- <argument index="0" name="bone_idx" type="int" />
+ <param index="0" name="bone_idx" type="int" />
<description>
</description>
</signal>
<signal name="bone_pose_changed">
- <argument index="0" name="bone_idx" type="int" />
+ <param index="0" name="bone_idx" type="int" />
<description>
This signal is emitted when one of the bones in the Skeleton3D node have changed their pose. This is used to inform nodes that rely on bone positions that one of the bones in the Skeleton3D have changed their transform/pose.
</description>
diff --git a/doc/classes/SkeletonIK3D.xml b/doc/classes/SkeletonIK3D.xml
index 0545469e4c..788ba3e248 100644
--- a/doc/classes/SkeletonIK3D.xml
+++ b/doc/classes/SkeletonIK3D.xml
@@ -20,7 +20,7 @@
</method>
<method name="start">
<return type="void" />
- <argument index="0" name="one_time" type="bool" default="false" />
+ <param index="0" name="one_time" type="bool" default="false" />
<description>
</description>
</method>
diff --git a/doc/classes/SkeletonModification2D.xml b/doc/classes/SkeletonModification2D.xml
index 8ce9bf5731..46d32aef41 100644
--- a/doc/classes/SkeletonModification2D.xml
+++ b/doc/classes/SkeletonModification2D.xml
@@ -19,26 +19,26 @@
</method>
<method name="_execute" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="delta" type="float" />
+ <param index="0" name="delta" type="float" />
<description>
Executes the given modification. This is where the modification performs whatever function it is designed to do.
</description>
</method>
<method name="_setup_modification" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="modification_stack" type="SkeletonModificationStack2D" />
+ <param index="0" name="modification_stack" type="SkeletonModificationStack2D" />
<description>
Called when the modification is setup. This is where the modification performs initialization.
</description>
</method>
<method name="clamp_angle">
<return type="float" />
- <argument index="0" name="angle" type="float" />
- <argument index="1" name="min" type="float" />
- <argument index="2" name="max" type="float" />
- <argument index="3" name="invert" type="bool" />
+ <param index="0" name="angle" type="float" />
+ <param index="1" name="min" type="float" />
+ <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">
@@ -61,14 +61,14 @@
</method>
<method name="set_editor_draw_gizmo">
<return type="void" />
- <argument index="0" name="draw_gizmo" type="bool" />
+ <param index="0" name="draw_gizmo" type="bool" />
<description>
Sets whether this modification will call [method _draw_editor_gizmo] in the Godot editor to draw modification-specific gizmos.
</description>
</method>
<method name="set_is_setup">
<return type="void" />
- <argument index="0" name="is_setup" type="bool" />
+ <param index="0" name="is_setup" type="bool" />
<description>
Manually allows you to set the setup state of the modification. This function should only rarely be used, as the [SkeletonModificationStack2D] the modification is bound to should handle setting the modification up.
</description>
diff --git a/doc/classes/SkeletonModification2DCCDIK.xml b/doc/classes/SkeletonModification2DCCDIK.xml
index a613787a3e..c8fee3f94d 100644
--- a/doc/classes/SkeletonModification2DCCDIK.xml
+++ b/doc/classes/SkeletonModification2DCCDIK.xml
@@ -14,114 +14,114 @@
<methods>
<method name="get_ccdik_joint_bone2d_node" qualifiers="const">
<return type="NodePath" />
- <argument index="0" name="joint_idx" type="int" />
+ <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" />
- <argument index="0" name="joint_idx" 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" />
- <argument index="0" name="joint_idx" type="int" />
+ <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" />
- <argument index="0" name="joint_idx" type="int" />
+ <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" />
- <argument index="0" name="joint_idx" type="int" />
+ <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" />
- <argument index="0" name="joint_idx" type="int" />
+ <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" />
- <argument index="0" name="joint_idx" type="int" />
+ <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">
<return type="void" />
- <argument index="0" name="joint_idx" type="int" />
- <argument index="1" name="bone2d_nodepath" type="NodePath" />
+ <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">
<return type="void" />
- <argument index="0" name="joint_idx" type="int" />
- <argument index="1" name="bone_idx" type="int" />
+ <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">
<return type="void" />
- <argument index="0" name="joint_idx" type="int" />
- <argument index="1" name="invert" type="bool" />
+ <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>
<method name="set_ccdik_joint_constraint_angle_max">
<return type="void" />
- <argument index="0" name="joint_idx" type="int" />
- <argument index="1" name="angle_max" type="float" />
+ <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">
<return type="void" />
- <argument index="0" name="joint_idx" type="int" />
- <argument index="1" name="angle_min" type="float" />
+ <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">
<return type="void" />
- <argument index="0" name="joint_idx" type="int" />
- <argument index="1" name="enable_constraint" type="bool" />
+ <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">
<return type="void" />
- <argument index="0" name="joint_idx" type="int" />
- <argument index="1" name="rotate_from_joint" type="bool" />
+ <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 883d4aa04b..ff3a65fe1a 100644
--- a/doc/classes/SkeletonModification2DFABRIK.xml
+++ b/doc/classes/SkeletonModification2DFABRIK.xml
@@ -15,69 +15,69 @@
<methods>
<method name="get_fabrik_joint_bone2d_node" qualifiers="const">
<return type="NodePath" />
- <argument index="0" name="joint_idx" type="int" />
+ <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" />
- <argument index="0" name="joint_idx" 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" />
- <argument index="0" name="joint_idx" type="int" />
+ <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">
<return type="bool" />
- <argument index="0" name="joint_idx" type="int" />
+ <param index="0" name="joint_idx" type="int" />
<description>
Returns whether the joint is using the target's rotation rather than allowing FABRIK to rotate the joint. This option only applies to the tip/final joint in the chain.
</description>
</method>
<method name="set_fabrik_joint_bone2d_node">
<return type="void" />
- <argument index="0" name="joint_idx" type="int" />
- <argument index="1" name="bone2d_nodepath" type="NodePath" />
+ <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">
<return type="void" />
- <argument index="0" name="joint_idx" type="int" />
- <argument index="1" name="bone_idx" type="int" />
+ <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">
<return type="void" />
- <argument index="0" name="joint_idx" type="int" />
- <argument index="1" name="magnet_position" type="Vector2" />
+ <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">
<return type="void" />
- <argument index="0" name="joint_idx" type="int" />
- <argument index="1" name="use_target_rotation" type="bool" />
+ <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 9948239eb8..7329b2d865 100644
--- a/doc/classes/SkeletonModification2DJiggle.xml
+++ b/doc/classes/SkeletonModification2DJiggle.xml
@@ -19,58 +19,58 @@
</method>
<method name="get_jiggle_joint_bone2d_node" qualifiers="const">
<return type="NodePath" />
- <argument index="0" name="joint_idx" type="int" />
+ <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" />
- <argument index="0" name="joint_idx" 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" />
- <argument index="0" name="joint_idx" type="int" />
+ <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" />
- <argument index="0" name="joint_idx" type="int" />
+ <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" />
- <argument index="0" name="joint_idx" type="int" />
+ <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" />
- <argument index="0" name="joint_idx" type="int" />
+ <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" />
- <argument index="0" name="joint_idx" type="int" />
+ <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" />
- <argument index="0" name="joint_idx" type="int" />
+ <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">
@@ -81,78 +81,78 @@
</method>
<method name="set_collision_mask">
<return type="void" />
- <argument index="0" name="collision_mask" type="int" />
+ <param index="0" name="collision_mask" type="int" />
<description>
Sets the collision mask that the Jiggle modifier will use when reacting to colliders, if the Jiggle modifier is set to take colliders into account.
</description>
</method>
<method name="set_jiggle_joint_bone2d_node">
<return type="void" />
- <argument index="0" name="joint_idx" type="int" />
- <argument index="1" name="bone2d_node" type="NodePath" />
+ <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">
<return type="void" />
- <argument index="0" name="joint_idx" type="int" />
- <argument index="1" name="bone_idx" type="int" />
+ <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">
<return type="void" />
- <argument index="0" name="joint_idx" type="int" />
- <argument index="1" name="damping" type="float" />
+ <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">
<return type="void" />
- <argument index="0" name="joint_idx" type="int" />
- <argument index="1" name="gravity" type="Vector2" />
+ <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">
<return type="void" />
- <argument index="0" name="joint_idx" type="int" />
- <argument index="1" name="mass" type="float" />
+ <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">
<return type="void" />
- <argument index="0" name="joint_idx" type="int" />
- <argument index="1" name="override" type="bool" />
+ <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">
<return type="void" />
- <argument index="0" name="joint_idx" type="int" />
- <argument index="1" name="stiffness" type="float" />
+ <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">
<return type="void" />
- <argument index="0" name="joint_idx" type="int" />
- <argument index="1" name="use_gravity" type="bool" />
+ <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">
<return type="void" />
- <argument index="0" name="use_colliders" type="bool" />
+ <param index="0" name="use_colliders" type="bool" />
<description>
If [code]true[/code], the Jiggle modifier will take colliders into account, keeping them from entering into these collision objects.
</description>
diff --git a/doc/classes/SkeletonModification2DLookAt.xml b/doc/classes/SkeletonModification2DLookAt.xml
index 802801fbef..4747b06056 100644
--- a/doc/classes/SkeletonModification2DLookAt.xml
+++ b/doc/classes/SkeletonModification2DLookAt.xml
@@ -41,14 +41,14 @@
</method>
<method name="set_additional_rotation">
<return type="void" />
- <argument index="0" name="rotation" type="float" />
+ <param index="0" name="rotation" type="float" />
<description>
Sets the amount of additional rotation that is to be applied after executing the modification. This allows for offsetting the results by the inputted rotation amount.
</description>
</method>
<method name="set_constraint_angle_invert">
<return type="void" />
- <argument index="0" name="invert" type="bool" />
+ <param index="0" name="invert" type="bool" />
<description>
When [code]true[/code], the modification will use an inverted joint constraint.
An inverted joint constraint only constraints the [Bone2D] to the angles [i]outside of[/i] the inputted minimum and maximum angles. For this reason, it is referred to as an inverted joint constraint, as it constraints the joint to the outside of the inputted values.
@@ -56,21 +56,21 @@
</method>
<method name="set_constraint_angle_max">
<return type="void" />
- <argument index="0" name="angle_max" type="float" />
+ <param index="0" name="angle_max" type="float" />
<description>
Sets the constraint's maximum allowed angle.
</description>
</method>
<method name="set_constraint_angle_min">
<return type="void" />
- <argument index="0" name="angle_min" type="float" />
+ <param index="0" name="angle_min" type="float" />
<description>
Sets the constraint's minimum allowed angle.
</description>
</method>
<method name="set_enable_constraint">
<return type="void" />
- <argument index="0" name="enable_constraint" type="bool" />
+ <param index="0" name="enable_constraint" type="bool" />
<description>
Sets whether this modification will use constraints or not. When [code]true[/code], constraints will be applied when solving the LookAt modification.
</description>
diff --git a/doc/classes/SkeletonModification2DPhysicalBones.xml b/doc/classes/SkeletonModification2DPhysicalBones.xml
index 9fb7b6d215..d5f46b2ea0 100644
--- a/doc/classes/SkeletonModification2DPhysicalBones.xml
+++ b/doc/classes/SkeletonModification2DPhysicalBones.xml
@@ -17,23 +17,23 @@
</method>
<method name="get_physical_bone_node" qualifiers="const">
<return type="NodePath" />
- <argument index="0" name="joint_idx" type="int" />
+ <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">
<return type="void" />
- <argument index="0" name="joint_idx" type="int" />
- <argument index="1" name="physicalbone2d_node" type="NodePath" />
+ <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>
<method name="start_simulation">
<return type="void" />
- <argument index="0" name="bones" type="StringName[]" default="[]" />
+ <param index="0" name="bones" type="StringName[]" default="[]" />
<description>
Tell the [PhysicalBone2D] nodes to start simulating and interacting with the physics world.
Optionally, an array of bone names can be passed to this function, and that will cause only [PhysicalBone2D] nodes with those names to start simulating.
@@ -41,7 +41,7 @@
</method>
<method name="stop_simulation">
<return type="void" />
- <argument index="0" name="bones" type="StringName[]" default="[]" />
+ <param index="0" name="bones" type="StringName[]" default="[]" />
<description>
Tell the [PhysicalBone2D] nodes to stop simulating and interacting with the physics world.
Optionally, an array of bone names can be passed to this function, and that will cause only [PhysicalBone2D] nodes with those names to stop simulating.
@@ -50,7 +50,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 f66f88d6b5..791dea2fb1 100644
--- a/doc/classes/SkeletonModification2DStackHolder.xml
+++ b/doc/classes/SkeletonModification2DStackHolder.xml
@@ -18,7 +18,7 @@
</method>
<method name="set_held_modification_stack">
<return type="void" />
- <argument index="0" name="held_modification_stack" type="SkeletonModificationStack2D" />
+ <param index="0" name="held_modification_stack" type="SkeletonModificationStack2D" />
<description>
Sets the [SkeletonModificationStack2D] that this modification is holding. This modification stack will then be executed when this modification is executed.
</description>
diff --git a/doc/classes/SkeletonModification2DTwoBoneIK.xml b/doc/classes/SkeletonModification2DTwoBoneIK.xml
index 956e94dce8..edd5431a0c 100644
--- a/doc/classes/SkeletonModification2DTwoBoneIK.xml
+++ b/doc/classes/SkeletonModification2DTwoBoneIK.xml
@@ -36,28 +36,28 @@
</method>
<method name="set_joint_one_bone2d_node">
<return type="void" />
- <argument index="0" name="bone2d_node" type="NodePath" />
+ <param index="0" name="bone2d_node" type="NodePath" />
<description>
Sets the [Bone2D] node that is being used as the first bone in the TwoBoneIK modification.
</description>
</method>
<method name="set_joint_one_bone_idx">
<return type="void" />
- <argument index="0" name="bone_idx" type="int" />
+ <param index="0" name="bone_idx" type="int" />
<description>
Sets the index of the [Bone2D] node that is being used as the first bone in the TwoBoneIK modification.
</description>
</method>
<method name="set_joint_two_bone2d_node">
<return type="void" />
- <argument index="0" name="bone2d_node" type="NodePath" />
+ <param index="0" name="bone2d_node" type="NodePath" />
<description>
Sets the [Bone2D] node that is being used as the second bone in the TwoBoneIK modification.
</description>
</method>
<method name="set_joint_two_bone_idx">
<return type="void" />
- <argument index="0" name="bone_idx" type="int" />
+ <param index="0" name="bone_idx" type="int" />
<description>
Sets the index of the [Bone2D] node that is being used as the second bone in the TwoBoneIK modification.
</description>
diff --git a/doc/classes/SkeletonModification3D.xml b/doc/classes/SkeletonModification3D.xml
index b21c9a2be9..8457179651 100644
--- a/doc/classes/SkeletonModification3D.xml
+++ b/doc/classes/SkeletonModification3D.xml
@@ -12,14 +12,14 @@
<methods>
<method name="_execute" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="delta" type="float" />
+ <param index="0" name="delta" type="float" />
<description>
Executes the given modification. This is where the modification performs whatever function it is designed to do.
</description>
</method>
<method name="_setup_modification" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="modification_stack" type="SkeletonModificationStack3D" />
+ <param index="0" name="modification_stack" type="SkeletonModificationStack3D" />
<description>
Sets up the modification so it can be executed. This function should be called automatically by the [SkeletonModificationStack3D] containing this modification.
If you need to initialize a modification before use, this is the place to do it!
@@ -27,12 +27,12 @@
</method>
<method name="clamp_angle">
<return type="float" />
- <argument index="0" name="angle" type="float" />
- <argument index="1" name="min" type="float" />
- <argument index="2" name="max" type="float" />
- <argument index="3" name="invert" type="bool" />
+ <param index="0" name="angle" type="float" />
+ <param index="1" name="min" type="float" />
+ <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">
@@ -49,7 +49,7 @@
</method>
<method name="set_is_setup">
<return type="void" />
- <argument index="0" name="is_setup" type="bool" />
+ <param index="0" name="is_setup" type="bool" />
<description>
Manually allows you to set the setup state of the modification. This function should only rarely be used, as the [SkeletonModificationStack3D] the modification is bound to should handle setting the modification up.
</description>
diff --git a/doc/classes/SkeletonModification3DCCDIK.xml b/doc/classes/SkeletonModification3DCCDIK.xml
index 6f5409ed4d..dec0fbe99f 100644
--- a/doc/classes/SkeletonModification3DCCDIK.xml
+++ b/doc/classes/SkeletonModification3DCCDIK.xml
@@ -14,114 +14,114 @@
<methods>
<method name="get_ccdik_joint_bone_index" qualifiers="const">
<return type="int" />
- <argument index="0" name="joint_idx" 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" />
- <argument index="0" name="joint_idx" type="int" />
+ <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" />
- <argument index="0" name="joint_idx" 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" />
- <argument index="0" name="joint_idx" type="int" />
+ <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" />
- <argument index="0" name="joint_idx" type="int" />
+ <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" />
- <argument index="0" name="joint_idx" type="int" />
+ <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" />
- <argument index="0" name="joint_idx" type="int" />
+ <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">
<return type="void" />
- <argument index="0" name="joint_idx" type="int" />
- <argument index="1" name="bone_index" type="int" />
+ <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">
<return type="void" />
- <argument index="0" name="joint_idx" type="int" />
- <argument index="1" name="bone_name" type="String" />
+ <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">
<return type="void" />
- <argument index="0" name="joint_idx" type="int" />
- <argument index="1" name="axis" type="int" />
+ <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">
<return type="void" />
- <argument index="0" name="joint_idx" type="int" />
- <argument index="1" name="max_angle" type="float" />
+ <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">
<return type="void" />
- <argument index="0" name="joint_idx" type="int" />
- <argument index="1" name="min_angle" type="float" />
+ <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">
<return type="void" />
- <argument index="0" name="joint_idx" type="int" />
- <argument index="1" name="invert" type="bool" />
+ <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>
<method name="set_ccdik_joint_enable_joint_constraint">
<return type="void" />
- <argument index="0" name="joint_idx" type="int" />
- <argument index="1" name="enable" type="bool" />
+ <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 41f78fab41..325cc2a12e 100644
--- a/doc/classes/SkeletonModification3DFABRIK.xml
+++ b/doc/classes/SkeletonModification3DFABRIK.xml
@@ -15,56 +15,56 @@
<methods>
<method name="fabrik_joint_auto_calculate_length">
<return type="void" />
- <argument index="0" name="joint_idx" type="int" />
+ <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" />
- <argument index="0" name="joint_idx" type="int" />
+ <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" />
- <argument index="0" name="joint_idx" 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" />
- <argument index="0" name="joint_idx" type="int" />
+ <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" />
- <argument index="0" name="joint_idx" type="int" />
+ <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" />
- <argument index="0" name="joint_idx" type="int" />
+ <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" />
- <argument index="0" name="joint_idx" type="int" />
+ <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">
<return type="bool" />
- <argument index="0" name="joint_idx" type="int" />
+ <param index="0" name="joint_idx" type="int" />
<description>
Returns a boolean indicating whether the FABRIK joint 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.
@@ -72,75 +72,75 @@
</method>
<method name="get_fabrik_joint_use_tip_node" qualifiers="const">
<return type="bool" />
- <argument index="0" name="joint_idx" type="int" />
+ <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">
<return type="void" />
- <argument index="0" name="joint_idx" type="int" />
- <argument index="1" name="auto_calculate_length" type="bool" />
+ <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">
<return type="void" />
- <argument index="0" name="joint_idx" type="int" />
- <argument index="1" name="bone_index" type="int" />
+ <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">
<return type="void" />
- <argument index="0" name="joint_idx" type="int" />
- <argument index="1" name="bone_name" type="String" />
+ <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">
<return type="void" />
- <argument index="0" name="joint_idx" type="int" />
- <argument index="1" name="length" type="float" />
+ <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">
<return type="void" />
- <argument index="0" name="joint_idx" type="int" />
- <argument index="1" name="magnet_position" type="Vector3" />
+ <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">
<return type="void" />
- <argument index="0" name="joint_idx" type="int" />
- <argument index="1" name="tip_node" type="NodePath" />
+ <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>
<method name="set_fabrik_joint_use_target_basis">
<return type="void" />
- <argument index="0" name="joint_idx" type="int" />
- <argument index="1" name="use_target_basis" type="bool" />
+ <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>
<method name="set_fabrik_joint_use_tip_node">
<return type="void" />
- <argument index="0" name="joint_idx" type="int" />
- <argument index="1" name="use_tip_node" type="bool" />
+ <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 697de4a580..ef469d42ea 100644
--- a/doc/classes/SkeletonModification3DJiggle.xml
+++ b/doc/classes/SkeletonModification3DJiggle.xml
@@ -19,65 +19,65 @@
</method>
<method name="get_jiggle_joint_bone_index" qualifiers="const">
<return type="int" />
- <argument index="0" name="joint_idx" 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" />
- <argument index="0" name="joint_idx" type="int" />
+ <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" />
- <argument index="0" name="joint_idx" type="int" />
+ <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" />
- <argument index="0" name="joint_idx" type="int" />
+ <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" />
- <argument index="0" name="joint_idx" type="int" />
+ <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" />
- <argument index="0" name="joint_idx" type="int" />
+ <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">
<return type="float" />
- <argument index="0" name="joint_idx" type="int" />
+ <param index="0" name="joint_idx" type="int" />
<description>
Returns the amount of roll/twist applied to the bone that the Jiggle joint is applied to.
</description>
</method>
<method name="get_jiggle_joint_stiffness" qualifiers="const">
<return type="float" />
- <argument index="0" name="joint_idx" type="int" />
+ <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" />
- <argument index="0" name="joint_idx" type="int" />
+ <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">
@@ -88,86 +88,86 @@
</method>
<method name="set_collision_mask">
<return type="void" />
- <argument index="0" name="mask" type="int" />
+ <param index="0" name="mask" type="int" />
<description>
Sets the collision mask that the Jiggle modifier takes into account when performing physics calculations.
</description>
</method>
<method name="set_jiggle_joint_bone_index">
<return type="void" />
- <argument index="0" name="joint_idx" type="int" />
- <argument index="1" name="bone_idx" type="int" />
+ <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">
<return type="void" />
- <argument index="0" name="joint_idx" type="int" />
- <argument index="1" name="name" type="String" />
+ <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">
<return type="void" />
- <argument index="0" name="joint_idx" type="int" />
- <argument index="1" name="damping" type="float" />
+ <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">
<return type="void" />
- <argument index="0" name="joint_idx" type="int" />
- <argument index="1" name="gravity" type="Vector3" />
+ <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">
<return type="void" />
- <argument index="0" name="joint_idx" type="int" />
- <argument index="1" name="mass" type="float" />
+ <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">
<return type="void" />
- <argument index="0" name="joint_idx" type="int" />
- <argument index="1" name="override" type="bool" />
+ <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">
<return type="void" />
- <argument index="0" name="joint_idx" type="int" />
- <argument index="1" name="roll" type="float" />
+ <param index="0" name="joint_idx" type="int" />
+ <param index="1" name="roll" type="float" />
<description>
Sets the amount of roll/twist on the bone the Jiggle joint is attached to.
</description>
</method>
<method name="set_jiggle_joint_stiffness">
<return type="void" />
- <argument index="0" name="joint_idx" type="int" />
- <argument index="1" name="stiffness" type="float" />
+ <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">
<return type="void" />
- <argument index="0" name="joint_idx" type="int" />
- <argument index="1" name="use_gravity" type="bool" />
+ <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">
<return type="void" />
- <argument index="0" name="use_colliders" type="bool" />
+ <param index="0" name="use_colliders" type="bool" />
<description>
When [code]true[/code], the Jiggle modifier will use raycasting to prevent the Jiggle joints from rotating themselves into collision objects when solving.
</description>
diff --git a/doc/classes/SkeletonModification3DLookAt.xml b/doc/classes/SkeletonModification3DLookAt.xml
index 90330c4cf0..3602cfad95 100644
--- a/doc/classes/SkeletonModification3DLookAt.xml
+++ b/doc/classes/SkeletonModification3DLookAt.xml
@@ -29,20 +29,20 @@
</method>
<method name="set_additional_rotation">
<return type="void" />
- <argument index="0" name="additional_rotation" type="Vector3" />
+ <param index="0" name="additional_rotation" type="Vector3" />
<description>
Sets the amount of extra rotation to be applied after the LookAt modification executes. This allows you to adjust the finished result.
</description>
</method>
<method name="set_lock_rotation_plane">
<return type="void" />
- <argument index="0" name="plane" type="int" />
+ <param index="0" name="plane" type="int" />
<description>
</description>
</method>
<method name="set_lock_rotation_to_plane">
<return type="void" />
- <argument index="0" name="lock_to_plane" type="bool" />
+ <param index="0" name="lock_to_plane" type="bool" />
<description>
When [code]true[/code], the LookAt modification will limit its rotation to a single plane in 3D space. The plane used can be configured using the [code]set_lock_rotation_plane[/code] function.
</description>
diff --git a/doc/classes/SkeletonModification3DStackHolder.xml b/doc/classes/SkeletonModification3DStackHolder.xml
index d5ed770fc0..24240236a4 100644
--- a/doc/classes/SkeletonModification3DStackHolder.xml
+++ b/doc/classes/SkeletonModification3DStackHolder.xml
@@ -18,7 +18,7 @@
</method>
<method name="set_held_modification_stack">
<return type="void" />
- <argument index="0" name="held_modification_stack" type="SkeletonModificationStack3D" />
+ <param index="0" name="held_modification_stack" type="SkeletonModificationStack3D" />
<description>
Sets the [SkeletonModificationStack3D] that this modification is holding. This modification stack will then be executed when this modification is executed.
</description>
diff --git a/doc/classes/SkeletonModification3DTwoBoneIK.xml b/doc/classes/SkeletonModification3DTwoBoneIK.xml
index 0576591e2e..6618ebbcfb 100644
--- a/doc/classes/SkeletonModification3DTwoBoneIK.xml
+++ b/doc/classes/SkeletonModification3DTwoBoneIK.xml
@@ -91,7 +91,7 @@
</method>
<method name="set_auto_calculate_joint_length">
<return type="void" />
- <argument index="0" name="auto_calculate_joint_length" type="bool" />
+ <param index="0" name="auto_calculate_joint_length" type="bool" />
<description>
If true, the TwoBoneIK modification will attempt to autocalculate the lengths of the bones being used. The first bone will be calculated by using the distance from the origin of the first bone to the origin of the second bone.
The second bone will be calculated either using the tip node if that setting is enabled, or by using the distances of the second bone's children. If the tip node is not enabled and the bone has no children, then the length cannot be autocalculated. In this case, the length will either have to be manually inputted or a tip node used to calculate the length.
@@ -99,70 +99,70 @@
</method>
<method name="set_joint_one_bone_idx">
<return type="void" />
- <argument index="0" name="bone_idx" type="int" />
+ <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" />
- <argument index="0" name="bone_name" type="String" />
+ <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">
<return type="void" />
- <argument index="0" name="bone_length" type="float" />
+ <param index="0" name="bone_length" type="float" />
<description>
Sets the length of the first bone in the TwoBoneIK modification.
</description>
</method>
<method name="set_joint_one_roll">
<return type="void" />
- <argument index="0" name="roll" type="float" />
+ <param index="0" name="roll" type="float" />
<description>
Sets the amount of roll/twist applied to the first bone in the TwoBoneIK modification.
</description>
</method>
<method name="set_joint_two_bone_idx">
<return type="void" />
- <argument index="0" name="bone_idx" type="int" />
+ <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" />
- <argument index="0" name="bone_name" type="String" />
+ <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">
<return type="void" />
- <argument index="0" name="bone_length" type="float" />
+ <param index="0" name="bone_length" type="float" />
<description>
Sets the length of the second bone in the TwoBoneIK modification.
</description>
</method>
<method name="set_joint_two_roll">
<return type="void" />
- <argument index="0" name="roll" type="float" />
+ <param index="0" name="roll" type="float" />
<description>
Sets the amount of roll/twist applied to the second bone in the TwoBoneIK modification.
</description>
</method>
<method name="set_pole_node">
<return type="void" />
- <argument index="0" name="pole_nodepath" type="NodePath" />
+ <param index="0" name="pole_nodepath" type="NodePath" />
<description>
Sets the node to be used as the for the pole of the TwoBoneIK. When a node is set and the modification is set to use the pole node, the TwoBoneIK modification will bend the nodes in the direction towards this node when the bones need to bend.
</description>
</method>
<method name="set_tip_node">
<return type="void" />
- <argument index="0" name="tip_nodepath" type="NodePath" />
+ <param index="0" name="tip_nodepath" type="NodePath" />
<description>
Sets the node to be used as the tip for the second bone. This is used to calculate the length and position of the end of the second bone in the TwoBoneIK modification.
[b]Note:[/b] The tip node should generally be a child node of a [BoneAttachment3D] node attached to the second bone, with the child node being offset so it is at the end of the bone.
@@ -170,14 +170,14 @@
</method>
<method name="set_use_pole_node">
<return type="void" />
- <argument index="0" name="use_pole_node" type="bool" />
+ <param index="0" name="use_pole_node" type="bool" />
<description>
When [code]true[/code], the TwoBoneIK modification will bend the bones towards the pole node, if one has been set. This gives control over the direction the TwoBoneIK solver will bend, which is helpful for joints like elbows that only bend in certain directions.
</description>
</method>
<method name="set_use_tip_node">
<return type="void" />
- <argument index="0" name="use_tip_node" type="bool" />
+ <param index="0" name="use_tip_node" type="bool" />
<description>
When [code]true[/code], the TwoBoneIK modification will use the tip node to calculate the distance and position of the end/tip of the second bone. This is the most stable solution for knowing the tip position and length of the second bone.
</description>
diff --git a/doc/classes/SkeletonModificationStack2D.xml b/doc/classes/SkeletonModificationStack2D.xml
index 9ddb8856ce..950e52e622 100644
--- a/doc/classes/SkeletonModificationStack2D.xml
+++ b/doc/classes/SkeletonModificationStack2D.xml
@@ -13,31 +13,31 @@
<methods>
<method name="add_modification">
<return type="void" />
- <argument index="0" name="modification" type="SkeletonModification2D" />
+ <param index="0" name="modification" type="SkeletonModification2D" />
<description>
Adds the passed-in [SkeletonModification2D] to the stack.
</description>
</method>
<method name="delete_modification">
<return type="void" />
- <argument index="0" name="mod_idx" type="int" />
+ <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">
<return type="void" />
- <argument index="0" name="enabled" type="bool" />
+ <param index="0" name="enabled" type="bool" />
<description>
Enables all [SkeletonModification2D]s in the stack.
</description>
</method>
<method name="execute">
<return type="void" />
- <argument index="0" name="delta" type="float" />
- <argument index="1" name="execution_mode" type="int" />
+ <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>
@@ -49,9 +49,9 @@
</method>
<method name="get_modification" qualifiers="const">
<return type="SkeletonModification2D" />
- <argument index="0" name="mod_idx" type="int" />
+ <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">
@@ -62,10 +62,10 @@
</method>
<method name="set_modification">
<return type="void" />
- <argument index="0" name="mod_idx" type="int" />
- <argument index="1" name="modification" type="SkeletonModification2D" />
+ <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 fc952f6864..34c7099bca 100644
--- a/doc/classes/SkeletonModificationStack3D.xml
+++ b/doc/classes/SkeletonModificationStack3D.xml
@@ -12,31 +12,31 @@
<methods>
<method name="add_modification">
<return type="void" />
- <argument index="0" name="modification" type="SkeletonModification3D" />
+ <param index="0" name="modification" type="SkeletonModification3D" />
<description>
Adds the passed-in [SkeletonModification3D] to the stack.
</description>
</method>
<method name="delete_modification">
<return type="void" />
- <argument index="0" name="mod_idx" type="int" />
+ <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">
<return type="void" />
- <argument index="0" name="enabled" type="bool" />
+ <param index="0" name="enabled" type="bool" />
<description>
Enables all [SkeletonModification3D]s in the stack.
</description>
</method>
<method name="execute">
<return type="void" />
- <argument index="0" name="delta" type="float" />
- <argument index="1" name="execution_mode" type="int" />
+ <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>
@@ -48,9 +48,9 @@
</method>
<method name="get_modification" qualifiers="const">
<return type="SkeletonModification3D" />
- <argument index="0" name="mod_idx" type="int" />
+ <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">
@@ -61,10 +61,10 @@
</method>
<method name="set_modification">
<return type="void" />
- <argument index="0" name="mod_idx" type="int" />
- <argument index="1" name="modification" type="SkeletonModification3D" />
+ <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
new file mode 100644
index 0000000000..55d21f3224
--- /dev/null
+++ b/doc/classes/SkeletonProfile.xml
@@ -0,0 +1,193 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="SkeletonProfile" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ Profile of a virtual skeleton used as a target for retargeting.
+ </brief_description>
+ <description>
+ 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>
+ </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 [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 [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>
+ <method name="get_bone_parent" qualifiers="const">
+ <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 [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 [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 [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 [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 [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>
+ <method name="get_reference_pose" qualifiers="const">
+ <return type="Transform3D" />
+ <param index="0" name="bone_idx" type="int" />
+ <description>
+ 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 [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 [param group_idx] that will be the drawing group background image in the [BoneMap] editor.
+ </description>
+ </method>
+ <method name="set_bone_name">
+ <return type="void" />
+ <param index="0" name="bone_idx" type="int" />
+ <param index="1" name="bone_name" type="StringName" />
+ <description>
+ 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>
+ <method name="set_bone_parent">
+ <return type="void" />
+ <param index="0" name="bone_idx" type="int" />
+ <param index="1" name="bone_parent" type="StringName" />
+ <description>
+ 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">
+ <return type="void" />
+ <param index="0" name="bone_idx" type="int" />
+ <param index="1" name="bone_tail" type="StringName" />
+ <description>
+ Sets the bone with name [param bone_tail] as the tail of the bone at [param bone_idx].
+ </description>
+ </method>
+ <method name="set_group">
+ <return type="void" />
+ <param index="0" name="bone_idx" type="int" />
+ <param index="1" name="group" type="StringName" />
+ <description>
+ Sets the group of the bone at [param bone_idx].
+ </description>
+ </method>
+ <method name="set_group_name">
+ <return type="void" />
+ <param index="0" name="group_idx" type="int" />
+ <param index="1" name="group_name" type="StringName" />
+ <description>
+ 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">
+ <return type="void" />
+ <param index="0" name="bone_idx" type="int" />
+ <param index="1" name="handle_offset" type="Vector2" />
+ <description>
+ 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>
+ <method name="set_reference_pose">
+ <return type="void" />
+ <param index="0" name="bone_idx" type="int" />
+ <param index="1" name="bone_name" type="Transform3D" />
+ <description>
+ Sets the reference pose transform for bone [param bone_idx].
+ </description>
+ </method>
+ <method name="set_tail_direction">
+ <return type="void" />
+ <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 [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>
+ <method name="set_texture">
+ <return type="void" />
+ <param index="0" name="group_idx" type="int" />
+ <param index="1" name="texture" type="Texture2D" />
+ <description>
+ 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>
+ <members>
+ <member name="bone_size" type="int" setter="set_bone_size" getter="get_bone_size" default="0">
+ </member>
+ <member name="group_size" type="int" setter="set_group_size" getter="get_group_size" default="0">
+ </member>
+ <member name="root_bone" type="StringName" setter="set_root_bone" getter="get_root_bone" default="&amp;&quot;&quot;">
+ A name of bone that will be used as the root bone in [AnimationTree].
+ [b]Note:[/b] In most cases, it is the bone of the parent of the hips that exists at the world origin in the humanoid model.
+ </member>
+ <member name="scale_base_bone" type="StringName" setter="set_scale_base_bone" getter="get_scale_base_bone" default="&amp;&quot;&quot;">
+ A name of bone which height will be used as the coefficient for normalization.
+ [b]Note:[/b] In most cases, it is hips in the humanoid model.
+ </member>
+ </members>
+ <signals>
+ <signal name="profile_updated">
+ <description>
+ This signal is emitted when change the value in profile. This is used to update key name in the [BoneMap] and to redraw the [BoneMap] editor.
+ [b]Note:[/b] This signal is not connected directly to editor to simplify the reference, instead it is passed on to editor through the [BoneMap].
+ </description>
+ </signal>
+ </signals>
+ <constants>
+ <constant name="TAIL_DIRECTION_AVERAGE_CHILDREN" value="0" enum="TailDirection">
+ Direction to the average coordinates of bone children.
+ </constant>
+ <constant name="TAIL_DIRECTION_SPECIFIC_CHILD" value="1" enum="TailDirection">
+ Direction to the coordinates of specified bone child.
+ </constant>
+ <constant name="TAIL_DIRECTION_END" value="2" enum="TailDirection">
+ Direction is not calculated.
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/SkeletonProfileHumanoid.xml b/doc/classes/SkeletonProfileHumanoid.xml
new file mode 100644
index 0000000000..11f0521718
--- /dev/null
+++ b/doc/classes/SkeletonProfileHumanoid.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="SkeletonProfileHumanoid" inherits="SkeletonProfile" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ </brief_description>
+ <description>
+ A [SkeletonProfile] as a preset that is optimized for the human form. This exists for standardization, so all parameters are read-only.
+ </description>
+ <tutorials>
+ </tutorials>
+ <members>
+ <member name="bone_size" type="int" setter="set_bone_size" getter="get_bone_size" overrides="SkeletonProfile" default="56" />
+ <member name="group_size" type="int" setter="set_group_size" getter="get_group_size" overrides="SkeletonProfile" default="4" />
+ <member name="root_bone" type="StringName" setter="set_root_bone" getter="get_root_bone" overrides="SkeletonProfile" default="&amp;&quot;Root&quot;" />
+ <member name="scale_base_bone" type="StringName" setter="set_scale_base_bone" getter="get_scale_base_bone" overrides="SkeletonProfile" default="&amp;&quot;Hips&quot;" />
+ </members>
+</class>
diff --git a/doc/classes/Skin.xml b/doc/classes/Skin.xml
index af1af7bad2..ea60bd707d 100644
--- a/doc/classes/Skin.xml
+++ b/doc/classes/Skin.xml
@@ -9,15 +9,15 @@
<methods>
<method name="add_bind">
<return type="void" />
- <argument index="0" name="bone" type="int" />
- <argument index="1" name="pose" type="Transform3D" />
+ <param index="0" name="bone" type="int" />
+ <param index="1" name="pose" type="Transform3D" />
<description>
</description>
</method>
<method name="add_named_bind">
<return type="void" />
- <argument index="0" name="name" type="String" />
- <argument index="1" name="pose" type="Transform3D" />
+ <param index="0" name="name" type="String" />
+ <param index="1" name="pose" type="Transform3D" />
<description>
</description>
</method>
@@ -28,7 +28,7 @@
</method>
<method name="get_bind_bone" qualifiers="const">
<return type="int" />
- <argument index="0" name="bind_index" type="int" />
+ <param index="0" name="bind_index" type="int" />
<description>
</description>
</method>
@@ -39,40 +39,40 @@
</method>
<method name="get_bind_name" qualifiers="const">
<return type="StringName" />
- <argument index="0" name="bind_index" type="int" />
+ <param index="0" name="bind_index" type="int" />
<description>
</description>
</method>
<method name="get_bind_pose" qualifiers="const">
<return type="Transform3D" />
- <argument index="0" name="bind_index" type="int" />
+ <param index="0" name="bind_index" type="int" />
<description>
</description>
</method>
<method name="set_bind_bone">
<return type="void" />
- <argument index="0" name="bind_index" type="int" />
- <argument index="1" name="bone" type="int" />
+ <param index="0" name="bind_index" type="int" />
+ <param index="1" name="bone" type="int" />
<description>
</description>
</method>
<method name="set_bind_count">
<return type="void" />
- <argument index="0" name="bind_count" type="int" />
+ <param index="0" name="bind_count" type="int" />
<description>
</description>
</method>
<method name="set_bind_name">
<return type="void" />
- <argument index="0" name="bind_index" type="int" />
- <argument index="1" name="name" type="StringName" />
+ <param index="0" name="bind_index" type="int" />
+ <param index="1" name="name" type="StringName" />
<description>
</description>
</method>
<method name="set_bind_pose">
<return type="void" />
- <argument index="0" name="bind_index" type="int" />
- <argument index="1" name="pose" type="Transform3D" />
+ <param index="0" name="bind_index" type="int" />
+ <param index="1" name="pose" type="Transform3D" />
<description>
</description>
</method>
diff --git a/doc/classes/Slider.xml b/doc/classes/Slider.xml
index 4139530db1..c3dbd69e59 100644
--- a/doc/classes/Slider.xml
+++ b/doc/classes/Slider.xml
@@ -25,9 +25,9 @@
</members>
<signals>
<signal name="drag_ended">
- <argument index="0" name="value_changed" type="bool" />
+ <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 d62cf8aac4..a67c38b12d 100644
--- a/doc/classes/SliderJoint3D.xml
+++ b/doc/classes/SliderJoint3D.xml
@@ -11,14 +11,14 @@
<methods>
<method name="get_param" qualifiers="const">
<return type="float" />
- <argument index="0" name="param" type="int" enum="SliderJoint3D.Param" />
+ <param index="0" name="param" type="int" enum="SliderJoint3D.Param" />
<description>
</description>
</method>
<method name="set_param">
<return type="void" />
- <argument index="0" name="param" type="int" enum="SliderJoint3D.Param" />
- <argument index="1" name="value" type="float" />
+ <param index="0" name="param" type="int" enum="SliderJoint3D.Param" />
+ <param index="1" name="value" type="float" />
<description>
</description>
</method>
@@ -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/SoftDynamicBody3D.xml
index 86552f30f6..7f0a1d94d0 100644
--- a/doc/classes/SoftDynamicBody3D.xml
+++ b/doc/classes/SoftDynamicBody3D.xml
@@ -13,29 +13,29 @@
<methods>
<method name="add_collision_exception_with">
<return type="void" />
- <argument index="0" name="body" type="Node" />
+ <param index="0" name="body" type="Node" />
<description>
Adds a body to the list of bodies that this body can't collide with.
</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>
</method>
<method name="get_collision_layer_value" qualifiers="const">
<return type="bool" />
- <argument index="0" name="layer_number" type="int" />
+ <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" />
- <argument index="0" name="layer_number" type="int" />
+ <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">
@@ -45,48 +45,48 @@
</method>
<method name="get_point_transform">
<return type="Vector3" />
- <argument index="0" name="point_index" type="int" />
+ <param index="0" name="point_index" type="int" />
<description>
Returns local translation of a vertex in the surface array.
</description>
</method>
<method name="is_point_pinned" qualifiers="const">
<return type="bool" />
- <argument index="0" name="point_index" type="int" />
+ <param index="0" name="point_index" type="int" />
<description>
Returns [code]true[/code] if vertex is set to pinned.
</description>
</method>
<method name="remove_collision_exception_with">
<return type="void" />
- <argument index="0" name="body" type="Node" />
+ <param index="0" name="body" type="Node" />
<description>
Removes a body from the list of bodies that this body can't collide with.
</description>
</method>
<method name="set_collision_layer_value">
<return type="void" />
- <argument index="0" name="layer_number" type="int" />
- <argument index="1" name="value" type="bool" />
+ <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">
<return type="void" />
- <argument index="0" name="layer_number" type="int" />
- <argument index="1" name="value" type="bool" />
+ <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">
<return type="void" />
- <argument index="0" name="point_index" type="int" />
- <argument index="1" name="pinned" type="bool" />
- <argument index="2" name="attachment_path" type="NodePath" default="NodePath(&quot;&quot;)" />
+ <param index="0" name="point_index" type="int" />
+ <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>
diff --git a/doc/classes/SphereMesh.xml b/doc/classes/SphereMesh.xml
index d0549d6b52..28c9704626 100644
--- a/doc/classes/SphereMesh.xml
+++ b/doc/classes/SphereMesh.xml
@@ -9,7 +9,7 @@
<tutorials>
</tutorials>
<members>
- <member name="height" type="float" setter="set_height" getter="get_height" default="2.0">
+ <member name="height" type="float" setter="set_height" getter="get_height" default="1.0">
Full height of the sphere.
</member>
<member name="is_hemisphere" type="bool" setter="set_is_hemisphere" getter="get_is_hemisphere" default="false">
@@ -19,7 +19,7 @@
<member name="radial_segments" type="int" setter="set_radial_segments" getter="get_radial_segments" default="64">
Number of radial segments on the sphere.
</member>
- <member name="radius" type="float" setter="set_radius" getter="get_radius" default="1.0">
+ <member name="radius" type="float" setter="set_radius" getter="get_radius" default="0.5">
Radius of sphere.
</member>
<member name="rings" type="int" setter="set_rings" getter="get_rings" default="32">
diff --git a/doc/classes/SphereShape3D.xml b/doc/classes/SphereShape3D.xml
index 63084f024e..b4713b1d41 100644
--- a/doc/classes/SphereShape3D.xml
+++ b/doc/classes/SphereShape3D.xml
@@ -11,7 +11,7 @@
<link title="3D Physics Tests Demo">https://godotengine.org/asset-library/asset/675</link>
</tutorials>
<members>
- <member name="radius" type="float" setter="set_radius" getter="get_radius" default="1.0">
+ <member name="radius" type="float" setter="set_radius" getter="get_radius" default="0.5">
The sphere's radius. The shape's diameter is double the radius.
</member>
</members>
diff --git a/doc/classes/SpinBox.xml b/doc/classes/SpinBox.xml
index e84f9c38ff..8df039794a 100644
--- a/doc/classes/SpinBox.xml
+++ b/doc/classes/SpinBox.xml
@@ -47,6 +47,9 @@
<members>
<member name="alignment" type="int" setter="set_horizontal_alignment" getter="get_horizontal_alignment" enum="HorizontalAlignment" default="0">
</member>
+ <member name="custom_arrow_step" type="float" setter="set_custom_arrow_step" getter="get_custom_arrow_step" default="0.0">
+ If not [code]0[/code], [code]value[/code] will always be rounded to a multiple of [code]custom_arrow_step[/code] when interacting with the arrow buttons of the [SpinBox].
+ </member>
<member name="editable" type="bool" setter="set_editable" getter="is_editable" default="true">
If [code]true[/code], the [SpinBox] will be editable. Otherwise, it will be read only.
</member>
diff --git a/doc/classes/SplitContainer.xml b/doc/classes/SplitContainer.xml
index f2bc65f8df..fb4b9466b5 100644
--- a/doc/classes/SplitContainer.xml
+++ b/doc/classes/SplitContainer.xml
@@ -30,7 +30,7 @@
</members>
<signals>
<signal name="dragged">
- <argument index="0" name="offset" type="int" />
+ <param index="0" name="offset" type="int" />
<description>
Emitted when the dragger is dragged by user.
</description>
diff --git a/doc/classes/SpringArm3D.xml b/doc/classes/SpringArm3D.xml
index d89b8f4549..29331e3071 100644
--- a/doc/classes/SpringArm3D.xml
+++ b/doc/classes/SpringArm3D.xml
@@ -14,7 +14,7 @@
<methods>
<method name="add_excluded_object">
<return type="void" />
- <argument index="0" name="RID" type="RID" />
+ <param index="0" name="RID" type="RID" />
<description>
Adds the [PhysicsBody3D] object with the given [RID] to the list of [PhysicsBody3D] objects excluded from the collision check.
</description>
@@ -33,7 +33,7 @@
</method>
<method name="remove_excluded_object">
<return type="bool" />
- <argument index="0" name="RID" type="RID" />
+ <param index="0" name="RID" type="RID" />
<description>
Removes the given [RID] from the list of [PhysicsBody3D] objects excluded from the collision check.
</description>
diff --git a/doc/classes/Sprite2D.xml b/doc/classes/Sprite2D.xml
index 2edc13a12b..83532721b2 100644
--- a/doc/classes/Sprite2D.xml
+++ b/doc/classes/Sprite2D.xml
@@ -41,7 +41,7 @@
</method>
<method name="is_pixel_opaque" qualifiers="const">
<return type="bool" />
- <argument index="0" name="pos" type="Vector2" />
+ <param index="0" name="pos" type="Vector2" />
<description>
Returns [code]true[/code], if the pixel at the given position is opaque and [code]false[/code] in other case.
[b]Note:[/b] It also returns [code]false[/code], if the sprite's texture is [code]null[/code] or if the given position is invalid.
diff --git a/doc/classes/Sprite3D.xml b/doc/classes/Sprite3D.xml
index 22437027c5..956e646702 100644
--- a/doc/classes/Sprite3D.xml
+++ b/doc/classes/Sprite3D.xml
@@ -24,7 +24,7 @@
The region of the atlas texture to display. [member region_enabled] must be [code]true[/code].
</member>
<member name="texture" type="Texture2D" setter="set_texture" getter="get_texture">
- [Texture2D] object to draw.
+ [Texture2D] object to draw. If [member GeometryInstance3D.material_override] is used, this will be overridden. The size information is still used.
</member>
<member name="vframes" type="int" setter="set_vframes" getter="get_vframes" default="1">
The number of rows in the sprite sheet.
diff --git a/doc/classes/SpriteBase3D.xml b/doc/classes/SpriteBase3D.xml
index 9733fa3a26..5fa984e7a0 100644
--- a/doc/classes/SpriteBase3D.xml
+++ b/doc/classes/SpriteBase3D.xml
@@ -17,7 +17,7 @@
</method>
<method name="get_draw_flag" qualifiers="const">
<return type="bool" />
- <argument index="0" name="flag" type="int" enum="SpriteBase3D.DrawFlags" />
+ <param index="0" name="flag" type="int" enum="SpriteBase3D.DrawFlags" />
<description>
Returns the value of the specified flag.
</description>
@@ -30,8 +30,8 @@
</method>
<method name="set_draw_flag">
<return type="void" />
- <argument index="0" name="flag" type="int" enum="SpriteBase3D.DrawFlags" />
- <argument index="1" name="enabled" type="bool" />
+ <param index="0" name="flag" type="int" enum="SpriteBase3D.DrawFlags" />
+ <param index="1" name="enabled" type="bool" />
<description>
If [code]true[/code], the specified flag will be enabled. See [enum SpriteBase3D.DrawFlags] for a list of flags.
</description>
@@ -75,6 +75,11 @@
<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 sprite to scale it in 3D.
</member>
+ <member name="render_priority" type="int" setter="set_render_priority" getter="get_render_priority" default="0">
+ Sets the render priority for the sprite. Higher priority objects will be sorted in front of lower priority objects.
+ [b]Note:[/b] This only applies if [member alpha_cut] is set to [constant ALPHA_CUT_DISABLED] (default value).
+ [b]Note:[/b] This only applies to sorting of transparent objects. This will not impact how transparent objects are sorted relative to opaque objects. This is because opaque objects are not sorted, while transparent objects are sorted from back to front (subject to priority).
+ </member>
<member name="shaded" type="bool" setter="set_draw_flag" getter="get_draw_flag" default="false">
If [code]true[/code], the [Light3D] in the [Environment] has effects on the sprite.
</member>
diff --git a/doc/classes/SpriteFrames.xml b/doc/classes/SpriteFrames.xml
index b0d1e1efcf..e9721495dd 100644
--- a/doc/classes/SpriteFrames.xml
+++ b/doc/classes/SpriteFrames.xml
@@ -12,23 +12,23 @@
<methods>
<method name="add_animation">
<return type="void" />
- <argument index="0" name="anim" type="StringName" />
+ <param index="0" name="anim" type="StringName" />
<description>
Adds a new animation to the library.
</description>
</method>
<method name="add_frame">
<return type="void" />
- <argument index="0" name="anim" type="StringName" />
- <argument index="1" name="frame" type="Texture2D" />
- <argument index="2" name="at_position" type="int" default="-1" />
+ <param index="0" name="anim" type="StringName" />
+ <param index="1" name="frame" type="Texture2D" />
+ <param index="2" name="at_position" type="int" default="-1" />
<description>
Adds a frame to the given animation.
</description>
</method>
<method name="clear">
<return type="void" />
- <argument index="0" name="anim" type="StringName" />
+ <param index="0" name="anim" type="StringName" />
<description>
Removes all frames from the given animation.
</description>
@@ -41,7 +41,7 @@
</method>
<method name="get_animation_loop" qualifiers="const">
<return type="bool" />
- <argument index="0" name="anim" type="StringName" />
+ <param index="0" name="anim" type="StringName" />
<description>
Returns [code]true[/code] if the given animation is configured to loop when it finishes playing. Otherwise, returns [code]false[/code].
</description>
@@ -54,85 +54,80 @@
</method>
<method name="get_animation_speed" qualifiers="const">
<return type="float" />
- <argument index="0" name="anim" type="StringName" />
+ <param index="0" name="anim" type="StringName" />
<description>
The animation's speed in frames per second.
</description>
</method>
<method name="get_frame" qualifiers="const">
<return type="Texture2D" />
- <argument index="0" name="anim" type="StringName" />
- <argument index="1" name="idx" type="int" />
+ <param index="0" name="anim" type="StringName" />
+ <param index="1" name="idx" type="int" />
<description>
Returns the animation's selected frame.
</description>
</method>
<method name="get_frame_count" qualifiers="const">
<return type="int" />
- <argument index="0" name="anim" type="StringName" />
+ <param index="0" name="anim" type="StringName" />
<description>
Returns the number of frames in the animation.
</description>
</method>
<method name="has_animation" qualifiers="const">
<return type="bool" />
- <argument index="0" name="anim" type="StringName" />
+ <param index="0" name="anim" type="StringName" />
<description>
If [code]true[/code], the named animation exists.
</description>
</method>
<method name="remove_animation">
<return type="void" />
- <argument index="0" name="anim" type="StringName" />
+ <param index="0" name="anim" type="StringName" />
<description>
Removes the given animation.
</description>
</method>
<method name="remove_frame">
<return type="void" />
- <argument index="0" name="anim" type="StringName" />
- <argument index="1" name="idx" type="int" />
+ <param index="0" name="anim" type="StringName" />
+ <param index="1" name="idx" type="int" />
<description>
Removes the animation's selected frame.
</description>
</method>
<method name="rename_animation">
<return type="void" />
- <argument index="0" name="anim" type="StringName" />
- <argument index="1" name="newname" type="StringName" />
+ <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">
<return type="void" />
- <argument index="0" name="anim" type="StringName" />
- <argument index="1" name="loop" type="bool" />
+ <param index="0" name="anim" type="StringName" />
+ <param index="1" name="loop" type="bool" />
<description>
If [code]true[/code], the animation will loop.
</description>
</method>
<method name="set_animation_speed">
<return type="void" />
- <argument index="0" name="anim" type="StringName" />
- <argument index="1" name="speed" type="float" />
+ <param index="0" name="anim" type="StringName" />
+ <param index="1" name="speed" type="float" />
<description>
The animation's speed in frames per second.
</description>
</method>
<method name="set_frame">
<return type="void" />
- <argument index="0" name="anim" type="StringName" />
- <argument index="1" name="idx" type="int" />
- <argument index="2" name="txt" type="Texture2D" />
+ <param index="0" name="anim" type="StringName" />
+ <param index="1" name="idx" type="int" />
+ <param index="2" name="txt" type="Texture2D" />
<description>
Sets the texture of the given frame.
</description>
</method>
</methods>
- <members>
- <member name="frames" type="Array" setter="_set_frames" getter="_get_frames">
- Compatibility property, always equals to an empty array.
- </member>
- </members>
</class>
diff --git a/doc/classes/StandardMaterial3D.xml b/doc/classes/StandardMaterial3D.xml
index 2305a9d325..bd6e5cdfa2 100644
--- a/doc/classes/StandardMaterial3D.xml
+++ b/doc/classes/StandardMaterial3D.xml
@@ -1,10 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="StandardMaterial3D" inherits="BaseMaterial3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
+ Physically based rendering (PBR) material that can be applied to 3D objects.
</brief_description>
<description>
+ StandardMaterial3D's properties are inherited from [BaseMaterial3D].
</description>
<tutorials>
- <link title="Standard Material 3D">$DOCS_URL/tutorials/3d/standard_material_3d.html</link>
+ <link title="Standard Material 3D and ORM Material 3D">$DOCS_URL/tutorials/3d/standard_material_3d.html</link>
</tutorials>
</class>
diff --git a/doc/classes/StreamPeer.xml b/doc/classes/StreamPeer.xml
index bd69867001..4188563695 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" />
- <argument index="0" name="bytes" type="int" />
+ <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 @GlobalScope.Error] code and a data array.
</description>
</method>
<method name="get_double">
@@ -61,16 +61,16 @@
</method>
<method name="get_partial_data">
<return type="Array" />
- <argument index="0" name="bytes" type="int" />
+ <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 @GlobalScope.Error] code, and a data array.
</description>
</method>
<method name="get_string">
<return type="String" />
- <argument index="0" name="bytes" type="int" default="-1" />
+ <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">
@@ -99,78 +99,78 @@
</method>
<method name="get_utf8_string">
<return type="String" />
- <argument index="0" name="bytes" type="int" default="-1" />
+ <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" />
- <argument index="0" name="allow_objects" type="bool" default="false" />
+ <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>
<method name="put_16">
<return type="void" />
- <argument index="0" name="value" type="int" />
+ <param index="0" name="value" type="int" />
<description>
Puts a signed 16-bit value into the stream.
</description>
</method>
<method name="put_32">
<return type="void" />
- <argument index="0" name="value" type="int" />
+ <param index="0" name="value" type="int" />
<description>
Puts a signed 32-bit value into the stream.
</description>
</method>
<method name="put_64">
<return type="void" />
- <argument index="0" name="value" type="int" />
+ <param index="0" name="value" type="int" />
<description>
Puts a signed 64-bit value into the stream.
</description>
</method>
<method name="put_8">
<return type="void" />
- <argument index="0" name="value" type="int" />
+ <param index="0" name="value" type="int" />
<description>
Puts a signed byte into the stream.
</description>
</method>
<method name="put_data">
<return type="int" enum="Error" />
- <argument index="0" name="data" type="PackedByteArray" />
+ <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.
</description>
</method>
<method name="put_double">
<return type="void" />
- <argument index="0" name="value" type="float" />
+ <param index="0" name="value" type="float" />
<description>
Puts a double-precision float into the stream.
</description>
</method>
<method name="put_float">
<return type="void" />
- <argument index="0" name="value" type="float" />
+ <param index="0" name="value" type="float" />
<description>
Puts a single-precision float into the stream.
</description>
</method>
<method name="put_partial_data">
<return type="Array" />
- <argument index="0" name="data" type="PackedByteArray" />
+ <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.
</description>
</method>
<method name="put_string">
<return type="void" />
- <argument index="0" name="value" type="String" />
+ <param index="0" name="value" type="String" />
<description>
Puts a zero-terminated ASCII string into the stream prepended by a 32-bit unsigned integer representing its size.
[b]Note:[/b] To put an ASCII string without prepending its size, you can use [method put_data]:
@@ -186,35 +186,35 @@
</method>
<method name="put_u16">
<return type="void" />
- <argument index="0" name="value" type="int" />
+ <param index="0" name="value" type="int" />
<description>
Puts an unsigned 16-bit value into the stream.
</description>
</method>
<method name="put_u32">
<return type="void" />
- <argument index="0" name="value" type="int" />
+ <param index="0" name="value" type="int" />
<description>
Puts an unsigned 32-bit value into the stream.
</description>
</method>
<method name="put_u64">
<return type="void" />
- <argument index="0" name="value" type="int" />
+ <param index="0" name="value" type="int" />
<description>
Puts an unsigned 64-bit value into the stream.
</description>
</method>
<method name="put_u8">
<return type="void" />
- <argument index="0" name="value" type="int" />
+ <param index="0" name="value" type="int" />
<description>
Puts an unsigned byte into the stream.
</description>
</method>
<method name="put_utf8_string">
<return type="void" />
- <argument index="0" name="value" type="String" />
+ <param index="0" name="value" type="String" />
<description>
Puts a zero-terminated UTF-8 string into the stream prepended by a 32 bits unsigned integer representing its size.
[b]Note:[/b] To put an UTF-8 string without prepending its size, you can use [method put_data]:
@@ -230,10 +230,10 @@
</method>
<method name="put_var">
<return type="void" />
- <argument index="0" name="value" type="Variant" />
- <argument index="1" name="full_objects" type="bool" default="false" />
+ <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 de725aef5b..4bef9f44b7 100644
--- a/doc/classes/StreamPeerBuffer.xml
+++ b/doc/classes/StreamPeerBuffer.xml
@@ -36,16 +36,16 @@
</method>
<method name="resize">
<return type="void" />
- <argument index="0" name="size" type="int" />
+ <param index="0" name="size" type="int" />
<description>
Resizes the [member data_array]. This [i]doesn't[/i] update the cursor.
</description>
</method>
<method name="seek">
<return type="void" />
- <argument index="0" name="position" type="int" />
+ <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 a3a08c530c..46783de275 100644
--- a/doc/classes/StreamPeerExtension.xml
+++ b/doc/classes/StreamPeerExtension.xml
@@ -14,33 +14,33 @@
</method>
<method name="_get_data" qualifiers="virtual">
<return type="int" />
- <argument index="0" name="r_buffer" type="uint8_t*" />
- <argument index="1" name="r_bytes" type="int" />
- <argument index="2" name="r_received" type="int32_t*" />
+ <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*" />
<description>
</description>
</method>
<method name="_get_partial_data" qualifiers="virtual">
<return type="int" />
- <argument index="0" name="r_buffer" type="uint8_t*" />
- <argument index="1" name="r_bytes" type="int" />
- <argument index="2" name="r_received" type="int32_t*" />
+ <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*" />
<description>
</description>
</method>
<method name="_put_data" qualifiers="virtual">
<return type="int" />
- <argument index="0" name="p_data" type="const uint8_t*" />
- <argument index="1" name="p_bytes" type="int" />
- <argument index="2" name="r_sent" type="int32_t*" />
+ <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*" />
<description>
</description>
</method>
<method name="_put_partial_data" qualifiers="virtual">
<return type="int" />
- <argument index="0" name="p_data" type="const uint8_t*" />
- <argument index="1" name="p_bytes" type="int" />
- <argument index="2" name="r_sent" type="int32_t*" />
+ <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*" />
<description>
</description>
</method>
diff --git a/doc/classes/StreamPeerSSL.xml b/doc/classes/StreamPeerSSL.xml
index 3aede347a0..7fe9c54e3e 100644
--- a/doc/classes/StreamPeerSSL.xml
+++ b/doc/classes/StreamPeerSSL.xml
@@ -13,23 +13,23 @@
<methods>
<method name="accept_stream">
<return type="int" enum="Error" />
- <argument index="0" name="stream" type="StreamPeer" />
- <argument index="1" name="private_key" type="CryptoKey" />
- <argument index="2" name="certificate" type="X509Certificate" />
- <argument index="3" name="chain" type="X509Certificate" default="null" />
+ <param index="0" name="stream" type="StreamPeer" />
+ <param index="1" name="private_key" type="CryptoKey" />
+ <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">
<return type="int" enum="Error" />
- <argument index="0" name="stream" type="StreamPeer" />
- <argument index="1" name="validate_certs" type="bool" default="false" />
- <argument index="2" name="for_hostname" type="String" default="&quot;&quot;" />
- <argument index="3" name="valid_certificate" type="X509Certificate" default="null" />
+ <param index="0" name="stream" type="StreamPeer" />
+ <param index="1" name="validate_certs" type="bool" default="false" />
+ <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], [StreamPeerSSL] 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 HTML5 exports due to browsers restrictions.
</description>
</method>
<method name="disconnect_from_stream">
@@ -44,6 +44,12 @@
Returns the status of the connection. See [enum Status] for values.
</description>
</method>
+ <method name="get_stream" qualifiers="const">
+ <return type="StreamPeer" />
+ <description>
+ Returns the underlying [StreamPeer] connection, used in [method accept_stream] or [method connect_to_stream].
+ </description>
+ </method>
<method name="poll">
<return type="void" />
<description>
diff --git a/doc/classes/StreamPeerTCP.xml b/doc/classes/StreamPeerTCP.xml
index f06cf5c7a2..c08fb82797 100644
--- a/doc/classes/StreamPeerTCP.xml
+++ b/doc/classes/StreamPeerTCP.xml
@@ -12,17 +12,17 @@
<methods>
<method name="bind">
<return type="int" enum="Error" />
- <argument index="0" name="port" type="int" />
- <argument index="1" name="host" type="String" default="&quot;*&quot;" />
+ <param index="0" name="port" type="int" />
+ <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">
<return type="int" enum="Error" />
- <argument index="0" name="host" type="String" />
- <argument index="1" name="port" type="int" />
+ <param index="0" name="host" type="String" />
+ <param index="1" name="port" type="int" />
<description>
Connects to the specified [code]host:port[/code] pair. A hostname will be resolved if valid. Returns [constant OK] on success.
</description>
@@ -65,9 +65,9 @@
</method>
<method name="set_no_delay">
<return type="void" />
- <argument index="0" name="enabled" type="bool" />
+ <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/String.xml b/doc/classes/String.xml
index 1f3d5596aa..f1cd4d72f7 100644
--- a/doc/classes/String.xml
+++ b/doc/classes/String.xml
@@ -18,21 +18,21 @@
</constructor>
<constructor name="String">
<return type="String" />
- <argument index="0" name="from" type="String" />
+ <param index="0" name="from" type="String" />
<description>
Constructs a [String] as a copy of the given [String].
</description>
</constructor>
<constructor name="String">
<return type="String" />
- <argument index="0" name="from" type="NodePath" />
+ <param index="0" name="from" type="NodePath" />
<description>
Constructs a new String from the given [NodePath].
</description>
</constructor>
<constructor name="String">
<return type="String" />
- <argument index="0" name="from" type="StringName" />
+ <param index="0" name="from" type="StringName" />
<description>
Constructs a new String from the given [StringName].
</description>
@@ -41,7 +41,7 @@
<methods>
<method name="begins_with" qualifiers="const">
<return type="bool" />
- <argument index="0" name="text" type="String" />
+ <param index="0" name="text" type="String" />
<description>
Returns [code]true[/code] if the string begins with the given string.
</description>
@@ -92,17 +92,17 @@
</method>
<method name="casecmp_to" qualifiers="const">
<return type="int" />
- <argument index="0" name="to" type="String" />
+ <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>
<method name="chr" qualifiers="static">
<return type="String" />
- <argument index="0" name="char" type="int" />
+ <param index="0" name="char" type="int" />
<description>
Directly converts an decimal integer to a unicode character. Tables of these characters can be found in various locations, for example [url=https://unicodelookup.com/]here.[/url]
[codeblock]
@@ -113,27 +113,27 @@
</method>
<method name="contains" qualifiers="const">
<return type="bool" />
- <argument index="0" name="what" type="String" />
+ <param index="0" name="what" type="String" />
<description>
Returns [code]true[/code] if the string contains the given string.
</description>
</method>
<method name="count" qualifiers="const">
<return type="int" />
- <argument index="0" name="what" type="String" />
- <argument index="1" name="from" type="int" default="0" />
- <argument index="2" name="to" type="int" default="0" />
+ <param index="0" name="what" type="String" />
+ <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">
<return type="int" />
- <argument index="0" name="what" type="String" />
- <argument index="1" name="from" type="int" default="0" />
- <argument index="2" name="to" type="int" default="0" />
+ <param index="0" name="what" type="String" />
+ <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">
@@ -144,15 +144,15 @@
</method>
<method name="ends_with" qualifiers="const">
<return type="bool" />
- <argument index="0" name="text" type="String" />
+ <param index="0" name="text" type="String" />
<description>
Returns [code]true[/code] if the string ends with the given string.
</description>
</method>
<method name="find" qualifiers="const">
<return type="int" />
- <argument index="0" name="what" type="String" />
- <argument index="1" name="from" type="int" default="0" />
+ <param index="0" name="what" type="String" />
+ <param index="1" name="from" type="int" default="0" />
<description>
Returns the index of the [b]first[/b] case-sensitive occurrence of the specified string in this instance, or [code]-1[/code]. Optionally, the starting search index can be specified, continuing to the end of the string.
[b]Note:[/b] If you just want to know whether a string contains a substring, use the [code]in[/code] operator as follows:
@@ -169,18 +169,33 @@
</method>
<method name="findn" qualifiers="const">
<return type="int" />
- <argument index="0" name="what" type="String" />
- <argument index="1" name="from" type="int" default="0" />
+ <param index="0" name="what" type="String" />
+ <param index="1" name="from" type="int" default="0" />
<description>
Returns the index of the [b]first[/b] case-insensitive occurrence of the specified string in this instance, or [code]-1[/code]. Optionally, the starting search index can be specified, continuing to the end of the string.
</description>
</method>
<method name="format" qualifiers="const">
<return type="String" />
- <argument index="0" name="values" type="Variant" />
- <argument index="1" name="placeholder" type="String" default="&quot;{_}&quot;" />
+ <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 [code]values[/code].
+ 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."
+ print(use_array_values.format(["Godot", "Samuel Beckett"]))
+
+ # Prints: User 42 is Godot.
+ print("User {id} is {name}.".format({"id": 42, "name": "Godot"}))
+ [/codeblock]
+ 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"], "{}"))
+ print("User {id} is {name}.".format([["id", 42], ["name", "Godot"]]))
+ [/codeblock]
</description>
</method>
<method name="get_base_dir" qualifiers="const">
@@ -219,10 +234,10 @@
</method>
<method name="get_slice" qualifiers="const">
<return type="String" />
- <argument index="0" name="delimiter" type="String" />
- <argument index="1" name="slice" type="int" />
+ <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:
[codeblock]
@@ -232,17 +247,17 @@
</method>
<method name="get_slice_count" qualifiers="const">
<return type="int" />
- <argument index="0" name="delimiter" type="String" />
+ <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">
<return type="String" />
- <argument index="0" name="delimiter" type="int" />
- <argument index="1" name="slice" type="int" />
+ <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>
@@ -271,7 +286,7 @@
</method>
<method name="humanize_size" qualifiers="static">
<return type="String" />
- <argument index="0" name="size" type="int" />
+ <param index="0" name="size" type="int" />
<description>
Converts an integer representing a number of bytes into a human-readable form.
Note that this output is in [url=https://en.wikipedia.org/wiki/Binary_prefix#IEC_prefixes]IEC prefix format[/url], and includes [code]B[/code], [code]KiB[/code], [code]MiB[/code], [code]GiB[/code], [code]TiB[/code], [code]PiB[/code], and [code]EiB[/code].
@@ -279,19 +294,19 @@
</method>
<method name="indent" qualifiers="const">
<return type="String" />
- <argument index="0" name="prefix" 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>
</method>
<method name="insert" qualifiers="const">
<return type="String" />
- <argument index="0" name="position" type="int" />
- <argument index="1" name="what" type="String" />
+ <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">
@@ -314,14 +329,14 @@
</method>
<method name="is_subsequence_of" qualifiers="const">
<return type="bool" />
- <argument index="0" name="text" type="String" />
+ <param index="0" name="text" type="String" />
<description>
Returns [code]true[/code] if this string is a subsequence of the given string.
</description>
</method>
<method name="is_subsequence_ofn" qualifiers="const">
<return type="bool" />
- <argument index="0" name="text" type="String" />
+ <param index="0" name="text" type="String" />
<description>
Returns [code]true[/code] if this string is a subsequence of the given string, without considering case.
</description>
@@ -347,9 +362,9 @@
</method>
<method name="is_valid_hex_number" qualifiers="const">
<return type="bool" />
- <argument index="0" name="with_prefix" type="bool" default="false" />
+ <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 [code]0x[/code] prefix, for instance: [code]0xDEADC0DE[/code].
</description>
</method>
<method name="is_valid_html_color" qualifiers="const">
@@ -390,9 +405,9 @@
</method>
<method name="join" qualifiers="const">
<return type="String" />
- <argument index="0" name="parts" type="PackedStringArray" />
+ <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.
+ Returns a [String] which is the concatenation of the [param parts]. The separator between elements is the string providing this method.
Example:
[codeblocks]
[gdscript]
@@ -412,9 +427,9 @@
</method>
<method name="left" qualifiers="const">
<return type="String" />
- <argument index="0" name="position" type="int" />
+ <param index="0" name="length" type="int" />
<description>
- Returns a number of characters from the left of the string. If negative [code]position[/code] is used, the characters are counted downwards from [String]'s length.
+ 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.
Examples:
[codeblock]
print("sample text".left(3)) #prints "sam"
@@ -425,35 +440,35 @@
<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">
<return type="String" />
- <argument index="0" name="min_length" type="int" />
- <argument index="1" name="character" type="String" default="&quot; &quot;" />
+ <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" />
- <argument index="0" name="chars" 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">
<return type="bool" />
- <argument index="0" name="expr" type="String" />
+ <param index="0" name="expr" type="String" />
<description>
Does a simple case-sensitive expression match, where [code]"*"[/code] matches zero or more arbitrary characters and [code]"?"[/code] matches any single character except a period ([code]"."[/code]). An empty string or empty expression always evaluates to [code]false[/code].
</description>
</method>
<method name="matchn" qualifiers="const">
<return type="bool" />
- <argument index="0" name="expr" type="String" />
+ <param index="0" name="expr" type="String" />
<description>
Does a simple case-insensitive expression match, where [code]"*"[/code] matches zero or more arbitrary characters and [code]"?"[/code] matches any single character except a period ([code]"."[/code]). An empty string or empty expression always evaluates to [code]false[/code].
</description>
@@ -472,32 +487,32 @@
</method>
<method name="naturalnocasecmp_to" qualifiers="const">
<return type="int" />
- <argument index="0" name="to" type="String" />
+ <param index="0" name="to" type="String" />
<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>
<method name="nocasecmp_to" qualifiers="const">
<return type="int" />
- <argument index="0" name="to" type="String" />
+ <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>
<method name="num" qualifiers="static">
<return type="String" />
- <argument index="0" name="number" type="float" />
- <argument index="1" name="decimals" type="int" default="-1" />
+ <param index="0" name="number" type="float" />
+ <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:
[codeblock]
@@ -507,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]
@@ -515,93 +530,93 @@
</method>
<method name="num_int64" qualifiers="static">
<return type="String" />
- <argument index="0" name="number" type="int" />
- <argument index="1" name="base" type="int" default="10" />
- <argument index="2" name="capitalize_hex" type="bool" default="false" />
+ <param index="0" name="number" type="int" />
+ <param index="1" name="base" type="int" default="10" />
+ <param index="2" name="capitalize_hex" type="bool" default="false" />
<description>
Converts a signed [int] to a string representation of a number.
</description>
</method>
<method name="num_scientific" qualifiers="static">
<return type="String" />
- <argument index="0" name="number" type="float" />
+ <param index="0" name="number" type="float" />
<description>
</description>
</method>
<method name="num_uint64" qualifiers="static">
<return type="String" />
- <argument index="0" name="number" type="int" />
- <argument index="1" name="base" type="int" default="10" />
- <argument index="2" name="capitalize_hex" type="bool" default="false" />
+ <param index="0" name="number" type="int" />
+ <param index="1" name="base" type="int" default="10" />
+ <param index="2" name="capitalize_hex" type="bool" default="false" />
<description>
Converts a unsigned [int] to a string representation of a number.
</description>
</method>
<method name="pad_decimals" qualifiers="const">
<return type="String" />
- <argument index="0" name="digits" type="int" />
+ <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" />
- <argument index="0" name="digits" type="int" />
+ <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">
<return type="String" />
- <argument index="0" name="file" 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".plus_file("path") == "this/is/path"[/code].
</description>
</method>
<method name="repeat" qualifiers="const">
<return type="String" />
- <argument index="0" name="count" type="int" />
+ <param index="0" name="count" type="int" />
<description>
Returns original string repeated a number of times. The number of repetitions is given by the argument.
</description>
</method>
<method name="replace" qualifiers="const">
<return type="String" />
- <argument index="0" name="what" type="String" />
- <argument index="1" name="forwhat" type="String" />
+ <param index="0" name="what" type="String" />
+ <param index="1" name="forwhat" type="String" />
<description>
Replaces occurrences of a case-sensitive substring with the given one inside the string.
</description>
</method>
<method name="replacen" qualifiers="const">
<return type="String" />
- <argument index="0" name="what" type="String" />
- <argument index="1" name="forwhat" type="String" />
+ <param index="0" name="what" type="String" />
+ <param index="1" name="forwhat" type="String" />
<description>
Replaces occurrences of a case-insensitive substring with the given one inside the string.
</description>
</method>
<method name="rfind" qualifiers="const">
<return type="int" />
- <argument index="0" name="what" type="String" />
- <argument index="1" name="from" type="int" default="-1" />
+ <param index="0" name="what" type="String" />
+ <param index="1" name="from" type="int" default="-1" />
<description>
Returns the index of the [b]last[/b] case-sensitive occurrence of the specified string in this instance, or [code]-1[/code]. Optionally, the starting search index can be specified, continuing to the beginning of the string.
</description>
</method>
<method name="rfindn" qualifiers="const">
<return type="int" />
- <argument index="0" name="what" type="String" />
- <argument index="1" name="from" type="int" default="-1" />
+ <param index="0" name="what" type="String" />
+ <param index="1" name="from" type="int" default="-1" />
<description>
Returns the index of the [b]last[/b] case-insensitive occurrence of the specified string in this instance, or [code]-1[/code]. Optionally, the starting search index can be specified, continuing to the beginning of the string.
</description>
</method>
<method name="right" qualifiers="const">
<return type="String" />
- <argument index="0" name="position" type="int" />
+ <param index="0" name="length" type="int" />
<description>
- Returns a number of characters from the right of the string. If negative [code]position[/code] is used, the characters are counted downwards from [String]'s length.
+ 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.
Examples:
[codeblock]
print("sample text".right(3)) #prints "ext"
@@ -611,21 +626,22 @@
</method>
<method name="rpad" qualifiers="const">
<return type="String" />
- <argument index="0" name="min_length" type="int" />
- <argument index="1" name="character" type="String" default="&quot; &quot;" />
+ <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" />
- <argument index="0" name="delimiter" type="String" />
- <argument index="1" name="allow_empty" type="bool" default="true" />
- <argument index="2" name="maxsplit" type="int" default="0" />
+ <param index="0" name="delimiter" type="String" />
+ <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.
The splits in the returned array are sorted in the same order as the original string, from left to right.
- 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].
+ 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].
Example:
[codeblocks]
[gdscript]
@@ -643,10 +659,10 @@
</method>
<method name="rstrip" qualifiers="const">
<return type="String" />
- <argument index="0" name="chars" 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">
@@ -675,7 +691,7 @@
</method>
<method name="similarity" qualifiers="const">
<return type="float" />
- <argument index="0" name="text" type="String" />
+ <param index="0" name="text" type="String" />
<description>
Returns the similarity index ([url=https://en.wikipedia.org/wiki/S%C3%B8rensen%E2%80%93Dice_coefficient]Sorensen-Dice coefficient[/url]) of this string compared to another. A result of 1.0 means totally similar, while 0.0 means totally dissimilar.
[codeblock]
@@ -694,12 +710,13 @@
</method>
<method name="split" qualifiers="const">
<return type="PackedStringArray" />
- <argument index="0" name="delimiter" type="String" />
- <argument index="1" name="allow_empty" type="bool" default="true" />
- <argument index="2" name="maxsplit" type="int" default="0" />
+ <param index="0" name="delimiter" type="String" />
+ <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]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 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:
[codeblocks]
@@ -722,17 +739,18 @@
</method>
<method name="split_floats" qualifiers="const">
<return type="PackedFloat32Array" />
- <argument index="0" name="delimiter" type="String" />
- <argument index="1" name="allow_empty" type="bool" default="true" />
+ <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 [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">
<return type="String" />
- <argument index="0" name="left" type="bool" default="true" />
- <argument index="1" name="right" type="bool" default="true" />
+ <param index="0" name="left" type="bool" default="true" />
+ <param index="1" name="right" type="bool" default="true" />
<description>
Returns a copy of the string stripped of any non-printable character (including tabulations, spaces and line breaks) at the beginning and the end. The optional arguments are used to toggle stripping on the left and right edges respectively.
</description>
@@ -745,10 +763,10 @@
</method>
<method name="substr" qualifiers="const">
<return type="String" />
- <argument index="0" name="from" type="int" />
- <argument index="1" name="len" type="int" default="-1" />
+ <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">
@@ -812,23 +830,23 @@
</method>
<method name="trim_prefix" qualifiers="const">
<return type="String" />
- <argument index="0" name="prefix" type="String" />
+ <param index="0" name="prefix" type="String" />
<description>
Removes a given string from the start if it starts with it or leaves the string unchanged.
</description>
</method>
<method name="trim_suffix" qualifiers="const">
<return type="String" />
- <argument index="0" name="suffix" type="String" />
+ <param index="0" name="suffix" type="String" />
<description>
Removes a given string from the end if it ends with it or leaves the string unchanged.
</description>
</method>
<method name="unicode_at" qualifiers="const">
<return type="int" />
- <argument index="0" name="at" 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">
@@ -867,9 +885,9 @@
</method>
<method name="xml_escape" qualifiers="const">
<return type="String" />
- <argument index="0" name="escape_quotes" type="bool" default="false" />
+ <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">
@@ -882,73 +900,73 @@
<operators>
<operator name="operator !=">
<return type="bool" />
- <argument index="0" name="right" type="String" />
+ <param index="0" name="right" type="String" />
<description>
</description>
</operator>
<operator name="operator !=">
<return type="bool" />
- <argument index="0" name="right" type="StringName" />
+ <param index="0" name="right" type="StringName" />
<description>
</description>
</operator>
<operator name="operator %">
<return type="String" />
- <argument index="0" name="right" type="Variant" />
+ <param index="0" name="right" type="Variant" />
<description>
</description>
</operator>
<operator name="operator +">
<return type="String" />
- <argument index="0" name="right" type="String" />
+ <param index="0" name="right" type="String" />
<description>
</description>
</operator>
<operator name="operator +">
<return type="String" />
- <argument index="0" name="right" type="int" />
+ <param index="0" name="right" type="int" />
<description>
</description>
</operator>
<operator name="operator &lt;">
<return type="bool" />
- <argument index="0" name="right" type="String" />
+ <param index="0" name="right" type="String" />
<description>
</description>
</operator>
<operator name="operator &lt;=">
<return type="bool" />
- <argument index="0" name="right" type="String" />
+ <param index="0" name="right" type="String" />
<description>
</description>
</operator>
<operator name="operator ==">
<return type="bool" />
- <argument index="0" name="right" type="String" />
+ <param index="0" name="right" type="String" />
<description>
</description>
</operator>
<operator name="operator ==">
<return type="bool" />
- <argument index="0" name="right" type="StringName" />
+ <param index="0" name="right" type="StringName" />
<description>
</description>
</operator>
<operator name="operator &gt;">
<return type="bool" />
- <argument index="0" name="right" type="String" />
+ <param index="0" name="right" type="String" />
<description>
</description>
</operator>
<operator name="operator &gt;=">
<return type="bool" />
- <argument index="0" name="right" type="String" />
+ <param index="0" name="right" type="String" />
<description>
</description>
</operator>
<operator name="operator []">
<return type="String" />
- <argument index="0" name="index" type="int" />
+ <param index="0" name="index" type="int" />
<description>
</description>
</operator>
diff --git a/doc/classes/StringName.xml b/doc/classes/StringName.xml
index ffa1227500..c40d8929fc 100644
--- a/doc/classes/StringName.xml
+++ b/doc/classes/StringName.xml
@@ -19,65 +19,73 @@
</constructor>
<constructor name="StringName">
<return type="StringName" />
- <argument index="0" name="from" type="StringName" />
+ <param index="0" name="from" type="StringName" />
<description>
Constructs a [StringName] as a copy of the given [StringName].
</description>
</constructor>
<constructor name="StringName">
<return type="StringName" />
- <argument index="0" name="from" type="String" />
+ <param index="0" name="from" type="String" />
<description>
Creates a new [StringName] from the given [String]. [code]StringName("example")[/code] is equivalent to [code]&amp;"example"[/code].
</description>
</constructor>
</constructors>
+ <methods>
+ <method name="hash" qualifiers="const">
+ <return type="int" />
+ <description>
+ Returns the 32-bit hash value representing the [StringName]'s contents.
+ </description>
+ </method>
+ </methods>
<operators>
<operator name="operator !=">
<return type="bool" />
- <argument index="0" name="right" type="String" />
+ <param index="0" name="right" type="String" />
<description>
</description>
</operator>
<operator name="operator !=">
<return type="bool" />
- <argument index="0" name="right" type="StringName" />
+ <param index="0" name="right" type="StringName" />
<description>
</description>
</operator>
<operator name="operator &lt;">
<return type="bool" />
- <argument index="0" name="right" type="StringName" />
+ <param index="0" name="right" type="StringName" />
<description>
</description>
</operator>
<operator name="operator &lt;=">
<return type="bool" />
- <argument index="0" name="right" type="StringName" />
+ <param index="0" name="right" type="StringName" />
<description>
</description>
</operator>
<operator name="operator ==">
<return type="bool" />
- <argument index="0" name="right" type="String" />
+ <param index="0" name="right" type="String" />
<description>
</description>
</operator>
<operator name="operator ==">
<return type="bool" />
- <argument index="0" name="right" type="StringName" />
+ <param index="0" name="right" type="StringName" />
<description>
</description>
</operator>
<operator name="operator &gt;">
<return type="bool" />
- <argument index="0" name="right" type="StringName" />
+ <param index="0" name="right" type="StringName" />
<description>
</description>
</operator>
<operator name="operator &gt;=">
<return type="bool" />
- <argument index="0" name="right" type="StringName" />
+ <param index="0" name="right" type="StringName" />
<description>
</description>
</operator>
diff --git a/doc/classes/StyleBox.xml b/doc/classes/StyleBox.xml
index 74d02a84fd..d9c19a0c86 100644
--- a/doc/classes/StyleBox.xml
+++ b/doc/classes/StyleBox.xml
@@ -12,8 +12,8 @@
<methods>
<method name="_draw" qualifiers="virtual const">
<return type="void" />
- <argument index="0" name="to_canvas_item" type="RID" />
- <argument index="1" name="rect" type="Rect2" />
+ <param index="0" name="to_canvas_item" type="RID" />
+ <param index="1" name="rect" type="Rect2" />
<description>
</description>
</method>
@@ -24,30 +24,30 @@
</method>
<method name="_get_draw_rect" qualifiers="virtual const">
<return type="Rect2" />
- <argument index="0" name="rect" type="Rect2" />
+ <param index="0" name="rect" type="Rect2" />
<description>
</description>
</method>
<method name="_get_style_margin" qualifiers="virtual const">
<return type="float" />
- <argument index="0" name="side" type="int" enum="Side" />
+ <param index="0" name="side" type="int" enum="Side" />
<description>
</description>
</method>
<method name="_test_mask" qualifiers="virtual const">
<return type="bool" />
- <argument index="0" name="point" type="Vector2" />
- <argument index="1" name="rect" type="Rect2" />
+ <param index="0" name="point" type="Vector2" />
+ <param index="1" name="rect" type="Rect2" />
<description>
</description>
</method>
<method name="draw" qualifiers="const">
<return type="void" />
- <argument index="0" name="canvas_item" type="RID" />
- <argument index="1" name="rect" type="Rect2" />
+ <param index="0" name="canvas_item" type="RID" />
+ <param index="1" name="rect" type="Rect2" />
<description>
- Draws this stylebox using a [CanvasItem] with given [RID].
- You can get a [RID] value using [method Object.get_instance_id] on a [CanvasItem]-derived node.
+ Draws this stylebox using a canvas item identified by the given [RID].
+ The [RID] value can either be the result of [method CanvasItem.get_canvas_item] called on an existing [CanvasItem]-derived node, or directly from creating a canvas item in the [RenderingServer] with [method RenderingServer.canvas_item_create].
</description>
</method>
<method name="get_center_size" qualifiers="const">
@@ -64,14 +64,14 @@
</method>
<method name="get_default_margin" qualifiers="const">
<return type="float" />
- <argument index="0" name="margin" type="int" enum="Side" />
+ <param index="0" name="margin" type="int" enum="Side" />
<description>
Returns the default margin of the specified [enum Side].
</description>
</method>
<method name="get_margin" qualifiers="const">
<return type="float" />
- <argument index="0" name="margin" type="int" enum="Side" />
+ <param index="0" name="margin" type="int" enum="Side" />
<description>
Returns the content margin offset for the specified [enum Side].
Positive values reduce size inwards, unlike [Control]'s margin values.
@@ -91,16 +91,16 @@
</method>
<method name="set_default_margin">
<return type="void" />
- <argument index="0" name="margin" type="int" enum="Side" />
- <argument index="1" name="offset" type="float" />
+ <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="test_mask" qualifiers="const">
<return type="bool" />
- <argument index="0" name="point" type="Vector2" />
- <argument index="1" name="rect" type="Rect2" />
+ <param index="0" name="point" type="Vector2" />
+ <param index="1" name="rect" type="Rect2" />
<description>
Test a position in a rectangle, return whether it passes the mask test.
</description>
diff --git a/doc/classes/StyleBoxFlat.xml b/doc/classes/StyleBoxFlat.xml
index c80f8dcbb1..c4024fa4b5 100644
--- a/doc/classes/StyleBoxFlat.xml
+++ b/doc/classes/StyleBoxFlat.xml
@@ -26,7 +26,7 @@
<methods>
<method name="get_border_width" qualifiers="const">
<return type="int" />
- <argument index="0" name="margin" type="int" enum="Side" />
+ <param index="0" name="margin" type="int" enum="Side" />
<description>
Returns the specified [enum Side]'s border width.
</description>
@@ -39,81 +39,81 @@
</method>
<method name="get_corner_radius" qualifiers="const">
<return type="int" />
- <argument index="0" name="corner" type="int" enum="Corner" />
+ <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">
<return type="float" />
- <argument index="0" name="margin" type="int" enum="Side" />
+ <param index="0" name="margin" type="int" enum="Side" />
<description>
Returns the size of the specified [enum Side]'s expand margin.
</description>
</method>
<method name="set_border_width">
<return type="void" />
- <argument index="0" name="margin" type="int" enum="Side" />
- <argument index="1" name="width" type="int" />
+ <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" />
- <argument index="0" name="width" type="int" />
+ <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">
<return type="void" />
- <argument index="0" name="corner" type="int" enum="Corner" />
- <argument index="1" name="radius" type="int" />
+ <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" />
- <argument index="0" name="radius" type="int" />
+ <param index="0" name="radius" type="int" />
<description>
- Sets the corner radius to [code]radius[/code] pixels for all corners.
+ Sets the corner radius to [param radius] pixels for all corners.
</description>
</method>
<method name="set_corner_radius_individual">
<return type="void" />
- <argument index="0" name="radius_top_left" type="int" />
- <argument index="1" name="radius_top_right" type="int" />
- <argument index="2" name="radius_bottom_right" type="int" />
- <argument index="3" name="radius_bottom_left" type="int" />
+ <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 for each corner to [param radius_top_left], [param radius_top_right], [param radius_bottom_right], and [param radius_bottom_left] pixels.
</description>
</method>
<method name="set_expand_margin">
<return type="void" />
- <argument index="0" name="margin" type="int" enum="Side" />
- <argument index="1" name="size" type="float" />
+ <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" />
- <argument index="0" name="size" type="float" />
+ <param index="0" name="size" type="float" />
<description>
- Sets the expand margin to [code]size[/code] pixels for all margins.
+ Sets the expand margin to [param size] pixels for all margins.
</description>
</method>
<method name="set_expand_margin_individual">
<return type="void" />
- <argument index="0" name="size_left" type="float" />
- <argument index="1" name="size_top" type="float" />
- <argument index="2" name="size_right" type="float" />
- <argument index="3" name="size_bottom" type="float" />
+ <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 for each margin to [param size_left], [param size_top], [param size_right], and [param size_bottom] pixels.
</description>
</method>
</methods>
diff --git a/doc/classes/StyleBoxTexture.xml b/doc/classes/StyleBoxTexture.xml
index 8c324d4e37..7db70e630d 100644
--- a/doc/classes/StyleBoxTexture.xml
+++ b/doc/classes/StyleBoxTexture.xml
@@ -11,49 +11,49 @@
<methods>
<method name="get_expand_margin_size" qualifiers="const">
<return type="float" />
- <argument index="0" name="margin" type="int" enum="Side" />
+ <param index="0" name="margin" type="int" enum="Side" />
<description>
Returns the expand margin size of the specified [enum Side].
</description>
</method>
<method name="get_margin_size" qualifiers="const">
<return type="float" />
- <argument index="0" name="margin" type="int" enum="Side" />
+ <param index="0" name="margin" type="int" enum="Side" />
<description>
Returns the margin size of the specified [enum Side].
</description>
</method>
<method name="set_expand_margin_all">
<return type="void" />
- <argument index="0" name="size" type="float" />
+ <param index="0" name="size" type="float" />
<description>
- Sets the expand margin to [code]size[/code] pixels for all margins.
+ Sets the expand margin to [param size] pixels for all margins.
</description>
</method>
<method name="set_expand_margin_individual">
<return type="void" />
- <argument index="0" name="size_left" type="float" />
- <argument index="1" name="size_top" type="float" />
- <argument index="2" name="size_right" type="float" />
- <argument index="3" name="size_bottom" type="float" />
+ <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 for each margin to [param size_left], [param size_top], [param size_right], and [param size_bottom] pixels.
</description>
</method>
<method name="set_expand_margin_size">
<return type="void" />
- <argument index="0" name="margin" type="int" enum="Side" />
- <argument index="1" name="size" type="float" />
+ <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">
<return type="void" />
- <argument index="0" name="margin" type="int" enum="Side" />
- <argument index="1" name="size" type="float" />
+ <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>
</methods>
diff --git a/doc/classes/SurfaceTool.xml b/doc/classes/SurfaceTool.xml
index 43d34d3890..ccec691107 100644
--- a/doc/classes/SurfaceTool.xml
+++ b/doc/classes/SurfaceTool.xml
@@ -33,19 +33,19 @@
<methods>
<method name="add_index">
<return type="void" />
- <argument index="0" name="index" type="int" />
+ <param index="0" name="index" type="int" />
<description>
- Adds an index to index array if you are using indexed vertices. Does not need to be called before adding vertices.
+ Adds a vertex to index array if you are using indexed vertices. Does not need to be called before adding vertices.
</description>
</method>
<method name="add_triangle_fan">
<return type="void" />
- <argument index="0" name="vertices" type="PackedVector3Array" />
- <argument index="1" name="uvs" type="PackedVector2Array" default="PackedVector2Array()" />
- <argument index="2" name="colors" type="PackedColorArray" default="PackedColorArray()" />
- <argument index="3" name="uv2s" type="PackedVector2Array" default="PackedVector2Array()" />
- <argument index="4" name="normals" type="PackedVector3Array" default="PackedVector3Array()" />
- <argument index="5" name="tangents" type="Array" default="[]" />
+ <param index="0" name="vertices" type="PackedVector3Array" />
+ <param index="1" name="uvs" type="PackedVector2Array" default="PackedVector2Array()" />
+ <param index="2" name="colors" type="PackedColorArray" default="PackedColorArray()" />
+ <param index="3" name="uv2s" type="PackedVector2Array" default="PackedVector2Array()" />
+ <param index="4" name="normals" type="PackedVector3Array" default="PackedVector3Array()" />
+ <param index="5" name="tangents" type="Array" default="[]" />
<description>
Inserts a triangle fan made of array data into [Mesh] being constructed.
Requires the primitive type be set to [constant Mesh.PRIMITIVE_TRIANGLES].
@@ -53,23 +53,23 @@
</method>
<method name="add_vertex">
<return type="void" />
- <argument index="0" name="vertex" type="Vector3" />
+ <param index="0" name="vertex" type="Vector3" />
<description>
Specifies the position of current vertex. Should be called after specifying other vertex properties (e.g. Color, UV).
</description>
</method>
<method name="append_from">
<return type="void" />
- <argument index="0" name="existing" type="Mesh" />
- <argument index="1" name="surface" type="int" />
- <argument index="2" name="transform" type="Transform3D" />
+ <param index="0" name="existing" type="Mesh" />
+ <param index="1" name="surface" type="int" />
+ <param index="2" name="transform" type="Transform3D" />
<description>
Append vertices from a given [Mesh] surface onto the current vertex array with specified [Transform3D].
</description>
</method>
<method name="begin">
<return type="void" />
- <argument index="0" name="primitive" type="int" enum="Mesh.PrimitiveType" />
+ <param index="0" name="primitive" type="int" enum="Mesh.PrimitiveType" />
<description>
Called before adding any vertices. Takes the primitive type as an argument (e.g. [constant Mesh.PRIMITIVE_TRIANGLES]).
</description>
@@ -82,11 +82,11 @@
</method>
<method name="commit">
<return type="ArrayMesh" />
- <argument index="0" name="existing" type="ArrayMesh" default="null" />
- <argument index="1" name="flags" type="int" default="0" />
+ <param index="0" name="existing" type="ArrayMesh" default="null" />
+ <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">
@@ -97,17 +97,17 @@
</method>
<method name="create_from">
<return type="void" />
- <argument index="0" name="existing" type="Mesh" />
- <argument index="1" name="surface" type="int" />
+ <param index="0" name="existing" type="Mesh" />
+ <param index="1" name="surface" type="int" />
<description>
Creates a vertex array from an existing [Mesh].
</description>
</method>
<method name="create_from_blend_shape">
<return type="void" />
- <argument index="0" name="existing" type="Mesh" />
- <argument index="1" name="surface" type="int" />
- <argument index="2" name="blend_shape" type="String" />
+ <param index="0" name="existing" type="Mesh" />
+ <param index="1" name="surface" type="int" />
+ <param index="2" name="blend_shape" type="String" />
<description>
Creates a vertex array from the specified blend shape of an existing [Mesh]. This can be used to extract a specific pose from a blend shape.
</description>
@@ -120,16 +120,18 @@
</method>
<method name="generate_lod">
<return type="PackedInt32Array" />
- <argument index="0" name="nd_threshold" type="float" />
- <argument index="1" name="target_index_count" type="int" default="3" />
+ <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 [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>
<method name="generate_normals">
<return type="void" />
- <argument index="0" name="flip" type="bool" default="false" />
+ <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].
</description>
</method>
@@ -139,25 +141,31 @@
Generates a tangent vector for each vertex. Requires that each vertex have UVs and normals set already (see [method generate_normals]).
</description>
</method>
- <method name="get_custom_format" qualifiers="const">
- <return type="int" enum="SurfaceTool.CustomFormat" />
- <argument index="0" name="index" type="int" />
+ <method name="get_aabb" qualifiers="const">
+ <return type="AABB" />
<description>
+ Returns the axis-aligned bounding box of the vertex positions.
</description>
</method>
- <method name="get_max_axis_length" qualifiers="const">
- <return type="float" />
+ <method name="get_custom_format" qualifiers="const">
+ <return type="int" enum="SurfaceTool.CustomFormat" />
+ <param index="0" name="channel_index" type="int" />
<description>
+ 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" qualifiers="const">
+ <method name="get_primitive_type" qualifiers="const">
<return type="int" enum="Mesh.PrimitiveType" />
<description>
+ Returns the type of mesh geometry, such as [constant Mesh.PRIMITIVE_TRIANGLES].
</description>
</method>
<method name="get_skin_weight_count" qualifiers="const">
<return type="int" enum="SurfaceTool.SkinWeightCount" />
<description>
+ By default, returns [constant SKIN_4_WEIGHTS] to indicate only 4 bone influences per vertex are used.
+ Returns [constant SKIN_8_WEIGHTS] if up to 8 influences are used.
+ [b]Note:[/b] This function returns an enum, not the exact number of weights.
</description>
</method>
<method name="index">
@@ -169,18 +177,19 @@
<method name="optimize_indices_for_cache">
<return type="void" />
<description>
+ Optimizes triangle sorting for performance. Requires that [method get_primitive_type] is [constant Mesh.PRIMITIVE_TRIANGLES].
</description>
</method>
<method name="set_bones">
<return type="void" />
- <argument index="0" name="bones" type="PackedInt32Array" />
+ <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">
<return type="void" />
- <argument index="0" name="color" type="Color" />
+ <param index="0" name="color" type="Color" />
<description>
Specifies a [Color] to use for the [i]next[/i] vertex. 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.
[b]Note:[/b] The material must have [member BaseMaterial3D.vertex_color_use_as_albedo] enabled for the vertex color to be visible.
@@ -188,96 +197,114 @@
</method>
<method name="set_custom">
<return type="void" />
- <argument index="0" name="index" type="int" />
- <argument index="1" name="custom" type="Color" />
+ <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 [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">
<return type="void" />
- <argument index="0" name="index" type="int" />
- <argument index="1" name="format" type="int" enum="SurfaceTool.CustomFormat" />
+ <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 [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>
<method name="set_material">
<return type="void" />
- <argument index="0" name="material" type="Material" />
+ <param index="0" name="material" type="Material" />
<description>
Sets [Material] to be used by the [Mesh] you are constructing.
</description>
</method>
<method name="set_normal">
<return type="void" />
- <argument index="0" name="normal" type="Vector3" />
+ <param index="0" name="normal" type="Vector3" />
<description>
Specifies a normal to use for the [i]next[/i] vertex. 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>
<method name="set_skin_weight_count">
<return type="void" />
- <argument index="0" name="count" type="int" enum="SurfaceTool.SkinWeightCount" />
+ <param index="0" name="count" type="int" enum="SurfaceTool.SkinWeightCount" />
<description>
+ Set to [constant SKIN_8_WEIGHTS] to indicate that up to 8 bone influences per vertex may be used.
+ By default, only 4 bone influences are used ([constant SKIN_4_WEIGHTS])
+ [b]Note:[/b] This function takes an enum, not the exact number of weights.
</description>
</method>
<method name="set_smooth_group">
<return type="void" />
- <argument index="0" name="index" type="int" />
+ <param index="0" name="index" type="int" />
<description>
Specifies whether the current vertex (if using only vertex arrays) or current index (if also using index arrays) should use smooth normals for normal calculation.
</description>
</method>
<method name="set_tangent">
<return type="void" />
- <argument index="0" name="tangent" type="Plane" />
+ <param index="0" name="tangent" type="Plane" />
<description>
Specifies a tangent to use for the [i]next[/i] vertex. 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>
<method name="set_uv">
<return type="void" />
- <argument index="0" name="uv" type="Vector2" />
+ <param index="0" name="uv" type="Vector2" />
<description>
Specifies a set of UV coordinates to use for the [i]next[/i] vertex. 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>
<method name="set_uv2">
<return type="void" />
- <argument index="0" name="uv2" type="Vector2" />
+ <param index="0" name="uv2" type="Vector2" />
<description>
Specifies an optional second set of UV coordinates to use for the [i]next[/i] vertex. 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>
<method name="set_weights">
<return type="void" />
- <argument index="0" name="weights" type="PackedFloat32Array" />
+ <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].
</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].
</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].
</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].
</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].
</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].
</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].
</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].
</constant>
<constant name="CUSTOM_MAX" value="8" enum="CustomFormat">
+ Used to indicate a disabled custom channel.
</constant>
<constant name="SKIN_4_WEIGHTS" value="0" enum="SkinWeightCount">
+ Each individual vertex can be influenced by only 4 bone weights.
</constant>
<constant name="SKIN_8_WEIGHTS" value="1" enum="SkinWeightCount">
+ Each individual vertex can be influenced by up to 8 bone weights.
</constant>
</constants>
</class>
diff --git a/doc/classes/SyntaxHighlighter.xml b/doc/classes/SyntaxHighlighter.xml
index 70cbd83371..fcac96c04d 100644
--- a/doc/classes/SyntaxHighlighter.xml
+++ b/doc/classes/SyntaxHighlighter.xml
@@ -19,7 +19,7 @@
</method>
<method name="_get_line_syntax_highlighting" qualifiers="virtual const">
<return type="Dictionary" />
- <argument index="0" name="line" type="int" />
+ <param index="0" name="line" type="int" />
<description>
Virtual method which can be overridden to return syntax highlighting data.
See [method get_line_syntax_highlighting] for more details.
@@ -40,7 +40,7 @@
</method>
<method name="get_line_syntax_highlighting">
<return type="Dictionary" />
- <argument index="0" name="line" type="int" />
+ <param index="0" name="line" type="int" />
<description>
Returns syntax highlighting data for a single line. If the line is not cached, calls [method _get_line_syntax_highlighting] to calculate the data.
The return [Dictionary] is column number to [Dictionary]. The column number notes the start of a region, the region will end if another region is found, or at the end of the line. The nested [Dictionary] contains the data for that region, currently only the key "color" is supported.
diff --git a/doc/classes/SystemFont.xml b/doc/classes/SystemFont.xml
new file mode 100644
index 0000000000..b7454cc7d2
--- /dev/null
+++ b/doc/classes/SystemFont.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="SystemFont" inherits="Font" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ Font loaded from a system font.
+ [b]Note:[/b] This class is implemented on iOS, Linux, macOS and Windows, on other platforms it will fallback to default theme font.
+ </brief_description>
+ <description>
+ [SystemFont] loads a font from a system font with the first matching name from [member font_names].
+ It will attempt to match font style, but it's not guaranteed.
+ The returned font might be part of a font collection or be a variable font with OpenType "weight" and/or "italic" features set.
+ You can create [FontVariation] of the system font for fine control over its features.
+ </description>
+ <tutorials>
+ </tutorials>
+ <members>
+ <member name="antialiased" type="bool" setter="set_antialiased" getter="is_antialiased" default="true">
+ If set to [code]true[/code], font 8-bit anitialiased glyph rendering is supported and enabled.
+ </member>
+ <member name="fallbacks" type="Font[]" setter="set_fallbacks" getter="get_fallbacks" default="[]">
+ Array of fallback [Font]s.
+ </member>
+ <member name="font_names" type="PackedStringArray" setter="set_font_names" getter="get_font_names" default="PackedStringArray()">
+ Array of font family names to search, first matching font found is used.
+ </member>
+ <member name="font_style" type="int" setter="set_font_style" getter="get_font_style" enum="TextServer.FontStyle" default="0">
+ Font style flags, see [enum TextServer.FontStyle].
+ </member>
+ <member name="force_autohinter" type="bool" setter="set_force_autohinter" getter="is_force_autohinter" default="false">
+ If set to [code]true[/code], auto-hinting is supported and preferred over font built-in hinting.
+ </member>
+ <member name="generate_mipmaps" type="bool" setter="set_generate_mipmaps" getter="get_generate_mipmaps" default="false">
+ If set to [code]true[/code], generate mipmaps for the font textures.
+ </member>
+ <member name="hinting" type="int" setter="set_hinting" getter="get_hinting" enum="TextServer.Hinting" default="1">
+ Font hinting mode.
+ </member>
+ <member name="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.
+ </member>
+ </members>
+</class>
diff --git a/doc/classes/TCPServer.xml b/doc/classes/TCPServer.xml
index 06fe4de9e2..fbed80bcfa 100644
--- a/doc/classes/TCPServer.xml
+++ b/doc/classes/TCPServer.xml
@@ -30,13 +30,13 @@
</method>
<method name="listen">
<return type="int" enum="Error" />
- <argument index="0" name="port" type="int" />
- <argument index="1" name="bind_address" type="String" default="&quot;*&quot;" />
+ <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 a8ed0d4286..713c016651 100644
--- a/doc/classes/TabBar.xml
+++ b/doc/classes/TabBar.xml
@@ -11,22 +11,15 @@
<methods>
<method name="add_tab">
<return type="void" />
- <argument index="0" name="title" type="String" default="&quot;&quot;" />
- <argument index="1" name="icon" type="Texture2D" default="null" />
+ <param index="0" name="title" type="String" default="&quot;&quot;" />
+ <param index="1" name="icon" type="Texture2D" default="null" />
<description>
Adds a new tab.
</description>
</method>
- <method name="clear_tab_opentype_features">
- <return type="void" />
- <argument index="0" name="tab_idx" type="int" />
- <description>
- Removes all OpenType features from the tab title.
- </description>
- </method>
<method name="ensure_tab_visible">
<return type="void" />
- <argument index="0" name="idx" type="int" />
+ <param index="0" name="idx" type="int" />
<description>
Moves the scroll view to make the tab visible.
</description>
@@ -45,28 +38,28 @@
</method>
<method name="get_tab_button_icon" qualifiers="const">
<return type="Texture2D" />
- <argument index="0" name="tab_idx" type="int" />
+ <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" />
- <argument index="0" name="tab_idx" type="int" />
+ <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" />
- <argument index="0" name="point" type="Vector2" />
+ <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">
<return type="String" />
- <argument index="0" name="tab_idx" type="int" />
+ <param index="0" name="tab_idx" type="int" />
<description>
Returns tab title language code.
</description>
@@ -77,127 +70,110 @@
Returns the number of hidden tabs offsetted to the left.
</description>
</method>
- <method name="get_tab_opentype_feature" qualifiers="const">
- <return type="int" />
- <argument index="0" name="tab_idx" type="int" />
- <argument index="1" name="tag" type="String" />
- <description>
- Returns OpenType feature [code]tag[/code] of the tab title.
- </description>
- </method>
<method name="get_tab_rect" qualifiers="const">
<return type="Rect2" />
- <argument index="0" name="tab_idx" type="int" />
+ <param index="0" name="tab_idx" type="int" />
<description>
Returns tab [Rect2] with local position and size.
</description>
</method>
<method name="get_tab_text_direction" qualifiers="const">
<return type="int" enum="Control.TextDirection" />
- <argument index="0" name="tab_idx" type="int" />
+ <param index="0" name="tab_idx" type="int" />
<description>
Returns tab title text base writing direction.
</description>
</method>
<method name="get_tab_title" qualifiers="const">
<return type="String" />
- <argument index="0" name="tab_idx" type="int" />
+ <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" />
- <argument index="0" name="tab_idx" type="int" />
+ <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" />
- <argument index="0" name="tab_idx" type="int" />
+ <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">
<return type="void" />
- <argument index="0" name="from" type="int" />
- <argument index="1" name="to" type="int" />
+ <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" />
- <argument index="0" name="tab_idx" type="int" />
+ <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">
<return type="void" />
- <argument index="0" name="tab_idx" type="int" />
- <argument index="1" name="icon" type="Texture2D" />
+ <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">
<return type="void" />
- <argument index="0" name="tab_idx" type="int" />
- <argument index="1" name="disabled" type="bool" />
+ <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">
<return type="void" />
- <argument index="0" name="tab_idx" type="int" />
- <argument index="1" name="hidden" type="bool" />
+ <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">
<return type="void" />
- <argument index="0" name="tab_idx" type="int" />
- <argument index="1" name="icon" type="Texture2D" />
+ <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">
<return type="void" />
- <argument index="0" name="tab_idx" type="int" />
- <argument index="1" name="language" type="String" />
+ <param index="0" name="tab_idx" type="int" />
+ <param index="1" name="language" type="String" />
<description>
Sets language code of tab title used for line-breaking and text shaping algorithms, if left empty current locale is used instead.
</description>
</method>
- <method name="set_tab_opentype_feature">
- <return type="void" />
- <argument index="0" name="tab_idx" type="int" />
- <argument index="1" name="tag" type="String" />
- <argument index="2" name="values" type="int" />
- <description>
- Sets OpenType feature [code]tag[/code] for the tab title. More info: [url=https://docs.microsoft.com/en-us/typography/opentype/spec/featuretags]OpenType feature tags[/url].
- </description>
- </method>
<method name="set_tab_text_direction">
<return type="void" />
- <argument index="0" name="tab_idx" type="int" />
- <argument index="1" name="direction" type="int" enum="Control.TextDirection" />
+ <param index="0" name="tab_idx" type="int" />
+ <param index="1" name="direction" type="int" enum="Control.TextDirection" />
<description>
Sets tab title base writing direction.
</description>
</method>
<method name="set_tab_title">
<return type="void" />
- <argument index="0" name="tab_idx" type="int" />
- <argument index="1" name="title" type="String" />
+ <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>
@@ -239,31 +215,31 @@
</members>
<signals>
<signal name="active_tab_rearranged">
- <argument index="0" name="idx_to" type="int" />
+ <param index="0" name="idx_to" type="int" />
<description>
Emitted when the active tab is rearranged via mouse drag. See [member drag_to_rearrange_enabled].
</description>
</signal>
<signal name="tab_button_pressed">
- <argument index="0" name="tab" type="int" />
+ <param index="0" name="tab" type="int" />
<description>
Emitted when a tab's right button is pressed. See [method set_tab_button_icon].
</description>
</signal>
<signal name="tab_changed">
- <argument index="0" name="tab" type="int" />
+ <param index="0" name="tab" type="int" />
<description>
Emitted when switching to another tab.
</description>
</signal>
<signal name="tab_clicked">
- <argument index="0" name="tab" type="int" />
+ <param index="0" name="tab" type="int" />
<description>
Emitted when a tab is clicked, even if it is the current tab.
</description>
</signal>
<signal name="tab_close_pressed">
- <argument index="0" name="tab" type="int" />
+ <param index="0" name="tab" type="int" />
<description>
Emitted when a tab's close button is pressed.
[b]Note:[/b] Tabs are not removed automatically once the close button is pressed, this behavior needs to be programmed manually. For example:
@@ -278,19 +254,19 @@
</description>
</signal>
<signal name="tab_hovered">
- <argument index="0" name="tab" type="int" />
+ <param index="0" name="tab" type="int" />
<description>
Emitted when a tab is hovered by the mouse.
</description>
</signal>
<signal name="tab_rmb_clicked">
- <argument index="0" name="tab" type="int" />
+ <param index="0" name="tab" type="int" />
<description>
Emitted when a tab is right-clicked. [member select_with_rmb] must be enabled.
</description>
</signal>
<signal name="tab_selected">
- <argument index="0" name="tab" type="int" />
+ <param index="0" name="tab" type="int" />
<description>
Emitted when a tab is selected via click or script, even if it is the current tab.
</description>
diff --git a/doc/classes/TabContainer.xml b/doc/classes/TabContainer.xml
index 10b5f730ad..74f258072c 100644
--- a/doc/classes/TabContainer.xml
+++ b/doc/classes/TabContainer.xml
@@ -33,16 +33,16 @@
</method>
<method name="get_tab_button_icon" qualifiers="const">
<return type="Texture2D" />
- <argument index="0" name="tab_idx" type="int" />
+ <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" />
- <argument index="0" name="tab_idx" type="int" />
+ <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">
@@ -53,91 +53,91 @@
</method>
<method name="get_tab_icon" qualifiers="const">
<return type="Texture2D" />
- <argument index="0" name="tab_idx" type="int" />
+ <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" />
- <argument index="0" name="point" type="Vector2" />
+ <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" />
- <argument index="0" name="control" type="Control" />
+ <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" />
- <argument index="0" name="tab_idx" type="int" />
+ <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" />
- <argument index="0" name="tab_idx" type="int" />
+ <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" />
- <argument index="0" name="tab_idx" type="int" />
+ <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">
<return type="void" />
- <argument index="0" name="popup" type="Node" />
+ <param index="0" name="popup" type="Node" />
<description>
If set on a [Popup] node instance, a popup menu icon appears in the top-right corner of the [TabContainer] (setting it to [code]null[/code] will make it go away). Clicking it will expand the [Popup] node.
</description>
</method>
<method name="set_tab_button_icon">
<return type="void" />
- <argument index="0" name="tab_idx" type="int" />
- <argument index="1" name="icon" type="Texture2D" />
+ <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">
<return type="void" />
- <argument index="0" name="tab_idx" type="int" />
- <argument index="1" name="disabled" type="bool" />
+ <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">
<return type="void" />
- <argument index="0" name="tab_idx" type="int" />
- <argument index="1" name="hidden" type="bool" />
+ <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">
<return type="void" />
- <argument index="0" name="tab_idx" type="int" />
- <argument index="1" name="icon" type="Texture2D" />
+ <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">
<return type="void" />
- <argument index="0" name="tab_idx" type="int" />
- <argument index="1" name="title" type="String" />
+ <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>
@@ -175,19 +175,19 @@
</description>
</signal>
<signal name="tab_button_pressed">
- <argument index="0" name="tab" type="int" />
+ <param index="0" name="tab" type="int" />
<description>
Emitted when the user clicks on the button icon on this tab.
</description>
</signal>
<signal name="tab_changed">
- <argument index="0" name="tab" type="int" />
+ <param index="0" name="tab" type="int" />
<description>
Emitted when switching to another tab.
</description>
</signal>
<signal name="tab_selected">
- <argument index="0" name="tab" type="int" />
+ <param index="0" name="tab" type="int" />
<description>
Emitted when a tab is selected, even if it is the current tab.
</description>
diff --git a/doc/classes/TextEdit.xml b/doc/classes/TextEdit.xml
index 58fdd2d058..aa7ce85f3a 100644
--- a/doc/classes/TextEdit.xml
+++ b/doc/classes/TextEdit.xml
@@ -30,9 +30,9 @@
</method>
<method name="_handle_unicode_input" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="unicode_char" type="int" />
+ <param index="0" name="unicode_char" 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">
@@ -50,9 +50,9 @@
</method>
<method name="add_gutter">
<return type="void" />
- <argument index="0" name="at" type="int" default="-1" />
+ <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="adjust_viewport_to_caret">
@@ -85,12 +85,6 @@
Performs a full reset of [TextEdit], including undo history.
</description>
</method>
- <method name="clear_opentype_features">
- <return type="void" />
- <description>
- Removes all OpenType features.
- </description>
- </method>
<method name="clear_undo_history">
<return type="void" />
<description>
@@ -153,7 +147,7 @@
</method>
<method name="get_first_non_whitespace_column" qualifiers="const">
<return type="int" />
- <argument index="0" name="line" type="int" />
+ <param index="0" name="line" type="int" />
<description>
Returns the first column containing a non-whitespace character.
</description>
@@ -167,35 +161,35 @@
<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">
<return type="String" />
- <argument index="0" name="gutter" type="int" />
+ <param index="0" name="gutter" type="int" />
<description>
Returns the name of the gutter at the given index.
</description>
</method>
<method name="get_gutter_type" qualifiers="const">
<return type="int" enum="TextEdit.GutterType" />
- <argument index="0" name="gutter" type="int" />
+ <param index="0" name="gutter" type="int" />
<description>
Returns the type of the gutter at the given index.
</description>
</method>
<method name="get_gutter_width" qualifiers="const">
<return type="int" />
- <argument index="0" name="gutter" type="int" />
+ <param index="0" name="gutter" type="int" />
<description>
Returns the width of the gutter at the given index.
</description>
</method>
<method name="get_indent_level" qualifiers="const">
<return type="int" />
- <argument index="0" name="line" 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">
@@ -218,62 +212,62 @@
</method>
<method name="get_line" qualifiers="const">
<return type="String" />
- <argument index="0" name="line" type="int" />
+ <param index="0" name="line" type="int" />
<description>
Returns the text of a specific line.
</description>
</method>
<method name="get_line_background_color" qualifiers="const">
<return type="Color" />
- <argument index="0" name="line" type="int" />
+ <param index="0" name="line" type="int" />
<description>
Returns the current background color of the line. [code]Color(0, 0, 0, 0)[/code] is returned if no color is set.
</description>
</method>
<method name="get_line_column_at_pos" qualifiers="const">
<return type="Vector2i" />
- <argument index="0" name="position" type="Vector2i" />
- <argument index="1" name="allow_out_of_bounds" type="bool" default="true" />
+ <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">
<return type="Texture2D" />
- <argument index="0" name="line" type="int" />
- <argument index="1" name="gutter" type="int" />
+ <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">
<return type="Color" />
- <argument index="0" name="line" type="int" />
- <argument index="1" name="gutter" type="int" />
+ <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">
<return type="Variant" />
- <argument index="0" name="line" type="int" />
- <argument index="1" name="gutter" type="int" />
+ <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">
<return type="String" />
- <argument index="0" name="line" type="int" />
- <argument index="1" name="gutter" type="int" />
+ <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">
@@ -284,30 +278,30 @@
</method>
<method name="get_line_width" qualifiers="const">
<return type="int" />
- <argument index="0" name="line" type="int" />
- <argument index="1" name="wrap_index" type="int" default="-1" />
+ <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">
<return type="int" />
- <argument index="0" name="line" type="int" />
+ <param index="0" name="line" type="int" />
<description>
Returns the number of times the given line is wrapped.
</description>
</method>
<method name="get_line_wrap_index_at_column" qualifiers="const">
<return type="int" />
- <argument index="0" name="line" type="int" />
- <argument index="1" name="column" type="int" />
+ <param index="0" name="line" type="int" />
+ <param index="1" name="column" type="int" />
<description>
Returns the wrap index of the given line column.
</description>
</method>
<method name="get_line_wrapped_text" qualifiers="const">
<return type="PackedStringArray" />
- <argument index="0" name="line" type="int" />
+ <param index="0" name="line" type="int" />
<description>
Returns an array of [String]s representing each wrapped index.
</description>
@@ -327,56 +321,49 @@
</method>
<method name="get_minimap_line_at_pos" qualifiers="const">
<return type="int" />
- <argument index="0" name="position" type="Vector2i" />
+ <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">
<return type="Vector2i" />
- <argument index="0" name="line" type="int" />
- <argument index="1" name="wrap_index" type="int" />
- <argument index="2" name="visible_amount" type="int" />
+ <param index="0" name="line" type="int" />
+ <param index="1" name="wrap_index" type="int" />
+ <param index="2" name="visible_amount" type="int" />
<description>
Similar to [method get_next_visible_line_offset_from], but takes into account the line wrap indexes. In the returned vector, [code]x[/code] is the line, [code]y[/code] is the wrap index.
</description>
</method>
<method name="get_next_visible_line_offset_from" qualifiers="const">
<return type="int" />
- <argument index="0" name="line" type="int" />
- <argument 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.
- </description>
- </method>
- <method name="get_opentype_feature" qualifiers="const">
- <return type="int" />
- <argument index="0" name="tag" type="String" />
+ <param index="0" name="line" type="int" />
+ <param index="1" name="visible_amount" type="int" />
<description>
- Returns OpenType feature [code]tag[/code].
+ 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">
<return type="Vector2i" />
- <argument index="0" name="line" type="int" />
- <argument index="1" name="column" type="int" />
+ <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>
<method name="get_rect_at_line_column" qualifiers="const">
<return type="Rect2i" />
- <argument index="0" name="line" type="int" />
- <argument index="1" name="column" type="int" />
+ <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>
@@ -388,10 +375,10 @@
</method>
<method name="get_scroll_pos_for_line" qualifiers="const">
<return type="float" />
- <argument index="0" name="line" type="int" />
- <argument index="1" name="wrap_index" type="int" default="0" />
+ <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">
@@ -457,7 +444,7 @@
<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_version" qualifiers="const">
@@ -474,17 +461,17 @@
</method>
<method name="get_visible_line_count_in_range" qualifiers="const">
<return type="int" />
- <argument index="0" name="from_line" type="int" />
- <argument index="1" name="to_line" type="int" />
+ <param index="0" name="from_line" type="int" />
+ <param index="1" name="to_line" type="int" />
<description>
Returns the total number of visible + wrapped lines between the two lines.
</description>
</method>
<method name="get_word_at_pos" qualifiers="const">
<return type="String" />
- <argument index="0" name="position" type="Vector2" />
+ <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">
@@ -519,15 +506,15 @@
</method>
<method name="insert_line_at">
<return type="void" />
- <argument index="0" name="line" type="int" />
- <argument index="1" name="text" type="String" />
+ <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" />
- <argument index="0" name="text" type="String" />
+ <param index="0" name="text" type="String" />
<description>
Insert the specified text at the caret position.
</description>
@@ -546,36 +533,36 @@
</method>
<method name="is_gutter_clickable" qualifiers="const">
<return type="bool" />
- <argument index="0" name="gutter" type="int" />
+ <param index="0" name="gutter" type="int" />
<description>
Returns whether the gutter is clickable.
</description>
</method>
<method name="is_gutter_drawn" qualifiers="const">
<return type="bool" />
- <argument index="0" name="gutter" type="int" />
+ <param index="0" name="gutter" type="int" />
<description>
Returns whether the gutter is currently drawn.
</description>
</method>
<method name="is_gutter_overwritable" qualifiers="const">
<return type="bool" />
- <argument index="0" name="gutter" type="int" />
+ <param index="0" name="gutter" type="int" />
<description>
Returns whether the gutter is overwritable.
</description>
</method>
<method name="is_line_gutter_clickable" qualifiers="const">
<return type="bool" />
- <argument index="0" name="line" type="int" />
- <argument index="1" name="gutter" type="int" />
+ <param index="0" name="line" type="int" />
+ <param index="1" name="gutter" type="int" />
<description>
Returns whether the gutter on the given line is clickable.
</description>
</method>
<method name="is_line_wrapped" qualifiers="const">
<return type="bool" />
- <argument index="0" name="line" type="int" />
+ <param index="0" name="line" type="int" />
<description>
Returns if the given line is wrapped.
</description>
@@ -588,9 +575,9 @@
</method>
<method name="is_mouse_over_selection" qualifiers="const">
<return type="bool" />
- <argument index="0" name="edges" type="bool" />
+ <param index="0" name="edges" type="bool" />
<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">
@@ -601,17 +588,17 @@
</method>
<method name="menu_option">
<return type="void" />
- <argument index="0" name="option" type="int" />
+ <param index="0" name="option" type="int" />
<description>
Triggers a right-click menu action by the specified index. See [enum MenuItems] for a list of available indexes.
</description>
</method>
<method name="merge_gutters">
<return type="void" />
- <argument index="0" name="from_line" type="int" />
- <argument index="1" name="to_line" type="int" />
+ <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="paste">
@@ -628,17 +615,17 @@
</method>
<method name="remove_gutter">
<return type="void" />
- <argument index="0" name="gutter" type="int" />
+ <param index="0" name="gutter" type="int" />
<description>
Removes the gutter from this [TextEdit].
</description>
</method>
<method name="remove_text">
<return type="void" />
- <argument index="0" name="from_line" type="int" />
- <argument index="1" name="from_column" type="int" />
- <argument index="2" name="to_line" type="int" />
- <argument index="3" name="to_column" type="int" />
+ <param index="0" name="from_line" type="int" />
+ <param index="1" name="from_column" type="int" />
+ <param index="2" name="to_line" type="int" />
+ <param index="3" name="to_column" type="int" />
<description>
Removes text between the given positions.
[b]Note:[/b] This does not adjust the caret or selection, which as a result it can end up in an invalid position.
@@ -646,10 +633,10 @@
</method>
<method name="search" qualifiers="const">
<return type="Vector2i" />
- <argument index="0" name="text" type="String" />
- <argument index="1" name="flags" type="int" />
- <argument index="2" name="from_line" type="int" />
- <argument index="3" name="from_colum" type="int" />
+ <param index="0" name="text" type="String" />
+ <param index="1" name="flags" type="int" />
+ <param index="2" name="from_line" type="int" />
+ <param index="3" name="from_colum" type="int" />
<description>
Perform a search inside the text. Search flags can be specified in the [enum SearchFlags] enum.
In the returned vector, [code]x[/code] is the column, [code]y[/code] is the line. If no results are found, both are equal to [code]-1[/code].
@@ -675,10 +662,10 @@
</method>
<method name="select">
<return type="void" />
- <argument index="0" name="from_line" type="int" />
- <argument index="1" name="from_column" type="int" />
- <argument index="2" name="to_line" type="int" />
- <argument index="3" name="to_column" type="int" />
+ <param index="0" name="from_line" type="int" />
+ <param index="1" name="from_column" type="int" />
+ <param index="2" name="to_line" type="int" />
+ <param index="3" name="to_column" type="int" />
<description>
Perform selection, from line/column to line/column.
If [member selecting_enabled] is [code]false[/code], no selection will occur.
@@ -699,222 +686,214 @@
</method>
<method name="set_caret_column">
<return type="void" />
- <argument index="0" name="column" type="int" />
- <argument index="1" name="adjust_viewport" type="bool" default="true" />
+ <param index="0" name="column" type="int" />
+ <param index="1" name="adjust_viewport" type="bool" default="true" />
<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.
</description>
</method>
<method name="set_caret_line">
<return type="void" />
- <argument index="0" name="line" type="int" />
- <argument index="1" name="adjust_viewport" type="bool" default="true" />
- <argument index="2" name="can_be_hidden" type="bool" default="true" />
- <argument index="3" name="wrap_index" type="int" default="0" />
+ <param index="0" name="line" type="int" />
+ <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" />
<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.
</description>
</method>
<method name="set_gutter_clickable">
<return type="void" />
- <argument index="0" name="gutter" type="int" />
- <argument index="1" name="clickable" type="bool" />
+ <param index="0" name="gutter" type="int" />
+ <param index="1" name="clickable" type="bool" />
<description>
Sets the gutter as clickable. This will change the mouse cursor to a pointing hand when hovering over the gutter.
</description>
</method>
<method name="set_gutter_custom_draw">
<return type="void" />
- <argument index="0" name="column" type="int" />
- <argument index="1" name="draw_callback" type="Callable" />
+ <param index="0" name="column" type="int" />
+ <param index="1" name="draw_callback" type="Callable" />
<description>
Set a custom draw method for the gutter. The callback method must take the following args: [code]line: int, gutter: int, Area: Rect2[/code].
</description>
</method>
<method name="set_gutter_draw">
<return type="void" />
- <argument index="0" name="gutter" type="int" />
- <argument index="1" name="draw" type="bool" />
+ <param index="0" name="gutter" type="int" />
+ <param index="1" name="draw" type="bool" />
<description>
Sets whether the gutter should be drawn.
</description>
</method>
<method name="set_gutter_name">
<return type="void" />
- <argument index="0" name="gutter" type="int" />
- <argument index="1" name="name" type="String" />
+ <param index="0" name="gutter" type="int" />
+ <param index="1" name="name" type="String" />
<description>
Sets the name of the gutter.
</description>
</method>
<method name="set_gutter_overwritable">
<return type="void" />
- <argument index="0" name="gutter" type="int" />
- <argument index="1" name="overwritable" type="bool" />
+ <param index="0" name="gutter" type="int" />
+ <param index="1" name="overwritable" type="bool" />
<description>
Sets the gutter to overwritable. See [method merge_gutters].
</description>
</method>
<method name="set_gutter_type">
<return type="void" />
- <argument index="0" name="gutter" type="int" />
- <argument index="1" name="type" type="int" enum="TextEdit.GutterType" />
+ <param index="0" name="gutter" type="int" />
+ <param index="1" name="type" type="int" enum="TextEdit.GutterType" />
<description>
Sets the type of gutter.
</description>
</method>
<method name="set_gutter_width">
<return type="void" />
- <argument index="0" name="gutter" type="int" />
- <argument index="1" name="width" type="int" />
+ <param index="0" name="gutter" type="int" />
+ <param index="1" name="width" type="int" />
<description>
Set the width of the gutter.
</description>
</method>
<method name="set_line">
<return type="void" />
- <argument index="0" name="line" type="int" />
- <argument index="1" name="new_text" type="String" />
+ <param index="0" name="line" type="int" />
+ <param index="1" name="new_text" type="String" />
<description>
Sets the text for a specific line.
</description>
</method>
<method name="set_line_as_center_visible">
<return type="void" />
- <argument index="0" name="line" type="int" />
- <argument index="1" name="wrap_index" type="int" default="0" />
+ <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">
<return type="void" />
- <argument index="0" name="line" type="int" />
- <argument index="1" name="wrap_index" type="int" default="0" />
+ <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">
<return type="void" />
- <argument index="0" name="line" type="int" />
- <argument index="1" name="wrap_index" type="int" default="0" />
+ <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">
<return type="void" />
- <argument index="0" name="line" type="int" />
- <argument index="1" name="color" type="Color" />
+ <param index="0" name="line" type="int" />
+ <param index="1" name="color" type="Color" />
<description>
Sets the current background color of the line. Set to [code]Color(0, 0, 0, 0)[/code] for no color.
</description>
</method>
<method name="set_line_gutter_clickable">
<return type="void" />
- <argument index="0" name="line" type="int" />
- <argument index="1" name="gutter" type="int" />
- <argument index="2" name="clickable" type="bool" />
+ <param index="0" name="line" type="int" />
+ <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">
<return type="void" />
- <argument index="0" name="line" type="int" />
- <argument index="1" name="gutter" type="int" />
- <argument index="2" name="icon" type="Texture2D" />
+ <param index="0" name="line" type="int" />
+ <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">
<return type="void" />
- <argument index="0" name="line" type="int" />
- <argument index="1" name="gutter" type="int" />
- <argument index="2" name="color" type="Color" />
+ <param index="0" name="line" type="int" />
+ <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">
<return type="void" />
- <argument index="0" name="line" type="int" />
- <argument index="1" name="gutter" type="int" />
- <argument index="2" name="metadata" type="Variant" />
+ <param index="0" name="line" type="int" />
+ <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">
<return type="void" />
- <argument index="0" name="line" type="int" />
- <argument index="1" name="gutter" type="int" />
- <argument index="2" name="text" type="String" />
+ <param index="0" name="line" type="int" />
+ <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].
- </description>
- </method>
- <method name="set_opentype_feature">
- <return type="void" />
- <argument index="0" name="tag" type="String" />
- <argument index="1" name="value" type="int" />
- <description>
- Sets OpenType feature [code]tag[/code]. More info: [url=https://docs.microsoft.com/en-us/typography/opentype/spec/featuretags]OpenType feature tags[/url].
+ Sets the text for [param gutter] on [param line] to [param text].
</description>
</method>
<method name="set_overtype_mode_enabled">
<return type="void" />
- <argument index="0" name="enabled" type="bool" />
+ <param index="0" name="enabled" type="bool" />
<description>
If [code]true[/code], sets the user into overtype mode. When the user types in this mode, it will override existing text.
</description>
</method>
<method name="set_search_flags">
<return type="void" />
- <argument index="0" name="flags" type="int" />
+ <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">
<return type="void" />
- <argument index="0" name="search_text" type="String" />
+ <param index="0" name="search_text" type="String" />
<description>
Sets the search text. See [method set_search_flags].
</description>
</method>
<method name="set_selection_mode">
<return type="void" />
- <argument index="0" name="mode" type="int" enum="TextEdit.SelectionMode" />
- <argument index="1" name="line" type="int" default="-1" />
- <argument index="2" name="column" type="int" default="-1" />
+ <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" />
<description>
Sets the current selection mode.
</description>
</method>
<method name="set_tab_size">
<return type="void" />
- <argument index="0" name="size" type="int" />
+ <param index="0" name="size" type="int" />
<description>
Sets the tab size for the [TextEdit] to use.
</description>
</method>
<method name="set_tooltip_request_func">
<return type="void" />
- <argument index="0" name="callback" type="Callable" />
+ <param index="0" name="callback" type="Callable" />
<description>
Provide custom tooltip text. The callback method must take the following args: [code]hovered_word: String[/code]
</description>
</method>
<method name="swap_lines">
<return type="void" />
- <argument index="0" name="from_line" type="int" />
- <argument index="1" name="to_line" type="int" />
+ <param index="0" name="from_line" type="int" />
+ <param index="1" name="to_line" type="int" />
<description>
Swaps the two lines.
</description>
@@ -956,6 +935,9 @@
<member name="deselect_on_focus_loss_enabled" type="bool" setter="set_deselect_on_focus_loss_enabled" getter="is_deselect_on_focus_loss_enabled" default="true">
If [code]true[/code], the selected text will be deselected when focus is lost.
</member>
+ <member name="drag_and_drop_selection_enabled" type="bool" setter="set_drag_and_drop_selection_enabled" getter="is_drag_and_drop_selection_enabled" default="true">
+ If [code]true[/code], allow drag and drop of selected text.
+ </member>
<member name="draw_control_chars" type="bool" setter="set_draw_control_chars" getter="get_draw_control_chars" default="false">
If [code]true[/code], control characters are displayed.
</member>
@@ -995,13 +977,16 @@
<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>
+ <member name="scroll_fit_content_height" type="bool" setter="set_fit_content_height_enabled" getter="is_fit_content_height_enabled" default="false">
+ If [code]true[/code], [TextEdit] will disable vertical scroll and fit minimum height to the number of visible lines.
+ </member>
<member name="scroll_horizontal" type="int" setter="set_h_scroll" getter="get_h_scroll" default="0">
If there is a horizontal scrollbar, this determines the current horizontal scroll value in pixels.
</member>
<member name="scroll_past_end_of_file" type="bool" setter="set_scroll_past_end_of_file_enabled" getter="is_scroll_past_end_of_file_enabled" default="false">
Allow scrolling past the last line into "virtual" space.
</member>
- <member name="scroll_smooth" type="bool" setter="set_smooth_scroll_enable" getter="is_smooth_scroll_enabled" default="false">
+ <member name="scroll_smooth" type="bool" setter="set_smooth_scroll_enabled" getter="is_smooth_scroll_enabled" default="false">
Scroll smoothly over the text rather then jumping to the next location.
</member>
<member name="scroll_v_scroll_speed" type="float" setter="set_v_scroll_speed" getter="get_v_scroll_speed" default="80.0">
@@ -1051,8 +1036,8 @@
</description>
</signal>
<signal name="gutter_clicked">
- <argument index="0" name="line" type="int" />
- <argument index="1" name="gutter" type="int" />
+ <param index="0" name="line" type="int" />
+ <param index="1" name="gutter" type="int" />
<description>
Emitted when a gutter is clicked.
</description>
@@ -1063,11 +1048,11 @@
</description>
</signal>
<signal name="lines_edited_from">
- <argument index="0" name="from_line" type="int" />
- <argument index="1" name="to_line" type="int" />
+ <param index="0" name="from_line" type="int" />
+ <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">
diff --git a/doc/classes/TextLine.xml b/doc/classes/TextLine.xml
index 5359937db5..471c1a9040 100644
--- a/doc/classes/TextLine.xml
+++ b/doc/classes/TextLine.xml
@@ -11,22 +11,21 @@
<methods>
<method name="add_object">
<return type="bool" />
- <argument index="0" name="key" type="Variant" />
- <argument index="1" name="size" type="Vector2" />
- <argument index="2" name="inline_align" type="int" enum="InlineAlignment" default="5" />
- <argument index="3" name="length" type="int" default="1" />
+ <param index="0" name="key" type="Variant" />
+ <param index="1" name="size" type="Vector2" />
+ <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">
<return type="bool" />
- <argument index="0" name="text" type="String" />
- <argument index="1" name="fonts" type="Font" />
- <argument index="2" name="size" type="int" />
- <argument index="3" name="opentype_features" type="Dictionary" default="{}" />
- <argument index="4" name="language" type="String" default="&quot;&quot;" />
- <argument index="5" name="meta" type="Variant" default="null" />
+ <param index="0" name="text" type="String" />
+ <param index="1" name="font" type="Font" />
+ <param index="2" name="font_size" type="int" />
+ <param index="3" name="language" type="String" default="&quot;&quot;" />
+ <param index="4" name="meta" type="Variant" default="null" />
<description>
Adds text span and font to draw it.
</description>
@@ -39,21 +38,21 @@
</method>
<method name="draw" qualifiers="const">
<return type="void" />
- <argument index="0" name="canvas" type="RID" />
- <argument index="1" name="pos" type="Vector2" />
- <argument index="2" name="color" type="Color" default="Color(1, 1, 1, 1)" />
+ <param index="0" name="canvas" type="RID" />
+ <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">
<return type="void" />
- <argument index="0" name="canvas" type="RID" />
- <argument index="1" name="pos" type="Vector2" />
- <argument index="2" name="outline_size" type="int" default="1" />
- <argument index="3" name="color" type="Color" default="Color(1, 1, 1, 1)" />
+ <param index="0" name="canvas" type="RID" />
+ <param index="1" name="pos" type="Vector2" />
+ <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">
@@ -88,7 +87,7 @@
</method>
<method name="get_object_rect" qualifiers="const">
<return type="Rect2" />
- <argument index="0" name="key" type="Variant" />
+ <param index="0" name="key" type="Variant" />
<description>
Returns bounding rectangle of the inline object.
</description>
@@ -113,23 +112,23 @@
</method>
<method name="hit_test" qualifiers="const">
<return type="int" />
- <argument index="0" name="coords" type="float" />
+ <param index="0" name="coords" type="float" />
<description>
Returns caret character offset at the specified pixel offset at the baseline. This function always returns a valid position.
</description>
</method>
<method name="resize_object">
<return type="bool" />
- <argument index="0" name="key" type="Variant" />
- <argument index="1" name="size" type="Vector2" />
- <argument index="2" name="inline_align" type="int" enum="InlineAlignment" default="5" />
+ <param index="0" name="key" type="Variant" />
+ <param index="1" name="size" type="Vector2" />
+ <param index="2" name="inline_align" type="int" enum="InlineAlignment" default="5" />
<description>
Sets new size and alignment of embedded object.
</description>
</method>
<method name="set_bidi_override">
<return type="void" />
- <argument index="0" name="override" type="Array" />
+ <param index="0" 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.
@@ -137,7 +136,7 @@
</method>
<method name="tab_align">
<return type="void" />
- <argument index="0" name="tab_stops" type="PackedFloat32Array" />
+ <param index="0" name="tab_stops" type="PackedFloat32Array" />
<description>
Aligns text to the given tab-stops.
</description>
@@ -149,8 +148,8 @@
<member name="direction" type="int" setter="set_direction" getter="get_direction" enum="TextServer.Direction" default="0">
Text writing direction.
</member>
- <member name="flags" type="int" setter="set_flags" getter="get_flags" default="3">
- Line Alignment rules. For more info see [TextServer].
+ <member name="flags" type="int" setter="set_flags" getter="get_flags" enum="TextServer.JustificationFlag" default="3">
+ Line alignment rules. For more info see [TextServer].
</member>
<member name="orientation" type="int" setter="set_orientation" getter="get_orientation" enum="TextServer.Orientation" default="0">
Text orientation.
@@ -161,28 +160,11 @@
<member name="preserve_invalid" type="bool" setter="set_preserve_invalid" getter="get_preserve_invalid" default="true">
If set to [code]true[/code] text will display invalid characters.
</member>
- <member name="text_overrun_behavior" type="int" setter="set_text_overrun_behavior" getter="get_text_overrun_behavior" enum="TextLine.OverrunBehavior" default="3">
- Sets the clipping behavior when the text exceeds the text line's set width. See [enum OverrunBehavior] for a description of all modes.
+ <member name="text_overrun_behavior" type="int" setter="set_text_overrun_behavior" getter="get_text_overrun_behavior" enum="TextServer.OverrunBehavior" default="3">
+ Sets the clipping behavior when the text exceeds the text line's set width. See [enum TextServer.OverrunBehavior] for a description of all modes.
</member>
<member name="width" type="float" setter="set_width" getter="get_width" default="-1.0">
Text line width.
</member>
</members>
- <constants>
- <constant name="OVERRUN_NO_TRIMMING" value="0" enum="OverrunBehavior">
- No text trimming is performed.
- </constant>
- <constant name="OVERRUN_TRIM_CHAR" value="1" enum="OverrunBehavior">
- Trims the text per character.
- </constant>
- <constant name="OVERRUN_TRIM_WORD" value="2" enum="OverrunBehavior">
- Trims the text per word.
- </constant>
- <constant name="OVERRUN_TRIM_ELLIPSIS" value="3" enum="OverrunBehavior">
- Trims the text per character and adds an ellipsis to indicate that parts are hidden.
- </constant>
- <constant name="OVERRUN_TRIM_WORD_ELLIPSIS" value="4" enum="OverrunBehavior">
- Trims the text per word and adds an ellipsis to indicate that parts are hidden.
- </constant>
- </constants>
</class>
diff --git a/doc/classes/TextMesh.xml b/doc/classes/TextMesh.xml
new file mode 100644
index 0000000000..17a0ca32e4
--- /dev/null
+++ b/doc/classes/TextMesh.xml
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="TextMesh" inherits="PrimitiveMesh" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ Generate an [PrimitiveMesh] from the text.
+ </brief_description>
+ <description>
+ Generate an [PrimitiveMesh] from the text.
+ TextMesh can be generated only when using dynamic fonts with vector glyph contours. Bitmap fonts (including bitmap data in the TrueType/OpenType containers, like color emoji fonts) are not supported.
+ The UV layout is arranged in 4 horizontal strips, top to bottom: 40% of the height for the front face, 40% for the back face, 10% for the outer edges and 10% for the inner edges.
+ </description>
+ <tutorials>
+ </tutorials>
+ <members>
+ <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>
+ <member name="depth" type="float" setter="set_depth" getter="get_depth" default="0.05">
+ Depths of the mesh, if set to [code]0.0[/code] only front surface, is generated, and UV layout is changed to use full texture for the front face only.
+ </member>
+ <member name="font" type="Font" setter="set_font" getter="get_font">
+ Font configuration used to display text.
+ </member>
+ <member name="font_size" type="int" setter="set_font_size" getter="get_font_size" default="16">
+ Font size of the [TextMesh]'s text.
+ </member>
+ <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>
+ <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="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>
+ <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>
+ <member name="structured_text_bidi_override_options" type="Array" setter="set_structured_text_bidi_override_options" getter="get_structured_text_bidi_override_options" default="[]">
+ Set additional options for BiDi override.
+ </member>
+ <member name="text" type="String" setter="set_text" getter="get_text" default="&quot;&quot;">
+ The text to generate mesh from.
+ </member>
+ <member name="text_direction" type="int" setter="set_text_direction" getter="get_text_direction" enum="TextServer.Direction" default="0">
+ Base text writing direction.
+ </member>
+ <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="width" type="float" setter="set_width" getter="get_width" default="500.0">
+ Text width (in pixels), used for fill alignment.
+ </member>
+ </members>
+</class>
diff --git a/doc/classes/TextParagraph.xml b/doc/classes/TextParagraph.xml
index 964e2c771f..e0729ba844 100644
--- a/doc/classes/TextParagraph.xml
+++ b/doc/classes/TextParagraph.xml
@@ -11,22 +11,21 @@
<methods>
<method name="add_object">
<return type="bool" />
- <argument index="0" name="key" type="Variant" />
- <argument index="1" name="size" type="Vector2" />
- <argument index="2" name="inline_align" type="int" enum="InlineAlignment" default="5" />
- <argument index="3" name="length" type="int" default="1" />
+ <param index="0" name="key" type="Variant" />
+ <param index="1" name="size" type="Vector2" />
+ <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">
<return type="bool" />
- <argument index="0" name="text" type="String" />
- <argument index="1" name="fonts" type="Font" />
- <argument index="2" name="size" type="int" />
- <argument index="3" name="opentype_features" type="Dictionary" default="{}" />
- <argument index="4" name="language" type="String" default="&quot;&quot;" />
- <argument index="5" name="meta" type="Variant" default="null" />
+ <param index="0" name="text" type="String" />
+ <param index="1" name="font" type="Font" />
+ <param index="2" name="font_size" type="int" />
+ <param index="3" name="language" type="String" default="&quot;&quot;" />
+ <param index="4" name="meta" type="Variant" default="null" />
<description>
Adds text span and font to draw it.
</description>
@@ -45,63 +44,63 @@
</method>
<method name="draw" qualifiers="const">
<return type="void" />
- <argument index="0" name="canvas" type="RID" />
- <argument index="1" name="pos" type="Vector2" />
- <argument index="2" name="color" type="Color" default="Color(1, 1, 1, 1)" />
- <argument index="3" name="dc_color" type="Color" default="Color(1, 1, 1, 1)" />
+ <param index="0" name="canvas" type="RID" />
+ <param index="1" name="pos" type="Vector2" />
+ <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">
<return type="void" />
- <argument index="0" name="canvas" type="RID" />
- <argument index="1" name="pos" type="Vector2" />
- <argument index="2" name="color" type="Color" default="Color(1, 1, 1, 1)" />
+ <param index="0" name="canvas" type="RID" />
+ <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">
<return type="void" />
- <argument index="0" name="canvas" type="RID" />
- <argument index="1" name="pos" type="Vector2" />
- <argument index="2" name="outline_size" type="int" default="1" />
- <argument index="3" name="color" type="Color" default="Color(1, 1, 1, 1)" />
+ <param index="0" name="canvas" type="RID" />
+ <param index="1" name="pos" type="Vector2" />
+ <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">
<return type="void" />
- <argument index="0" name="canvas" type="RID" />
- <argument index="1" name="pos" type="Vector2" />
- <argument index="2" name="line" type="int" />
- <argument index="3" name="color" type="Color" default="Color(1, 1, 1, 1)" />
+ <param index="0" name="canvas" type="RID" />
+ <param index="1" name="pos" type="Vector2" />
+ <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">
<return type="void" />
- <argument index="0" name="canvas" type="RID" />
- <argument index="1" name="pos" type="Vector2" />
- <argument index="2" name="line" type="int" />
- <argument index="3" name="outline_size" type="int" default="1" />
- <argument index="4" name="color" type="Color" default="Color(1, 1, 1, 1)" />
+ <param index="0" name="canvas" type="RID" />
+ <param index="1" name="pos" type="Vector2" />
+ <param index="2" name="line" type="int" />
+ <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">
<return type="void" />
- <argument index="0" name="canvas" type="RID" />
- <argument index="1" name="pos" type="Vector2" />
- <argument index="2" name="outline_size" type="int" default="1" />
- <argument index="3" name="color" type="Color" default="Color(1, 1, 1, 1)" />
- <argument index="4" name="dc_color" type="Color" default="Color(1, 1, 1, 1)" />
+ <param index="0" name="canvas" type="RID" />
+ <param index="1" name="pos" type="Vector2" />
+ <param index="2" name="outline_size" type="int" default="1" />
+ <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">
@@ -124,7 +123,7 @@
</method>
<method name="get_line_ascent" qualifiers="const">
<return type="float" />
- <argument index="0" name="line" type="int" />
+ <param index="0" name="line" type="int" />
<description>
Returns the text line ascent (number of pixels above the baseline for horizontal layout or to the left of baseline for vertical).
</description>
@@ -137,64 +136,64 @@
</method>
<method name="get_line_descent" qualifiers="const">
<return type="float" />
- <argument index="0" name="line" type="int" />
+ <param index="0" name="line" type="int" />
<description>
Returns the text line descent (number of pixels below the baseline for horizontal layout or to the right of baseline for vertical).
</description>
</method>
<method name="get_line_object_rect" qualifiers="const">
<return type="Rect2" />
- <argument index="0" name="line" type="int" />
- <argument index="1" name="key" type="Variant" />
+ <param index="0" name="line" type="int" />
+ <param index="1" name="key" type="Variant" />
<description>
Returns bounding rectangle of the inline object.
</description>
</method>
<method name="get_line_objects" qualifiers="const">
<return type="Array" />
- <argument index="0" name="line" type="int" />
+ <param index="0" name="line" type="int" />
<description>
Returns array of inline objects in the line.
</description>
</method>
<method name="get_line_range" qualifiers="const">
<return type="Vector2i" />
- <argument index="0" name="line" type="int" />
+ <param index="0" name="line" type="int" />
<description>
Returns character range of the line.
</description>
</method>
<method name="get_line_rid" qualifiers="const">
<return type="RID" />
- <argument index="0" name="line" type="int" />
+ <param index="0" name="line" type="int" />
<description>
Returns TextServer line buffer RID.
</description>
</method>
<method name="get_line_size" qualifiers="const">
<return type="Vector2" />
- <argument index="0" name="line" type="int" />
+ <param index="0" name="line" type="int" />
<description>
Returns size of the bounding box of the line of text.
</description>
</method>
<method name="get_line_underline_position" qualifiers="const">
<return type="float" />
- <argument index="0" name="line" type="int" />
+ <param index="0" name="line" type="int" />
<description>
Returns pixel offset of the underline below the baseline.
</description>
</method>
<method name="get_line_underline_thickness" qualifiers="const">
<return type="float" />
- <argument index="0" name="line" type="int" />
+ <param index="0" name="line" type="int" />
<description>
Returns thickness of the underline.
</description>
</method>
<method name="get_line_width" qualifiers="const">
<return type="float" />
- <argument index="0" name="line" type="int" />
+ <param index="0" name="line" type="int" />
<description>
Returns width (for horizontal layout) or height (for vertical) of the line of text.
</description>
@@ -217,37 +216,25 @@
Returns the size of the bounding box of the paragraph.
</description>
</method>
- <method name="get_spacing_bottom" qualifiers="const">
- <return type="int" />
- <description>
- Returns extra spacing at the bottom of the line. See [member Font.spacing_bottom].
- </description>
- </method>
- <method name="get_spacing_top" qualifiers="const">
- <return type="int" />
- <description>
- Returns extra spacing at the top of the line. See [member Font.spacing_top].
- </description>
- </method>
<method name="hit_test" qualifiers="const">
<return type="int" />
- <argument index="0" name="coords" type="Vector2" />
+ <param index="0" name="coords" type="Vector2" />
<description>
Returns caret character offset at the specified coordinates. This function always returns a valid position.
</description>
</method>
<method name="resize_object">
<return type="bool" />
- <argument index="0" name="key" type="Variant" />
- <argument index="1" name="size" type="Vector2" />
- <argument index="2" name="inline_align" type="int" enum="InlineAlignment" default="5" />
+ <param index="0" name="key" type="Variant" />
+ <param index="1" name="size" type="Vector2" />
+ <param index="2" name="inline_align" type="int" enum="InlineAlignment" default="5" />
<description>
Sets new size and alignment of embedded object.
</description>
</method>
<method name="set_bidi_override">
<return type="void" />
- <argument index="0" name="override" type="Array" />
+ <param index="0" 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.
@@ -255,19 +242,18 @@
</method>
<method name="set_dropcap">
<return type="bool" />
- <argument index="0" name="text" type="String" />
- <argument index="1" name="fonts" type="Font" />
- <argument index="2" name="size" type="int" />
- <argument index="3" name="dropcap_margins" type="Rect2" default="Rect2(0, 0, 0, 0)" />
- <argument index="4" name="opentype_features" type="Dictionary" default="{}" />
- <argument index="5" name="language" type="String" default="&quot;&quot;" />
+ <param index="0" name="text" type="String" />
+ <param index="1" name="font" type="Font" />
+ <param index="2" name="font_size" type="int" />
+ <param index="3" name="dropcap_margins" type="Rect2" default="Rect2(0, 0, 0, 0)" />
+ <param index="4" name="language" type="String" default="&quot;&quot;" />
<description>
Sets drop cap, overrides previously set drop cap. Drop cap (dropped capital) is a decorative element at the beginning of a paragraph that is larger than the rest of the text.
</description>
</method>
<method name="tab_align">
<return type="void" />
- <argument index="0" name="tab_stops" type="PackedFloat32Array" />
+ <param index="0" name="tab_stops" type="PackedFloat32Array" />
<description>
Aligns paragraph to the given tab-stops.
</description>
@@ -277,14 +263,17 @@
<member name="alignment" type="int" setter="set_alignment" getter="get_alignment" enum="HorizontalAlignment" default="0">
Paragraph horizontal alignment.
</member>
+ <member name="break_flags" type="int" setter="set_break_flags" getter="get_break_flags" enum="TextServer.LineBreakFlag" default="3">
+ Line breaking rules. For more info see [TextServer].
+ </member>
<member name="custom_punctuation" type="String" setter="set_custom_punctuation" getter="get_custom_punctuation" default="&quot;&quot;">
Custom punctuation character list, used for word breaking. If set to empty string, server defaults are used.
</member>
<member name="direction" type="int" setter="set_direction" getter="get_direction" enum="TextServer.Direction" default="0">
Text writing direction.
</member>
- <member name="flags" type="int" setter="set_flags" getter="get_flags" default="99">
- Line breaking and alignment rules. For more info see [TextServer].
+ <member name="justification_flags" type="int" setter="set_justification_flags" getter="get_justification_flags" enum="TextServer.JustificationFlag" default="3">
+ Line alignment rules. For more info see [TextServer].
</member>
<member name="max_lines_visible" type="int" setter="set_max_lines_visible" getter="get_max_lines_visible" default="-1">
Limits the lines of text shown.
@@ -298,28 +287,11 @@
<member name="preserve_invalid" type="bool" setter="set_preserve_invalid" getter="get_preserve_invalid" default="true">
If set to [code]true[/code] text will display invalid characters.
</member>
- <member name="text_overrun_behavior" type="int" setter="set_text_overrun_behavior" getter="get_text_overrun_behavior" enum="TextParagraph.OverrunBehavior" default="0">
- Sets the clipping behavior when the text exceeds the paragraph's set width. See [enum OverrunBehavior] for a description of all modes.
+ <member name="text_overrun_behavior" type="int" setter="set_text_overrun_behavior" getter="get_text_overrun_behavior" enum="TextServer.OverrunBehavior" default="0">
+ Sets the clipping behavior when the text exceeds the paragraph's set width. See [enum TextServer.OverrunBehavior] for a description of all modes.
</member>
<member name="width" type="float" setter="set_width" getter="get_width" default="-1.0">
Paragraph width.
</member>
</members>
- <constants>
- <constant name="OVERRUN_NO_TRIMMING" value="0" enum="OverrunBehavior">
- No text trimming is performed.
- </constant>
- <constant name="OVERRUN_TRIM_CHAR" value="1" enum="OverrunBehavior">
- Trims the text per character.
- </constant>
- <constant name="OVERRUN_TRIM_WORD" value="2" enum="OverrunBehavior">
- Trims the text per word.
- </constant>
- <constant name="OVERRUN_TRIM_ELLIPSIS" value="3" enum="OverrunBehavior">
- Trims the text per character and adds an ellipsis to indicate that parts are hidden.
- </constant>
- <constant name="OVERRUN_TRIM_WORD_ELLIPSIS" value="4" enum="OverrunBehavior">
- Trims the text per word and adds an ellipsis to indicate that parts are hidden.
- </constant>
- </constants>
</class>
diff --git a/doc/classes/TextServer.xml b/doc/classes/TextServer.xml
index 2f57b76374..9c4f7857c7 100644
--- a/doc/classes/TextServer.xml
+++ b/doc/classes/TextServer.xml
@@ -17,29 +17,29 @@
</method>
<method name="create_shaped_text">
<return type="RID" />
- <argument index="0" name="direction" type="int" enum="TextServer.Direction" default="0" />
- <argument index="1" name="orientation" type="int" enum="TextServer.Orientation" default="0" />
+ <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>
</method>
<method name="draw_hex_code_box" qualifiers="const">
<return type="void" />
- <argument index="0" name="canvas" type="RID" />
- <argument index="1" name="size" type="int" />
- <argument index="2" name="pos" type="Vector2" />
- <argument index="3" name="index" type="int" />
- <argument index="4" name="color" type="Color" />
+ <param index="0" name="canvas" type="RID" />
+ <param index="1" name="size" type="int" />
+ <param index="2" name="pos" type="Vector2" />
+ <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.
</description>
</method>
<method name="font_clear_glyphs">
<return type="void" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="size" type="Vector2i" />
+ <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.
[b]Note:[/b] This function will not remove textures associated with the glyphs, use [method font_remove_texture] to remove them manually.
@@ -47,23 +47,23 @@
</method>
<method name="font_clear_kerning_map">
<return type="void" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="size" type="int" />
+ <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">
<return type="void" />
- <argument index="0" name="font_rid" type="RID" />
+ <param index="0" name="font_rid" type="RID" />
<description>
Removes all font sizes from the cache entry.
</description>
</method>
<method name="font_clear_textures">
<return type="void" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="size" type="Vector2i" />
+ <param index="0" name="font_rid" type="RID" />
+ <param index="1" name="size" type="Vector2i" />
<description>
Removes all textures from font cache entry.
[b]Note:[/b] This function will not remove glyphs associated with the texture, use [method font_remove_glyph] to remove them manually.
@@ -71,66 +71,80 @@
</method>
<method name="font_draw_glyph" qualifiers="const">
<return type="void" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="canvas" type="RID" />
- <argument index="2" name="size" type="int" />
- <argument index="3" name="pos" type="Vector2" />
- <argument index="4" name="index" type="int" />
- <argument 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].
+ <param index="0" name="font_rid" type="RID" />
+ <param index="1" name="canvas" type="RID" />
+ <param index="2" name="size" type="int" />
+ <param index="3" name="pos" type="Vector2" />
+ <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 [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_draw_glyph_outline" qualifiers="const">
<return type="void" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="canvas" type="RID" />
- <argument index="2" name="size" type="int" />
- <argument index="3" name="outline_size" type="int" />
- <argument index="4" name="pos" type="Vector2" />
- <argument index="5" name="index" type="int" />
- <argument 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].
+ <param index="0" name="font_rid" type="RID" />
+ <param index="1" name="canvas" type="RID" />
+ <param index="2" name="size" type="int" />
+ <param index="3" name="outline_size" type="int" />
+ <param index="4" name="pos" type="Vector2" />
+ <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 [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_ascent" qualifiers="const">
<return type="float" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="size" type="int" />
+ <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="const">
<return type="float" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="size" type="int" />
+ <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="const">
<return type="float" />
- <argument index="0" name="font_rid" type="RID" />
+ <param index="0" name="font_rid" type="RID" />
<description>
Returns font embolden strength.
</description>
</method>
+ <method name="font_get_face_count" qualifiers="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="const">
+ <return type="int" />
+ <param index="0" name="font_rid" type="RID" />
+ <description>
+ Recturns an active face index in the TrueType / OpenType collection.
+ </description>
+ </method>
<method name="font_get_fixed_size" qualifiers="const">
<return type="int" />
- <argument index="0" name="font_rid" type="RID" />
+ <param index="0" name="font_rid" type="RID" />
<description>
Returns bitmap font fixed size.
</description>
</method>
<method name="font_get_generate_mipmaps" qualifiers="const">
<return type="bool" />
- <argument index="0" name="font_rid" type="RID" />
+ <param index="0" name="font_rid" type="RID" />
<description>
Returns [code]true[/code] if font texture mipmap generation is enabled.
</description>
@@ -143,9 +157,9 @@
</method>
<method name="font_get_glyph_advance" qualifiers="const">
<return type="Vector2" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="size" type="int" />
- <argument index="2" name="glyph" type="int" />
+ <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).
[b]Note:[/b] Advance for glyphs outlines is the same as the base glyph advance and is not saved.
@@ -153,9 +167,9 @@
</method>
<method name="font_get_glyph_contours" qualifiers="const">
<return type="Dictionary" />
- <argument index="0" name="font" type="RID" />
- <argument index="1" name="size" type="int" />
- <argument index="2" name="index" type="int" />
+ <param index="0" name="font" 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 ContourPointTag] values.
@@ -165,54 +179,54 @@
</method>
<method name="font_get_glyph_index" qualifiers="const">
<return type="int" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="size" type="int" />
- <argument index="2" name="char" type="int" />
- <argument index="3" name="variation_selector" 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].
+ 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" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="size" type="Vector2i" />
+ <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="const">
<return type="Vector2" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="size" type="Vector2i" />
- <argument index="2" name="glyph" 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 glyph offset from the baseline.
</description>
</method>
<method name="font_get_glyph_size" qualifiers="const">
<return type="Vector2" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="size" type="Vector2i" />
- <argument index="2" name="glyph" 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 size of the glyph.
</description>
</method>
<method name="font_get_glyph_texture_idx" qualifiers="const">
<return type="int" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="size" type="Vector2i" />
- <argument index="2" name="glyph" 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="const">
<return type="RID" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="size" type="Vector2i" />
- <argument index="2" name="glyph" 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 resource id of the cache texture containing the glyph.
[b]Note:[/b] If there are pending glyphs to render, calling this function might trigger the texture cache update.
@@ -220,9 +234,9 @@
</method>
<method name="font_get_glyph_texture_size" qualifiers="const">
<return type="Vector2" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="size" type="Vector2i" />
- <argument index="2" name="glyph" 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 size of the cache texture containing the glyph.
[b]Note:[/b] If there are pending glyphs to render, calling this function might trigger the texture cache update.
@@ -230,260 +244,251 @@
</method>
<method name="font_get_glyph_uv_rect" qualifiers="const">
<return type="Rect2" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="size" type="Vector2i" />
- <argument index="2" name="glyph" 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 rectangle in the cache texture containing the glyph.
</description>
</method>
<method name="font_get_hinting" qualifiers="const">
<return type="int" enum="TextServer.Hinting" />
- <argument index="0" name="font_rid" type="RID" />
+ <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="const">
<return type="Vector2" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="size" type="int" />
- <argument index="2" name="glyph_pair" type="Vector2i" />
+ <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="const">
- <return type="Array" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="size" type="int" />
+ <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">
<return type="bool" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="language" type="String" />
+ <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">
<return type="PackedStringArray" />
- <argument index="0" name="font_rid" type="RID" />
+ <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="const">
<return type="int" />
- <argument index="0" name="font_rid" type="RID" />
+ <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="const">
<return type="int" />
- <argument index="0" name="font_rid" type="RID" />
+ <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="const">
<return type="String" />
- <argument index="0" name="font_rid" type="RID" />
+ <param index="0" name="font_rid" type="RID" />
<description>
Returns font family name.
</description>
</method>
<method name="font_get_opentype_feature_overrides" qualifiers="const">
<return type="Dictionary" />
- <argument index="0" name="font_rid" type="RID" />
+ <param index="0" name="font_rid" type="RID" />
<description>
Returns font OpenType feature set override.
</description>
</method>
<method name="font_get_oversampling" qualifiers="const">
<return type="float" />
- <argument index="0" name="font_rid" type="RID" />
+ <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="const">
<return type="float" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="size" type="int" />
+ <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">
<return type="bool" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="script" type="String" />
+ <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">
<return type="PackedStringArray" />
- <argument index="0" name="font_rid" type="RID" />
+ <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="const">
- <return type="Array" />
- <argument index="0" name="font_rid" type="RID" />
+ <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_spacing" qualifiers="const">
- <return type="int" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="size" type="int" />
- <argument index="2" name="spacing" type="int" enum="TextServer.SpacingType" />
- <description>
- Returns extra spacing added between glyphs in pixels.
- </description>
- </method>
<method name="font_get_style" qualifiers="const">
- <return type="int" />
- <argument index="0" name="font_rid" type="RID" />
+ <return type="int" enum="TextServer.FontStyle" />
+ <param index="0" name="font_rid" type="RID" />
<description>
Returns font style flags, see [enum FontStyle].
</description>
</method>
<method name="font_get_style_name" qualifiers="const">
<return type="String" />
- <argument index="0" name="font_rid" type="RID" />
+ <param index="0" name="font_rid" type="RID" />
<description>
Returns font style name.
</description>
</method>
<method name="font_get_subpixel_positioning" qualifiers="const">
<return type="int" enum="TextServer.SubpixelPositioning" />
- <argument index="0" name="font_rid" type="RID" />
+ <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="const">
<return type="String" />
- <argument index="0" name="font_rid" type="RID" />
+ <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="const">
<return type="int" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="size" type="Vector2i" />
+ <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="const">
<return type="Image" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="size" type="Vector2i" />
- <argument index="2" name="texture_index" type="int" />
+ <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="const">
<return type="PackedInt32Array" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="size" type="Vector2i" />
- <argument index="2" name="texture_index" type="int" />
+ <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="const">
<return type="Transform2D" />
- <argument index="0" name="font_rid" type="RID" />
+ <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="const">
<return type="float" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="size" type="int" />
+ <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="const">
<return type="float" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="size" type="int" />
+ <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="const">
<return type="Dictionary" />
- <argument index="0" name="font_rid" type="RID" />
+ <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="const">
<return type="bool" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="char" type="int" />
+ <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.
+ Returns [code]true[/code] if a Unicode [param char] is available in the font.
</description>
</method>
<method name="font_is_antialiased" qualifiers="const">
<return type="bool" />
- <argument index="0" name="font_rid" type="RID" />
+ <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="const">
<return type="bool" />
- <argument index="0" name="font_rid" type="RID" />
+ <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="const">
<return type="bool" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="language" type="String" />
+ <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="const">
<return type="bool" />
- <argument index="0" name="font_rid" type="RID" />
+ <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="const">
<return type="bool" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="script" type="String" />
+ <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">
<return type="void" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="size" type="Vector2i" />
- <argument index="2" name="glyph" 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>
Removes specified rendered glyph information from the cache entry.
[b]Note:[/b] This function will not remove textures associated with the glyphs, use [method font_remove_texture] to remove them manually.
@@ -491,135 +496,143 @@
</method>
<method name="font_remove_kerning">
<return type="void" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="size" type="int" />
- <argument index="2" name="glyph_pair" type="Vector2i" />
+ <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">
<return type="void" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="language" type="String" />
+ <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">
<return type="void" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="script" type="String" />
+ <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">
<return type="void" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="size" type="Vector2i" />
+ <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">
<return type="void" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="size" type="Vector2i" />
- <argument index="2" name="texture_index" type="int" />
+ <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 font cache entry.
+ Removes specified texture from the cache entry.
[b]Note:[/b] This function will not remove glyphs associated with the texture, remove them manually, using [method font_remove_glyph].
</description>
</method>
<method name="font_render_glyph">
<return type="void" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="size" type="Vector2i" />
- <argument index="2" name="index" type="int" />
+ <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">
<return type="void" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="size" type="Vector2i" />
- <argument index="2" name="start" type="int" />
- <argument index="3" name="end" type="int" />
+ <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">
<return type="void" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="antialiased" type="bool" />
+ <param index="0" name="font_rid" type="RID" />
+ <param index="1" name="antialiased" type="bool" />
<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">
<return type="void" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="size" type="int" />
- <argument index="2" name="ascent" type="float" />
+ <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">
<return type="void" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="data" type="PackedByteArray" />
+ <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_descent">
<return type="void" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="size" type="int" />
- <argument index="2" name="descent" type="float" />
+ <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">
<return type="void" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="strength" type="float" />
+ <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">
+ <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">
<return type="void" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="fixed_size" type="int" />
+ <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">
<return type="void" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="force_autohinter" type="bool" />
+ <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">
<return type="void" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="generate_mipmaps" type="bool" />
+ <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">
<return type="void" />
- <argument index="0" name="oversampling" type="float" />
+ <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.
@@ -627,10 +640,10 @@
</method>
<method name="font_set_glyph_advance">
<return type="void" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="size" type="int" />
- <argument index="2" name="glyph" type="int" />
- <argument index="3" name="advance" type="Vector2" />
+ <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).
[b]Note:[/b] Advance for glyphs outlines is the same as the base glyph advance and is not saved.
@@ -638,91 +651,91 @@
</method>
<method name="font_set_glyph_offset">
<return type="void" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="size" type="Vector2i" />
- <argument index="2" name="glyph" type="int" />
- <argument index="3" name="offset" type="Vector2" />
+ <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">
<return type="void" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="size" type="Vector2i" />
- <argument index="2" name="glyph" type="int" />
- <argument index="3" name="gl_size" type="Vector2" />
+ <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">
<return type="void" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="size" type="Vector2i" />
- <argument index="2" name="glyph" type="int" />
- <argument index="3" name="texture_idx" type="int" />
+ <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">
<return type="void" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="size" type="Vector2i" />
- <argument index="2" name="glyph" type="int" />
- <argument index="3" name="uv_rect" type="Rect2" />
+ <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">
<return type="void" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="hinting" type="int" enum="TextServer.Hinting" />
+ <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">
<return type="void" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="size" type="int" />
- <argument index="2" name="glyph_pair" type="Vector2i" />
- <argument index="3" name="kerning" 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" />
+ <param index="3" name="kerning" type="Vector2" />
<description>
Sets kerning for the pair of glyphs.
</description>
</method>
<method name="font_set_language_support_override">
<return type="void" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="language" type="String" />
- <argument index="2" name="supported" type="bool" />
+ <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">
<return type="void" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="msdf_pixel_range" type="int" />
+ <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">
<return type="void" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="msdf_size" type="int" />
+ <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">
<return type="void" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="msdf" type="bool" />
+ <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.
@@ -730,104 +743,94 @@
</method>
<method name="font_set_name">
<return type="void" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="name" type="String" />
+ <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">
<return type="void" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="overrides" type="Dictionary" />
+ <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">
<return type="void" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="oversampling" type="float" />
+ <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">
<return type="void" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="size" type="int" />
- <argument index="2" name="scale" type="float" />
+ <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">
<return type="void" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="script" type="String" />
- <argument index="2" name="supported" type="bool" />
+ <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_spacing">
- <return type="void" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="size" type="int" />
- <argument index="2" name="spacing" type="int" enum="TextServer.SpacingType" />
- <argument index="3" name="value" type="int" />
- <description>
- Sets extra spacing added between glyphs in pixels.
- </description>
- </method>
<method name="font_set_style">
<return type="void" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="style" type="int" />
+ <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 FontStyle].
</description>
</method>
<method name="font_set_style_name">
<return type="void" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="name" type="String" />
+ <param index="0" name="font_rid" type="RID" />
+ <param index="1" name="name" type="String" />
<description>
Sets the font style name.
</description>
</method>
<method name="font_set_subpixel_positioning">
<return type="void" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="subpixel_positioning" type="int" enum="TextServer.SubpixelPositioning" />
+ <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">
<return type="void" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="size" type="Vector2i" />
- <argument index="2" name="texture_index" type="int" />
- <argument index="3" name="image" 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" />
+ <param index="3" name="image" type="Image" />
<description>
Sets font cache texture image data.
</description>
</method>
<method name="font_set_texture_offsets">
<return type="void" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="size" type="Vector2i" />
- <argument index="2" name="texture_index" type="int" />
- <argument index="3" name="offset" 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" />
+ <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">
<return type="void" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="transform" type="Transform2D" />
+ <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].
@@ -835,55 +838,55 @@
</method>
<method name="font_set_underline_position">
<return type="void" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="size" type="int" />
- <argument index="2" name="underline_position" type="float" />
+ <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">
<return type="void" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="size" type="int" />
- <argument index="2" name="underline_thickness" type="float" />
+ <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">
<return type="void" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="variation_coordinates" type="Dictionary" />
+ <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="const">
<return type="Dictionary" />
- <argument index="0" name="font_rid" type="RID" />
+ <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="const">
<return type="Dictionary" />
- <argument index="0" name="font_rid" type="RID" />
+ <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="const">
<return type="String" />
- <argument index="0" name="number" type="String" />
- <argument index="1" name="language" type="String" default="&quot;&quot;" />
+ <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">
<return type="void" />
- <argument index="0" name="rid" type="RID" />
+ <param index="0" name="rid" type="RID" />
<description>
Frees an object created by this [TextServer].
</description>
@@ -896,8 +899,8 @@
</method>
<method name="get_hex_code_box_size" qualifiers="const">
<return type="Vector2" />
- <argument index="0" name="size" type="int" />
- <argument index="1" name="index" type="int" />
+ <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).
</description>
@@ -922,28 +925,53 @@
</method>
<method name="has">
<return type="bool" />
- <argument index="0" name="rid" type="RID" />
+ <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">
<return type="bool" />
- <argument index="0" name="feature" type="int" enum="TextServer.Feature" />
+ <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="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 [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>
+ </method>
<method name="is_locale_right_to_left" qualifiers="const">
<return type="bool" />
- <argument index="0" name="locale" type="String" />
+ <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="const">
+ <return type="bool" />
+ <param index="0" name="string" type="String" />
+ <description>
+ 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].
+ - May contain Unicode characters of class XID_Continue in the other positions.
+ - Use UAX #31 recommended scripts only (mixed scripts are allowed).
+ If the [constant FEATURE_UNICODE_IDENTIFIERS] feature is not supported, a valid identifier must:
+ - Begin with a Unicode character of class XID_Start or [code]"_"[/code].
+ - May contain Unicode characters of class XID_Continue in the other positions.
+ </description>
+ </method>
<method name="load_support_data">
<return type="bool" />
- <argument index="0" name="filename" type="String" />
+ <param index="0" name="filename" type="String" />
<description>
Loads optional TextServer database (e.g. ICU break iterators and dictionaries).
[b]Note:[/b] This function should be called before any other TextServer functions used, otherwise it won't have any effect.
@@ -951,38 +979,38 @@
</method>
<method name="name_to_tag" qualifiers="const">
<return type="int" />
- <argument index="0" name="name" type="String" />
+ <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="const">
<return type="String" />
- <argument index="0" name="number" type="String" />
- <argument index="1" name="language" type="String" default="&quot;&quot;" />
+ <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" />
- <argument index="0" name="parser_type" type="int" enum="TextServer.StructuredTextParser" />
- <argument index="1" name="args" type="Array" />
- <argument index="2" name="text" type="String" />
+ <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>
Default implementation of the BiDi algorithm override function. See [enum StructuredTextParser] for more info.
</description>
</method>
<method name="percent_sign" qualifiers="const">
<return type="String" />
- <argument index="0" name="language" type="String" default="&quot;&quot;" />
+ <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">
<return type="bool" />
- <argument index="0" name="filename" type="String" />
+ <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.
@@ -990,98 +1018,98 @@
</method>
<method name="shaped_get_span_count" qualifiers="const">
<return type="int" />
- <argument index="0" name="shaped" type="RID" />
+ <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="const">
<return type="Variant" />
- <argument index="0" name="shaped" type="RID" />
- <argument index="1" name="index" type="int" />
+ <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">
<return type="void" />
- <argument index="0" name="shaped" type="RID" />
- <argument index="1" name="index" type="int" />
- <argument index="2" name="fonts" type="Array" />
- <argument index="3" name="size" type="int" />
- <argument index="4" name="opentype_features" type="Dictionary" default="{}" />
+ <param index="0" name="shaped" type="RID" />
+ <param index="1" name="index" type="int" />
+ <param index="2" name="fonts" type="Array" />
+ <param index="3" name="size" type="int" />
+ <param index="4" name="opentype_features" type="Dictionary" default="{}" />
<description>
Changes text span font, font size and OpenType features, without changing the text.
</description>
</method>
<method name="shaped_text_add_object">
<return type="bool" />
- <argument index="0" name="shaped" type="RID" />
- <argument index="1" name="key" type="Variant" />
- <argument index="2" name="size" type="Vector2" />
- <argument index="3" name="inline_align" type="int" enum="InlineAlignment" default="5" />
- <argument index="4" name="length" type="int" default="1" />
+ <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" 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" />
- <argument index="0" name="shaped" type="RID" />
- <argument index="1" name="text" type="String" />
- <argument index="2" name="fonts" type="Array" />
- <argument index="3" name="size" type="int" />
- <argument index="4" name="opentype_features" type="Dictionary" default="{}" />
- <argument index="5" name="language" type="String" default="&quot;&quot;" />
- <argument index="6" name="meta" type="Variant" default="null" />
+ <param index="0" name="shaped" type="RID" />
+ <param index="1" name="text" type="String" />
+ <param index="2" name="fonts" type="Array" />
+ <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;" />
+ <param index="6" name="meta" type="Variant" default="null" />
<description>
Adds text span and font to draw it to the text buffer.
</description>
</method>
<method name="shaped_text_clear">
<return type="void" />
- <argument index="0" name="rid" type="RID" />
+ <param index="0" name="rid" type="RID" />
<description>
Clears text buffer (removes text and inline objects).
</description>
</method>
<method name="shaped_text_draw" qualifiers="const">
<return type="void" />
- <argument index="0" name="shaped" type="RID" />
- <argument index="1" name="canvas" type="RID" />
- <argument index="2" name="pos" type="Vector2" />
- <argument index="3" name="clip_l" type="float" default="-1" />
- <argument index="4" name="clip_r" type="float" default="-1" />
- <argument index="5" name="color" type="Color" default="Color(1, 1, 1, 1)" />
+ <param index="0" name="shaped" type="RID" />
+ <param index="1" name="canvas" type="RID" />
+ <param index="2" name="pos" type="Vector2" />
+ <param index="3" name="clip_l" type="float" default="-1" />
+ <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">
<return type="void" />
- <argument index="0" name="shaped" type="RID" />
- <argument index="1" name="canvas" type="RID" />
- <argument index="2" name="pos" type="Vector2" />
- <argument index="3" name="clip_l" type="float" default="-1" />
- <argument index="4" name="clip_r" type="float" default="-1" />
- <argument index="5" name="outline_size" type="int" default="1" />
- <argument index="6" name="color" type="Color" default="Color(1, 1, 1, 1)" />
+ <param index="0" name="shaped" type="RID" />
+ <param index="1" name="canvas" type="RID" />
+ <param index="2" name="pos" type="Vector2" />
+ <param index="3" name="clip_l" type="float" default="-1" />
+ <param index="4" name="clip_r" type="float" default="-1" />
+ <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">
<return type="float" />
- <argument index="0" name="shaped" type="RID" />
- <argument index="1" name="width" type="float" />
- <argument index="2" name="jst_flags" type="int" default="3" />
+ <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" default="3" />
<description>
Adjusts text with to fit to specified width, returns new text width.
</description>
</method>
<method name="shaped_text_get_ascent" qualifiers="const">
<return type="float" />
- <argument index="0" name="shaped" type="RID" />
+ <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).
[b]Note:[/b] Overall ascent can be higher than font ascent, if some glyphs are displaced from the baseline.
@@ -1089,22 +1117,22 @@
</method>
<method name="shaped_text_get_carets" qualifiers="const">
<return type="Dictionary" />
- <argument index="0" name="shaped" type="RID" />
- <argument index="1" name="position" type="int" />
+ <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">
<return type="String" />
- <argument index="0" name="shaped" type="RID" />
+ <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="const">
<return type="float" />
- <argument index="0" name="shaped" type="RID" />
+ <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).
[b]Note:[/b] Overall descent can be higher than font descent, if some glyphs are displaced from the baseline.
@@ -1112,130 +1140,130 @@
</method>
<method name="shaped_text_get_direction" qualifiers="const">
<return type="int" enum="TextServer.Direction" />
- <argument index="0" name="shaped" type="RID" />
+ <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="const">
<return type="int" enum="TextServer.Direction" />
- <argument index="0" name="shaped" type="RID" />
- <argument index="1" name="start" type="int" />
- <argument index="2" name="end" 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.
</description>
</method>
<method name="shaped_text_get_ellipsis_glyph_count" qualifiers="const">
<return type="int" />
- <argument index="0" name="shaped" type="RID" />
+ <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="const">
- <return type="Array" />
- <argument index="0" name="shaped" type="RID" />
+ <return type="Dictionary[]" />
+ <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="const">
<return type="int" />
- <argument index="0" name="shaped" type="RID" />
+ <param index="0" name="shaped" type="RID" />
<description>
Returns position of the ellipsis.
</description>
</method>
<method name="shaped_text_get_glyph_count" qualifiers="const">
<return type="int" />
- <argument index="0" name="shaped" type="RID" />
+ <param index="0" name="shaped" type="RID" />
<description>
Returns number of glyphs in the buffer.
</description>
</method>
<method name="shaped_text_get_glyphs" qualifiers="const">
- <return type="Array" />
- <argument index="0" name="shaped" type="RID" />
+ <return type="Dictionary[]" />
+ <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="const">
<return type="Vector2" />
- <argument index="0" name="shaped" type="RID" />
- <argument index="1" name="pos" type="int" />
+ <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.
</description>
</method>
<method name="shaped_text_get_inferred_direction" qualifiers="const">
<return type="int" enum="TextServer.Direction" />
- <argument index="0" name="shaped" type="RID" />
+ <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="const">
<return type="PackedInt32Array" />
- <argument index="0" name="shaped" type="RID" />
- <argument index="1" name="width" type="float" />
- <argument index="2" name="start" type="int" default="0" />
- <argument index="3" name="break_flags" type="int" default="96" />
+ <param index="0" name="shaped" type="RID" />
+ <param index="1" name="width" type="float" />
+ <param index="2" name="start" type="int" default="0" />
+ <param index="3" name="break_flags" type="int" enum="TextServer.LineBreakFlag" default="3" />
<description>
Breaks text to the lines and returns character ranges for each line.
</description>
</method>
<method name="shaped_text_get_line_breaks_adv" qualifiers="const">
<return type="PackedInt32Array" />
- <argument index="0" name="shaped" type="RID" />
- <argument index="1" name="width" type="PackedFloat32Array" />
- <argument index="2" name="start" type="int" default="0" />
- <argument index="3" name="once" type="bool" default="true" />
- <argument index="4" name="break_flags" type="int" default="96" />
+ <param index="0" name="shaped" type="RID" />
+ <param index="1" name="width" type="PackedFloat32Array" />
+ <param index="2" name="start" type="int" default="0" />
+ <param index="3" name="once" type="bool" default="true" />
+ <param index="4" name="break_flags" type="int" enum="TextServer.LineBreakFlag" default="3" />
<description>
Breaks text to the lines and columns. Returns character ranges for each segment.
</description>
</method>
<method name="shaped_text_get_object_rect" qualifiers="const">
<return type="Rect2" />
- <argument index="0" name="shaped" type="RID" />
- <argument index="1" name="key" type="Variant" />
+ <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="const">
<return type="Array" />
- <argument index="0" name="shaped" type="RID" />
+ <param index="0" name="shaped" type="RID" />
<description>
Returns array of inline objects.
</description>
</method>
<method name="shaped_text_get_orientation" qualifiers="const">
<return type="int" enum="TextServer.Orientation" />
- <argument index="0" name="shaped" type="RID" />
+ <param index="0" name="shaped" type="RID" />
<description>
Returns text orientation.
</description>
</method>
<method name="shaped_text_get_parent" qualifiers="const">
<return type="RID" />
- <argument index="0" name="shaped" 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="const">
<return type="bool" />
- <argument index="0" name="shaped" type="RID" />
+ <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="const">
<return type="bool" />
- <argument index="0" name="shaped" type="RID" />
+ <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.
@@ -1243,125 +1271,133 @@
</method>
<method name="shaped_text_get_range" qualifiers="const">
<return type="Vector2i" />
- <argument index="0" name="shaped" type="RID" />
+ <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="const">
<return type="PackedVector2Array" />
- <argument index="0" name="shaped" type="RID" />
- <argument index="1" name="start" type="int" />
- <argument index="2" name="end" 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 selection rectangles for the specified character range.
</description>
</method>
<method name="shaped_text_get_size" qualifiers="const">
<return type="Vector2" />
- <argument index="0" name="shaped" type="RID" />
+ <param index="0" name="shaped" type="RID" />
<description>
Returns size of the text.
</description>
</method>
+ <method name="shaped_text_get_spacing" qualifiers="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="const">
<return type="int" />
- <argument index="0" name="shaped" type="RID" />
+ <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="const">
<return type="float" />
- <argument index="0" name="shaped" type="RID" />
+ <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="const">
<return type="float" />
- <argument index="0" name="shaped" type="RID" />
+ <param index="0" name="shaped" type="RID" />
<description>
Returns thickness of the underline.
</description>
</method>
<method name="shaped_text_get_width" qualifiers="const">
<return type="float" />
- <argument index="0" name="shaped" type="RID" />
+ <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="const">
<return type="PackedInt32Array" />
- <argument index="0" name="shaped" type="RID" />
- <argument index="1" name="grapheme_flags" type="int" default="264" />
+ <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">
<return type="int" />
- <argument index="0" name="shaped" type="RID" />
- <argument index="1" name="coords" type="float" />
+ <param index="0" name="shaped" type="RID" />
+ <param index="1" name="coords" type="float" />
<description>
Returns grapheme index at the specified pixel offset at the baseline, or [code]-1[/code] if none is found.
</description>
</method>
<method name="shaped_text_hit_test_position" qualifiers="const">
<return type="int" />
- <argument index="0" name="shaped" type="RID" />
- <argument index="1" name="coords" type="float" />
+ <param index="0" name="shaped" type="RID" />
+ <param index="1" name="coords" type="float" />
<description>
Returns caret character offset at the specified pixel offset at the baseline. This function always returns a valid position.
</description>
</method>
<method name="shaped_text_is_ready" qualifiers="const">
<return type="bool" />
- <argument index="0" name="shaped" type="RID" />
+ <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="const">
<return type="int" />
- <argument index="0" name="shaped" type="RID" />
- <argument index="1" name="pos" 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].
+ Returns composite character end position closest to the [param pos].
</description>
</method>
<method name="shaped_text_overrun_trim_to_width">
<return type="void" />
- <argument index="0" name="shaped" type="RID" />
- <argument index="1" name="width" type="float" default="0" />
- <argument index="2" name="overrun_trim_flags" type="int" default="0" />
+ <param index="0" name="shaped" type="RID" />
+ <param index="1" name="width" type="float" default="0" />
+ <param index="2" name="overrun_trim_flags" type="int" enum="TextServer.TextOverrunFlag" default="0" />
<description>
Trims text if it exceeds the given width.
</description>
</method>
<method name="shaped_text_prev_grapheme_pos" qualifiers="const">
<return type="int" />
- <argument index="0" name="shaped" type="RID" />
- <argument index="1" name="pos" 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].
+ Returns composite character start position closest to the [param pos].
</description>
</method>
<method name="shaped_text_resize_object">
<return type="bool" />
- <argument index="0" name="shaped" type="RID" />
- <argument index="1" name="key" type="Variant" />
- <argument index="2" name="size" type="Vector2" />
- <argument index="3" name="inline_align" type="int" enum="InlineAlignment" default="5" />
+ <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" default="5" />
<description>
Sets new size and alignment of embedded object.
</description>
</method>
<method name="shaped_text_set_bidi_override">
<return type="void" />
- <argument index="0" name="shaped" type="RID" />
- <argument index="1" name="override" type="Array" />
+ <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.
@@ -1369,16 +1405,16 @@
</method>
<method name="shaped_text_set_custom_punctuation">
<return type="void" />
- <argument index="0" name="shaped" type="RID" />
- <argument index="1" name="punct" type="String" />
+ <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">
<return type="void" />
- <argument index="0" name="shaped" type="RID" />
- <argument index="1" name="direction" type="int" enum="TextServer.Direction" default="0" />
+ <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.
[b]Note:[/b] Direction is ignored if server does not support [constant FEATURE_BIDI_LAYOUT] feature (supported by [TextServerAdvanced]).
@@ -1386,8 +1422,8 @@
</method>
<method name="shaped_text_set_orientation">
<return type="void" />
- <argument index="0" name="shaped" type="RID" />
- <argument index="1" name="orientation" type="int" enum="TextServer.Orientation" default="0" />
+ <param index="0" name="shaped" type="RID" />
+ <param index="1" name="orientation" type="int" enum="TextServer.Orientation" default="0" />
<description>
Sets desired text orientation.
[b]Note:[/b] Orientation is ignored if server does not support [constant FEATURE_VERTICAL_LAYOUT] feature (supported by [TextServerAdvanced]).
@@ -1395,64 +1431,81 @@
</method>
<method name="shaped_text_set_preserve_control">
<return type="void" />
- <argument index="0" name="shaped" type="RID" />
- <argument index="1" name="enabled" type="bool" />
+ <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">
<return type="void" />
- <argument index="0" name="shaped" type="RID" />
- <argument index="1" name="enabled" type="bool" />
+ <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">
+ <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">
<return type="bool" />
- <argument index="0" name="shaped" type="RID" />
+ <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.
[b]Note:[/b] It is not necessary to call this function manually, buffer will be shaped automatically as soon as any of its output data is requested.
</description>
</method>
<method name="shaped_text_sort_logical">
- <return type="Array" />
- <argument index="0" name="shaped" type="RID" />
+ <return type="Dictionary[]" />
+ <param index="0" name="shaped" type="RID" />
<description>
Returns text glyphs in the logical order.
</description>
</method>
<method name="shaped_text_substr" qualifiers="const">
<return type="RID" />
- <argument index="0" name="shaped" type="RID" />
- <argument index="1" name="start" type="int" />
- <argument index="2" name="length" type="int" />
+ <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).
+ 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">
<return type="float" />
- <argument index="0" name="shaped" type="RID" />
- <argument index="1" name="tab_stops" type="PackedFloat32Array" />
+ <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="spoof_check" qualifiers="const">
+ <return type="bool" />
+ <param index="0" name="string" type="String" />
+ <description>
+ 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>
<method name="string_get_word_breaks" qualifiers="const">
<return type="PackedInt32Array" />
- <argument index="0" name="string" type="String" />
- <argument index="1" name="language" type="String" default="&quot;&quot;" />
+ <param index="0" name="string" type="String" />
+ <param index="1" name="language" type="String" default="&quot;&quot;" />
<description>
Returns array of the word break character offsets.
</description>
</method>
<method name="string_to_lower" qualifiers="const">
<return type="String" />
- <argument index="0" name="string" type="String" />
- <argument index="1" name="language" type="String" default="&quot;&quot;" />
+ <param index="0" name="string" type="String" />
+ <param index="1" name="language" type="String" default="&quot;&quot;" />
<description>
Returns the string converted to lowercase.
[b]Note:[/b] Casing is locale dependent and context sensitive if server support [constant FEATURE_CONTEXT_SENSITIVE_CASE_CONVERSION] feature (supported by [TextServerAdvanced]).
@@ -1461,8 +1514,8 @@
</method>
<method name="string_to_upper" qualifiers="const">
<return type="String" />
- <argument index="0" name="string" type="String" />
- <argument index="1" name="language" type="String" default="&quot;&quot;" />
+ <param index="0" name="string" type="String" />
+ <param index="1" name="language" type="String" default="&quot;&quot;" />
<description>
Returns the string converted to uppercase.
[b]Note:[/b] Casing is locale dependent and context sensitive if server support [constant FEATURE_CONTEXT_SENSITIVE_CASE_CONVERSION] feature (supported by [TextServerAdvanced]).
@@ -1471,7 +1524,7 @@
</method>
<method name="strip_diacritics" qualifiers="const">
<return type="String" />
- <argument index="0" name="string" type="String" />
+ <param index="0" name="string" type="String" />
<description>
Strips diacritics from the string.
[b]Note:[/b] The result may be longer or shorter than the original.
@@ -1479,7 +1532,7 @@
</method>
<method name="tag_to_name" qualifiers="const">
<return type="String" />
- <argument index="0" name="tag" type="int" />
+ <param index="0" name="tag" type="int" />
<description>
Converts OpenType tag to readable feature, variation, script or language name.
</description>
@@ -1502,89 +1555,133 @@
Left to right text is written vertically from top to bottom.
Right to left text is written vertically from bottom to top.
</constant>
- <constant name="JUSTIFICATION_NONE" value="0" enum="JustificationFlag">
+ <constant name="JUSTIFICATION_NONE" value="0" enum="JustificationFlag" is_bitfield="true">
Do not justify text.
</constant>
- <constant name="JUSTIFICATION_KASHIDA" value="1" enum="JustificationFlag">
+ <constant name="JUSTIFICATION_KASHIDA" value="1" enum="JustificationFlag" is_bitfield="true">
Justify text by adding and removing kashidas.
</constant>
- <constant name="JUSTIFICATION_WORD_BOUND" value="2" enum="JustificationFlag">
+ <constant name="JUSTIFICATION_WORD_BOUND" value="2" enum="JustificationFlag" is_bitfield="true">
Justify text by changing width of the spaces between the words.
</constant>
- <constant name="JUSTIFICATION_TRIM_EDGE_SPACES" value="4" enum="JustificationFlag">
+ <constant name="JUSTIFICATION_TRIM_EDGE_SPACES" value="4" enum="JustificationFlag" is_bitfield="true">
Remove trailing and leading spaces from the justified text.
</constant>
- <constant name="JUSTIFICATION_AFTER_LAST_TAB" value="8" enum="JustificationFlag">
+ <constant name="JUSTIFICATION_AFTER_LAST_TAB" value="8" enum="JustificationFlag" is_bitfield="true">
Only apply justification to the part of the text after the last tab.
</constant>
- <constant name="JUSTIFICATION_CONSTRAIN_ELLIPSIS" value="16" enum="JustificationFlag">
+ <constant name="JUSTIFICATION_CONSTRAIN_ELLIPSIS" value="16" enum="JustificationFlag" is_bitfield="true">
Apply justification to the trimmed line with ellipsis.
</constant>
- <constant name="BREAK_NONE" value="0" enum="LineBreakFlag">
+ <constant name="AUTOWRAP_OFF" value="0" enum="AutowrapMode">
+ Autowrap is disabled.
+ </constant>
+ <constant name="AUTOWRAP_ARBITRARY" value="1" enum="AutowrapMode">
+ Wraps the text inside the node's bounding rectangle by allowing to break lines at arbitrary positions, which is useful when very limited space is available.
+ </constant>
+ <constant name="AUTOWRAP_WORD" value="2" enum="AutowrapMode">
+ Wraps the text inside the node's bounding rectangle by soft-breaking between words.
+ </constant>
+ <constant name="AUTOWRAP_WORD_SMART" value="3" enum="AutowrapMode">
+ Behaves similarly to [constant AUTOWRAP_WORD], but force-breaks a word if that single word does not fit in one line.
+ </constant>
+ <constant name="BREAK_NONE" value="0" enum="LineBreakFlag" is_bitfield="true">
Do not break the line.
</constant>
- <constant name="BREAK_MANDATORY" value="32" enum="LineBreakFlag">
+ <constant name="BREAK_MANDATORY" value="1" enum="LineBreakFlag" is_bitfield="true">
Break the line at the line mandatory break characters (e.g. [code]"\n"[/code]).
</constant>
- <constant name="BREAK_WORD_BOUND" value="64" enum="LineBreakFlag">
+ <constant name="BREAK_WORD_BOUND" value="2" enum="LineBreakFlag" is_bitfield="true">
Break the line between the words.
</constant>
- <constant name="BREAK_GRAPHEME_BOUND" value="128" enum="LineBreakFlag">
+ <constant name="BREAK_GRAPHEME_BOUND" value="4" enum="LineBreakFlag" is_bitfield="true">
Break the line between any unconnected graphemes.
</constant>
- <constant name="BREAK_WORD_BOUND_ADAPTIVE" value="320" enum="LineBreakFlag">
- Break the line between the words, or any unconnected graphemes if line is too short to fit the whole word.
+ <constant name="BREAK_ADAPTIVE" value="8" enum="LineBreakFlag" is_bitfield="true">
+ </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.
+ </constant>
+ <constant name="VC_CHARS_AFTER_SHAPING" value="1" enum="VisibleCharactersBehavior">
+ 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.
+ </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.
+ </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.
+ </constant>
+ <constant name="OVERRUN_NO_TRIMMING" value="0" enum="OverrunBehavior">
+ No text trimming is performed.
</constant>
- <constant name="OVERRUN_NO_TRIMMING" value="0" enum="TextOverrunFlag">
+ <constant name="OVERRUN_TRIM_CHAR" value="1" enum="OverrunBehavior">
+ Trims the text per character.
+ </constant>
+ <constant name="OVERRUN_TRIM_WORD" value="2" enum="OverrunBehavior">
+ Trims the text per word.
+ </constant>
+ <constant name="OVERRUN_TRIM_ELLIPSIS" value="3" enum="OverrunBehavior">
+ Trims the text per character and adds an ellipsis to indicate that parts are hidden.
+ </constant>
+ <constant name="OVERRUN_TRIM_WORD_ELLIPSIS" value="4" enum="OverrunBehavior">
+ Trims the text per word and adds an ellipsis to indicate that parts are hidden.
+ </constant>
+ <constant name="OVERRUN_NO_TRIM" value="0" enum="TextOverrunFlag" is_bitfield="true">
No trimming is performed.
</constant>
- <constant name="OVERRUN_TRIM" value="1" enum="TextOverrunFlag">
+ <constant name="OVERRUN_TRIM" value="1" enum="TextOverrunFlag" is_bitfield="true">
Trims the text when it exceeds the given width.
</constant>
- <constant name="OVERRUN_TRIM_WORD_ONLY" value="2" enum="TextOverrunFlag">
+ <constant name="OVERRUN_TRIM_WORD_ONLY" value="2" enum="TextOverrunFlag" is_bitfield="true">
Trims the text per word instead of per grapheme.
</constant>
- <constant name="OVERRUN_ADD_ELLIPSIS" value="4" enum="TextOverrunFlag">
+ <constant name="OVERRUN_ADD_ELLIPSIS" value="4" enum="TextOverrunFlag" is_bitfield="true">
Determines whether an ellipsis should be added at the end of the text.
</constant>
- <constant name="OVERRUN_ENFORCE_ELLIPSIS" value="8" enum="TextOverrunFlag">
+ <constant name="OVERRUN_ENFORCE_ELLIPSIS" value="8" enum="TextOverrunFlag" is_bitfield="true">
Determines whether the ellipsis at the end of the text is enforced and may not be hidden.
</constant>
- <constant name="OVERRUN_JUSTIFICATION_AWARE" value="16" enum="TextOverrunFlag">
+ <constant name="OVERRUN_JUSTIFICATION_AWARE" value="16" enum="TextOverrunFlag" is_bitfield="true">
</constant>
- <constant name="GRAPHEME_IS_VALID" value="1" enum="GraphemeFlag">
+ <constant name="GRAPHEME_IS_VALID" value="1" enum="GraphemeFlag" is_bitfield="true">
Grapheme is supported by the font, and can be drawn.
</constant>
- <constant name="GRAPHEME_IS_RTL" value="2" enum="GraphemeFlag">
+ <constant name="GRAPHEME_IS_RTL" value="2" enum="GraphemeFlag" is_bitfield="true">
Grapheme is part of right-to-left or bottom-to-top run.
</constant>
- <constant name="GRAPHEME_IS_VIRTUAL" value="4" enum="GraphemeFlag">
+ <constant name="GRAPHEME_IS_VIRTUAL" value="4" enum="GraphemeFlag" is_bitfield="true">
Grapheme is not part of source text, it was added by justification process.
</constant>
- <constant name="GRAPHEME_IS_SPACE" value="8" enum="GraphemeFlag">
+ <constant name="GRAPHEME_IS_SPACE" value="8" enum="GraphemeFlag" is_bitfield="true">
Grapheme is whitespace.
</constant>
- <constant name="GRAPHEME_IS_BREAK_HARD" value="16" enum="GraphemeFlag">
+ <constant name="GRAPHEME_IS_BREAK_HARD" value="16" enum="GraphemeFlag" is_bitfield="true">
Grapheme is mandatory break point (e.g. [code]"\n"[/code]).
</constant>
- <constant name="GRAPHEME_IS_BREAK_SOFT" value="32" enum="GraphemeFlag">
+ <constant name="GRAPHEME_IS_BREAK_SOFT" value="32" enum="GraphemeFlag" is_bitfield="true">
Grapheme is optional break point (e.g. space).
</constant>
- <constant name="GRAPHEME_IS_TAB" value="64" enum="GraphemeFlag">
+ <constant name="GRAPHEME_IS_TAB" value="64" enum="GraphemeFlag" is_bitfield="true">
Grapheme is the tabulation character.
</constant>
- <constant name="GRAPHEME_IS_ELONGATION" value="128" enum="GraphemeFlag">
+ <constant name="GRAPHEME_IS_ELONGATION" value="128" enum="GraphemeFlag" is_bitfield="true">
Grapheme is kashida.
</constant>
- <constant name="GRAPHEME_IS_PUNCTUATION" value="256" enum="GraphemeFlag">
+ <constant name="GRAPHEME_IS_PUNCTUATION" value="256" enum="GraphemeFlag" is_bitfield="true">
Grapheme is punctuation character.
</constant>
- <constant name="GRAPHEME_IS_UNDERSCORE" value="512" enum="GraphemeFlag">
+ <constant name="GRAPHEME_IS_UNDERSCORE" value="512" enum="GraphemeFlag" is_bitfield="true">
Grapheme is underscore character.
</constant>
- <constant name="GRAPHEME_IS_CONNECTED" value="1024" enum="GraphemeFlag">
+ <constant name="GRAPHEME_IS_CONNECTED" value="1024" enum="GraphemeFlag" is_bitfield="true">
Grapheme is connected to the previous grapheme. Breaking line before this grapheme is not safe.
</constant>
+ <constant name="GRAPHEME_IS_SAFE_TO_INSERT_TATWEEL" value="2048" enum="GraphemeFlag" is_bitfield="true">
+ It is safe to insert a U+0640 before this grapheme for elongation.
+ </constant>
<constant name="HINTING_NONE" value="0" enum="Hinting">
Disables font hinting (smoother but less crisp).
</constant>
@@ -1610,10 +1707,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.
@@ -1652,7 +1749,13 @@
TextServer supports locale dependent and context sensitive case conversion.
</constant>
<constant name="FEATURE_USE_SUPPORT_DATA" value="4096" enum="Feature">
- TextServer require external data file for some features.
+ TextServer require external data file for some features, see [method load_support_data].
+ </constant>
+ <constant name="FEATURE_UNICODE_IDENTIFIERS" value="8192" enum="Feature">
+ TextServer supports UAX #31 identifier validation, see [method is_valid_identifier].
+ </constant>
+ <constant name="FEATURE_UNICODE_SECURITY" value="16384" enum="Feature">
+ TextServer supports [url=https://unicode.org/reports/tr36/]Unicode Technical Report #36[/url] and [url=https://unicode.org/reports/tr39/]Unicode Technical Standard #39[/url] based spoof detection features.
</constant>
<constant name="CONTOUR_CURVE_TAG_ON" value="1" enum="ContourPointTag">
Contour point is on the curve.
@@ -1675,13 +1778,15 @@
<constant name="SPACING_BOTTOM" value="3" enum="SpacingType">
Spacing at the bottom of the line.
</constant>
- <constant name="FONT_BOLD" value="1" enum="FontStyle">
+ <constant name="SPACING_MAX" value="4" enum="SpacingType">
+ </constant>
+ <constant name="FONT_BOLD" value="1" enum="FontStyle" is_bitfield="true">
Font is bold.
</constant>
- <constant name="FONT_ITALIC" value="2" enum="FontStyle">
+ <constant name="FONT_ITALIC" value="2" enum="FontStyle" is_bitfield="true">
Font is italic or oblique.
</constant>
- <constant name="FONT_FIXED_WIDTH" value="4" enum="FontStyle">
+ <constant name="FONT_FIXED_WIDTH" value="4" enum="FontStyle" is_bitfield="true">
Font have fixed-width characters.
</constant>
<constant name="STRUCTURED_TEXT_DEFAULT" value="0" enum="StructuredTextParser">
diff --git a/doc/classes/TextServerExtension.xml b/doc/classes/TextServerExtension.xml
index 434d6f909c..9eb7188846 100644
--- a/doc/classes/TextServerExtension.xml
+++ b/doc/classes/TextServerExtension.xml
@@ -17,19 +17,19 @@
</method>
<method name="create_shaped_text" qualifiers="virtual">
<return type="RID" />
- <argument index="0" name="direction" type="int" enum="TextServer.Direction" />
- <argument index="1" name="orientation" type="int" enum="TextServer.Orientation" />
+ <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.
+ 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.
</description>
</method>
<method name="draw_hex_code_box" qualifiers="virtual const">
<return type="void" />
- <argument index="0" name="canvas" type="RID" />
- <argument index="1" name="size" type="int" />
- <argument index="2" name="pos" type="Vector2" />
- <argument index="3" name="index" type="int" />
- <argument index="4" name="color" type="Color" />
+ <param index="0" name="canvas" type="RID" />
+ <param index="1" name="size" type="int" />
+ <param index="2" name="pos" type="Vector2" />
+ <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.
@@ -37,93 +37,107 @@
</method>
<method name="font_clear_glyphs" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="size" type="Vector2i" />
+ <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">
<return type="void" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="size" type="int" />
+ <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">
<return type="void" />
- <argument index="0" name="font_rid" type="RID" />
+ <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">
<return type="void" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="size" type="Vector2i" />
+ <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">
<return type="void" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="canvas" type="RID" />
- <argument index="2" name="size" type="int" />
- <argument index="3" name="pos" type="Vector2" />
- <argument index="4" name="index" type="int" />
- <argument index="5" name="color" type="Color" />
+ <param index="0" name="font_rid" type="RID" />
+ <param index="1" name="canvas" type="RID" />
+ <param index="2" name="size" type="int" />
+ <param index="3" name="pos" type="Vector2" />
+ <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].
+ Draws single glyph into a canvas item at the position, using [param font_rid] at the size [param size].
</description>
</method>
<method name="font_draw_glyph_outline" qualifiers="virtual const">
<return type="void" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="canvas" type="RID" />
- <argument index="2" name="size" type="int" />
- <argument index="3" name="outline_size" type="int" />
- <argument index="4" name="pos" type="Vector2" />
- <argument index="5" name="index" type="int" />
- <argument index="6" name="color" type="Color" />
+ <param index="0" name="font_rid" type="RID" />
+ <param index="1" name="canvas" type="RID" />
+ <param index="2" name="size" type="int" />
+ <param index="3" name="outline_size" type="int" />
+ <param index="4" name="pos" type="Vector2" />
+ <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].
+ 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].
</description>
</method>
<method name="font_get_ascent" qualifiers="virtual const">
<return type="float" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="size" type="int" />
+ <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">
<return type="float" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="size" type="int" />
+ <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">
<return type="float" />
- <argument index="0" name="font_rid" type="RID" />
+ <param index="0" name="font_rid" type="RID" />
<description>
Returns font embolden strength.
</description>
</method>
+ <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">
+ <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">
<return type="int" />
- <argument index="0" name="font_rid" type="RID" />
+ <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">
<return type="bool" />
- <argument index="0" name="font_rid" type="RID" />
+ <param index="0" name="font_rid" type="RID" />
<description>
Returns [code]true[/code] if font texture mipmap generation is enabled.
</description>
@@ -136,18 +150,18 @@
</method>
<method name="font_get_glyph_advance" qualifiers="virtual const">
<return type="Vector2" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="size" type="int" />
- <argument index="2" name="glyph" type="int" />
+ <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">
<return type="Dictionary" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="size" type="int" />
- <argument index="2" name="index" type="int" />
+ <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.
@@ -157,466 +171,465 @@
</method>
<method name="font_get_glyph_index" qualifiers="virtual const">
<return type="int" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="size" type="int" />
- <argument index="2" name="char" type="int" />
- <argument index="3" name="variation_selector" 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].
+ Returns the glyph index of a [param char], optionally modified by the [param variation_selector].
</description>
</method>
<method name="font_get_glyph_list" qualifiers="virtual const">
- <return type="Array" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="size" type="Vector2i" />
+ <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">
<return type="Vector2" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="size" type="Vector2i" />
- <argument index="2" name="glyph" 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 glyph offset from the baseline.
</description>
</method>
<method name="font_get_glyph_size" qualifiers="virtual const">
<return type="Vector2" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="size" type="Vector2i" />
- <argument index="2" name="glyph" 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 size of the glyph.
</description>
</method>
<method name="font_get_glyph_texture_idx" qualifiers="virtual const">
<return type="int" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="size" type="Vector2i" />
- <argument index="2" name="glyph" 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">
<return type="RID" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="size" type="Vector2i" />
- <argument index="2" name="glyph" 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 resource id of the cache texture containing the glyph.
</description>
</method>
<method name="font_get_glyph_texture_size" qualifiers="virtual const">
<return type="Vector2" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="size" type="Vector2i" />
- <argument index="2" name="glyph" 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 size of the cache texture containing the glyph.
</description>
</method>
<method name="font_get_glyph_uv_rect" qualifiers="virtual const">
<return type="Rect2" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="size" type="Vector2i" />
- <argument index="2" name="glyph" 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 rectangle in the cache texture containing the glyph.
</description>
</method>
<method name="font_get_hinting" qualifiers="virtual const">
<return type="int" enum="TextServer.Hinting" />
- <argument index="0" name="font_rid" type="RID" />
+ <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">
<return type="Vector2" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="size" type="int" />
- <argument index="2" name="glyph_pair" type="Vector2i" />
+ <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" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="size" type="int" />
+ <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">
<return type="bool" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="language" type="String" />
+ <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" qualifiers="virtual">
<return type="PackedStringArray" />
- <argument index="0" name="font_rid" type="RID" />
+ <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">
<return type="int" />
- <argument index="0" name="font_rid" type="RID" />
+ <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">
<return type="int" />
- <argument index="0" name="font_rid" type="RID" />
+ <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">
<return type="String" />
- <argument index="0" name="font_rid" type="RID" />
+ <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">
<return type="Dictionary" />
- <argument index="0" name="font_rid" type="RID" />
+ <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">
<return type="float" />
- <argument index="0" name="font_rid" type="RID" />
+ <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">
<return type="float" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="size" type="int" />
+ <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">
<return type="bool" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="script" type="String" />
+ <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" qualifiers="virtual">
<return type="PackedStringArray" />
- <argument index="0" name="font_rid" type="RID" />
+ <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" />
- <argument index="0" name="font_rid" type="RID" />
+ <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_spacing" qualifiers="virtual const">
- <return type="int" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="size" type="int" />
- <argument index="2" name="spacing" type="int" enum="TextServer.SpacingType" />
- <description>
- Returns extra spacing added between glyphs in pixels.
- </description>
- </method>
<method name="font_get_style" qualifiers="virtual const">
- <return type="int" />
- <argument index="0" name="font_rid" type="RID" />
+ <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">
<return type="String" />
- <argument index="0" name="font_rid" type="RID" />
+ <param index="0" name="font_rid" type="RID" />
<description>
Returns font style name.
</description>
</method>
<method name="font_get_subpixel_positioning" qualifiers="virtual const">
<return type="int" enum="TextServer.SubpixelPositioning" />
- <argument index="0" name="font_rid" type="RID" />
+ <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">
<return type="String" />
- <argument index="0" name="font_rid" type="RID" />
+ <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">
<return type="int" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="size" type="Vector2i" />
+ <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">
<return type="Image" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="size" type="Vector2i" />
- <argument index="2" name="texture_index" type="int" />
+ <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">
<return type="PackedInt32Array" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="size" type="Vector2i" />
- <argument index="2" name="texture_index" type="int" />
+ <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">
<return type="Transform2D" />
- <argument index="0" name="font_rid" type="RID" />
+ <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">
<return type="float" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="size" type="int" />
+ <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">
<return type="float" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="size" type="int" />
+ <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">
<return type="Dictionary" />
- <argument index="0" name="font_rid" type="RID" />
+ <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">
<return type="bool" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="char" type="int" />
+ <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.
+ Returns [code]true[/code] if a Unicode [param char] is available in the font.
</description>
</method>
<method name="font_is_antialiased" qualifiers="virtual const">
<return type="bool" />
- <argument index="0" name="font_rid" type="RID" />
+ <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" />
- <argument index="0" name="font_rid" type="RID" />
+ <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">
<return type="bool" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="language" type="String" />
+ <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">
<return type="bool" />
- <argument index="0" name="font_rid" type="RID" />
+ <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">
<return type="bool" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="script" type="String" />
+ <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">
<return type="void" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="size" type="Vector2i" />
- <argument index="2" name="glyph" 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>
Removes specified rendered glyph information from the cache entry.
</description>
</method>
<method name="font_remove_kerning" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="size" type="int" />
- <argument index="2" name="glyph_pair" type="Vector2i" />
+ <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">
<return type="void" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="language" type="String" />
+ <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">
<return type="void" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="script" type="String" />
+ <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">
<return type="void" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="size" type="Vector2i" />
+ <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">
<return type="void" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="size" type="Vector2i" />
- <argument index="2" name="texture_index" type="int" />
+ <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 font cache entry.
+ Removes specified texture from the cache entry.
</description>
</method>
<method name="font_render_glyph" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="size" type="Vector2i" />
- <argument index="2" name="index" type="int" />
+ <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">
<return type="void" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="size" type="Vector2i" />
- <argument index="2" name="start" type="int" />
- <argument index="3" name="end" type="int" />
+ <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">
<return type="void" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="antialiased" type="bool" />
+ <param index="0" name="font_rid" type="RID" />
+ <param index="1" name="antialiased" type="bool" />
<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">
<return type="void" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="size" type="int" />
- <argument index="2" name="ascent" type="float" />
+ <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">
<return type="void" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="data" type="PackedByteArray" />
+ <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">
<return type="void" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="data_ptr" type="const uint8_t*" />
- <argument index="2" name="data_size" type="int" />
+ <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.
+ Sets font source data, e.g contents of the dynamic font source file. [param data_ptr] memory buffer must remain accessible during font lifetime.
</description>
</method>
<method name="font_set_descent" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="size" type="int" />
- <argument index="2" name="descent" type="float" />
+ <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">
<return type="void" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="strength" type="float" />
+ <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" 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">
<return type="void" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="fixed_size" type="int" />
+ <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">
<return type="void" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="force_autohinter" type="bool" />
+ <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">
<return type="void" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="generate_mipmaps" type="bool" />
+ <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">
<return type="void" />
- <argument index="0" name="oversampling" type="float" />
+ <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.
@@ -624,101 +637,101 @@
</method>
<method name="font_set_glyph_advance" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="size" type="int" />
- <argument index="2" name="glyph" type="int" />
- <argument index="3" name="advance" type="Vector2" />
+ <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">
<return type="void" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="size" type="Vector2i" />
- <argument index="2" name="glyph" type="int" />
- <argument index="3" name="offset" type="Vector2" />
+ <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">
<return type="void" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="size" type="Vector2i" />
- <argument index="2" name="glyph" type="int" />
- <argument index="3" name="gl_size" type="Vector2" />
+ <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">
<return type="void" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="size" type="Vector2i" />
- <argument index="2" name="glyph" type="int" />
- <argument index="3" name="texture_idx" type="int" />
+ <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">
<return type="void" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="size" type="Vector2i" />
- <argument index="2" name="glyph" type="int" />
- <argument index="3" name="uv_rect" type="Rect2" />
+ <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">
<return type="void" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="hinting" type="int" enum="TextServer.Hinting" />
+ <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">
<return type="void" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="size" type="int" />
- <argument index="2" name="glyph_pair" type="Vector2i" />
- <argument index="3" name="kerning" 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" />
+ <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">
<return type="void" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="language" type="String" />
- <argument index="2" name="supported" type="bool" />
+ <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">
<return type="void" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="msdf_pixel_range" type="int" />
+ <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">
<return type="void" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="msdf_size" type="int" />
+ <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">
<return type="void" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="msdf" type="bool" />
+ <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.
@@ -726,104 +739,94 @@
</method>
<method name="font_set_name" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="name" type="String" />
+ <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">
<return type="void" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="overrides" type="Dictionary" />
+ <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">
<return type="void" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="oversampling" type="float" />
+ <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">
<return type="void" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="size" type="int" />
- <argument index="2" name="scale" type="float" />
+ <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">
<return type="void" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="script" type="String" />
- <argument index="2" name="supported" type="bool" />
+ <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_spacing" qualifiers="virtual">
- <return type="void" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="size" type="int" />
- <argument index="2" name="spacing" type="int" enum="TextServer.SpacingType" />
- <argument index="3" name="value" type="int" />
- <description>
- Sets extra spacing added between glyphs in pixels.
- </description>
- </method>
<method name="font_set_style" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="style" type="int" />
+ <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">
<return type="void" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="name_style" type="String" />
+ <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">
<return type="void" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="subpixel_positioning" type="int" enum="TextServer.SubpixelPositioning" />
+ <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">
<return type="void" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="size" type="Vector2i" />
- <argument index="2" name="texture_index" type="int" />
- <argument index="3" name="image" 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" />
+ <param index="3" name="image" type="Image" />
<description>
Sets font cache texture image data.
</description>
</method>
<method name="font_set_texture_offsets" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="size" type="Vector2i" />
- <argument index="2" name="texture_index" type="int" />
- <argument index="3" name="offset" 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" />
+ <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">
<return type="void" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="transform" type="Transform2D" />
+ <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].
@@ -831,55 +834,55 @@
</method>
<method name="font_set_underline_position" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="size" type="int" />
- <argument index="2" name="underline_position" type="float" />
+ <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">
<return type="void" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="size" type="int" />
- <argument index="2" name="underline_thickness" type="float" />
+ <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">
<return type="void" />
- <argument index="0" name="font_rid" type="RID" />
- <argument index="1" name="variation_coordinates" type="Dictionary" />
+ <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">
<return type="Dictionary" />
- <argument index="0" name="font_rid" type="RID" />
+ <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">
<return type="Dictionary" />
- <argument index="0" name="font_rid" type="RID" />
+ <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">
<return type="String" />
- <argument index="0" name="string" type="String" />
- <argument index="1" name="language" 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].
+ Converts a number from the Western Arabic (0..9) to the numeral systems used in [param language].
</description>
</method>
<method name="free_rid" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="rid" type="RID" />
+ <param index="0" name="rid" type="RID" />
<description>
Frees an object created by this [TextServer].
</description>
@@ -892,8 +895,8 @@
</method>
<method name="get_hex_code_box_size" qualifiers="virtual const">
<return type="Vector2" />
- <argument index="0" name="size" type="int" />
- <argument index="1" name="index" type="int" />
+ <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.
@@ -919,65 +922,80 @@
</method>
<method name="has" qualifiers="virtual">
<return type="bool" />
- <argument index="0" name="rid" type="RID" />
+ <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="virtual const">
<return type="bool" />
- <argument index="0" name="feature" type="int" enum="TextServer.Feature" />
+ <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">
+ <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 [param dict] which is visually confusable with the [param string], or [code]-1[/code] if none is found.
+ </description>
+ </method>
<method name="is_locale_right_to_left" qualifiers="virtual const">
<return type="bool" />
- <argument index="0" name="locale" type="String" />
+ <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">
+ <return type="bool" />
+ <param index="0" name="string" type="String" />
+ <description>
+ Returns [code]true[/code] is [param string] is a valid identifier.
+ </description>
+ </method>
<method name="load_support_data" qualifiers="virtual">
<return type="bool" />
- <argument index="0" name="filename" type="String" />
+ <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">
<return type="int" />
- <argument index="0" name="name" type="String" />
+ <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">
<return type="String" />
- <argument index="0" name="string" type="String" />
- <argument index="1" name="language" 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).
+ Converts a number from the numeral systems used in [param language] to Western Arabic (0..9).
</description>
</method>
<method name="parse_structured_text" qualifiers="virtual const">
- <return type="Array" />
- <argument index="0" name="parser_type" type="int" enum="TextServer.StructuredTextParser" />
- <argument index="1" name="args" type="Array" />
- <argument index="2" name="text" type="String" />
+ <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">
<return type="String" />
- <argument index="0" name="language" type="String" />
+ <param index="0" name="language" type="String" />
<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="virtual const">
<return type="bool" />
- <argument index="0" name="filename" type="String" />
+ <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.
@@ -985,140 +1003,140 @@
</method>
<method name="shaped_get_span_count" qualifiers="virtual const">
<return type="int" />
- <argument index="0" name="shaped" type="RID" />
+ <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">
<return type="Variant" />
- <argument index="0" name="shaped" type="RID" />
- <argument index="1" name="index" type="int" />
+ <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">
<return type="void" />
- <argument index="0" name="shaped" type="RID" />
- <argument index="1" name="index" type="int" />
- <argument index="2" name="fonts" type="Array" />
- <argument index="3" name="size" type="int" />
- <argument index="4" name="opentype_features" type="Dictionary" />
+ <param index="0" name="shaped" type="RID" />
+ <param index="1" name="index" type="int" />
+ <param index="2" name="fonts" type="Array" />
+ <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">
<return type="bool" />
- <argument index="0" name="shaped" type="RID" />
- <argument index="1" name="key" type="Variant" />
- <argument index="2" name="size" type="Vector2" />
- <argument index="3" name="inline_align" type="int" enum="InlineAlignment" />
- <argument index="4" name="length" type="int" />
+ <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" />
+ <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.
+ 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" qualifiers="virtual">
<return type="bool" />
- <argument index="0" name="shaped" type="RID" />
- <argument index="1" name="text" type="String" />
- <argument index="2" name="fonts" type="Array" />
- <argument index="3" name="size" type="int" />
- <argument index="4" name="opentype_features" type="Dictionary" />
- <argument index="5" name="language" type="String" />
- <argument index="6" name="meta" type="Variant" />
+ <param index="0" name="shaped" type="RID" />
+ <param index="1" name="text" type="String" />
+ <param index="2" name="fonts" type="Array" />
+ <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">
<return type="void" />
- <argument index="0" name="shaped" type="RID" />
+ <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">
<return type="void" />
- <argument index="0" name="shaped" type="RID" />
- <argument index="1" name="canvas" type="RID" />
- <argument index="2" name="pos" type="Vector2" />
- <argument index="3" name="clip_l" type="float" />
- <argument index="4" name="clip_r" type="float" />
- <argument index="5" name="color" type="Color" />
+ <param index="0" name="shaped" type="RID" />
+ <param index="1" name="canvas" type="RID" />
+ <param index="2" name="pos" type="Vector2" />
+ <param index="3" name="clip_l" type="float" />
+ <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).
+ 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).
[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">
<return type="void" />
- <argument index="0" name="shaped" type="RID" />
- <argument index="1" name="canvas" type="RID" />
- <argument index="2" name="pos" type="Vector2" />
- <argument index="3" name="clip_l" type="float" />
- <argument index="4" name="clip_r" type="float" />
- <argument index="5" name="outline_size" type="int" />
- <argument index="6" name="color" type="Color" />
+ <param index="0" name="shaped" type="RID" />
+ <param index="1" name="canvas" type="RID" />
+ <param index="2" name="pos" type="Vector2" />
+ <param index="3" name="clip_l" type="float" />
+ <param index="4" name="clip_r" type="float" />
+ <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).
+ 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).
[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">
<return type="float" />
- <argument index="0" name="shaped" type="RID" />
- <argument index="1" name="width" type="float" />
- <argument index="2" name="jst_flags" type="int" />
+ <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">
<return type="float" />
- <argument index="0" name="shaped" type="RID" />
+ <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">
<return type="void" />
- <argument index="0" name="shaped" type="RID" />
- <argument index="1" name="position" type="int" />
- <argument index="2" name="caret" type="CaretInfo*" />
+ <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.
+ Returns shapes of the carets corresponding to the character offset [param position] 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">
<return type="String" />
- <argument index="0" name="shaped" type="RID" />
+ <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">
<return type="float" />
- <argument index="0" name="shaped" type="RID" />
+ <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">
<return type="int" enum="TextServer.Direction" />
- <argument index="0" name="shaped" type="RID" />
+ <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">
<return type="int" />
- <argument index="0" name="shaped" type="RID" />
- <argument index="1" name="start" type="int" />
- <argument index="2" name="end" 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.
@@ -1126,43 +1144,43 @@
</method>
<method name="shaped_text_get_ellipsis_glyph_count" qualifiers="virtual const">
<return type="int" />
- <argument index="0" name="shaped" type="RID" />
+ <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">
<return type="const Glyph*" />
- <argument index="0" name="shaped" type="RID" />
+ <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">
<return type="int" />
- <argument index="0" name="shaped" type="RID" />
+ <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">
<return type="int" />
- <argument index="0" name="shaped" type="RID" />
+ <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">
<return type="const Glyph*" />
- <argument index="0" name="shaped" type="RID" />
+ <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">
<return type="Vector2" />
- <argument index="0" name="shaped" type="RID" />
- <argument index="1" name="pos" type="int" />
+ <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.
@@ -1170,17 +1188,17 @@
</method>
<method name="shaped_text_get_inferred_direction" qualifiers="virtual const">
<return type="int" enum="TextServer.Direction" />
- <argument index="0" name="shaped" type="RID" />
+ <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">
<return type="PackedInt32Array" />
- <argument index="0" name="shaped" type="RID" />
- <argument index="1" name="width" type="float" />
- <argument index="2" name="start" type="int" />
- <argument index="3" name="break_flags" type="int" />
+ <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.
@@ -1188,11 +1206,11 @@
</method>
<method name="shaped_text_get_line_breaks_adv" qualifiers="virtual const">
<return type="PackedInt32Array" />
- <argument index="0" name="shaped" type="RID" />
- <argument index="1" name="width" type="PackedFloat32Array" />
- <argument index="2" name="start" type="int" />
- <argument index="3" name="once" type="bool" />
- <argument index="4" name="break_flags" type="int" />
+ <param index="0" name="shaped" type="RID" />
+ <param index="1" name="width" type="PackedFloat32Array" />
+ <param index="2" name="start" type="int" />
+ <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.
@@ -1200,43 +1218,43 @@
</method>
<method name="shaped_text_get_object_rect" qualifiers="virtual const">
<return type="Rect2" />
- <argument index="0" name="shaped" type="RID" />
- <argument index="1" name="key" type="Variant" />
+ <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">
<return type="Array" />
- <argument index="0" name="shaped" type="RID" />
+ <param index="0" name="shaped" type="RID" />
<description>
Returns array of inline objects.
</description>
</method>
<method name="shaped_text_get_orientation" qualifiers="virtual const">
<return type="int" enum="TextServer.Orientation" />
- <argument index="0" name="shaped" type="RID" />
+ <param index="0" name="shaped" type="RID" />
<description>
eturns text orientation.
</description>
</method>
<method name="shaped_text_get_parent" qualifiers="virtual const">
<return type="RID" />
- <argument index="0" name="shaped" 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">
<return type="bool" />
- <argument index="0" name="shaped" type="RID" />
+ <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">
<return type="bool" />
- <argument index="0" name="shaped" type="RID" />
+ <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.
@@ -1244,16 +1262,16 @@
</method>
<method name="shaped_text_get_range" qualifiers="virtual const">
<return type="Vector2i" />
- <argument index="0" name="shaped" type="RID" />
+ <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">
<return type="PackedVector2Array" />
- <argument index="0" name="shaped" type="RID" />
- <argument index="1" name="start" type="int" />
- <argument index="2" name="end" 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 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.
@@ -1261,43 +1279,51 @@
</method>
<method name="shaped_text_get_size" qualifiers="virtual const">
<return type="Vector2" />
- <argument index="0" name="shaped" type="RID" />
+ <param index="0" name="shaped" type="RID" />
<description>
Returns size of the text.
</description>
</method>
+ <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">
<return type="int" />
- <argument index="0" name="shaped" type="RID" />
+ <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">
<return type="float" />
- <argument index="0" name="shaped" type="RID" />
+ <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">
<return type="float" />
- <argument index="0" name="shaped" type="RID" />
+ <param index="0" name="shaped" type="RID" />
<description>
Returns thickness of the underline.
</description>
</method>
<method name="shaped_text_get_width" qualifiers="virtual const">
<return type="float" />
- <argument index="0" name="shaped" type="RID" />
+ <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">
<return type="PackedInt32Array" />
- <argument index="0" name="shaped" type="RID" />
- <argument index="1" name="grapheme_flags" type="int" />
+ <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.
@@ -1305,8 +1331,8 @@
</method>
<method name="shaped_text_hit_test_grapheme" qualifiers="virtual const">
<return type="int" />
- <argument index="0" name="shaped" type="RID" />
- <argument index="1" name="coord" type="float" />
+ <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.
@@ -1314,8 +1340,8 @@
</method>
<method name="shaped_text_hit_test_position" qualifiers="virtual const">
<return type="int" />
- <argument index="0" name="shaped" type="RID" />
- <argument index="1" name="coord" type="float" />
+ <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.
@@ -1323,52 +1349,52 @@
</method>
<method name="shaped_text_is_ready" qualifiers="virtual const">
<return type="bool" />
- <argument index="0" name="shaped" type="RID" />
+ <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">
<return type="int" />
- <argument index="0" name="shaped" type="RID" />
- <argument index="1" name="pos" 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].
+ Returns composite character end position closest to the [param pos].
[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">
<return type="void" />
- <argument index="0" name="shaped" type="RID" />
- <argument index="1" name="width" type="float" />
- <argument index="2" name="trim_flags" type="int" />
+ <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">
<return type="int" />
- <argument index="0" name="shaped" type="RID" />
- <argument index="1" name="pos" 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].
+ Returns composite character start position closest to the [param pos].
[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">
<return type="bool" />
- <argument index="0" name="shaped" type="RID" />
- <argument index="1" name="key" type="Variant" />
- <argument index="2" name="size" type="Vector2" />
- <argument index="3" name="inline_align" type="int" enum="InlineAlignment" />
+ <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">
<return type="void" />
- <argument index="0" name="shaped" type="RID" />
- <argument index="1" name="override" type="Array" />
+ <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.
@@ -1376,78 +1402,87 @@
</method>
<method name="shaped_text_set_custom_punctuation" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="shaped" type="RID" />
- <argument index="1" name="punct" type="String" />
+ <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">
<return type="void" />
- <argument index="0" name="shaped" type="RID" />
- <argument index="1" name="direction" type="int" enum="TextServer.Direction" />
+ <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.
+ Sets desired text [param 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">
<return type="void" />
- <argument index="0" name="shaped" type="RID" />
- <argument index="1" name="orientation" type="int" enum="TextServer.Orientation" />
+ <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">
<return type="void" />
- <argument index="0" name="shaped" type="RID" />
- <argument index="1" name="enabled" type="bool" />
+ <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">
<return type="void" />
- <argument index="0" name="shaped" type="RID" />
- <argument index="1" name="enabled" type="bool" />
+ <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">
+ <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">
<return type="bool" />
- <argument index="0" name="shaped" type="RID" />
+ <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">
<return type="const Glyph*" />
- <argument index="0" name="shaped" type="RID" />
+ <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">
<return type="RID" />
- <argument index="0" name="shaped" type="RID" />
- <argument index="1" name="start" type="int" />
- <argument index="2" name="length" type="int" />
+ <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).
+ 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" qualifiers="virtual">
<return type="float" />
- <argument index="0" name="shaped" type="RID" />
- <argument index="1" name="tab_stops" type="PackedFloat32Array" />
+ <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">
<return type="bool" />
- <argument index="0" name="shaped" type="RID" />
+ <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.
@@ -1455,39 +1490,46 @@
</method>
<method name="shaped_text_update_justification_ops" qualifiers="virtual">
<return type="bool" />
- <argument index="0" name="shaped" type="RID" />
+ <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">
+ <return type="bool" />
+ <param index="0" name="string" type="String" />
+ <description>
+ Returns [code]true[/code] if [param string] is likely to be an attempt at confusing the reader.
+ </description>
+ </method>
<method name="string_get_word_breaks" qualifiers="virtual const">
<return type="PackedInt32Array" />
- <argument index="0" name="string" type="String" />
- <argument index="1" name="language" type="String" />
+ <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">
<return type="String" />
- <argument index="0" name="string" type="String" />
- <argument index="1" name="language" 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">
<return type="String" />
- <argument index="0" name="string" type="String" />
- <argument index="1" name="language" 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">
<return type="String" />
- <argument index="0" name="string" 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.
@@ -1495,7 +1537,7 @@
</method>
<method name="tag_to_name" qualifiers="virtual const">
<return type="String" />
- <argument index="0" name="tag" type="int" />
+ <param index="0" name="tag" type="int" />
<description>
Converts OpenType tag to readable feature, variation, script or language name.
</description>
diff --git a/doc/classes/TextServerManager.xml b/doc/classes/TextServerManager.xml
index 7eff19038c..9477e5ec54 100644
--- a/doc/classes/TextServerManager.xml
+++ b/doc/classes/TextServerManager.xml
@@ -12,21 +12,21 @@
<methods>
<method name="add_interface">
<return type="void" />
- <argument index="0" name="interface" type="TextServer" />
+ <param index="0" name="interface" type="TextServer" />
<description>
Registers an [TextServer] interface.
</description>
</method>
<method name="find_interface" qualifiers="const">
<return type="TextServer" />
- <argument index="0" name="name" type="String" />
+ <param index="0" name="name" type="String" />
<description>
Finds an interface by its name.
</description>
</method>
<method name="get_interface" qualifiers="const">
<return type="TextServer" />
- <argument index="0" name="idx" type="int" />
+ <param index="0" name="idx" type="int" />
<description>
Returns the interface registered at a given index.
</description>
@@ -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>
@@ -51,14 +51,14 @@
</method>
<method name="remove_interface">
<return type="void" />
- <argument index="0" name="interface" type="TextServer" />
+ <param index="0" name="interface" type="TextServer" />
<description>
Removes interface. All fonts and shaped text caches should be freed before removing interface.
</description>
</method>
<method name="set_primary_interface">
<return type="void" />
- <argument index="0" name="index" type="TextServer" />
+ <param index="0" name="index" type="TextServer" />
<description>
Sets the primary [TextServer] interface.
</description>
@@ -66,13 +66,13 @@
</methods>
<signals>
<signal name="interface_added">
- <argument index="0" name="interface_name" type="StringName" />
+ <param index="0" name="interface_name" type="StringName" />
<description>
Emitted when a new interface has been added.
</description>
</signal>
<signal name="interface_removed">
- <argument index="0" name="interface_name" type="StringName" />
+ <param index="0" name="interface_name" type="StringName" />
<description>
Emitted when an interface is removed.
</description>
diff --git a/doc/classes/Texture2D.xml b/doc/classes/Texture2D.xml
index 1bbebe085e..14e89a1b74 100644
--- a/doc/classes/Texture2D.xml
+++ b/doc/classes/Texture2D.xml
@@ -14,31 +14,31 @@
<methods>
<method name="_draw" qualifiers="virtual const">
<return type="void" />
- <argument index="0" name="to_canvas_item" type="RID" />
- <argument index="1" name="pos" type="Vector2" />
- <argument index="2" name="modulate" type="Color" />
- <argument index="3" name="transpose" type="bool" />
+ <param index="0" name="to_canvas_item" type="RID" />
+ <param index="1" name="pos" type="Vector2" />
+ <param index="2" name="modulate" type="Color" />
+ <param index="3" name="transpose" type="bool" />
<description>
</description>
</method>
<method name="_draw_rect" qualifiers="virtual const">
<return type="void" />
- <argument index="0" name="to_canvas_item" type="RID" />
- <argument index="1" name="rect" type="Rect2" />
- <argument index="2" name="tile" type="bool" />
- <argument index="3" name="modulate" type="Color" />
- <argument index="4" name="transpose" type="bool" />
+ <param index="0" name="to_canvas_item" type="RID" />
+ <param index="1" name="rect" type="Rect2" />
+ <param index="2" name="tile" type="bool" />
+ <param index="3" name="modulate" type="Color" />
+ <param index="4" name="transpose" type="bool" />
<description>
</description>
</method>
<method name="_draw_rect_region" qualifiers="virtual const">
<return type="void" />
- <argument index="0" name="tp_canvas_item" type="RID" />
- <argument index="1" name="rect" type="Rect2" />
- <argument index="2" name="src_rect" type="Rect2" />
- <argument index="3" name="modulate" type="Color" />
- <argument index="4" name="transpose" type="bool" />
- <argument index="5" name="clip_uv" type="bool" />
+ <param index="0" name="tp_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>
</description>
</method>
@@ -59,40 +59,40 @@
</method>
<method name="_is_pixel_opaque" qualifiers="virtual const">
<return type="bool" />
- <argument index="0" name="x" type="int" />
- <argument index="1" name="y" type="int" />
+ <param index="0" name="x" type="int" />
+ <param index="1" name="y" type="int" />
<description>
</description>
</method>
<method name="draw" qualifiers="const">
<return type="void" />
- <argument index="0" name="canvas_item" type="RID" />
- <argument index="1" name="position" type="Vector2" />
- <argument index="2" name="modulate" type="Color" default="Color(1, 1, 1, 1)" />
- <argument index="3" name="transpose" type="bool" default="false" />
+ <param index="0" name="canvas_item" type="RID" />
+ <param index="1" name="position" type="Vector2" />
+ <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">
<return type="void" />
- <argument index="0" name="canvas_item" type="RID" />
- <argument index="1" name="rect" type="Rect2" />
- <argument index="2" name="tile" type="bool" />
- <argument index="3" name="modulate" type="Color" default="Color(1, 1, 1, 1)" />
- <argument index="4" name="transpose" type="bool" default="false" />
+ <param index="0" name="canvas_item" type="RID" />
+ <param index="1" name="rect" type="Rect2" />
+ <param index="2" name="tile" type="bool" />
+ <param index="3" name="modulate" type="Color" default="Color(1, 1, 1, 1)" />
+ <param index="4" name="transpose" type="bool" default="false" />
<description>
Draws the texture using a [CanvasItem] with the [RenderingServer] API.
</description>
</method>
<method name="draw_rect_region" qualifiers="const">
<return type="void" />
- <argument index="0" name="canvas_item" type="RID" />
- <argument index="1" name="rect" type="Rect2" />
- <argument index="2" name="src_rect" type="Rect2" />
- <argument index="3" name="modulate" type="Color" default="Color(1, 1, 1, 1)" />
- <argument index="4" name="transpose" type="bool" default="false" />
- <argument index="5" name="clip_uv" type="bool" default="true" />
+ <param index="0" name="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" default="Color(1, 1, 1, 1)" />
+ <param index="4" name="transpose" type="bool" default="false" />
+ <param index="5" name="clip_uv" type="bool" default="true" />
<description>
Draws a part of the texture using a [CanvasItem] with the [RenderingServer] API.
</description>
@@ -106,7 +106,8 @@
<method name="get_image" qualifiers="const">
<return type="Image" />
<description>
- Returns an [Image] that is a copy of data from this [Texture2D]. [Image]s can be accessed and manipulated directly.
+ Returns an [Image] that is a copy of data from this [Texture2D] (a new [Image] is created each time). [Image]s can be accessed and manipulated directly.
+ [b]Note:[/b] This will fetch the texture data from the GPU, which might cause performance problems when overused.
</description>
</method>
<method name="get_size" qualifiers="const">
diff --git a/doc/classes/TextureLayered.xml b/doc/classes/TextureLayered.xml
index 3445329f32..7b528e2082 100644
--- a/doc/classes/TextureLayered.xml
+++ b/doc/classes/TextureLayered.xml
@@ -21,7 +21,7 @@
</method>
<method name="_get_layer_data" qualifiers="virtual const">
<return type="Image" />
- <argument index="0" name="layer_index" type="int" />
+ <param index="0" name="layer_index" type="int" />
<description>
</description>
</method>
@@ -59,9 +59,9 @@
</method>
<method name="get_layer_data" qualifiers="const">
<return type="Image" />
- <argument index="0" name="layer" type="int" />
+ <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">
diff --git a/doc/classes/TextureProgressBar.xml b/doc/classes/TextureProgressBar.xml
index 4ea072a25f..fcdb18e10d 100644
--- a/doc/classes/TextureProgressBar.xml
+++ b/doc/classes/TextureProgressBar.xml
@@ -11,14 +11,14 @@
<methods>
<method name="get_stretch_margin" qualifiers="const">
<return type="int" />
- <argument index="0" name="margin" type="int" enum="Side" />
+ <param index="0" name="margin" type="int" enum="Side" />
<description>
</description>
</method>
<method name="set_stretch_margin">
<return type="void" />
- <argument index="0" name="margin" type="int" enum="Side" />
- <argument index="1" name="value" type="int" />
+ <param index="0" name="margin" type="int" enum="Side" />
+ <param index="1" name="value" type="int" />
<description>
</description>
</method>
diff --git a/doc/classes/Theme.xml b/doc/classes/Theme.xml
index 5270da9588..868933bdf7 100644
--- a/doc/classes/Theme.xml
+++ b/doc/classes/Theme.xml
@@ -15,7 +15,7 @@
<methods>
<method name="add_type">
<return type="void" />
- <argument index="0" name="theme_type" type="StringName" />
+ <param index="0" name="theme_type" type="StringName" />
<description>
Adds an empty theme type for every valid data type.
[b]Note:[/b] Empty types are not saved with the theme. This method only exists to perform in-memory changes to the resource. Use available [code]set_*[/code] methods to add theme items.
@@ -29,90 +29,90 @@
</method>
<method name="clear_color">
<return type="void" />
- <argument index="0" name="name" type="StringName" />
- <argument index="1" name="theme_type" type="StringName" />
+ <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>
<method name="clear_constant">
<return type="void" />
- <argument index="0" name="name" type="StringName" />
- <argument index="1" name="theme_type" type="StringName" />
+ <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>
<method name="clear_font">
<return type="void" />
- <argument index="0" name="name" type="StringName" />
- <argument index="1" name="theme_type" type="StringName" />
+ <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>
<method name="clear_font_size">
<return type="void" />
- <argument index="0" name="name" type="StringName" />
- <argument index="1" name="theme_type" type="StringName" />
+ <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>
<method name="clear_icon">
<return type="void" />
- <argument index="0" name="name" type="StringName" />
- <argument index="1" name="theme_type" type="StringName" />
+ <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>
<method name="clear_stylebox">
<return type="void" />
- <argument index="0" name="name" type="StringName" />
- <argument index="1" name="theme_type" type="StringName" />
+ <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>
<method name="clear_theme_item">
<return type="void" />
- <argument index="0" name="data_type" type="int" enum="Theme.DataType" />
- <argument index="1" name="name" type="StringName" />
- <argument index="2" name="theme_type" type="StringName" />
+ <param index="0" name="data_type" type="int" enum="Theme.DataType" />
+ <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>
</method>
<method name="clear_type_variation">
<return type="void" />
- <argument index="0" name="theme_type" type="StringName" />
+ <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">
<return type="Color" />
- <argument index="0" name="name" type="StringName" />
- <argument index="1" name="theme_type" type="StringName" />
+ <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>
<method name="get_color_list" qualifiers="const">
<return type="PackedStringArray" />
- <argument index="0" name="theme_type" type="String" />
+ <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">
@@ -123,18 +123,18 @@
</method>
<method name="get_constant" qualifiers="const">
<return type="int" />
- <argument index="0" name="name" type="StringName" />
- <argument index="1" name="theme_type" type="StringName" />
+ <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>
<method name="get_constant_list" qualifiers="const">
<return type="PackedStringArray" />
- <argument index="0" name="theme_type" type="String" />
+ <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">
@@ -145,36 +145,36 @@
</method>
<method name="get_font" qualifiers="const">
<return type="Font" />
- <argument index="0" name="name" type="StringName" />
- <argument index="1" name="theme_type" type="StringName" />
+ <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.
</description>
</method>
<method name="get_font_list" qualifiers="const">
<return type="PackedStringArray" />
- <argument index="0" name="theme_type" type="String" />
+ <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">
<return type="int" />
- <argument index="0" name="name" type="StringName" />
- <argument index="1" name="theme_type" type="StringName" />
+ <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.
</description>
</method>
<method name="get_font_size_list" qualifiers="const">
<return type="PackedStringArray" />
- <argument index="0" name="theme_type" type="String" />
+ <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">
@@ -191,18 +191,18 @@
</method>
<method name="get_icon" qualifiers="const">
<return type="Texture2D" />
- <argument index="0" name="name" type="StringName" />
- <argument index="1" name="theme_type" type="StringName" />
+ <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 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. Use [method has_icon] to check for existence.
</description>
</method>
<method name="get_icon_list" qualifiers="const">
<return type="PackedStringArray" />
- <argument index="0" name="theme_type" type="String" />
+ <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">
@@ -213,18 +213,18 @@
</method>
<method name="get_stylebox" qualifiers="const">
<return type="StyleBox" />
- <argument index="0" name="name" type="StringName" />
- <argument index="1" name="theme_type" type="StringName" />
+ <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 [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. Use [method has_stylebox] to check for existence.
</description>
</method>
<method name="get_stylebox_list" qualifiers="const">
<return type="PackedStringArray" />
- <argument index="0" name="theme_type" type="String" />
+ <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">
@@ -235,29 +235,29 @@
</method>
<method name="get_theme_item" qualifiers="const">
<return type="Variant" />
- <argument index="0" name="data_type" type="int" enum="Theme.DataType" />
- <argument index="1" name="name" type="StringName" />
- <argument index="2" name="theme_type" type="StringName" />
+ <param index="0" name="data_type" type="int" enum="Theme.DataType" />
+ <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 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. 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>
<method name="get_theme_item_list" qualifiers="const">
<return type="PackedStringArray" />
- <argument index="0" name="data_type" type="int" enum="Theme.DataType" />
- <argument index="1" name="theme_type" type="String" />
+ <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>
<method name="get_theme_item_type_list" qualifiers="const">
<return type="PackedStringArray" />
- <argument index="0" name="data_type" type="int" enum="Theme.DataType" />
+ <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>
@@ -269,33 +269,33 @@
</method>
<method name="get_type_variation_base" qualifiers="const">
<return type="StringName" />
- <argument index="0" name="theme_type" 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" />
- <argument index="0" name="base_type" type="StringName" />
+ <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">
<return type="bool" />
- <argument index="0" name="name" type="StringName" />
- <argument index="1" name="theme_type" type="StringName" />
+ <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>
<method name="has_constant" qualifiers="const">
<return type="bool" />
- <argument index="0" name="name" type="StringName" />
- <argument index="1" name="theme_type" type="StringName" />
+ <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>
@@ -322,220 +322,220 @@
</method>
<method name="has_font" qualifiers="const">
<return type="bool" />
- <argument index="0" name="name" type="StringName" />
- <argument index="1" name="theme_type" type="StringName" />
+ <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>
<method name="has_font_size" qualifiers="const">
<return type="bool" />
- <argument index="0" name="name" type="StringName" />
- <argument index="1" name="theme_type" type="StringName" />
+ <param index="0" name="name" type="StringName" />
+ <param index="1" 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]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">
<return type="bool" />
- <argument index="0" name="name" type="StringName" />
- <argument index="1" name="theme_type" type="StringName" />
+ <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>
<method name="has_stylebox" qualifiers="const">
<return type="bool" />
- <argument index="0" name="name" type="StringName" />
- <argument index="1" name="theme_type" type="StringName" />
+ <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>
<method name="has_theme_item" qualifiers="const">
<return type="bool" />
- <argument index="0" name="data_type" type="int" enum="Theme.DataType" />
- <argument index="1" name="name" type="StringName" />
- <argument index="2" name="theme_type" type="StringName" />
+ <param index="0" name="data_type" type="int" enum="Theme.DataType" />
+ <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>
</method>
<method name="is_type_variation" qualifiers="const">
<return type="bool" />
- <argument index="0" name="theme_type" type="StringName" />
- <argument index="1" name="base_type" type="StringName" />
+ <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" />
- <argument index="0" name="other" type="Theme" />
+ <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>
<method name="remove_type">
<return type="void" />
- <argument index="0" name="theme_type" type="StringName" />
+ <param index="0" name="theme_type" type="StringName" />
<description>
Removes the theme type, gracefully discarding defined theme items. If the type is a variation, this information is also erased. If the type is a base for type variations, those variations lose their base.
</description>
</method>
<method name="rename_color">
<return type="void" />
- <argument index="0" name="old_name" type="StringName" />
- <argument index="1" name="name" type="StringName" />
- <argument index="2" name="theme_type" type="StringName" />
+ <param index="0" name="old_name" type="StringName" />
+ <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>
<method name="rename_constant">
<return type="void" />
- <argument index="0" name="old_name" type="StringName" />
- <argument index="1" name="name" type="StringName" />
- <argument index="2" name="theme_type" type="StringName" />
+ <param index="0" name="old_name" type="StringName" />
+ <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>
<method name="rename_font">
<return type="void" />
- <argument index="0" name="old_name" type="StringName" />
- <argument index="1" name="name" type="StringName" />
- <argument index="2" name="theme_type" type="StringName" />
+ <param index="0" name="old_name" type="StringName" />
+ <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>
<method name="rename_font_size">
<return type="void" />
- <argument index="0" name="old_name" type="StringName" />
- <argument index="1" name="name" type="StringName" />
- <argument index="2" name="theme_type" type="StringName" />
+ <param index="0" name="old_name" type="StringName" />
+ <param index="1" name="name" type="StringName" />
+ <param index="2" name="theme_type" type="StringName" />
<description>
- Renames the font size property defined by [code]old_name[/code] and [code]theme_type[/code] to [code]name[/code], if it exists.
+ 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">
<return type="void" />
- <argument index="0" name="old_name" type="StringName" />
- <argument index="1" name="name" type="StringName" />
- <argument index="2" name="theme_type" type="StringName" />
+ <param index="0" name="old_name" type="StringName" />
+ <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>
<method name="rename_stylebox">
<return type="void" />
- <argument index="0" name="old_name" type="StringName" />
- <argument index="1" name="name" type="StringName" />
- <argument index="2" name="theme_type" type="StringName" />
+ <param index="0" name="old_name" type="StringName" />
+ <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>
<method name="rename_theme_item">
<return type="void" />
- <argument index="0" name="data_type" type="int" enum="Theme.DataType" />
- <argument index="1" name="old_name" type="StringName" />
- <argument index="2" name="name" type="StringName" />
- <argument index="3" name="theme_type" type="StringName" />
+ <param index="0" name="data_type" type="int" enum="Theme.DataType" />
+ <param index="1" name="old_name" type="StringName" />
+ <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>
</method>
<method name="set_color">
<return type="void" />
- <argument index="0" name="name" type="StringName" />
- <argument index="1" name="theme_type" type="StringName" />
- <argument index="2" name="color" type="Color" />
+ <param index="0" name="name" type="StringName" />
+ <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">
<return type="void" />
- <argument index="0" name="name" type="StringName" />
- <argument index="1" name="theme_type" type="StringName" />
- <argument index="2" name="constant" type="int" />
+ <param index="0" name="name" type="StringName" />
+ <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">
<return type="void" />
- <argument index="0" name="name" type="StringName" />
- <argument index="1" name="theme_type" type="StringName" />
- <argument index="2" name="font" type="Font" />
+ <param index="0" name="name" type="StringName" />
+ <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">
<return type="void" />
- <argument index="0" name="name" type="StringName" />
- <argument index="1" name="theme_type" type="StringName" />
- <argument index="2" name="font_size" type="int" />
+ <param index="0" name="name" type="StringName" />
+ <param index="1" name="theme_type" type="StringName" />
+ <param index="2" name="font_size" type="int" />
<description>
- Creates or changes the value of the font size property defined by [code]name[/code] and [code]theme_type[/code]. Use [method clear_font_size] to remove the 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">
<return type="void" />
- <argument index="0" name="name" type="StringName" />
- <argument index="1" name="theme_type" type="StringName" />
- <argument index="2" name="texture" type="Texture2D" />
+ <param index="0" name="name" type="StringName" />
+ <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">
<return type="void" />
- <argument index="0" name="name" type="StringName" />
- <argument index="1" name="theme_type" type="StringName" />
- <argument index="2" name="texture" type="StyleBox" />
+ <param index="0" name="name" type="StringName" />
+ <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">
<return type="void" />
- <argument index="0" name="data_type" type="int" enum="Theme.DataType" />
- <argument index="1" name="name" type="StringName" />
- <argument index="2" name="theme_type" type="StringName" />
- <argument index="3" name="value" type="Variant" />
+ <param index="0" name="data_type" type="int" enum="Theme.DataType" />
+ <param index="1" name="name" type="StringName" />
+ <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>
<method name="set_type_variation">
<return type="void" />
- <argument index="0" name="theme_type" type="StringName" />
- <argument index="1" name="base_type" type="StringName" />
+ <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>
diff --git a/doc/classes/Thread.xml b/doc/classes/Thread.xml
index d78b8db052..846dae0bae 100644
--- a/doc/classes/Thread.xml
+++ b/doc/classes/Thread.xml
@@ -34,11 +34,12 @@
</method>
<method name="start">
<return type="int" enum="Error" />
- <argument index="0" name="callable" type="Callable" />
- <argument index="1" name="userdata" type="Variant" default="null" />
- <argument index="2" name="priority" type="int" enum="Thread.Priority" default="1" />
+ <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] with [code]userdata[/code] passed as an argument. Even if no userdata is passed, [code]callable[/code] must accept one argument and it will be null. The [code]priority[/code] of the [Thread] can be changed by passing a value from the [enum Priority] enum.
+ Starts a new [Thread] that calls [param callable].
+ If the method takes some arguments, you can pass them using [method Callable.bind].
+ 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 d5c2693f8b..798a536a88 100644
--- a/doc/classes/TileData.xml
+++ b/doc/classes/TileData.xml
@@ -9,188 +9,188 @@
<methods>
<method name="add_collision_polygon">
<return type="void" />
- <argument index="0" name="layer_id" type="int" />
+ <param index="0" name="layer_id" type="int" />
<description>
Adds a collision polygon to the tile on the given TileSet physics layer.
</description>
</method>
<method name="get_collision_polygon_one_way_margin" qualifiers="const">
<return type="float" />
- <argument index="0" name="layer_id" type="int" />
- <argument index="1" name="polygon_index" type="int" />
+ <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">
<return type="PackedVector2Array" />
- <argument index="0" name="layer_id" type="int" />
- <argument index="1" name="polygon_index" type="int" />
+ <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" />
- <argument index="0" name="layer_id" 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">
<return type="float" />
- <argument index="0" name="layer_id" type="int" />
+ <param index="0" name="layer_id" type="int" />
<description>
Returns the constant angular velocity applied to objects colliding with this tile.
</description>
</method>
<method name="get_constant_linear_velocity" qualifiers="const">
<return type="Vector2" />
- <argument index="0" name="layer_id" type="int" />
+ <param index="0" name="layer_id" type="int" />
<description>
Returns the constant linear velocity applied to objects colliding with this tile.
</description>
</method>
<method name="get_custom_data" qualifiers="const">
<return type="Variant" />
- <argument index="0" name="layer_name" type="String" />
+ <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" />
- <argument index="0" name="layer_id" type="int" />
+ <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" />
- <argument index="0" name="layer_id" type="int" />
+ <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" />
- <argument index="0" name="layer_id" type="int" />
+ <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_peering_bit_terrain" qualifiers="const">
+ <method name="get_terrain_peering_bit" qualifiers="const">
<return type="int" />
- <argument index="0" name="peering_bit" type="int" enum="TileSet.CellNeighbor" />
+ <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">
<return type="bool" />
- <argument index="0" name="layer_id" type="int" />
- <argument index="1" name="polygon_index" type="int" />
+ <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">
<return type="void" />
- <argument index="0" name="layer_id" type="int" />
- <argument index="1" name="polygon_index" type="int" />
+ <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">
<return type="void" />
- <argument index="0" name="layer_id" type="int" />
- <argument index="1" name="polygon_index" type="int" />
- <argument index="2" name="one_way" type="bool" />
+ <param index="0" name="layer_id" type="int" />
+ <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">
<return type="void" />
- <argument index="0" name="layer_id" type="int" />
- <argument index="1" name="polygon_index" type="int" />
- <argument index="2" name="one_way_margin" type="float" />
+ <param index="0" name="layer_id" type="int" />
+ <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">
<return type="void" />
- <argument index="0" name="layer_id" type="int" />
- <argument index="1" name="polygon_index" type="int" />
- <argument index="2" name="polygon" type="PackedVector2Array" />
+ <param index="0" name="layer_id" type="int" />
+ <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">
<return type="void" />
- <argument index="0" name="layer_id" type="int" />
- <argument index="1" name="polygons_count" type="int" />
+ <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">
<return type="void" />
- <argument index="0" name="layer_id" type="int" />
- <argument index="1" name="velocity" type="float" />
+ <param index="0" name="layer_id" type="int" />
+ <param index="1" name="velocity" type="float" />
<description>
Sets the constant angular velocity. This does not rotate the tile. This angular velocity is applied to objects colliding with this tile.
</description>
</method>
<method name="set_constant_linear_velocity">
<return type="void" />
- <argument index="0" name="layer_id" type="int" />
- <argument index="1" name="velocity" type="Vector2" />
+ <param index="0" name="layer_id" type="int" />
+ <param index="1" name="velocity" type="Vector2" />
<description>
Sets the constant linear velocity. This does not move the tile. This linear velocity is applied to objects colliding with this tile. This is useful to create conveyor belts.
</description>
</method>
<method name="set_custom_data">
<return type="void" />
- <argument index="0" name="layer_name" type="String" />
- <argument index="1" name="value" type="Variant" />
+ <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">
<return type="void" />
- <argument index="0" name="layer_id" type="int" />
- <argument index="1" name="value" type="Variant" />
+ <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">
<return type="void" />
- <argument index="0" name="layer_id" type="int" />
- <argument index="1" name="navigation_polygon" type="NavigationPolygon" />
+ <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">
<return type="void" />
- <argument index="0" name="layer_id" type="int" />
- <argument index="1" name="occluder_polygon" type="OccluderPolygon2D" />
+ <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_peering_bit_terrain">
+ <method name="set_terrain_peering_bit">
<return type="void" />
- <argument index="0" name="peering_bit" type="int" enum="TileSet.CellNeighbor" />
- <argument index="1" name="terrain" type="int" />
+ <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>
@@ -199,12 +199,15 @@
</member>
<member name="flip_v" type="bool" setter="set_flip_v" getter="get_flip_v" default="false">
</member>
- <member name="material" type="ShaderMaterial" setter="set_material" getter="get_material">
+ <member name="material" type="Material" setter="set_material" getter="get_material">
+ The [Material] to use for this [TileData]. This can be a [CanvasItemMaterial] to use the default shader, or a [ShaderMaterial] to use a custom shader.
</member>
<member name="modulate" type="Color" setter="set_modulate" getter="get_modulate" default="Color(1, 1, 1, 1)">
</member>
<member name="probability" type="float" setter="set_probability" getter="get_probability" default="1.0">
</member>
+ <member name="terrain" type="int" setter="set_terrain" getter="get_terrain" default="-1">
+ </member>
<member name="terrain_set" type="int" setter="set_terrain_set" getter="get_terrain_set" default="-1">
</member>
<member name="texture_offset" type="Vector2i" setter="set_texture_offset" getter="get_texture_offset" default="Vector2i(0, 0)">
diff --git a/doc/classes/TileMap.xml b/doc/classes/TileMap.xml
index 259c800a78..5530759628 100644
--- a/doc/classes/TileMap.xml
+++ b/doc/classes/TileMap.xml
@@ -18,30 +18,30 @@
<methods>
<method name="_tile_data_runtime_update" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="layer" type="int" />
- <argument index="1" name="coords" type="Vector2i" />
- <argument index="2" name="tile_data" type="TileData" />
+ <param index="0" name="layer" type="int" />
+ <param index="1" name="coords" type="Vector2i" />
+ <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">
<return type="bool" />
- <argument index="0" name="layer" type="int" />
- <argument index="1" name="coords" type="Vector2i" />
+ <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>
<method name="add_layer">
<return type="void" />
- <argument index="0" name="to_position" type="int" />
+ <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 -1, adds it at the end of the array.
</description>
</method>
<method name="clear">
@@ -52,17 +52,17 @@
</method>
<method name="clear_layer">
<return type="void" />
- <argument index="0" name="layer" type="int" />
+ <param index="0" name="layer" type="int" />
<description>
Clears all cells on the given layer.
</description>
</method>
<method name="erase_cell">
<return type="void" />
- <argument index="0" name="layer" type="int" />
- <argument index="1" name="coords" type="Vector2i" />
+ <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">
@@ -73,71 +73,81 @@
</method>
<method name="force_update">
<return type="void" />
- <argument index="0" name="layer" type="int" default="-1" />
+ <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" />
- <argument index="0" name="layer" type="int" />
- <argument index="1" name="coords" type="Vector2i" />
- <argument index="2" name="use_proxies" type="bool" />
+ <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 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" />
- <argument index="0" name="layer" type="int" />
- <argument index="1" name="coords" type="Vector2i" />
- <argument index="2" name="use_proxies" type="bool" />
+ <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 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" />
- <argument index="0" name="layer" type="int" />
- <argument index="1" name="coords" type="Vector2i" />
- <argument index="2" name="use_proxies" type="bool" />
+ <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 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">
<return type="Vector2i" />
- <argument index="0" name="body" type="RID" />
+ <param index="0" name="body" type="RID" />
<description>
Returns the coordinates of the tile for given physics body RID. Such RID can be retrieved from [method KinematicCollision2D.get_collider_rid], when colliding with a tile.
</description>
</method>
<method name="get_layer_modulate" qualifiers="const">
<return type="Color" />
- <argument index="0" name="layer" type="int" />
+ <param index="0" name="layer" type="int" />
<description>
Returns a TileMap layer's modulate.
</description>
</method>
<method name="get_layer_name" qualifiers="const">
<return type="String" />
- <argument index="0" name="layer" type="int" />
+ <param index="0" name="layer" type="int" />
<description>
Returns a TileMap layer's name.
</description>
</method>
<method name="get_layer_y_sort_origin" qualifiers="const">
<return type="int" />
- <argument index="0" name="layer" type="int" />
+ <param index="0" name="layer" type="int" />
<description>
Returns a TileMap layer's Y sort origin.
</description>
</method>
<method name="get_layer_z_index" qualifiers="const">
<return type="int" />
- <argument index="0" name="layer" type="int" />
+ <param index="0" name="layer" type="int" />
<description>
Returns a TileMap layer's Z-index value.
</description>
@@ -149,30 +159,30 @@
</method>
<method name="get_neighbor_cell" qualifiers="const">
<return type="Vector2i" />
- <argument index="0" name="coords" type="Vector2i" />
- <argument index="1" name="neighbor" type="int" enum="TileSet.CellNeighbor" />
+ <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">
<return type="TileMapPattern" />
- <argument index="0" name="layer" type="int" />
- <argument index="1" name="coords_array" type="Vector2i[]" />
+ <param index="0" name="layer" type="int" />
+ <param index="1" name="coords_array" type="Vector2i[]" />
<description>
Creates a new [TileMapPattern] from the given layer and set of cells.
</description>
</method>
<method name="get_surrounding_tiles">
<return type="Vector2i[]" />
- <argument index="0" name="coords" 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">
<return type="Vector2i[]" />
- <argument index="0" name="layer" type="int" />
+ <param index="0" name="layer" type="int" />
<description>
Returns a [Vector2] array with the positions of all cells containing a tile in the given layer. A cell is considered empty if its source identifier equals -1, its atlas coordinates identifiers is [code]Vector2(-1, -1)[/code] and its alternative identifier is -1.
</description>
@@ -185,30 +195,30 @@
</method>
<method name="is_layer_enabled" qualifiers="const">
<return type="bool" />
- <argument index="0" name="layer" type="int" />
+ <param index="0" name="layer" type="int" />
<description>
Returns if a layer is enabled.
</description>
</method>
<method name="is_layer_y_sort_enabled" qualifiers="const">
<return type="bool" />
- <argument index="0" name="layer" type="int" />
+ <param index="0" name="layer" type="int" />
<description>
Returns if a layer Y-sorts its tiles.
</description>
</method>
<method name="map_pattern">
<return type="Vector2i" />
- <argument index="0" name="position_in_tilemap" type="Vector2i" />
- <argument index="1" name="coords_in_pattern" type="Vector2i" />
- <argument index="2" name="pattern" type="TileMapPattern" />
+ <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">
<return type="Vector2" />
- <argument index="0" name="map_position" type="Vector2i" />
+ <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.
@@ -216,72 +226,87 @@
</method>
<method name="move_layer">
<return type="void" />
- <argument index="0" name="layer" type="int" />
- <argument index="1" name="to_position" type="int" />
+ <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" />
- <argument index="0" name="layer" type="int" />
+ <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">
<return type="void" />
- <argument index="0" name="layer" type="int" />
- <argument index="1" name="coords" type="Vector2i" />
- <argument index="2" name="source_id" type="int" default="-1" />
- <argument index="3" name="atlas_coords" type="Vector2i" default="Vector2i(-1, -1)" />
- <argument index="4" name="alternative_tile" type="int" default="0" />
+ <param index="0" name="layer" type="int" />
+ <param index="1" name="coords" type="Vector2i" />
+ <param index="2" name="source_id" type="int" default="-1" />
+ <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 [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">
+ <return type="void" />
+ <param index="0" name="layer" type="int" />
+ <param index="1" name="cells" type="Vector2i[]" />
+ <param index="2" name="terrain_set" type="int" />
+ <param index="3" name="terrain" type="int" />
+ <param index="4" name="ignore_empty_terrains" type="bool" default="true" />
<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].
+ 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>
- <method name="set_cells_from_surrounding_terrains">
+ <method name="set_cells_terrain_path">
<return type="void" />
- <argument index="0" name="layer" type="int" />
- <argument index="1" name="cells" type="Vector2i[]" />
- <argument index="2" name="terrain_set" type="int" />
- <argument index="3" name="ignore_empty_terrains" type="bool" default="true" />
+ <param index="0" name="layer" type="int" />
+ <param index="1" name="path" type="Vector2i[]" />
+ <param index="2" name="terrain_set" type="int" />
+ <param index="3" name="terrain" type="int" />
+ <param index="4" name="ignore_empty_terrains" type="bool" default="true" />
<description>
- Updates all the cells in the [code]cells[/code] coordinates array and replace them by tiles that matches the surrounding cells terrains. Only cells form the given [code]terrain_set[/code] are considered.
- If [code]ignore_empty_terrains[/code] is true, zones with no terrain defined are ignored to select the tiles.
+ 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>
<method name="set_layer_enabled">
<return type="void" />
- <argument index="0" name="layer" type="int" />
- <argument index="1" name="enabled" type="bool" />
+ <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...).
</description>
</method>
<method name="set_layer_modulate">
<return type="void" />
- <argument index="0" name="layer" type="int" />
- <argument index="1" name="enabled" type="Color" />
+ <param index="0" name="layer" type="int" />
+ <param index="1" name="enabled" type="Color" />
<description>
Sets a layer's color. It will be multiplied by tile's color and TileMap's modulate.
</description>
</method>
<method name="set_layer_name">
<return type="void" />
- <argument index="0" name="layer" type="int" />
- <argument index="1" name="name" type="String" />
+ <param index="0" name="layer" type="int" />
+ <param index="1" name="name" type="String" />
<description>
Sets a layer's name. This is mostly useful in the editor.
</description>
</method>
<method name="set_layer_y_sort_enabled">
<return type="void" />
- <argument index="0" name="layer" type="int" />
- <argument index="1" name="y_sort_enabled" type="bool" />
+ <param index="0" name="layer" type="int" />
+ <param index="1" name="y_sort_enabled" type="bool" />
<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.
@@ -289,8 +314,8 @@
</method>
<method name="set_layer_y_sort_origin">
<return type="void" />
- <argument index="0" name="layer" type="int" />
- <argument index="1" name="y_sort_origin" type="int" />
+ <param index="0" name="layer" type="int" />
+ <param index="1" name="y_sort_origin" type="int" />
<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.
@@ -298,24 +323,24 @@
</method>
<method name="set_layer_z_index">
<return type="void" />
- <argument index="0" name="layer" type="int" />
- <argument index="1" name="z_index" type="int" />
+ <param index="0" name="layer" type="int" />
+ <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.
</description>
</method>
<method name="set_pattern">
<return type="void" />
- <argument index="0" name="layer" type="int" />
- <argument index="1" name="position" type="Vector2i" />
- <argument index="2" name="pattern" type="TileMapPattern" />
+ <param index="0" name="layer" type="int" />
+ <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.
+ Paste the given [TileMapPattern] at the given [param position] and [param layer] in the tile map.
</description>
</method>
<method name="world_to_map" qualifiers="const">
<return type="Vector2i" />
- <argument index="0" name="world_position" type="Vector2" />
+ <param index="0" name="world_position" type="Vector2" />
<description>
Returns the tilemap (grid-based) coordinates corresponding to the given local position.
</description>
diff --git a/doc/classes/TileMapPattern.xml b/doc/classes/TileMapPattern.xml
index 5fe514d3da..30bb174313 100644
--- a/doc/classes/TileMapPattern.xml
+++ b/doc/classes/TileMapPattern.xml
@@ -12,23 +12,23 @@
<methods>
<method name="get_cell_alternative_tile" qualifiers="const">
<return type="int" />
- <argument index="0" name="coords" type="Vector2i" />
+ <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" />
- <argument index="0" name="coords" 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" />
- <argument index="0" name="coords" type="Vector2i" />
+ <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">
@@ -45,7 +45,7 @@
</method>
<method name="has_cell" qualifiers="const">
<return type="bool" />
- <argument index="0" name="coords" type="Vector2i" />
+ <param index="0" name="coords" type="Vector2i" />
<description>
Returns whether the pattern has a tile at the given coordinates.
</description>
@@ -58,25 +58,25 @@
</method>
<method name="remove_cell">
<return type="void" />
- <argument index="0" name="coords" type="Vector2i" />
- <argument index="1" name="update_size" type="bool" />
+ <param index="0" name="coords" type="Vector2i" />
+ <param index="1" name="update_size" type="bool" />
<description>
Remove the cell at the given coordinates.
</description>
</method>
<method name="set_cell">
<return type="void" />
- <argument index="0" name="coords" type="Vector2i" />
- <argument index="1" name="source_id" type="int" default="-1" />
- <argument index="2" name="atlas_coords" type="Vector2i" default="Vector2i(-1, -1)" />
- <argument index="3" name="alternative_tile" type="int" default="-1" />
+ <param index="0" name="coords" type="Vector2i" />
+ <param index="1" name="source_id" type="int" default="-1" />
+ <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">
<return type="void" />
- <argument index="0" name="size" type="Vector2i" />
+ <param index="0" name="size" type="Vector2i" />
<description>
Sets the size of the pattern.
</description>
diff --git a/doc/classes/TileSet.xml b/doc/classes/TileSet.xml
index 809992b58f..7ced16d1af 100644
--- a/doc/classes/TileSet.xml
+++ b/doc/classes/TileSet.xml
@@ -24,66 +24,66 @@
<methods>
<method name="add_custom_data_layer">
<return type="void" />
- <argument index="0" name="to_position" type="int" default="-1" />
+ <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>
<method name="add_navigation_layer">
<return type="void" />
- <argument index="0" name="to_position" type="int" default="-1" />
+ <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>
<method name="add_occlusion_layer">
<return type="void" />
- <argument index="0" name="to_position" type="int" default="-1" />
+ <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>
<method name="add_pattern">
<return type="int" />
- <argument index="0" name="pattern" type="TileMapPattern" />
- <argument index="1" name="index" type="int" default="-1" />
+ <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" />
- <argument index="0" name="to_position" type="int" default="-1" />
+ <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>
<method name="add_source">
<return type="int" />
- <argument index="0" name="source" type="TileSetSource" />
- <argument index="1" name="atlas_source_id_override" type="int" default="-1" />
+ <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>
<method name="add_terrain">
<return type="void" />
- <argument index="0" name="terrain_set" type="int" />
- <argument index="1" name="to_position" type="int" default="-1" />
+ <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" />
- <argument index="0" name="to_position" type="int" default="-1" />
+ <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">
@@ -100,9 +100,9 @@
</method>
<method name="get_alternative_level_tile_proxy">
<return type="Array" />
- <argument index="0" name="source_from" type="int" />
- <argument index="1" name="coords_from" type="Vector2i" />
- <argument index="2" name="alternative_from" type="int" />
+ <param index="0" name="source_from" type="int" />
+ <param index="1" name="coords_from" type="Vector2i" />
+ <param index="2" name="alternative_from" type="int" />
<description>
Returns the alternative-level proxy for the given identifiers. The returned array contains the three proxie's target identifiers (source ID, atlas coords ID and alternative tile ID).
If the TileSet has no proxy for the given identifiers, returns an empty Array.
@@ -110,13 +110,34 @@
</method>
<method name="get_coords_level_tile_proxy">
<return type="Array" />
- <argument index="0" name="source_from" type="int" />
- <argument index="1" name="coords_from" type="Vector2i" />
+ <param index="0" name="source_from" type="int" />
+ <param index="1" name="coords_from" type="Vector2i" />
<description>
- Returns the coodinate-level proxy for the given identifiers. The returned array contains the two proxie's target identifiers (source ID and atlas coords ID).
+ Returns the coordinate-level proxy for the given identifiers. The returned array contains the two target identifiers of the proxy (source ID and atlas coordinates ID).
If the TileSet has no proxy for the given identifiers, returns an empty Array.
</description>
</method>
+ <method name="get_custom_data_layer_by_name" qualifiers="const">
+ <return type="int" />
+ <param index="0" name="layer_name" type="String" />
+ <description>
+ Returns the index of the custom data layer identified by the given name.
+ </description>
+ </method>
+ <method name="get_custom_data_layer_name" qualifiers="const">
+ <return type="String" />
+ <param index="0" name="layer_index" type="int" />
+ <description>
+ Returns the name of the custom data layer identified by the given index.
+ </description>
+ </method>
+ <method name="get_custom_data_layer_type" qualifiers="const">
+ <return type="int" enum="Variant.Type" />
+ <param index="0" name="layer_index" type="int" />
+ <description>
+ Returns the type of the custom data layer identified by the given index.
+ </description>
+ </method>
<method name="get_custom_data_layers_count" qualifiers="const">
<return type="int" />
<description>
@@ -125,7 +146,7 @@
</method>
<method name="get_navigation_layer_layers" qualifiers="const">
<return type="int" />
- <argument index="0" name="layer_index" type="int" />
+ <param index="0" name="layer_index" type="int" />
<description>
Returns the navigation layers (as in the Navigation server) of the gives TileSet navigation layer.
</description>
@@ -144,14 +165,14 @@
</method>
<method name="get_occlusion_layer_light_mask" qualifiers="const">
<return type="int" />
- <argument index="0" name="layer_index" type="int" />
+ <param index="0" name="layer_index" type="int" />
<description>
Returns the light mask of the occlusion layer.
</description>
</method>
<method name="get_occlusion_layer_sdf_collision" qualifiers="const">
<return type="bool" />
- <argument index="0" name="layer_index" type="int" />
+ <param index="0" name="layer_index" type="int" />
<description>
Returns if the occluders from this layer use [code]sdf_collision[/code].
</description>
@@ -164,9 +185,9 @@
</method>
<method name="get_pattern">
<return type="TileMapPattern" />
- <argument index="0" name="index" type="int" default="-1" />
+ <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">
@@ -177,21 +198,21 @@
</method>
<method name="get_physics_layer_collision_layer" qualifiers="const">
<return type="int" />
- <argument index="0" name="layer_index" type="int" />
+ <param index="0" name="layer_index" type="int" />
<description>
Returns the collision layer (as in the physics server) bodies on the given TileSet's physics layer are in.
</description>
</method>
<method name="get_physics_layer_collision_mask" qualifiers="const">
<return type="int" />
- <argument index="0" name="layer_index" type="int" />
+ <param index="0" name="layer_index" type="int" />
<description>
Returns the collision mask of bodies on the given TileSet's physics layer.
</description>
</method>
<method name="get_physics_layer_physics_material" qualifiers="const">
<return type="PhysicsMaterial" />
- <argument index="0" name="layer_index" type="int" />
+ <param index="0" name="layer_index" type="int" />
<description>
Returns the physics material of bodies on the given TileSet's physics layer.
</description>
@@ -204,9 +225,9 @@
</method>
<method name="get_source" qualifiers="const">
<return type="TileSetSource" />
- <argument index="0" name="source_id" type="int" />
+ <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">
@@ -217,14 +238,14 @@
</method>
<method name="get_source_id" qualifiers="const">
<return type="int" />
- <argument index="0" name="index" 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">
<return type="int" />
- <argument index="0" name="source_from" type="int" />
+ <param index="0" name="source_from" type="int" />
<description>
Returns the source-level proxy for the given source identifier.
If the TileSet has no proxy for the given identifier, returns -1.
@@ -232,23 +253,23 @@
</method>
<method name="get_terrain_color" qualifiers="const">
<return type="Color" />
- <argument index="0" name="terrain_set" type="int" />
- <argument index="1" name="terrain_index" type="int" />
+ <param index="0" name="terrain_set" type="int" />
+ <param index="1" name="terrain_index" type="int" />
<description>
Returns a terrain's color.
</description>
</method>
<method name="get_terrain_name" qualifiers="const">
<return type="String" />
- <argument index="0" name="terrain_set" type="int" />
- <argument index="1" name="terrain_index" type="int" />
+ <param index="0" name="terrain_set" type="int" />
+ <param index="1" name="terrain_index" type="int" />
<description>
Returns a terrain's name.
</description>
</method>
<method name="get_terrain_set_mode" qualifiers="const">
<return type="int" enum="TileSet.TerrainMode" />
- <argument index="0" name="terrain_set" type="int" />
+ <param index="0" name="terrain_set" type="int" />
<description>
Returns a terrain set mode.
</description>
@@ -261,47 +282,47 @@
</method>
<method name="get_terrains_count" qualifiers="const">
<return type="int" />
- <argument index="0" name="terrain_set" type="int" />
+ <param index="0" name="terrain_set" type="int" />
<description>
Returns the number of terrains in the given terrain set.
</description>
</method>
<method name="has_alternative_level_tile_proxy">
<return type="bool" />
- <argument index="0" name="source_from" type="int" />
- <argument index="1" name="coords_from" type="Vector2i" />
- <argument index="2" name="alternative_from" type="int" />
+ <param index="0" name="source_from" type="int" />
+ <param index="1" name="coords_from" type="Vector2i" />
+ <param index="2" name="alternative_from" type="int" />
<description>
Returns if there is and alternative-level proxy for the given identifiers.
</description>
</method>
<method name="has_coords_level_tile_proxy">
<return type="bool" />
- <argument index="0" name="source_from" type="int" />
- <argument index="1" name="coords_from" type="Vector2i" />
+ <param index="0" name="source_from" type="int" />
+ <param index="1" name="coords_from" type="Vector2i" />
<description>
Returns if there is a coodinates-level proxy for the given identifiers.
</description>
</method>
<method name="has_source" qualifiers="const">
<return type="bool" />
- <argument index="0" name="source_id" type="int" />
+ <param index="0" name="source_id" type="int" />
<description>
Returns if this TileSet has a source for the given source ID.
</description>
</method>
<method name="has_source_level_tile_proxy">
<return type="bool" />
- <argument index="0" name="source_from" type="int" />
+ <param index="0" name="source_from" type="int" />
<description>
Returns if there is a source-level proxy for the given source ID.
</description>
</method>
<method name="map_tile_proxy" qualifiers="const">
<return type="Array" />
- <argument index="0" name="source_from" type="int" />
- <argument index="1" name="coords_from" type="Vector2i" />
- <argument index="2" name="alternative_from" type="int" />
+ <param index="0" name="source_from" type="int" />
+ <param index="1" name="coords_from" type="Vector2i" />
+ <param index="2" name="alternative_from" type="int" />
<description>
According to the configured proxies, maps the provided indentifiers to a new set of identifiers. The source ID, atlas coordinates ID and alternative tile ID are returned as a 3 elements Array.
This function first look for matching alternative-level proxies, then coordinates-level proxies, then source-level proxies.
@@ -310,142 +331,142 @@
</method>
<method name="move_custom_data_layer">
<return type="void" />
- <argument index="0" name="layer_index" type="int" />
- <argument index="1" name="to_position" type="int" />
+ <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">
<return type="void" />
- <argument index="0" name="layer_index" type="int" />
- <argument index="1" name="to_position" type="int" />
+ <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">
<return type="void" />
- <argument index="0" name="layer_index" type="int" />
- <argument index="1" name="to_position" type="int" />
+ <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">
<return type="void" />
- <argument index="0" name="layer_index" type="int" />
- <argument index="1" name="to_position" type="int" />
+ <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">
<return type="void" />
- <argument index="0" name="terrain_set" type="int" />
- <argument index="1" name="terrain_index" type="int" />
- <argument index="2" name="to_position" type="int" />
+ <param index="0" name="terrain_set" type="int" />
+ <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">
<return type="void" />
- <argument index="0" name="terrain_set" type="int" />
- <argument index="1" name="to_position" type="int" />
+ <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">
<return type="void" />
- <argument index="0" name="source_from" type="int" />
- <argument index="1" name="coords_from" type="Vector2i" />
- <argument index="2" name="alternative_from" type="int" />
+ <param index="0" name="source_from" type="int" />
+ <param index="1" name="coords_from" type="Vector2i" />
+ <param index="2" name="alternative_from" type="int" />
<description>
Removes an alternative-level proxy for the given identifiers.
</description>
</method>
<method name="remove_coords_level_tile_proxy">
<return type="void" />
- <argument index="0" name="source_from" type="int" />
- <argument index="1" name="coords_from" type="Vector2i" />
+ <param index="0" name="source_from" type="int" />
+ <param index="1" name="coords_from" type="Vector2i" />
<description>
Removes a coordinates-level proxy for the given identifiers.
</description>
</method>
<method name="remove_custom_data_layer">
<return type="void" />
- <argument index="0" name="layer_index" type="int" />
+ <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" />
- <argument index="0" name="layer_index" type="int" />
+ <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" />
- <argument index="0" name="layer_index" type="int" />
+ <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">
<return type="void" />
- <argument index="0" name="index" type="int" />
+ <param index="0" name="index" type="int" />
<description>
Remove the [TileMapPattern] at the given index.
</description>
</method>
<method name="remove_physics_layer">
<return type="void" />
- <argument index="0" name="layer_index" type="int" />
+ <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">
<return type="void" />
- <argument index="0" name="source_id" type="int" />
+ <param index="0" name="source_id" type="int" />
<description>
Removes the source with the given source ID.
</description>
</method>
<method name="remove_source_level_tile_proxy">
<return type="void" />
- <argument index="0" name="source_from" type="int" />
+ <param index="0" name="source_from" type="int" />
<description>
Removes a source-level tile proxy.
</description>
</method>
<method name="remove_terrain">
<return type="void" />
- <argument index="0" name="terrain_set" type="int" />
- <argument index="1" name="terrain_index" type="int" />
+ <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" />
- <argument index="0" name="terrain_set" type="int" />
+ <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">
<return type="void" />
- <argument index="0" name="source_from" type="int" />
- <argument index="1" name="coords_from" type="Vector2i" />
- <argument index="2" name="alternative_from" type="int" />
- <argument index="3" name="source_to" type="int" />
- <argument index="4" name="coords_to" type="Vector2i" />
- <argument index="5" name="alternative_to" type="int" />
+ <param index="0" name="source_from" type="int" />
+ <param index="1" name="coords_from" type="Vector2i" />
+ <param index="2" name="alternative_from" type="int" />
+ <param index="3" name="source_to" type="int" />
+ <param index="4" name="coords_to" type="Vector2i" />
+ <param index="5" name="alternative_to" type="int" />
<description>
Create an alternative-level proxy for the given identifiers. A proxy will map set of tile identifiers to another set of identifiers.
This can be used to replace a tile in all TileMaps using this TileSet, as TileMap nodes will find and use the proxy's target tile when one is available.
@@ -454,76 +475,92 @@
</method>
<method name="set_coords_level_tile_proxy">
<return type="void" />
- <argument index="0" name="p_source_from" type="int" />
- <argument index="1" name="coords_from" type="Vector2i" />
- <argument index="2" name="source_to" type="int" />
- <argument index="3" name="coords_to" type="Vector2i" />
+ <param index="0" name="p_source_from" type="int" />
+ <param index="1" name="coords_from" type="Vector2i" />
+ <param index="2" name="source_to" type="int" />
+ <param index="3" name="coords_to" type="Vector2i" />
<description>
Creates a coordinates-level proxy for the given identifiers. A proxy will map set of tile identifiers to another set of identifiers. The alternative tile ID is kept the same when using coordinates-level proxies.
This can be used to replace a tile in all TileMaps using this TileSet, as TileMap nodes will find and use the proxy's target tile when one is available.
Proxied tiles can be automatically replaced in TileMap nodes using the editor.
</description>
</method>
+ <method name="set_custom_data_layer_name">
+ <return type="void" />
+ <param index="0" name="layer_index" type="int" />
+ <param index="1" name="layer_name" type="String" />
+ <description>
+ Sets the name of the custom data layer identified by the given index. Names are identifiers of the layer therefore if the name is already taken it will fail and raise an error.
+ </description>
+ </method>
+ <method name="set_custom_data_layer_type">
+ <return type="void" />
+ <param index="0" name="layer_index" type="int" />
+ <param index="1" name="layer_type" type="int" enum="Variant.Type" />
+ <description>
+ Sets the type of the custom data layer identified by the given index.
+ </description>
+ </method>
<method name="set_navigation_layer_layers">
<return type="void" />
- <argument index="0" name="layer_index" type="int" />
- <argument index="1" name="layers" type="int" />
+ <param index="0" name="layer_index" type="int" />
+ <param index="1" name="layers" type="int" />
<description>
Sets the navigation layers (as in the navigation server) for navigation regions is the given TileSet navigation layer.
</description>
</method>
<method name="set_occlusion_layer_light_mask">
<return type="void" />
- <argument index="0" name="layer_index" type="int" />
- <argument index="1" name="light_mask" type="int" />
+ <param index="0" name="layer_index" type="int" />
+ <param index="1" name="light_mask" type="int" />
<description>
Sets the occlusion layer (as in the rendering server) for occluders in the given TileSet occlusion layer.
</description>
</method>
<method name="set_occlusion_layer_sdf_collision">
<return type="void" />
- <argument index="0" name="layer_index" type="int" />
- <argument index="1" name="sdf_collision" type="bool" />
+ <param index="0" name="layer_index" type="int" />
+ <param index="1" name="sdf_collision" type="bool" />
<description>
Enables or disables sdf collision for occluders in the given TileSet occlusion layer.
</description>
</method>
<method name="set_physics_layer_collision_layer">
<return type="void" />
- <argument index="0" name="layer_index" type="int" />
- <argument index="1" name="layer" type="int" />
+ <param index="0" name="layer_index" type="int" />
+ <param index="1" name="layer" type="int" />
<description>
Sets the physics layer (as in the physics server) for bodies in the given TileSet physics layer.
</description>
</method>
<method name="set_physics_layer_collision_mask">
<return type="void" />
- <argument index="0" name="layer_index" type="int" />
- <argument index="1" name="mask" type="int" />
+ <param index="0" name="layer_index" type="int" />
+ <param index="1" name="mask" type="int" />
<description>
Sets the physics layer (as in the physics server) for bodies in the given TileSet physics layer.
</description>
</method>
<method name="set_physics_layer_physics_material">
<return type="void" />
- <argument index="0" name="layer_index" type="int" />
- <argument index="1" name="physics_material" type="PhysicsMaterial" />
+ <param index="0" name="layer_index" type="int" />
+ <param index="1" name="physics_material" type="PhysicsMaterial" />
<description>
Sets the physics material for bodies in the given TileSet physics layer.
</description>
</method>
<method name="set_source_id">
<return type="void" />
- <argument index="0" name="source_id" type="int" />
- <argument index="1" name="new_source_id" type="int" />
+ <param index="0" name="source_id" type="int" />
+ <param index="1" name="new_source_id" type="int" />
<description>
Changes a source's ID.
</description>
</method>
<method name="set_source_level_tile_proxy">
<return type="void" />
- <argument index="0" name="source_from" type="int" />
- <argument index="1" name="source_to" type="int" />
+ <param index="0" name="source_from" type="int" />
+ <param index="1" name="source_to" type="int" />
<description>
Creates a source-level proxy for the given source ID. A proxy will map set of tile identifiers to another set of identifiers. Both the atlac coordinates ID and the alternative tile ID are kept the same when using source-level proxies.
This can be used to replace a source in all TileMaps using this TileSet, as TileMap nodes will find and use the proxy's target source when one is available.
@@ -532,26 +569,26 @@
</method>
<method name="set_terrain_color">
<return type="void" />
- <argument index="0" name="terrain_set" type="int" />
- <argument index="1" name="terrain_index" type="int" />
- <argument index="2" name="color" type="Color" />
+ <param index="0" name="terrain_set" type="int" />
+ <param index="1" name="terrain_index" type="int" />
+ <param index="2" name="color" type="Color" />
<description>
Sets a terrain's color. This color is used for identifying the different terrains in the TileSet editor.
</description>
</method>
<method name="set_terrain_name">
<return type="void" />
- <argument index="0" name="terrain_set" type="int" />
- <argument index="1" name="terrain_index" type="int" />
- <argument index="2" name="name" type="String" />
+ <param index="0" name="terrain_set" type="int" />
+ <param index="1" name="terrain_index" type="int" />
+ <param index="2" name="name" type="String" />
<description>
Sets a terrain's name.
</description>
</method>
<method name="set_terrain_set_mode">
<return type="void" />
- <argument index="0" name="terrain_set" type="int" />
- <argument index="1" name="mode" type="int" enum="TileSet.TerrainMode" />
+ <param index="0" name="terrain_set" type="int" />
+ <param index="1" name="mode" type="int" enum="TileSet.TerrainMode" />
<description>
Sets a terrain mode. Each mode determines which bits of a tile shape is used to match the neighbouring tiles' terrains.
</description>
@@ -591,7 +628,7 @@
Tile coordinates layout where both axis stay consistent with their respective local horizontal and vertical axis.
</constant>
<constant name="TILE_LAYOUT_STACKED_OFFSET" value="1" enum="TileLayout">
- Same as [code]TILE_LAYOUT_STAKED[/code], but the first half-offset is negative instead of positive.
+ Same as [constant TILE_LAYOUT_STACKED], but the first half-offset is negative instead of positive.
</constant>
<constant name="TILE_LAYOUT_STAIRS_RIGHT" value="2" enum="TileLayout">
Tile coordinates layout where the horizontal axis stay horizontal, and the vertical one goes down-right.
diff --git a/doc/classes/TileSetAtlasSource.xml b/doc/classes/TileSetAtlasSource.xml
index db4e52f661..df469cd030 100644
--- a/doc/classes/TileSetAtlasSource.xml
+++ b/doc/classes/TileSetAtlasSource.xml
@@ -17,19 +17,19 @@
<methods>
<method name="create_alternative_tile">
<return type="int" />
- <argument index="0" name="atlas_coords" type="Vector2i" />
- <argument index="1" name="alternative_id_override" type="int" default="-1" />
+ <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">
<return type="void" />
- <argument index="0" name="atlas_coords" type="Vector2i" />
- <argument index="1" name="size" type="Vector2i" default="Vector2i(1, 1)" />
+ <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">
@@ -40,7 +40,7 @@
</method>
<method name="get_next_alternative_tile_id" qualifiers="const">
<return type="int" />
- <argument index="0" name="atlas_coords" type="Vector2i" />
+ <param index="0" name="atlas_coords" type="Vector2i" />
<description>
Returns the alternative ID a following call to [method create_alternative_tile] would return.
</description>
@@ -53,184 +53,184 @@
</method>
<method name="get_runtime_tile_texture_region" qualifiers="const">
<return type="Rect2i" />
- <argument index="0" name="atlas_coords" type="Vector2i" />
- <argument index="1" name="frame" type="int" />
+ <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>
<method name="get_tile_animation_columns" qualifiers="const">
<return type="int" />
- <argument index="0" name="atlas_coords" type="Vector2i" />
+ <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">
<return type="float" />
- <argument index="0" name="atlas_coords" type="Vector2i" />
- <argument index="1" name="frame_index" type="int" />
+ <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" />
- <argument index="0" name="atlas_coords" type="Vector2i" />
+ <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" />
- <argument index="0" name="atlas_coords" 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" />
- <argument index="0" name="atlas_coords" type="Vector2i" />
+ <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" />
- <argument index="0" name="atlas_coords" type="Vector2i" />
+ <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" />
- <argument index="0" name="atlas_coords" 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">
<return type="TileData" />
- <argument index="0" name="atlas_coords" type="Vector2i" />
- <argument index="1" name="alternative_tile" type="int" />
+ <param index="0" name="atlas_coords" type="Vector2i" />
+ <param index="1" name="alternative_tile" type="int" />
<description>
Returns the [TileData] object for the given atlas coordinates and alternative ID.
</description>
</method>
<method name="get_tile_size_in_atlas" qualifiers="const">
<return type="Vector2i" />
- <argument index="0" name="atlas_coords" 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">
<return type="Rect2i" />
- <argument index="0" name="atlas_coords" type="Vector2i" />
- <argument index="1" name="frame" type="int" default="0" />
+ <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">
<return type="PackedVector2Array" />
- <argument index="0" name="texture" type="Texture2D" />
- <argument index="1" name="margins" type="Vector2i" />
- <argument index="2" name="separation" type="Vector2i" />
- <argument index="3" name="texture_region_size" type="Vector2i" />
+ <param index="0" name="texture" type="Texture2D" />
+ <param index="1" name="margins" type="Vector2i" />
+ <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">
<return type="bool" />
- <argument index="0" name="atlas_coords" type="Vector2i" />
- <argument index="1" name="size" type="Vector2i" />
- <argument index="2" name="animation_columns" type="int" />
- <argument index="3" name="animation_separation" type="Vector2i" />
- <argument index="4" name="frames_count" type="int" />
- <argument index="5" name="ignored_tile" type="Vector2i" default="Vector2i(-1, -1)" />
+ <param index="0" name="atlas_coords" type="Vector2i" />
+ <param index="1" name="size" type="Vector2i" />
+ <param index="2" name="animation_columns" type="int" />
+ <param index="3" name="animation_separation" type="Vector2i" />
+ <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">
<return type="void" />
- <argument index="0" name="atlas_coords" type="Vector2i" />
- <argument index="1" name="new_atlas_coords" type="Vector2i" default="Vector2i(-1, -1)" />
- <argument index="2" name="new_size" type="Vector2i" default="Vector2i(-1, -1)" />
+ <param index="0" name="atlas_coords" type="Vector2i" />
+ <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>
<method name="remove_alternative_tile">
<return type="void" />
- <argument index="0" name="atlas_coords" type="Vector2i" />
- <argument index="1" name="alternative_tile" type="int" />
+ <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" />
- <argument index="0" name="atlas_coords" type="Vector2i" />
+ <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">
<return type="void" />
- <argument index="0" name="atlas_coords" type="Vector2i" />
- <argument index="1" name="alternative_tile" type="int" />
- <argument index="2" name="new_id" type="int" />
+ <param index="0" name="atlas_coords" type="Vector2i" />
+ <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">
<return type="void" />
- <argument index="0" name="atlas_coords" type="Vector2i" />
- <argument index="1" name="frame_columns" type="int" />
+ <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">
<return type="void" />
- <argument index="0" name="atlas_coords" type="Vector2i" />
- <argument index="1" name="frame_index" type="int" />
- <argument index="2" name="duration" type="float" />
+ <param index="0" name="atlas_coords" type="Vector2i" />
+ <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">
<return type="void" />
- <argument index="0" name="atlas_coords" type="Vector2i" />
- <argument index="1" name="frames_count" type="int" />
+ <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">
<return type="void" />
- <argument index="0" name="atlas_coords" type="Vector2i" />
- <argument index="1" name="separation" type="Vector2i" />
+ <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">
<return type="void" />
- <argument index="0" name="atlas_coords" type="Vector2i" />
- <argument index="1" name="speed" type="float" />
+ <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 a8ef253933..ec8fe2ad54 100644
--- a/doc/classes/TileSetScenesCollectionSource.xml
+++ b/doc/classes/TileSetScenesCollectionSource.xml
@@ -12,8 +12,8 @@
<methods>
<method name="create_scene_tile">
<return type="int" />
- <argument index="0" name="packed_scene" type="PackedScene" />
- <argument index="1" name="id_override" type="int" default="-1" />
+ <param index="0" name="packed_scene" type="PackedScene" />
+ <param index="1" name="id_override" type="int" default="-1" />
<description>
Creates a scene-based tile out of the given scene.
Returns a newly generated unique ID.
@@ -27,23 +27,23 @@
</method>
<method name="get_scene_tile_display_placeholder" qualifiers="const">
<return type="bool" />
- <argument index="0" name="id" type="int" />
+ <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" />
- <argument index="0" name="index" 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" />
- <argument index="0" name="id" type="int" />
+ <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">
@@ -54,40 +54,40 @@
</method>
<method name="has_scene_tile_id">
<return type="bool" />
- <argument index="0" name="id" type="int" />
+ <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" />
- <argument index="0" name="id" type="int" />
+ <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">
<return type="void" />
- <argument index="0" name="id" type="int" />
- <argument index="1" name="display_placeholder" type="bool" />
+ <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">
<return type="void" />
- <argument index="0" name="id" type="int" />
- <argument index="1" name="new_id" type="int" />
+ <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">
<return type="void" />
- <argument index="0" name="id" type="int" />
- <argument index="1" name="packed_scene" type="PackedScene" />
+ <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 3d23975e37..e88e725bf4 100644
--- a/doc/classes/TileSetSource.xml
+++ b/doc/classes/TileSetSource.xml
@@ -15,26 +15,26 @@
<methods>
<method name="get_alternative_tile_id" qualifiers="const">
<return type="int" />
- <argument index="0" name="atlas_coords" type="Vector2i" />
- <argument index="1" name="index" type="int" />
+ <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" />
- <argument index="0" name="atlas_coords" type="Vector2i" />
+ <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>
</method>
<method name="get_tile_id" qualifiers="const">
<return type="Vector2i" />
- <argument index="0" name="index" type="int" />
+ <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">
@@ -45,17 +45,17 @@
</method>
<method name="has_alternative_tile" qualifiers="const">
<return type="bool" />
- <argument index="0" name="atlas_coords" type="Vector2i" />
- <argument index="1" name="alternative_tile" type="int" />
+ <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" />
- <argument index="0" name="atlas_coords" type="Vector2i" />
+ <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 d3aac5fa00..cdbe30c444 100644
--- a/doc/classes/Time.xml
+++ b/doc/classes/Time.xml
@@ -15,92 +15,92 @@
<methods>
<method name="get_date_dict_from_system" qualifiers="const">
<return type="Dictionary" />
- <argument index="0" name="utc" type="bool" default="false" />
+ <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.
+ 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">
<return type="Dictionary" />
- <argument index="0" name="unix_time_val" type="int" />
+ <param index="0" name="unix_time_val" type="int" />
<description>
Converts the given Unix timestamp to a dictionary of keys: [code]year[/code], [code]month[/code], [code]day[/code], and [code]weekday[/code].
</description>
</method>
<method name="get_date_string_from_system" qualifiers="const">
<return type="String" />
- <argument index="0" name="utc" type="bool" default="false" />
+ <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">
<return type="String" />
- <argument index="0" name="unix_time_val" type="int" />
+ <param index="0" name="unix_time_val" type="int" />
<description>
Converts the given Unix timestamp to an ISO 8601 date string (YYYY-MM-DD).
</description>
</method>
- <method name="get_datetime_dict_from_string" qualifiers="const">
+ <method name="get_datetime_dict_from_datetime_string" qualifiers="const">
<return type="Dictionary" />
- <argument index="0" name="datetime" type="String" />
- <argument index="1" name="weekday" type="bool" />
+ <param index="0" name="datetime" type="String" />
+ <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>
<method name="get_datetime_dict_from_system" qualifiers="const">
<return type="Dictionary" />
- <argument index="0" name="utc" type="bool" default="false" />
+ <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].
</description>
</method>
<method name="get_datetime_dict_from_unix_time" qualifiers="const">
<return type="Dictionary" />
- <argument index="0" name="unix_time_val" type="int" />
+ <param index="0" name="unix_time_val" type="int" />
<description>
Converts the given Unix timestamp to a dictionary of keys: [code]year[/code], [code]month[/code], [code]day[/code], and [code]weekday[/code].
The returned Dictionary's values will be the same as the [method get_datetime_dict_from_system] if the Unix timestamp is the current time, with the exception of Daylight Savings Time as it cannot be determined from the epoch.
</description>
</method>
- <method name="get_datetime_string_from_dict" qualifiers="const">
+ <method name="get_datetime_string_from_datetime_dict" qualifiers="const">
<return type="String" />
- <argument index="0" name="datetime" type="Dictionary" />
- <argument index="1" name="use_space" type="bool" />
+ <param index="0" name="datetime" type="Dictionary" />
+ <param index="1" name="use_space" type="bool" />
<description>
Converts the given dictionary of keys to an ISO 8601 date and time string (YYYY-MM-DDTHH:MM:SS).
The given dictionary can be populated with the following keys: [code]year[/code], [code]month[/code], [code]day[/code], [code]hour[/code], [code]minute[/code], and [code]second[/code]. Any other entries (including [code]dst[/code]) are ignored.
If the dictionary is empty, [code]0[/code] is returned. If some keys are omitted, they default to the equivalent values for the Unix epoch timestamp 0 (1970-01-01 at 00:00:00).
- If [code]use_space[/code] is true, use a space instead of the letter T in the middle.
+ 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">
<return type="String" />
- <argument index="0" name="utc" type="bool" default="false" />
- <argument index="1" name="use_space" type="bool" default="false" />
+ <param index="0" name="utc" type="bool" default="false" />
+ <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">
<return type="String" />
- <argument index="0" name="unix_time_val" type="int" />
- <argument index="1" name="use_space" type="bool" default="false" />
+ <param index="0" name="unix_time_val" type="int" />
+ <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">
<return type="String" />
- <argument index="0" name="offset_minutes" type="int" />
+ <param index="0" name="offset_minutes" type="int" />
<description>
Converts the given timezone offset in minutes to a timezone offset string. For example, -480 returns "-08:00", 345 returns "+05:45", and 0 returns "+00:00".
</description>
@@ -121,30 +121,30 @@
</method>
<method name="get_time_dict_from_system" qualifiers="const">
<return type="Dictionary" />
- <argument index="0" name="utc" type="bool" default="false" />
+ <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">
<return type="Dictionary" />
- <argument index="0" name="unix_time_val" type="int" />
+ <param index="0" name="unix_time_val" type="int" />
<description>
Converts the given time to a dictionary of keys: [code]hour[/code], [code]minute[/code], and [code]second[/code].
</description>
</method>
<method name="get_time_string_from_system" qualifiers="const">
<return type="String" />
- <argument index="0" name="utc" type="bool" default="false" />
+ <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">
<return type="String" />
- <argument index="0" name="unix_time_val" type="int" />
+ <param index="0" name="unix_time_val" type="int" />
<description>
Converts the given Unix timestamp to an ISO 8601 time string (HH:MM:SS).
</description>
@@ -157,7 +157,7 @@
</method>
<method name="get_unix_time_from_datetime_dict" qualifiers="const">
<return type="int" />
- <argument index="0" name="datetime" type="Dictionary" />
+ <param index="0" name="datetime" type="Dictionary" />
<description>
Converts a dictionary of time values to a Unix timestamp.
The given dictionary can be populated with the following keys: [code]year[/code], [code]month[/code], [code]day[/code], [code]hour[/code], [code]minute[/code], and [code]second[/code]. Any other entries (including [code]dst[/code]) are ignored.
@@ -168,7 +168,7 @@
</method>
<method name="get_unix_time_from_datetime_string" qualifiers="const">
<return type="int" />
- <argument index="0" name="datetime" type="String" />
+ <param index="0" name="datetime" type="String" />
<description>
Converts the given ISO 8601 date and/or time string to a Unix timestamp. The string can contain a date only, a time only, or both.
[b]Note:[/b] Unix timestamps are often in UTC. This method does not do any timezone conversion, so the timestamp will be in the same timezone as the given datetime string.
diff --git a/doc/classes/Timer.xml b/doc/classes/Timer.xml
index ebe25ed55e..d171797e80 100644
--- a/doc/classes/Timer.xml
+++ b/doc/classes/Timer.xml
@@ -19,9 +19,9 @@
</method>
<method name="start">
<return type="void" />
- <argument index="0" name="time_sec" type="float" default="-1" />
+ <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/TorusMesh.xml b/doc/classes/TorusMesh.xml
new file mode 100644
index 0000000000..6b83152793
--- /dev/null
+++ b/doc/classes/TorusMesh.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="TorusMesh" inherits="PrimitiveMesh" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ Class representing a torus [PrimitiveMesh].
+ </brief_description>
+ <description>
+ Class representing a torus [PrimitiveMesh].
+ </description>
+ <tutorials>
+ </tutorials>
+ <members>
+ <member name="inner_radius" type="float" setter="set_inner_radius" getter="get_inner_radius" default="0.5">
+ The inner radius of the torus.
+ </member>
+ <member name="outer_radius" type="float" setter="set_outer_radius" getter="get_outer_radius" default="1.0">
+ The outer radius of the torus.
+ </member>
+ <member name="ring_segments" type="int" setter="set_ring_segments" getter="get_ring_segments" default="32">
+ The number of edges each ring of the torus is constructed of.
+ </member>
+ <member name="rings" type="int" setter="set_rings" getter="get_rings" default="64">
+ The number of slices the torus is constructed of.
+ </member>
+ </members>
+</class>
diff --git a/doc/classes/Transform2D.xml b/doc/classes/Transform2D.xml
index 3ad21ee809..905b3d77af 100644
--- a/doc/classes/Transform2D.xml
+++ b/doc/classes/Transform2D.xml
@@ -22,34 +22,34 @@
</constructor>
<constructor name="Transform2D">
<return type="Transform2D" />
- <argument index="0" name="from" type="Transform2D" />
+ <param index="0" name="from" type="Transform2D" />
<description>
Constructs a [Transform2D] as a copy of the given [Transform2D].
</description>
</constructor>
<constructor name="Transform2D">
<return type="Transform2D" />
- <argument index="0" name="rotation" type="float" />
- <argument index="1" name="position" type="Vector2" />
+ <param index="0" name="rotation" type="float" />
+ <param index="1" name="position" type="Vector2" />
<description>
Constructs the transform from a given angle (in radians) and position.
</description>
</constructor>
<constructor name="Transform2D">
<return type="Transform2D" />
- <argument index="0" name="rotation" type="float" />
- <argument index="1" name="scale" type="Vector2" />
- <argument index="2" name="skew" type="float" />
- <argument index="3" name="position" type="Vector2" />
+ <param index="0" name="rotation" type="float" />
+ <param index="1" name="scale" type="Vector2" />
+ <param index="2" name="skew" type="float" />
+ <param index="3" name="position" type="Vector2" />
<description>
Constructs the transform from a given angle (in radians), scale, skew (in radians) and position.
</description>
</constructor>
<constructor name="Transform2D">
<return type="Transform2D" />
- <argument index="0" name="x_axis" type="Vector2" />
- <argument index="1" name="y_axis" type="Vector2" />
- <argument index="2" name="origin" type="Vector2" />
+ <param index="0" name="x_axis" type="Vector2" />
+ <param index="1" name="y_axis" type="Vector2" />
+ <param index="2" name="origin" type="Vector2" />
<description>
Constructs the transform from 3 [Vector2] values representing [member x], [member y], and the [member origin] (the three column vectors).
</description>
@@ -64,7 +64,7 @@
</method>
<method name="basis_xform" qualifiers="const">
<return type="Vector2" />
- <argument index="0" name="v" type="Vector2" />
+ <param index="0" name="v" type="Vector2" />
<description>
Returns a vector transformed (multiplied) by the basis matrix.
This method does not account for translation (the origin vector).
@@ -72,7 +72,7 @@
</method>
<method name="basis_xform_inv" qualifiers="const">
<return type="Vector2" />
- <argument index="0" name="v" type="Vector2" />
+ <param index="0" name="v" type="Vector2" />
<description>
Returns a vector transformed (multiplied) by the inverse basis matrix.
This method does not account for translation (the origin vector).
@@ -104,10 +104,10 @@
</method>
<method name="interpolate_with" qualifiers="const">
<return type="Transform2D" />
- <argument index="0" name="xform" type="Transform2D" />
- <argument index="1" name="weight" type="float" />
+ <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">
@@ -118,16 +118,16 @@
</method>
<method name="is_equal_approx" qualifiers="const">
<return type="bool" />
- <argument index="0" name="xform" type="Transform2D" />
+ <param index="0" name="xform" type="Transform2D" />
<description>
Returns [code]true[/code] if this transform and [code]transform[/code] are approximately equal, by calling [code]is_equal_approx[/code] on each component.
</description>
</method>
<method name="looking_at" qualifiers="const">
<return type="Transform2D" />
- <argument index="0" name="target" type="Vector2" default="Vector2(0, 0)" />
+ <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>
@@ -139,45 +139,84 @@
</method>
<method name="rotated" qualifiers="const">
<return type="Transform2D" />
- <argument index="0" name="phi" type="float" />
+ <param index="0" name="angle" type="float" />
<description>
- Rotates the transform by the given angle (in radians), using matrix multiplication.
+ 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.
+ </description>
+ </method>
+ <method name="rotated_local" qualifiers="const">
+ <return type="Transform2D" />
+ <param index="0" name="angle" type="float" />
+ <description>
+ 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.
</description>
</method>
<method name="scaled" qualifiers="const">
<return type="Transform2D" />
- <argument index="0" name="scale" type="Vector2" />
+ <param index="0" name="scale" type="Vector2" />
+ <description>
+ 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.
+ </description>
+ </method>
+ <method name="scaled_local" qualifiers="const">
+ <return type="Transform2D" />
+ <param index="0" name="scale" type="Vector2" />
<description>
- Scales the transform by the given scale factor, using matrix multiplication.
+ 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="set_rotation">
<return type="void" />
- <argument index="0" name="rotation" type="float" />
+ <param index="0" name="rotation" type="float" />
<description>
Sets the transform's rotation (in radians).
</description>
</method>
<method name="set_scale">
<return type="void" />
- <argument index="0" name="scale" type="Vector2" />
+ <param index="0" name="scale" type="Vector2" />
<description>
Sets the transform's scale.
+ [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.
</description>
</method>
<method name="set_skew">
<return type="void" />
- <argument index="0" name="skew" type="float" />
+ <param index="0" name="skew" type="float" />
<description>
Sets the transform's skew (in radians).
</description>
</method>
<method name="translated" qualifiers="const">
<return type="Transform2D" />
- <argument index="0" name="offset" type="Vector2" />
+ <param index="0" name="offset" type="Vector2" />
+ <description>
+ 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.
+ </description>
+ </method>
+ <method name="translated_local" qualifiers="const">
+ <return type="Transform2D" />
+ <param index="0" name="offset" type="Vector2" />
<description>
- Translates the transform by the given offset, relative to the transform's basis vectors.
- Unlike [method rotated] and [method scaled], this does not use matrix multiplication.
+ 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.
</description>
</method>
</methods>
@@ -206,7 +245,7 @@
<operators>
<operator name="operator !=">
<return type="bool" />
- <argument index="0" name="right" type="Transform2D" />
+ <param index="0" name="right" type="Transform2D" />
<description>
Returns [code]true[/code] if the transforms are not equal.
[b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.
@@ -214,49 +253,49 @@
</operator>
<operator name="operator *">
<return type="PackedVector2Array" />
- <argument index="0" name="right" type="PackedVector2Array" />
+ <param index="0" name="right" type="PackedVector2Array" />
<description>
Transforms (multiplies) each element of the [Vector2] array by the given [Transform2D] matrix.
</description>
</operator>
<operator name="operator *">
<return type="Rect2" />
- <argument index="0" name="right" type="Rect2" />
+ <param index="0" name="right" type="Rect2" />
<description>
Transforms (multiplies) the [Rect2] by the given [Transform2D] matrix.
</description>
</operator>
<operator name="operator *">
<return type="Transform2D" />
- <argument index="0" name="right" type="Transform2D" />
+ <param index="0" name="right" type="Transform2D" />
<description>
Composes these two transformation matrices by multiplying them together. This has the effect of transforming the second transform (the child) by the first transform (the parent).
</description>
</operator>
<operator name="operator *">
<return type="Vector2" />
- <argument index="0" name="right" type="Vector2" />
+ <param index="0" name="right" type="Vector2" />
<description>
Transforms (multiplies) the [Vector2] by the given [Transform2D] matrix.
</description>
</operator>
<operator name="operator *">
<return type="Transform2D" />
- <argument index="0" name="right" type="float" />
+ <param index="0" name="right" type="float" />
<description>
This operator multiplies all components of the [Transform2D], including the origin vector, which scales it uniformly.
</description>
</operator>
<operator name="operator *">
<return type="Transform2D" />
- <argument index="0" name="right" type="int" />
+ <param index="0" name="right" type="int" />
<description>
This operator multiplies all components of the [Transform2D], including the origin vector, which scales it uniformly.
</description>
</operator>
<operator name="operator ==">
<return type="bool" />
- <argument index="0" name="right" type="Transform2D" />
+ <param index="0" name="right" type="Transform2D" />
<description>
Returns [code]true[/code] if the transforms are exactly equal.
[b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.
@@ -264,7 +303,7 @@
</operator>
<operator name="operator []">
<return type="Vector2" />
- <argument index="0" name="index" type="int" />
+ <param index="0" name="index" type="int" />
<description>
Access transform components using their index. [code]t[0][/code] is equivalent to [code]t.x[/code], [code]t[1][/code] is equivalent to [code]t.y[/code], and [code]t[2][/code] is equivalent to [code]t.origin[/code].
</description>
diff --git a/doc/classes/Transform3D.xml b/doc/classes/Transform3D.xml
index 5a72dc223c..14aa72b80c 100644
--- a/doc/classes/Transform3D.xml
+++ b/doc/classes/Transform3D.xml
@@ -24,25 +24,31 @@
</constructor>
<constructor name="Transform3D">
<return type="Transform3D" />
- <argument index="0" name="from" type="Transform3D" />
+ <param index="0" name="from" type="Transform3D" />
<description>
Constructs a [Transform3D] as a copy of the given [Transform3D].
</description>
</constructor>
<constructor name="Transform3D">
<return type="Transform3D" />
- <argument index="0" name="basis" type="Basis" />
- <argument index="1" name="origin" type="Vector3" />
+ <param index="0" name="basis" type="Basis" />
+ <param index="1" name="origin" type="Vector3" />
<description>
Constructs a Transform3D from a [Basis] and [Vector3].
</description>
</constructor>
<constructor name="Transform3D">
<return type="Transform3D" />
- <argument index="0" name="x_axis" type="Vector3" />
- <argument index="1" name="y_axis" type="Vector3" />
- <argument index="2" name="z_axis" type="Vector3" />
- <argument index="3" name="origin" type="Vector3" />
+ <param index="0" name="from" type="Projection" />
+ <description>
+ </description>
+ </constructor>
+ <constructor name="Transform3D">
+ <return type="Transform3D" />
+ <param index="0" name="x_axis" type="Vector3" />
+ <param index="1" name="y_axis" type="Vector3" />
+ <param index="2" name="z_axis" type="Vector3" />
+ <param index="3" name="origin" type="Vector3" />
<description>
Constructs a Transform3D from four [Vector3] values (matrix columns). Each axis corresponds to local basis vectors (some of which may be scaled).
</description>
@@ -57,10 +63,10 @@
</method>
<method name="interpolate_with" qualifiers="const">
<return type="Transform3D" />
- <argument index="0" name="xform" type="Transform3D" />
- <argument index="1" name="weight" type="float" />
+ <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">
@@ -71,18 +77,18 @@
</method>
<method name="is_equal_approx" qualifiers="const">
<return type="bool" />
- <argument index="0" name="xform" type="Transform3D" />
+ <param index="0" name="xform" type="Transform3D" />
<description>
Returns [code]true[/code] if this transform and [code]transform[/code] are approximately equal, by calling [code]is_equal_approx[/code] on each component.
</description>
</method>
<method name="looking_at" qualifiers="const">
<return type="Transform3D" />
- <argument index="0" name="target" type="Vector3" />
- <argument index="1" name="up" type="Vector3" default="Vector3(0, 1, 0)" />
+ <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">
@@ -93,33 +99,74 @@
</method>
<method name="rotated" qualifiers="const">
<return type="Transform3D" />
- <argument index="0" name="axis" type="Vector3" />
- <argument index="1" name="phi" type="float" />
+ <param index="0" name="axis" type="Vector3" />
+ <param index="1" name="angle" type="float" />
<description>
- Rotates the transform around the given axis by the given angle (in radians), using matrix multiplication. The axis 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.
+ </description>
+ </method>
+ <method name="rotated_local" qualifiers="const">
+ <return type="Transform3D" />
+ <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 [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.
</description>
</method>
<method name="scaled" qualifiers="const">
<return type="Transform3D" />
- <argument index="0" name="scale" type="Vector3" />
+ <param index="0" name="scale" type="Vector3" />
<description>
- Scales basis and origin of the transform by the given scale factor, using matrix multiplication.
+ 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.
</description>
</method>
- <method name="sphere_interpolate_with" qualifiers="const">
+ <method name="scaled_local" qualifiers="const">
<return type="Transform3D" />
- <argument index="0" name="xform" type="Transform3D" />
- <argument index="1" name="weight" type="float" />
+ <param index="0" name="scale" type="Vector3" />
<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).
+ 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 [param weight] (on the range of 0.0 to 1.0).
</description>
</method>
<method name="translated" qualifiers="const">
<return type="Transform3D" />
- <argument index="0" name="offset" type="Vector3" />
+ <param index="0" name="offset" type="Vector3" />
+ <description>
+ 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.
+ </description>
+ </method>
+ <method name="translated_local" qualifiers="const">
+ <return type="Transform3D" />
+ <param index="0" name="offset" type="Vector3" />
<description>
- Translates the transform by the given offset, relative to the transform's basis vectors.
- Unlike [method rotated] and [method scaled], this does not use matrix multiplication.
+ 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.
</description>
</method>
</methods>
@@ -148,7 +195,7 @@
<operators>
<operator name="operator !=">
<return type="bool" />
- <argument index="0" name="right" type="Transform3D" />
+ <param index="0" name="right" type="Transform3D" />
<description>
Returns [code]true[/code] if the transforms are not equal.
[b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.
@@ -156,49 +203,56 @@
</operator>
<operator name="operator *">
<return type="AABB" />
- <argument index="0" name="right" type="AABB" />
+ <param index="0" name="right" type="AABB" />
<description>
Transforms (multiplies) the [AABB] by the given [Transform3D] matrix.
</description>
</operator>
<operator name="operator *">
<return type="PackedVector3Array" />
- <argument index="0" name="right" type="PackedVector3Array" />
+ <param index="0" name="right" type="PackedVector3Array" />
<description>
Transforms (multiplies) each element of the [Vector3] array by the given [Transform3D] matrix.
</description>
</operator>
<operator name="operator *">
+ <return type="Plane" />
+ <param index="0" name="right" type="Plane" />
+ <description>
+ Transforms (multiplies) the [Plane] by the given [Transform3D] transformation matrix.
+ </description>
+ </operator>
+ <operator name="operator *">
<return type="Transform3D" />
- <argument index="0" name="right" type="Transform3D" />
+ <param index="0" name="right" type="Transform3D" />
<description>
Composes these two transformation matrices by multiplying them together. This has the effect of transforming the second transform (the child) by the first transform (the parent).
</description>
</operator>
<operator name="operator *">
<return type="Vector3" />
- <argument index="0" name="right" type="Vector3" />
+ <param index="0" name="right" type="Vector3" />
<description>
Transforms (multiplies) the [Vector3] by the given [Transform3D] matrix.
</description>
</operator>
<operator name="operator *">
<return type="Transform3D" />
- <argument index="0" name="right" type="float" />
+ <param index="0" name="right" type="float" />
<description>
This operator multiplies all components of the [Transform3D], including the origin vector, which scales it uniformly.
</description>
</operator>
<operator name="operator *">
<return type="Transform3D" />
- <argument index="0" name="right" type="int" />
+ <param index="0" name="right" type="int" />
<description>
This operator multiplies all components of the [Transform3D], including the origin vector, which scales it uniformly.
</description>
</operator>
<operator name="operator ==">
<return type="bool" />
- <argument index="0" name="right" type="Transform3D" />
+ <param index="0" name="right" type="Transform3D" />
<description>
Returns [code]true[/code] if the transforms are exactly equal.
[b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.
diff --git a/doc/classes/Translation.xml b/doc/classes/Translation.xml
index 7aafbc68c6..314be9adf8 100644
--- a/doc/classes/Translation.xml
+++ b/doc/classes/Translation.xml
@@ -13,27 +13,27 @@
<methods>
<method name="_get_message" qualifiers="virtual const">
<return type="StringName" />
- <argument index="0" name="src_message" type="StringName" />
- <argument index="1" name="context" type="StringName" />
+ <param index="0" name="src_message" type="StringName" />
+ <param index="1" name="context" type="StringName" />
<description>
Virtual method to override [method get_message].
</description>
</method>
<method name="_get_plural_message" qualifiers="virtual const">
<return type="StringName" />
- <argument index="0" name="src_message" type="StringName" />
- <argument index="1" name="src_plural_message" type="StringName" />
- <argument index="2" name="n" type="int" />
- <argument index="3" name="context" type="StringName" />
+ <param index="0" name="src_message" type="StringName" />
+ <param index="1" name="src_plural_message" type="StringName" />
+ <param index="2" name="n" type="int" />
+ <param index="3" name="context" type="StringName" />
<description>
Virtual method to override [method get_plural_message].
</description>
</method>
<method name="add_message">
<return type="void" />
- <argument index="0" name="src_message" type="StringName" />
- <argument index="1" name="xlated_message" type="StringName" />
- <argument index="2" name="context" type="StringName" default="&quot;&quot;" />
+ <param index="0" name="src_message" type="StringName" />
+ <param index="1" name="xlated_message" type="StringName" />
+ <param index="2" name="context" type="StringName" default="&quot;&quot;" />
<description>
Adds a message if nonexistent, followed by its translation.
An additional context could be used to specify the translation context or differentiate polysemic words.
@@ -41,9 +41,9 @@
</method>
<method name="add_plural_message">
<return type="void" />
- <argument index="0" name="src_message" type="StringName" />
- <argument index="1" name="xlated_messages" type="PackedStringArray" />
- <argument index="2" name="context" type="StringName" default="&quot;&quot;" />
+ <param index="0" name="src_message" type="StringName" />
+ <param index="1" name="xlated_messages" type="PackedStringArray" />
+ <param index="2" name="context" type="StringName" default="&quot;&quot;" />
<description>
Adds a message involving plural translation if nonexistent, followed by its translation.
An additional context could be used to specify the translation context or differentiate polysemic words.
@@ -51,16 +51,16 @@
</method>
<method name="erase_message">
<return type="void" />
- <argument index="0" name="src_message" type="StringName" />
- <argument index="1" name="context" type="StringName" default="&quot;&quot;" />
+ <param index="0" name="src_message" type="StringName" />
+ <param index="1" name="context" type="StringName" default="&quot;&quot;" />
<description>
Erases a message.
</description>
</method>
<method name="get_message" qualifiers="const">
<return type="StringName" />
- <argument index="0" name="src_message" type="StringName" />
- <argument index="1" name="context" type="StringName" default="&quot;&quot;" />
+ <param index="0" name="src_message" type="StringName" />
+ <param index="1" name="context" type="StringName" default="&quot;&quot;" />
<description>
Returns a message's translation.
</description>
@@ -79,13 +79,13 @@
</method>
<method name="get_plural_message" qualifiers="const">
<return type="StringName" />
- <argument index="0" name="src_message" type="StringName" />
- <argument index="1" name="src_plural_message" type="StringName" />
- <argument index="2" name="n" type="int" />
- <argument index="3" name="context" type="StringName" default="&quot;&quot;" />
+ <param index="0" name="src_message" type="StringName" />
+ <param index="1" name="src_plural_message" type="StringName" />
+ <param index="2" name="n" type="int" />
+ <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>
</methods>
diff --git a/doc/classes/TranslationServer.xml b/doc/classes/TranslationServer.xml
index a4cf070ede..7b18d8ddb6 100644
--- a/doc/classes/TranslationServer.xml
+++ b/doc/classes/TranslationServer.xml
@@ -13,7 +13,7 @@
<methods>
<method name="add_translation">
<return type="void" />
- <argument index="0" name="translation" type="Translation" />
+ <param index="0" name="translation" type="Translation" />
<description>
Adds a [Translation] resource.
</description>
@@ -26,8 +26,8 @@
</method>
<method name="compare_locales" qualifiers="const">
<return type="int" />
- <argument index="0" name="locale_a" type="String" />
- <argument index="1" name="locale_b" type="String" />
+ <param index="0" name="locale_a" type="String" />
+ <param index="1" name="locale_b" type="String" />
<description>
Compares two locales and return similarity score between [code]0[/code](no match) and [code]10[/code](full match).
</description>
@@ -52,20 +52,20 @@
</method>
<method name="get_country_name" qualifiers="const">
<return type="String" />
- <argument index="0" name="country" 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" />
- <argument index="0" name="language" 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>
@@ -79,16 +79,16 @@
</method>
<method name="get_locale_name" qualifiers="const">
<return type="String" />
- <argument index="0" name="locale" type="String" />
+ <param index="0" name="locale" type="String" />
<description>
Returns a locale's language and its variant (e.g. [code]"en_US"[/code] would return [code]"English (United States)"[/code]).
</description>
</method>
<method name="get_script_name" qualifiers="const">
<return type="String" />
- <argument index="0" name="script" 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">
@@ -100,17 +100,17 @@
</method>
<method name="get_translation_object">
<return type="Translation" />
- <argument index="0" name="locale" type="String" />
+ <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" />
- <argument index="0" name="message" 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">
@@ -121,43 +121,43 @@
</method>
<method name="remove_translation">
<return type="void" />
- <argument index="0" name="translation" type="Translation" />
+ <param index="0" name="translation" type="Translation" />
<description>
Removes the given translation from the server.
</description>
</method>
<method name="set_locale">
<return type="void" />
- <argument index="0" name="locale" type="String" />
+ <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>
<method name="standardize_locale" qualifiers="const">
<return type="String" />
- <argument index="0" name="locale" 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">
<return type="StringName" />
- <argument index="0" name="message" type="StringName" />
- <argument index="1" name="context" type="StringName" default="&quot;&quot;" />
+ <param index="0" name="message" type="StringName" />
+ <param index="1" name="context" type="StringName" default="&quot;&quot;" />
<description>
Returns the current locale's translation for the given message (key) and context.
</description>
</method>
<method name="translate_plural" qualifiers="const">
<return type="StringName" />
- <argument index="0" name="message" type="StringName" />
- <argument index="1" name="plural_message" type="StringName" />
- <argument index="2" name="n" type="int" />
- <argument index="3" name="context" type="StringName" default="&quot;&quot;" />
+ <param index="0" name="message" type="StringName" />
+ <param index="1" name="plural_message" type="StringName" />
+ <param index="2" name="n" type="int" />
+ <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 1d4a5b922d..bf66d9f12a 100644
--- a/doc/classes/Tree.xml
+++ b/doc/classes/Tree.xml
@@ -31,6 +31,7 @@
[/csharp]
[/codeblocks]
To iterate over all the [TreeItem] objects in a [Tree] object, use [method TreeItem.get_next] and [method TreeItem.get_first_child] after getting the root through [method get_root]. You can use [method Object.free] on a [TreeItem] to remove it from the [Tree].
+ [b]Incremental search:[/b] Like [ItemList] and [PopupMenu], [Tree] supports searching within the list while the control is focused. Press a key that matches the first letter of an item's name to select the first item starting with the given letter. After that point, there are two ways to perform incremental search: 1) Press the same key again before the timeout duration to select the next item starting with the same letter. 2) Press letter keys that match the rest of the word before the timeout duration to match to select the item in question directly. Both of these actions will be reset to the beginning of the list if the timeout duration has passed since the last keystroke was registered. You can adjust the timeout duration by changing [member ProjectSettings.gui/timers/incremental_search_max_interval_msec].
</description>
<tutorials>
</tutorials>
@@ -41,21 +42,14 @@
Clears the tree. This removes all items.
</description>
</method>
- <method name="clear_column_title_opentype_features">
- <return type="void" />
- <argument index="0" name="column" type="int" />
- <description>
- Removes all OpenType features from the item's text.
- </description>
- </method>
<method name="create_item">
<return type="TreeItem" />
- <argument index="0" name="parent" type="TreeItem" default="null" />
- <argument index="1" name="idx" type="int" default="-1" />
+ <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">
@@ -74,56 +68,48 @@
</method>
<method name="get_button_id_at_position" qualifiers="const">
<return type="int" />
- <argument index="0" name="position" type="Vector2" />
+ <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" />
- <argument index="0" name="position" type="Vector2" />
+ <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">
<return type="int" />
- <argument index="0" name="column" type="int" />
+ <param index="0" name="column" type="int" />
<description>
</description>
</method>
<method name="get_column_title" qualifiers="const">
<return type="String" />
- <argument index="0" name="column" type="int" />
+ <param index="0" name="column" type="int" />
<description>
Returns the column's title.
</description>
</method>
<method name="get_column_title_direction" qualifiers="const">
<return type="int" enum="Control.TextDirection" />
- <argument index="0" name="column" type="int" />
+ <param index="0" name="column" type="int" />
<description>
Returns column title base writing direction.
</description>
</method>
<method name="get_column_title_language" qualifiers="const">
<return type="String" />
- <argument index="0" name="column" type="int" />
+ <param index="0" name="column" type="int" />
<description>
Returns column title language code.
</description>
</method>
- <method name="get_column_title_opentype_feature" qualifiers="const">
- <return type="int" />
- <argument index="0" name="column" type="int" />
- <argument index="1" name="tag" type="String" />
- <description>
- Returns OpenType feature [code]tag[/code] of the column title.
- </description>
- </method>
<method name="get_column_width" qualifiers="const">
<return type="int" />
- <argument index="0" name="column" type="int" />
+ <param index="0" name="column" type="int" />
<description>
Returns the column's width in pixels.
</description>
@@ -136,9 +122,9 @@
</method>
<method name="get_drop_section_at_position" qualifiers="const">
<return type="int" />
- <argument index="0" name="position" type="Vector2" />
+ <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>
@@ -177,26 +163,26 @@
</method>
<method name="get_item_area_rect" qualifiers="const">
<return type="Rect2" />
- <argument index="0" name="item" type="TreeItem" />
- <argument index="1" name="column" type="int" default="-1" />
- <argument index="2" name="button_index" type="int" default="-1" />
+ <param index="0" name="item" type="TreeItem" />
+ <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">
<return type="TreeItem" />
- <argument index="0" name="position" type="Vector2" />
+ <param index="0" name="position" type="Vector2" />
<description>
Returns the tree item at the specified position (relative to the tree origin position).
</description>
</method>
<method name="get_next_selected">
<return type="TreeItem" />
- <argument index="0" name="from" type="TreeItem" />
+ <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">
@@ -235,87 +221,78 @@
</method>
<method name="is_column_clipping_content" qualifiers="const">
<return type="bool" />
- <argument index="0" name="column" type="int" />
+ <param index="0" name="column" type="int" />
<description>
</description>
</method>
<method name="is_column_expanding" qualifiers="const">
<return type="bool" />
- <argument index="0" name="column" type="int" />
+ <param index="0" name="column" type="int" />
<description>
</description>
</method>
<method name="scroll_to_item">
<return type="void" />
- <argument index="0" name="item" type="TreeItem" />
- <argument index="1" name="center_on_item" type="bool" default="false" />
+ <param index="0" name="item" type="TreeItem" />
+ <param index="1" name="center_on_item" type="bool" default="false" />
<description>
Causes the [Tree] to jump to the specified [TreeItem].
</description>
</method>
<method name="set_column_clip_content">
<return type="void" />
- <argument index="0" name="column" type="int" />
- <argument index="1" name="enable" type="bool" />
+ <param index="0" name="column" type="int" />
+ <param index="1" name="enable" type="bool" />
<description>
</description>
</method>
<method name="set_column_custom_minimum_width">
<return type="void" />
- <argument index="0" name="column" type="int" />
- <argument index="1" name="min_width" type="int" />
+ <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].
</description>
</method>
<method name="set_column_expand">
<return type="void" />
- <argument index="0" name="column" type="int" />
- <argument index="1" name="expand" type="bool" />
+ <param index="0" name="column" type="int" />
+ <param index="1" name="expand" type="bool" />
<description>
If [code]true[/code], the column will have the "Expand" flag of [Control]. 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_ratio">
<return type="void" />
- <argument index="0" name="column" type="int" />
- <argument index="1" name="ratio" type="int" />
+ <param index="0" name="column" type="int" />
+ <param index="1" name="ratio" type="int" />
<description>
</description>
</method>
<method name="set_column_title">
<return type="void" />
- <argument index="0" name="column" type="int" />
- <argument index="1" name="title" type="String" />
+ <param index="0" name="column" type="int" />
+ <param index="1" name="title" type="String" />
<description>
Sets the title of a column.
</description>
</method>
<method name="set_column_title_direction">
<return type="void" />
- <argument index="0" name="column" type="int" />
- <argument index="1" name="direction" type="int" enum="Control.TextDirection" />
+ <param index="0" name="column" type="int" />
+ <param index="1" name="direction" type="int" enum="Control.TextDirection" />
<description>
Sets column title base writing direction.
</description>
</method>
<method name="set_column_title_language">
<return type="void" />
- <argument index="0" name="column" type="int" />
- <argument index="1" name="language" type="String" />
+ <param index="0" name="column" type="int" />
+ <param index="1" name="language" type="String" />
<description>
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_column_title_opentype_feature">
- <return type="void" />
- <argument index="0" name="column" type="int" />
- <argument index="1" name="tag" type="String" />
- <argument index="2" name="value" type="int" />
- <description>
- Sets OpenType feature [code]tag[/code] for the column title.
- </description>
- </method>
</methods>
<members>
<member name="allow_reselect" type="bool" setter="set_allow_reselect" getter="get_allow_reselect" default="false">
@@ -353,10 +330,11 @@
</member>
</members>
<signals>
- <signal name="button_pressed">
- <argument index="0" name="item" type="TreeItem" />
- <argument index="1" name="column" type="int" />
- <argument index="2" name="id" type="int" />
+ <signal name="button_clicked">
+ <param index="0" name="item" type="TreeItem" />
+ <param index="1" name="column" type="int" />
+ <param index="2" name="id" type="int" />
+ <param index="3" name="mouse_button_index" type="int" />
<description>
Emitted when a button on the tree was pressed (see [method TreeItem.add_button]).
</description>
@@ -367,34 +345,36 @@
</description>
</signal>
<signal name="check_propagated_to_item">
- <argument index="0" name="item" type="TreeItem" />
- <argument index="1" name="column" type="int" />
+ <param index="0" name="item" type="TreeItem" />
+ <param index="1" name="column" type="int" />
<description>
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">
- <argument index="0" name="column" type="int" />
+ <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_popup_edited">
- <argument index="0" name="arrow_clicked" type="bool" />
+ <signal name="custom_item_clicked">
+ <param index="0" name="mouse_button_index" type="int" />
<description>
- Emitted when a cell with the [constant TreeItem.CELL_MODE_CUSTOM] is clicked to be edited.
+ Emitted when an item with [constant TreeItem.CELL_MODE_CUSTOM] is clicked with a mouse button.
</description>
</signal>
- <signal name="empty_rmb">
- <argument index="0" name="position" type="Vector2" />
+ <signal name="custom_popup_edited">
+ <param index="0" name="arrow_clicked" type="bool" />
<description>
- Emitted when the right mouse button is pressed in the empty space of the tree.
+ Emitted when a cell with the [constant TreeItem.CELL_MODE_CUSTOM] is clicked to be edited.
</description>
</signal>
- <signal name="empty_tree_rmb_selected">
- <argument index="0" name="position" type="Vector2" />
+ <signal name="empty_clicked">
+ <param index="0" name="position" type="Vector2" />
+ <param index="1" name="mouse_button_index" type="int" />
<description>
- Emitted when the right mouse button is pressed if right mouse button selection is active and the tree is empty.
+ Emitted when a mouse button is clicked in the empty space of the tree.
</description>
</signal>
<signal name="item_activated">
@@ -403,7 +383,7 @@
</description>
</signal>
<signal name="item_collapsed">
- <argument index="0" name="item" type="TreeItem" />
+ <param index="0" name="item" type="TreeItem" />
<description>
Emitted when an item is collapsed by a click on the folding arrow.
</description>
@@ -423,15 +403,11 @@
Emitted when an item is edited.
</description>
</signal>
- <signal name="item_rmb_edited">
- <description>
- Emitted when an item is edited using the right mouse button.
- </description>
- </signal>
- <signal name="item_rmb_selected">
- <argument index="0" name="position" type="Vector2" />
+ <signal name="item_mouse_selected">
+ <param index="0" name="position" type="Vector2" />
+ <param index="1" name="mouse_button_index" type="int" />
<description>
- Emitted when an item is selected with the right mouse button.
+ Emitted when an item is selected with a mouse button.
</description>
</signal>
<signal name="item_selected">
@@ -440,9 +416,9 @@
</description>
</signal>
<signal name="multi_selected">
- <argument index="0" name="item" type="TreeItem" />
- <argument index="1" name="column" type="int" />
- <argument index="2" name="selected" type="bool" />
+ <param index="0" name="item" type="TreeItem" />
+ <param index="1" name="column" type="int" />
+ <param index="2" name="selected" type="bool" />
<description>
Emitted instead of [code]item_selected[/code] if [code]select_mode[/code] is [constant SELECT_MULTI].
</description>
@@ -486,7 +462,7 @@
<theme_item name="custom_button_font_highlight" data_type="color" type="Color" default="Color(0.95, 0.95, 0.95, 1)">
Text [Color] for a [constant TreeItem.CELL_MODE_CUSTOM] mode cell when it's hovered.
</theme_item>
- <theme_item name="drop_position_color" data_type="color" type="Color" default="Color(1, 0.3, 0.2, 1)">
+ <theme_item name="drop_position_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
[Color] used to draw possible drop locations. See [enum DropModeFlags] constants for further description of drop locations.
</theme_item>
<theme_item name="font_color" data_type="color" type="Color" default="Color(0.7, 0.7, 0.7, 1)">
diff --git a/doc/classes/TreeItem.xml b/doc/classes/TreeItem.xml
index d2e29bf3b1..6d4408cf61 100644
--- a/doc/classes/TreeItem.xml
+++ b/doc/classes/TreeItem.xml
@@ -12,115 +12,108 @@
<methods>
<method name="add_button">
<return type="void" />
- <argument index="0" name="column" type="int" />
- <argument index="1" name="button" type="Texture2D" />
- <argument index="2" name="id" type="int" default="-1" />
- <argument index="3" name="disabled" type="bool" default="false" />
- <argument index="4" name="tooltip" type="String" default="&quot;&quot;" />
+ <param index="0" name="column" type="int" />
+ <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;" />
<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].
</description>
</method>
<method name="call_recursive" qualifiers="vararg">
<return type="void" />
- <argument index="0" name="method" type="StringName" />
+ <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">
<return type="void" />
- <argument index="0" name="column" type="int" />
+ <param index="0" name="column" type="int" />
<description>
Resets the background color for the given column to default.
</description>
</method>
<method name="clear_custom_color">
<return type="void" />
- <argument index="0" name="column" type="int" />
+ <param index="0" name="column" type="int" />
<description>
Resets the color for the given column to default.
</description>
</method>
- <method name="clear_opentype_features">
- <return type="void" />
- <argument index="0" name="column" type="int" />
- <description>
- Removes all OpenType features.
- </description>
- </method>
<method name="create_child">
<return type="TreeItem" />
- <argument index="0" name="idx" type="int" default="-1" />
+ <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">
<return type="void" />
- <argument index="0" name="column" type="int" />
+ <param index="0" name="column" type="int" />
<description>
Deselects the given column.
</description>
</method>
<method name="erase_button">
<return type="void" />
- <argument index="0" name="column" type="int" />
- <argument index="1" name="button_idx" type="int" />
+ <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">
<return type="Texture2D" />
- <argument index="0" name="column" type="int" />
- <argument index="1" name="button_idx" type="int" />
+ <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">
<return type="int" />
- <argument index="0" name="column" type="int" />
- <argument index="1" name="id" type="int" />
+ <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" />
- <argument index="0" name="column" 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">
<return type="int" />
- <argument index="0" name="column" type="int" />
- <argument index="1" name="button_idx" type="int" />
+ <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">
<return type="String" />
- <argument index="0" name="column" type="int" />
- <argument index="1" name="button_idx" type="int" />
+ <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 string for the button at index [param button_idx] in column [param column].
</description>
</method>
<method name="get_cell_mode" qualifiers="const">
<return type="int" enum="TreeItem.TreeCellMode" />
- <argument index="0" name="column" type="int" />
+ <param index="0" name="column" type="int" />
<description>
Returns the column's cell mode.
</description>
</method>
<method name="get_child">
<return type="TreeItem" />
- <argument index="0" name="idx" type="int" />
+ <param index="0" name="idx" type="int" />
<description>
Returns a child item by its index (see [method get_child_count]). This method is often used for iterating all children of an item.
Negative indices access the children from the last one.
@@ -133,42 +126,42 @@
</description>
</method>
<method name="get_children">
- <return type="Array" />
+ <return type="TreeItem[]" />
<description>
Returns an array of references to the item's children.
</description>
</method>
<method name="get_custom_bg_color" qualifiers="const">
<return type="Color" />
- <argument index="0" name="column" type="int" />
+ <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" />
- <argument index="0" name="column" type="int" />
+ <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" />
- <argument index="0" name="column" type="int" />
+ <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" />
- <argument index="0" name="column" 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">
<return type="bool" />
- <argument index="0" name="column" type="int" />
+ <param index="0" name="column" type="int" />
<description>
Returns [code]true[/code] if [code]expand_right[/code] is set.
</description>
@@ -181,28 +174,28 @@
</method>
<method name="get_icon" qualifiers="const">
<return type="Texture2D" />
- <argument index="0" name="column" type="int" />
+ <param index="0" name="column" type="int" />
<description>
Returns the given column's icon [Texture2D]. Error if no icon is set.
</description>
</method>
<method name="get_icon_max_width" qualifiers="const">
<return type="int" />
- <argument index="0" name="column" type="int" />
+ <param index="0" name="column" type="int" />
<description>
Returns the column's icon's maximum width.
</description>
</method>
<method name="get_icon_modulate" qualifiers="const">
<return type="Color" />
- <argument index="0" name="column" type="int" />
+ <param index="0" name="column" type="int" />
<description>
Returns the [Color] modulating the column's icon.
</description>
</method>
<method name="get_icon_region" qualifiers="const">
<return type="Rect2" />
- <argument index="0" name="column" type="int" />
+ <param index="0" name="column" type="int" />
<description>
Returns the icon [Texture2D] region as [Rect2].
</description>
@@ -215,14 +208,14 @@
</method>
<method name="get_language" qualifiers="const">
<return type="String" />
- <argument index="0" name="column" type="int" />
+ <param index="0" name="column" type="int" />
<description>
Returns item's text language code.
</description>
</method>
<method name="get_metadata" qualifiers="const">
<return type="Variant" />
- <argument index="0" name="column" type="int" />
+ <param index="0" name="column" type="int" />
<description>
Returns the metadata value that was set for the given column using [method set_metadata].
</description>
@@ -230,23 +223,15 @@
<method name="get_next" qualifiers="const">
<return type="TreeItem" />
<description>
- Returns the next TreeItem in the tree or a null object if there is none.
+ Returns the next sibling TreeItem in the tree or a null object if there is none.
</description>
</method>
<method name="get_next_visible">
<return type="TreeItem" />
- <argument index="0" name="wrap" type="bool" default="false" />
- <description>
- Returns the next visible 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].
- </description>
- </method>
- <method name="get_opentype_feature" qualifiers="const">
- <return type="int" />
- <argument index="0" name="column" type="int" />
- <argument index="1" name="tag" type="String" />
+ <param index="0" name="wrap" type="bool" default="false" />
<description>
- Returns OpenType feature [code]tag[/code] of the item's text.
+ Returns the next visible sibling TreeItem in the tree or a null object if there is none.
+ 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">
@@ -258,74 +243,74 @@
<method name="get_prev">
<return type="TreeItem" />
<description>
- Returns the previous TreeItem in the tree or a null object if there is none.
+ Returns the previous sibling TreeItem in the tree or a null object if there is none.
</description>
</method>
<method name="get_prev_visible">
<return type="TreeItem" />
- <argument index="0" name="wrap" type="bool" default="false" />
+ <param index="0" name="wrap" type="bool" default="false" />
<description>
- Returns the previous visible 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].
+ Returns the previous visible sibling TreeItem in the tree or a null object if there is none.
+ 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">
<return type="float" />
- <argument index="0" name="column" type="int" />
+ <param index="0" name="column" type="int" />
<description>
Returns the value of a [constant CELL_MODE_RANGE] column.
</description>
</method>
<method name="get_range_config">
<return type="Dictionary" />
- <argument index="0" name="column" type="int" />
+ <param index="0" name="column" type="int" />
<description>
Returns a dictionary containing the range parameters for a given column. The keys are "min", "max", "step", and "expr".
</description>
</method>
<method name="get_structured_text_bidi_override" qualifiers="const">
<return type="int" enum="TextServer.StructuredTextParser" />
- <argument index="0" name="column" type="int" />
+ <param index="0" name="column" type="int" />
<description>
</description>
</method>
<method name="get_structured_text_bidi_override_options" qualifiers="const">
<return type="Array" />
- <argument index="0" name="column" type="int" />
+ <param index="0" name="column" type="int" />
<description>
</description>
</method>
<method name="get_suffix" qualifiers="const">
<return type="String" />
- <argument index="0" name="column" type="int" />
+ <param index="0" name="column" type="int" />
<description>
Gets the suffix string shown after the column value.
</description>
</method>
<method name="get_text" qualifiers="const">
<return type="String" />
- <argument index="0" name="column" type="int" />
+ <param index="0" name="column" type="int" />
<description>
Returns the given column's text.
</description>
</method>
<method name="get_text_alignment" qualifiers="const">
<return type="int" enum="HorizontalAlignment" />
- <argument index="0" name="column" type="int" />
+ <param index="0" name="column" type="int" />
<description>
Returns the given column's text alignment.
</description>
</method>
<method name="get_text_direction" qualifiers="const">
<return type="int" enum="Control.TextDirection" />
- <argument index="0" name="column" type="int" />
+ <param index="0" name="column" type="int" />
<description>
Returns item's text base writing direction.
</description>
</method>
<method name="get_tooltip" qualifiers="const">
<return type="String" />
- <argument index="0" name="column" type="int" />
+ <param index="0" name="column" type="int" />
<description>
Returns the given column's tooltip.
</description>
@@ -338,335 +323,326 @@
</method>
<method name="is_button_disabled" qualifiers="const">
<return type="bool" />
- <argument index="0" name="column" type="int" />
- <argument index="1" name="button_idx" type="int" />
+ <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" />
- <argument index="0" name="column" type="int" />
+ <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">
<return type="bool" />
- <argument index="0" name="column" type="int" />
+ <param index="0" name="column" type="int" />
<description>
</description>
</method>
<method name="is_editable">
<return type="bool" />
- <argument index="0" name="column" type="int" />
+ <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" />
- <argument index="0" name="column" type="int" />
+ <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" />
- <argument index="0" name="column" type="int" />
+ <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" />
- <argument index="0" name="column" type="int" />
+ <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" />
- <argument index="0" name="item" type="TreeItem" />
+ <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>
<method name="move_before">
<return type="void" />
- <argument index="0" name="item" type="TreeItem" />
+ <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>
<method name="propagate_check">
<return type="void" />
- <argument index="0" name="column" type="int" />
- <argument index="1" name="emit_signal" type="bool" default="true" />
+ <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">
<return type="void" />
- <argument index="0" name="child" type="TreeItem" />
+ <param index="0" name="child" type="TreeItem" />
<description>
Removes the given child [TreeItem] and all its children from the [Tree]. Note that it doesn't free the item from memory, so it can be reused later. To completely remove a [TreeItem] use [method Object.free].
</description>
</method>
<method name="select">
<return type="void" />
- <argument index="0" name="column" type="int" />
+ <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">
<return type="void" />
- <argument index="0" name="column" type="int" />
- <argument index="1" name="button_idx" type="int" />
- <argument index="2" name="button" type="Texture2D" />
+ <param index="0" name="column" type="int" />
+ <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_disabled">
<return type="void" />
- <argument index="0" name="column" type="int" />
- <argument index="1" name="button_idx" type="int" />
- <argument index="2" name="disabled" type="bool" />
+ <param index="0" name="column" type="int" />
+ <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">
<return type="void" />
- <argument index="0" name="column" type="int" />
- <argument index="1" name="mode" type="int" enum="TreeItem.TreeCellMode" />
+ <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">
<return type="void" />
- <argument index="0" name="column" type="int" />
- <argument index="1" name="checked" type="bool" />
+ <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_custom_as_button">
<return type="void" />
- <argument index="0" name="column" type="int" />
- <argument index="1" name="enable" type="bool" />
+ <param index="0" name="column" type="int" />
+ <param index="1" name="enable" type="bool" />
<description>
</description>
</method>
<method name="set_custom_bg_color">
<return type="void" />
- <argument index="0" name="column" type="int" />
- <argument index="1" name="color" type="Color" />
- <argument index="2" name="just_outline" type="bool" default="false" />
+ <param index="0" name="column" type="int" />
+ <param index="1" name="color" type="Color" />
+ <param index="2" name="just_outline" type="bool" default="false" />
<description>
Sets the given column's custom background color and whether to just use it as an outline.
</description>
</method>
<method name="set_custom_color">
<return type="void" />
- <argument index="0" name="column" type="int" />
- <argument index="1" name="color" type="Color" />
+ <param index="0" name="column" type="int" />
+ <param index="1" name="color" type="Color" />
<description>
Sets the given column's custom color.
</description>
</method>
<method name="set_custom_draw">
<return type="void" />
- <argument index="0" name="column" type="int" />
- <argument index="1" name="object" type="Object" />
- <argument index="2" name="callback" type="StringName" />
+ <param index="0" name="column" type="int" />
+ <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">
<return type="void" />
- <argument index="0" name="column" type="int" />
- <argument index="1" name="font" type="Font" />
+ <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">
<return type="void" />
- <argument index="0" name="column" type="int" />
- <argument index="1" name="font_size" type="int" />
+ <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">
<return type="void" />
- <argument index="0" name="column" type="int" />
- <argument index="1" name="enabled" type="bool" />
+ <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">
<return type="void" />
- <argument index="0" name="column" type="int" />
- <argument index="1" name="enable" type="bool" />
+ <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">
<return type="void" />
- <argument index="0" name="column" type="int" />
- <argument index="1" name="texture" type="Texture2D" />
+ <param index="0" name="column" type="int" />
+ <param index="1" name="texture" type="Texture2D" />
<description>
Sets the given column's icon [Texture2D].
</description>
</method>
<method name="set_icon_max_width">
<return type="void" />
- <argument index="0" name="column" type="int" />
- <argument index="1" name="width" type="int" />
+ <param index="0" name="column" type="int" />
+ <param index="1" name="width" type="int" />
<description>
Sets the given column's icon's maximum width.
</description>
</method>
<method name="set_icon_modulate">
<return type="void" />
- <argument index="0" name="column" type="int" />
- <argument index="1" name="modulate" type="Color" />
+ <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">
<return type="void" />
- <argument index="0" name="column" type="int" />
- <argument index="1" name="region" type="Rect2" />
+ <param index="0" name="column" type="int" />
+ <param index="1" name="region" type="Rect2" />
<description>
Sets the given column's icon's texture region.
</description>
</method>
<method name="set_indeterminate">
<return type="void" />
- <argument index="0" name="column" type="int" />
- <argument index="1" name="indeterminate" type="bool" />
+ <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>
<method name="set_language">
<return type="void" />
- <argument index="0" name="column" type="int" />
- <argument index="1" name="language" type="String" />
+ <param index="0" name="column" type="int" />
+ <param index="1" name="language" type="String" />
<description>
Sets language code of item's text used for line-breaking and text shaping algorithms, if left empty current locale is used instead.
</description>
</method>
<method name="set_metadata">
<return type="void" />
- <argument index="0" name="column" type="int" />
- <argument index="1" name="meta" type="Variant" />
+ <param index="0" name="column" type="int" />
+ <param index="1" name="meta" type="Variant" />
<description>
Sets the metadata value for the given column, which can be retrieved later using [method get_metadata]. This can be used, for example, to store a reference to the original data.
</description>
</method>
- <method name="set_opentype_feature">
- <return type="void" />
- <argument index="0" name="column" type="int" />
- <argument index="1" name="tag" type="String" />
- <argument index="2" name="value" type="int" />
- <description>
- Sets OpenType feature [code]tag[/code] for the item's text.
- </description>
- </method>
<method name="set_range">
<return type="void" />
- <argument index="0" name="column" type="int" />
- <argument index="1" name="value" type="float" />
+ <param index="0" name="column" type="int" />
+ <param index="1" name="value" type="float" />
<description>
Sets the value of a [constant CELL_MODE_RANGE] column.
</description>
</method>
<method name="set_range_config">
<return type="void" />
- <argument index="0" name="column" type="int" />
- <argument index="1" name="min" type="float" />
- <argument index="2" name="max" type="float" />
- <argument index="3" name="step" type="float" />
- <argument index="4" name="expr" type="bool" default="false" />
+ <param index="0" name="column" type="int" />
+ <param index="1" name="min" type="float" />
+ <param index="2" name="max" type="float" />
+ <param index="3" name="step" type="float" />
+ <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">
<return type="void" />
- <argument index="0" name="column" type="int" />
- <argument index="1" name="selectable" type="bool" />
+ <param index="0" name="column" type="int" />
+ <param index="1" name="selectable" type="bool" />
<description>
If [code]true[/code], the given column is selectable.
</description>
</method>
<method name="set_structured_text_bidi_override">
<return type="void" />
- <argument index="0" name="column" type="int" />
- <argument index="1" name="parser" type="int" enum="TextServer.StructuredTextParser" />
+ <param index="0" name="column" type="int" />
+ <param index="1" name="parser" type="int" enum="TextServer.StructuredTextParser" />
<description>
</description>
</method>
<method name="set_structured_text_bidi_override_options">
<return type="void" />
- <argument index="0" name="column" type="int" />
- <argument index="1" name="args" type="Array" />
+ <param index="0" name="column" type="int" />
+ <param index="1" name="args" type="Array" />
<description>
</description>
</method>
<method name="set_suffix">
<return type="void" />
- <argument index="0" name="column" type="int" />
- <argument index="1" name="text" type="String" />
+ <param index="0" name="column" type="int" />
+ <param index="1" name="text" type="String" />
<description>
Sets a string to be shown after a column's value (for example, a unit abbreviation).
</description>
</method>
<method name="set_text">
<return type="void" />
- <argument index="0" name="column" type="int" />
- <argument index="1" name="text" type="String" />
+ <param index="0" name="column" type="int" />
+ <param index="1" name="text" type="String" />
<description>
Sets the given column's text value.
</description>
</method>
<method name="set_text_alignment">
<return type="void" />
- <argument index="0" name="column" type="int" />
- <argument index="1" name="text_alignment" type="int" enum="HorizontalAlignment" />
+ <param index="0" name="column" type="int" />
+ <param index="1" name="text_alignment" type="int" enum="HorizontalAlignment" />
<description>
Sets the given column's text alignment. See [enum HorizontalAlignment] for possible values.
</description>
</method>
<method name="set_text_direction">
<return type="void" />
- <argument index="0" name="column" type="int" />
- <argument index="1" name="direction" type="int" enum="Control.TextDirection" />
+ <param index="0" name="column" type="int" />
+ <param index="1" name="direction" type="int" enum="Control.TextDirection" />
<description>
Sets item's text base writing direction.
</description>
</method>
<method name="set_tooltip">
<return type="void" />
- <argument index="0" name="column" type="int" />
- <argument index="1" name="tooltip" type="String" />
+ <param index="0" name="column" type="int" />
+ <param index="1" name="tooltip" type="String" />
<description>
Sets the given column's tooltip text.
</description>
@@ -687,6 +663,10 @@
<member name="disable_folding" type="bool" setter="set_disable_folding" getter="is_folding_disabled">
If [code]true[/code], folding is disabled for this TreeItem.
</member>
+ <member name="visible" type="bool" setter="set_visible" getter="is_visible">
+ If [code]true[/code], the [TreeItem] is visible (default).
+ Note that if a [TreeItem] is set to not be visible, none of its children will be visible either.
+ </member>
</members>
<constants>
<constant name="CELL_MODE_STRING" value="0" enum="TreeCellMode">
diff --git a/doc/classes/TubeTrailMesh.xml b/doc/classes/TubeTrailMesh.xml
index 05fcbe967a..ddc544dc97 100644
--- a/doc/classes/TubeTrailMesh.xml
+++ b/doc/classes/TubeTrailMesh.xml
@@ -11,7 +11,7 @@
</member>
<member name="radial_steps" type="int" setter="set_radial_steps" getter="get_radial_steps" default="8">
</member>
- <member name="radius" type="float" setter="set_radius" getter="get_radius" default="1.0">
+ <member name="radius" type="float" setter="set_radius" getter="get_radius" default="0.5">
</member>
<member name="section_length" type="float" setter="set_section_length" getter="get_section_length" default="0.2">
</member>
diff --git a/doc/classes/Tween.xml b/doc/classes/Tween.xml
index f9ec0d115d..c7fc78c1d3 100644
--- a/doc/classes/Tween.xml
+++ b/doc/classes/Tween.xml
@@ -4,50 +4,50 @@
Lightweight object used for general-purpose animation via script, using [Tweener]s.
</brief_description>
<description>
- Tweens are mostly useful for animations requiring a numerical property to be interpolated over a range of values. The name [i]tween[/i] comes from [i]in-betweening[/i], an animation technique where you specify [i]keyframes[/i] and the computer interpolates the frames that appear between them.
+ Tweens are mostly useful for animations requiring a numerical property to be interpolated over a range of values. The name [i]tween[/i] comes from [i]in-betweening[/i], an animation technique where you specify [i]keyframes[/i] and the computer interpolates the frames that appear between them. Animating something with a [Tween] is called tweening.
[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 composed of a sequence of [Tweener]s, which by default are executed one after another. You can create a sequence by appending [Tweener]s to the [Tween]. Animating something with a [Tweener] is called tweening. Example tweening sequence looks like this:
+ 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]
var tween = get_tree().create_tween()
tween.tween_property($Sprite, "modulate", Color.red, 1)
tween.tween_property($Sprite, "scale", Vector2(), 1)
tween.tween_callback($Sprite.queue_free)
[/codeblock]
- This sequence will make the [code]$Sprite[/code] node turn red, then shrink and finally the [method Node.queue_free] is called to remove the sprite. See methods [method tween_property], [method tween_interval], [method tween_callback] and [method tween_method] for more usage information.
- When a [Tweener] is created with one of the [code]tween_*[/code] methods, a chained method call can be used to tweak the properties of this [Tweener]. For example, if you want to set different transition type in the above example, you can do:
+ 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]
var tween = get_tree().create_tween()
tween.tween_property($Sprite, "modulate", Color.red, 1).set_trans(Tween.TRANS_SINE)
tween.tween_property($Sprite, "scale", Vector2(), 1).set_trans(Tween.TRANS_BOUNCE)
tween.tween_callback($Sprite.queue_free)
[/codeblock]
- Most of the [Tween] methods can be chained this way too. In this example the [Tween] is bound and have set a default transition:
+ 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]
var tween = get_tree().create_tween().bind_node(self).set_trans(Tween.TRANS_ELASTIC)
tween.tween_property($Sprite, "modulate", Color.red, 1)
tween.tween_property($Sprite, "scale", Vector2(), 1)
tween.tween_callback($Sprite.queue_free)
[/codeblock]
- Another interesting use for [Tween]s is animating arbitrary set of objects:
+ Another interesting use for [Tween]s is animating arbitrary sets of objects:
[codeblock]
var tween = create_tween()
for sprite in get_children():
- tween.tween_property(sprite, "position", Vector2(), 1)
+ tween.tween_property(sprite, "position", Vector2(0, 0), 1)
[/codeblock]
In the example above, all children of a node are moved one after another to position (0, 0).
- Some [Tweener]s use transitions and eases. The first accepts an [enum TransitionType] constant, and refers to the way the timing of the animation is handled (see [url=https://easings.net/]easings.net[/url] for some examples). The second accepts an [enum EaseType] constant, and controls where the [code]trans_type[/code] is applied to the interpolation (in the beginning, the end, or both). If you don't know which transition and easing to pick, you can try different [enum TransitionType] constants with [constant EASE_IN_OUT], and use the one that looks best.
+ 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 was created.
+ [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.
</description>
<tutorials>
</tutorials>
<methods>
<method name="bind_node">
<return type="Tween" />
- <argument index="0" name="node" type="Node" />
+ <param index="0" name="node" type="Node" />
<description>
- Binds this [Tween] with the given [code]node[/code]. [Tween]s are processed directly by the [SceneTree], so they run independently of the animated nodes. When you bind a [Node] with the [Tween], the [Tween] will halt the animation when the object is not inside tree and the [Tween] will be automatically killed when the bound object is freed. Also [constant TWEEN_PAUSE_BOUND] will make the pausing behavior dependent on the bound node.
+ Binds this [Tween] with the given [param node]. [Tween]s are processed directly by the [SceneTree], so they run independently of the animated nodes. When you bind a [Node] with the [Tween], the [Tween] will halt the animation when the object is not inside tree and the [Tween] will be automatically killed when the bound object is freed. Also [constant TWEEN_PAUSE_BOUND] will make the pausing behavior dependent on the bound node.
For a shorter way to create and bind a [Tween], you can use [method Node.create_tween].
</description>
</method>
@@ -65,35 +65,35 @@
</method>
<method name="custom_step">
<return type="bool" />
- <argument index="0" name="delta" type="float" />
+ <param index="0" name="delta" type="float" />
<description>
- Processes the [Tween] by given [code]delta[/code] value, in seconds. Mostly useful when the [Tween] is paused, for controlling it manually. Can also be used to end the [Tween] animation immediately, by using [code]delta[/code] longer than the whole duration.
+ Processes the [Tween] by the given [param delta] value, in seconds. This is mostly useful for manual control when the [Tween] is paused. It can also be used to end the [Tween] animation immediately, by setting [param delta] longer than the whole duration of the [Tween] animation.
Returns [code]true[/code] if the [Tween] still has [Tweener]s that haven't finished.
- [b]Note:[/b] The [Tween] will become invalid after finished, but you can call [method stop] after the step, to keep it and reset.
+ [b]Note:[/b] The [Tween] will become invalid in the next processing frame after its animation finishes. Calling [method stop] after performing [method custom_step] instead keeps and resets the [Tween].
</description>
</method>
<method name="get_total_elapsed_time" qualifiers="const">
<return type="float" />
<description>
- Returns the total time in seconds the [Tween] has been animating (i.e. time since it started, not counting pauses etc.). The time is affected by [method set_speed_scale] and [method stop] will reset it to [code]0[/code].
+ Returns the total time in seconds the [Tween] has been animating (i.e. the time since it started, not counting pauses etc.). The time is affected by [method set_speed_scale], and [method stop] will reset it to [code]0[/code].
[b]Note:[/b] As it results from accumulating frame deltas, the time returned after the [Tween] has finished animating will be slightly greater than the actual [Tween] duration.
</description>
</method>
<method name="interpolate_value" qualifiers="static">
<return type="Variant" />
- <argument index="0" name="initial_value" type="Variant" />
- <argument index="1" name="delta_value" type="Variant" />
- <argument index="2" name="elapsed_time" type="float" />
- <argument index="3" name="duration" type="float" />
- <argument index="4" name="trans_type" type="int" enum="Tween.TransitionType" />
- <argument index="5" name="ease_type" type="int" enum="Tween.EaseType" />
+ <param index="0" name="initial_value" type="Variant" />
+ <param index="1" name="delta_value" type="Variant" />
+ <param index="2" name="elapsed_time" type="float" />
+ <param index="3" name="duration" type="float" />
+ <param index="4" name="trans_type" type="int" enum="Tween.TransitionType" />
+ <param index="5" name="ease_type" type="int" enum="Tween.EaseType" />
<description>
This method can be used for manual interpolation of a value, when you don't want [Tween] to do animating for you. It's similar to [method @GlobalScope.lerp], but with support for custom transition and easing.
- [code]initial_value[/code] is the starting value of the interpolation.
- [code]delta_value[/code] is the change of the value in the interpolation, i.e. it's equal to [code]final_value - initial_value[/code].
- [code]elapsed_time[/code] is the time in seconds that passed after the interpolation started and it's used to control the position of the interpolation. E.g. when it's equal to half of the [code]duration[/code], the interpolated value will be halfway between initial and final values. This value can also be greater than [code]duration[/code] or lower than 0, which will extrapolate the value.
- [code]duration[/code] is the total time of the interpolation.
- [b]Note:[/b] If [code]duration[/code] is equal to [code]0[/code], the method will always return the final value, regardless of [code]elapsed_time[/code] provided.
+ [param initial_value] is the starting value of the interpolation.
+ [param delta_value] is the change of the value in the interpolation, i.e. it's equal to [code]final_value - initial_value[/code].
+ [param elapsed_time] is the time in seconds that passed after the interpolation started and it's used to control the position of the interpolation. E.g. when it's equal to half of the [param duration], the interpolated value will be halfway between initial and final values. This value can also be greater than [param duration] or lower than 0, which will extrapolate the value.
+ [param duration] is the total time of the interpolation.
+ [b]Note:[/b] If [param duration] is equal to [code]0[/code], the method will always return the final value, regardless of [param elapsed_time] provided.
</description>
</method>
<method name="is_running">
@@ -105,7 +105,7 @@
<method name="is_valid">
<return type="bool" />
<description>
- Returns whether the [Tween] is valid. A valid [Tween] is a [Tween] contained by the scene tree (i.e. the array from [method SceneTree.get_processed_tweens] will contain this [Tween]). [Tween] might become invalid when it has finished tweening or was killed, also when created with [code]Tween.new()[/code]. Invalid [Tween] can't have [Tweener]s appended, because it can't animate them.
+ Returns whether the [Tween] is valid. A valid [Tween] is a [Tween] contained by the scene tree (i.e. the array from [method SceneTree.get_processed_tweens] will contain this [Tween]). A [Tween] might become invalid when it has finished tweening, is killed, or when created with [code]Tween.new()[/code]. Invalid [Tween]s can't have [Tweener]s appended.
</description>
</method>
<method name="kill">
@@ -142,30 +142,30 @@
</method>
<method name="set_ease">
<return type="Tween" />
- <argument index="0" name="ease" type="int" enum="Tween.EaseType" />
+ <param index="0" name="ease" type="int" enum="Tween.EaseType" />
<description>
Sets the default ease type for [PropertyTweener]s and [MethodTweener]s animated by this [Tween].
</description>
</method>
<method name="set_loops">
<return type="Tween" />
- <argument index="0" name="loops" type="int" default="0" />
+ <param index="0" name="loops" type="int" default="0" />
<description>
Sets the number of times the tweening sequence will be repeated, i.e. [code]set_loops(2)[/code] will run the animation twice.
- Calling this method without arguments will make the [Tween] run infinitely, until it is either killed by [method kill] or by freeing bound node, or all the animated objects have been freed (which makes further animation impossible).
- [b]Warning:[/b] Make sure to always add some duration/delay when using infinite loops. 0-duration looped animations (e.g. single [CallbackTweener] with no delay or [PropertyTweener] with invalid node) are equivalent to infinite [code]while[/code] loops and will freeze your game. If a [Tween]'s lifetime depends on some node, always use [method bind_node].
+ Calling this method without arguments will make the [Tween] run infinitely, until either it is killed with [method kill], the [Tween]'s bound node is freed, or all the animated objects have been freed (which makes further animation impossible).
+ [b]Warning:[/b] Make sure to always add some duration/delay when using infinite loops. To prevent the game freezing, 0-duration looped animations (e.g. a single [CallbackTweener] with no delay) are stopped after a small number of loops, which may produce unexpected results. If a [Tween]'s lifetime depends on some node, always use [method bind_node].
</description>
</method>
<method name="set_parallel">
<return type="Tween" />
- <argument index="0" name="parallel" type="bool" default="true" />
+ <param index="0" name="parallel" type="bool" default="true" />
<description>
- If [code]parallel[/code] is [code]true[/code], the [Tweener]s appended after this method will by default run simultaneously, as opposed to sequentially.
+ If [param parallel] is [code]true[/code], the [Tweener]s appended after this method will by default run simultaneously, as opposed to sequentially.
</description>
</method>
<method name="set_pause_mode">
<return type="Tween" />
- <argument index="0" name="mode" type="int" enum="Tween.TweenPauseMode" />
+ <param index="0" name="mode" type="int" enum="Tween.TweenPauseMode" />
<description>
Determines the behavior of the [Tween] when the [SceneTree] is paused. Check [enum TweenPauseMode] for options.
Default value is [constant TWEEN_PAUSE_BOUND].
@@ -173,7 +173,7 @@
</method>
<method name="set_process_mode">
<return type="Tween" />
- <argument index="0" name="mode" type="int" enum="Tween.TweenProcessMode" />
+ <param index="0" name="mode" type="int" enum="Tween.TweenProcessMode" />
<description>
Determines whether the [Tween] should run during idle frame (see [method Node._process]) or physics frame (see [method Node._physics_process].
Default value is [constant TWEEN_PROCESS_IDLE].
@@ -181,14 +181,14 @@
</method>
<method name="set_speed_scale">
<return type="Tween" />
- <argument index="0" name="speed" type="float" />
+ <param index="0" name="speed" type="float" />
<description>
Scales the speed of tweening. This affects all [Tweener]s and their delays.
</description>
</method>
<method name="set_trans">
<return type="Tween" />
- <argument index="0" name="trans" type="int" enum="Tween.TransitionType" />
+ <param index="0" name="trans" type="int" enum="Tween.TransitionType" />
<description>
Sets the default transition type for [PropertyTweener]s and [MethodTweener]s animated by this [Tween].
</description>
@@ -201,7 +201,7 @@
</method>
<method name="tween_callback">
<return type="CallbackTweener" />
- <argument index="0" name="callback" type="Callable" />
+ <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.
@@ -219,9 +219,9 @@
</method>
<method name="tween_interval">
<return type="IntervalTweener" />
- <argument index="0" name="time" type="float" />
+ <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 for using the delay in other [Tweener]s or when there's no animation (in which case the [Tween] acts as a timer). [code]time[/code] is the length of the interval, in seconds.
+ 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]
# ... some code
@@ -242,12 +242,12 @@
</method>
<method name="tween_method">
<return type="MethodTweener" />
- <argument index="0" name="method" type="Callable" />
- <argument index="1" name="from" type="Variant" />
- <argument index="2" name="to" type="Variant" />
- <argument index="3" name="duration" type="float" />
+ <param index="0" name="method" type="Callable" />
+ <param index="1" name="from" type="Variant" />
+ <param index="2" name="to" type="Variant" />
+ <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 [code]from[/code] and [code]to[/code] over the time specified by [code]duration[/code], in seconds. Use [method Callable.bind] to bind additional arguments for the call. You can use [method MethodTweener.set_ease] and [method MethodTweener.set_trans] to tweak the easing and transition of the value or [method MethodTweener.set_delay] to delay the tweening.
+ 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]
var tween = create_tween()
@@ -266,12 +266,12 @@
</method>
<method name="tween_property">
<return type="PropertyTweener" />
- <argument index="0" name="object" type="Object" />
- <argument index="1" name="property" type="NodePath" />
- <argument index="2" name="final_val" type="Variant" />
- <argument index="3" name="duration" type="float" />
+ <param index="0" name="object" type="Object" />
+ <param index="1" name="property" type="NodePath" />
+ <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 [code]property[/code] of an [code]object[/code] between an initial value and [code]final_val[/code] in a span of time equal to [code]duration[/code], in seconds. The initial value by default is a value at the time the tweening of the [PropertyTweener] start. For example:
+ 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]
var tween = create_tween()
tween.tween_property($Sprite, "position", Vector2(100, 200), 1)
@@ -292,19 +292,19 @@
<signal name="finished">
<description>
Emitted when the [Tween] has finished all tweening. Never emitted when the [Tween] is set to infinite looping (see [method set_loops]).
- [b]Note:[/b] The [Tween] is removed (invalidated) after this signal is emitted, but it doesn't happen immediately, but on the next processing frame. Calling [method stop] inside the signal callback will preserve the [Tween].
+ [b]Note:[/b] The [Tween] is removed (invalidated) in the next processing frame after this signal is emitted. Calling [method stop] inside the signal callback will prevent the [Tween] from being removed.
</description>
</signal>
<signal name="loop_finished">
- <argument index="0" name="loop_count" type="int" />
+ <param index="0" name="loop_count" type="int" />
<description>
- Emitted when a full loop is complete (see [method set_loops]), providing the loop index. This signal is not emitted after final loop, use [signal finished] instead for this case.
+ Emitted when a full loop is complete (see [method set_loops]), providing the loop index. This signal is not emitted after the final loop, use [signal finished] instead for this case.
</description>
</signal>
<signal name="step_finished">
- <argument index="0" name="idx" type="int" />
+ <param index="0" name="idx" type="int" />
<description>
- Emitted when one step of the [Tween] is complete, providing the step index. One step is either a single [Tweener] or a group of [Tweener]s running parallelly.
+ Emitted when one step of the [Tween] is complete, providing the step index. One step is either a single [Tweener] or a group of [Tweener]s running in parallel.
</description>
</signal>
</signals>
diff --git a/doc/classes/UDPServer.xml b/doc/classes/UDPServer.xml
index 6fb4d50c0c..c3a3a49a80 100644
--- a/doc/classes/UDPServer.xml
+++ b/doc/classes/UDPServer.xml
@@ -143,10 +143,10 @@
</method>
<method name="listen">
<return type="int" enum="Error" />
- <argument index="0" name="port" type="int" />
- <argument index="1" name="bind_address" type="String" default="&quot;*&quot;" />
+ <param index="0" name="port" type="int" />
+ <param index="1" name="bind_address" type="String" default="&quot;*&quot;" />
<description>
- Starts the server by opening a UDP socket listening on the given port. You can optionally specify a [code]bind_address[/code] to only listen for packets sent to that address. See also [method PacketPeerUDP.bind].
+ Starts the server by opening a UDP socket listening on the given [param port]. You can optionally specify a [param bind_address] to only listen for packets sent to that address. See also [method PacketPeerUDP.bind].
</description>
</method>
<method name="poll">
diff --git a/doc/classes/UndoRedo.xml b/doc/classes/UndoRedo.xml
index 80a548ceaf..3ef59b1c39 100644
--- a/doc/classes/UndoRedo.xml
+++ b/doc/classes/UndoRedo.xml
@@ -64,74 +64,74 @@
<methods>
<method name="add_do_method" qualifiers="vararg">
<return type="void" />
- <argument index="0" name="object" type="Object" />
- <argument index="1" name="method" type="StringName" />
+ <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.
+ Register a [param method] that will be called when the action is committed.
</description>
</method>
<method name="add_do_property">
<return type="void" />
- <argument index="0" name="object" type="Object" />
- <argument index="1" name="property" type="StringName" />
- <argument index="2" name="value" type="Variant" />
+ <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".
+ Register a [param property] that would change its value to [param value] when the action is committed.
</description>
</method>
<method name="add_do_reference">
<return type="void" />
- <argument index="0" name="object" type="Object" />
+ <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" />
- <argument index="0" name="object" type="Object" />
- <argument index="1" name="method" type="StringName" />
+ <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.
+ Register a [param method] that will be called when the action is undone.
</description>
</method>
<method name="add_undo_property">
<return type="void" />
- <argument index="0" name="object" type="Object" />
- <argument index="1" name="property" type="StringName" />
- <argument index="2" name="value" type="Variant" />
+ <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".
+ Register a [param property] that would change its value to [param value] when the action is undone.
</description>
</method>
<method name="add_undo_reference">
<return type="void" />
- <argument index="0" name="object" type="Object" />
+ <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="clear_history">
<return type="void" />
- <argument index="0" name="increase_version" type="bool" default="true" />
+ <param index="0" name="increase_version" type="bool" default="true" />
<description>
Clear the undo/redo history and associated references.
- Passing [code]false[/code] to [code]increase_version[/code] will prevent the version number to be increased from this.
+ Passing [code]false[/code] to [param increase_version] will prevent the version number from increasing when the history is cleared.
</description>
</method>
<method name="commit_action">
<return type="void" />
- <argument index="0" name="execute" type="bool" default="true" />
+ <param index="0" name="execute" type="bool" default="true" />
<description>
- Commit the action. If [code]execute[/code] is true (default), all "do" methods/properties are called/set when this function is called.
+ Commit the action. If [param execute] is [code]true[/code] (which it is by default), all "do" methods/properties are called/set when this function is called.
</description>
</method>
<method name="create_action">
<return type="void" />
- <argument index="0" name="name" type="String" />
- <argument index="1" name="merge_mode" type="int" enum="UndoRedo.MergeMode" default="0" />
+ <param index="0" name="name" type="String" />
+ <param index="1" name="merge_mode" type="int" enum="UndoRedo.MergeMode" default="0" />
<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 [code]merge_mode[/code] argument. See [enum MergeMode] for details.
+ The way actions are merged is dictated by [param merge_mode]. See [enum MergeMode] for details.
</description>
</method>
<method name="end_force_keep_in_merge_ends">
@@ -142,7 +142,7 @@
</method>
<method name="get_action_name">
<return type="String" />
- <argument index="0" name="id" type="int" />
+ <param index="0" name="id" type="int" />
<description>
Gets the action name from its index.
</description>
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 f9ef126658..19fe2e2bfc 100644
--- a/doc/classes/Vector2.xml
+++ b/doc/classes/Vector2.xml
@@ -25,24 +25,24 @@
</constructor>
<constructor name="Vector2">
<return type="Vector2" />
- <argument index="0" name="from" type="Vector2" />
+ <param index="0" name="from" type="Vector2" />
<description>
Constructs a [Vector2] as a copy of the given [Vector2].
</description>
</constructor>
<constructor name="Vector2">
<return type="Vector2" />
- <argument index="0" name="from" type="Vector2i" />
+ <param index="0" name="from" type="Vector2i" />
<description>
Constructs a new [Vector2] from [Vector2i].
</description>
</constructor>
<constructor name="Vector2">
<return type="Vector2" />
- <argument index="0" name="x" type="float" />
- <argument index="1" name="y" type="float" />
+ <param index="0" name="x" type="float" />
+ <param index="1" name="y" type="float" />
<description>
- Constructs a new [Vector2] from the given [code]x[/code] and [code]y[/code].
+ Constructs a new [Vector2] from the given [param x] and [param y].
</description>
</constructor>
</constructors>
@@ -64,7 +64,7 @@
</method>
<method name="angle_to" qualifiers="const">
<return type="float" />
- <argument index="0" name="to" type="Vector2" />
+ <param index="0" name="to" type="Vector2" />
<description>
Returns the angle to the given vector, in radians.
[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/vector2_angle_to.png]Illustration of the returned angle.[/url]
@@ -72,7 +72,7 @@
</method>
<method name="angle_to_point" qualifiers="const">
<return type="float" />
- <argument index="0" name="to" type="Vector2" />
+ <param index="0" name="to" type="Vector2" />
<description>
Returns the angle between the line connecting the two points and the X axis, in radians.
[code]a.angle_to_point(b)[/code] is equivalent of doing [code](b - a).angle()[/code].
@@ -85,9 +85,19 @@
Returns the aspect ratio of this vector, the ratio of [member x] to [member y].
</description>
</method>
+ <method name="bezier_interpolate" qualifiers="const">
+ <return type="Vector2" />
+ <param index="0" name="control_1" type="Vector2" />
+ <param index="1" name="control_2" type="Vector2" />
+ <param index="2" name="end" type="Vector2" />
+ <param index="3" name="t" type="float" />
+ <description>
+ Returns the point at the given [param t] on the [url=https://en.wikipedia.org/wiki/B%C3%A9zier_curve]Bezier curve[/url] defined by this vector and the given [param control_1], [param control_2], and [param end] points.
+ </description>
+ </method>
<method name="bounce" qualifiers="const">
<return type="Vector2" />
- <argument index="0" name="n" type="Vector2" />
+ <param index="0" name="n" type="Vector2" />
<description>
Returns the vector "bounced off" from a plane defined by the given normal.
</description>
@@ -100,58 +110,72 @@
</method>
<method name="clamp" qualifiers="const">
<return type="Vector2" />
- <argument index="0" name="min" type="Vector2" />
- <argument index="1" name="max" type="Vector2" />
+ <param index="0" name="min" type="Vector2" />
+ <param index="1" name="max" type="Vector2" />
<description>
- Returns a new vector with all components clamped between the components of [code]min[/code] and [code]max[/code], by running [method @GlobalScope.clamp] on each component.
+ 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="cross" qualifiers="const">
<return type="float" />
- <argument index="0" name="with" type="Vector2" />
+ <param index="0" name="with" type="Vector2" />
<description>
- Returns the 2D analog of the cross product for this vector and [code]with[/code].
+ Returns the 2D analog of the cross product for this vector and [param with].
This is the signed area of the parallelogram formed by the two vectors. If the second vector is clockwise from the first vector, then the cross product is the positive area. If counter-clockwise, the cross product is the negative area.
[b]Note:[/b] Cross product is not defined in 2D mathematically. This method embeds the 2D vectors in the XY plane of 3D space and uses their cross product's Z component as the analog.
</description>
</method>
<method name="cubic_interpolate" qualifiers="const">
<return type="Vector2" />
- <argument index="0" name="b" type="Vector2" />
- <argument index="1" name="pre_a" type="Vector2" />
- <argument index="2" name="post_b" type="Vector2" />
- <argument index="3" name="weight" type="float" />
+ <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" />
+ <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.
+ </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 [code]b[/code] using [code]pre_a[/code] and [code]post_b[/code] as handles, and returns the result at position [code]weight[/code]. [code]weight[/code] is on the range of 0.0 to 1.0, representing the amount of interpolation.
+ 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" />
- <argument index="0" name="to" type="Vector2" />
+ <param index="0" name="to" type="Vector2" />
<description>
- Returns the normalized vector pointing from this vector to [code]to[/code]. This is equivalent to using [code](b - a).normalized()[/code].
+ Returns the normalized vector pointing from this vector to [param to]. This is equivalent to using [code](b - a).normalized()[/code].
</description>
</method>
<method name="distance_squared_to" qualifiers="const">
<return type="float" />
- <argument index="0" name="to" type="Vector2" />
+ <param index="0" name="to" type="Vector2" />
<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>
<method name="distance_to" qualifiers="const">
<return type="float" />
- <argument index="0" name="to" type="Vector2" />
+ <param index="0" name="to" type="Vector2" />
<description>
- Returns the distance between this vector and [code]to[/code].
+ Returns the distance between this vector and [param to].
</description>
</method>
<method name="dot" qualifiers="const">
<return type="float" />
- <argument index="0" name="with" type="Vector2" />
+ <param index="0" name="with" type="Vector2" />
<description>
- Returns the dot product of this vector and [code]with[/code]. This can be used to compare the angle between two vectors. For example, this can be used to determine whether an enemy is facing the player.
+ Returns the dot product of this vector and [param with]. This can be used to compare the angle between two vectors. For example, this can be used to determine whether an enemy is facing the player.
The dot product will be [code]0[/code] for a straight angle (90 degrees), greater than 0 for angles narrower than 90 degrees and lower than 0 for angles wider than 90 degrees.
When using unit (normalized) vectors, the result will always be between [code]-1.0[/code] (180 degree angle) when the vectors are facing opposite directions, and [code]1.0[/code] (0 degree angle) when the vectors are aligned.
[b]Note:[/b] [code]a.dot(b)[/code] is equivalent to [code]b.dot(a)[/code].
@@ -165,9 +189,9 @@
</method>
<method name="from_angle" qualifiers="static">
<return type="Vector2" />
- <argument index="0" name="angle" type="float" />
+ <param index="0" name="angle" type="float" />
<description>
- Creates a unit [Vector2] rotated to the given [code]angle[/code] in radians. This is equivalent to doing [code]Vector2(cos(angle), sin(angle))[/code] or [code]Vector2.RIGHT.rotated(angle)[/code].
+ Creates a unit [Vector2] rotated to the given [param angle] in radians. This is equivalent to doing [code]Vector2(cos(angle), sin(angle))[/code] or [code]Vector2.RIGHT.rotated(angle)[/code].
[codeblock]
print(Vector2.from_angle(0)) # Prints (1, 0).
print(Vector2(1, 0).angle()) # Prints 0, which is the angle used above.
@@ -177,7 +201,7 @@
</method>
<method name="is_equal_approx" qualifiers="const">
<return type="bool" />
- <argument index="0" name="to" type="Vector2" />
+ <param index="0" name="to" type="Vector2" />
<description>
Returns [code]true[/code] if this vector and [code]v[/code] are approximately equal, by running [method @GlobalScope.is_equal_approx] on each component.
</description>
@@ -203,17 +227,17 @@
</method>
<method name="lerp" qualifiers="const">
<return type="Vector2" />
- <argument index="0" name="to" type="Vector2" />
- <argument index="1" name="weight" type="float" />
+ <param index="0" name="to" type="Vector2" />
+ <param index="1" name="weight" type="float" />
<description>
- Returns the result of the linear interpolation between this vector and [code]to[/code] by amount [code]weight[/code]. [code]weight[/code] is on the range of 0.0 to 1.0, representing the amount of interpolation.
+ Returns the result of the linear interpolation between this vector and [param to] by amount [param weight]. [param weight] is on the range of 0.0 to 1.0, representing the amount of interpolation.
</description>
</method>
<method name="limit_length" qualifiers="const">
<return type="Vector2" />
- <argument index="0" name="length" type="float" default="1.0" />
+ <param index="0" name="length" type="float" default="1.0" />
<description>
- Returns the vector with a maximum length by limiting its length to [code]length[/code].
+ Returns the vector with a maximum length by limiting its length to [param length].
</description>
</method>
<method name="max_axis_index" qualifiers="const">
@@ -230,10 +254,10 @@
</method>
<method name="move_toward" qualifiers="const">
<return type="Vector2" />
- <argument index="0" name="to" type="Vector2" />
- <argument index="1" name="delta" type="float" />
+ <param index="0" name="to" type="Vector2" />
+ <param index="1" name="delta" type="float" />
<description>
- Returns a new vector moved toward [code]to[/code] by the fixed [code]delta[/code] amount. Will not go past the final value.
+ Returns a new vector moved toward [param to] by the fixed [param delta] amount. Will not go past the final value.
</description>
</method>
<method name="normalized" qualifiers="const">
@@ -250,37 +274,37 @@
</method>
<method name="posmod" qualifiers="const">
<return type="Vector2" />
- <argument index="0" name="mod" type="float" />
+ <param index="0" name="mod" type="float" />
<description>
- Returns a vector composed of the [method @GlobalScope.fposmod] of this vector's components and [code]mod[/code].
+ Returns a vector composed of the [method @GlobalScope.fposmod] of this vector's components and [param mod].
</description>
</method>
<method name="posmodv" qualifiers="const">
<return type="Vector2" />
- <argument index="0" name="modv" type="Vector2" />
+ <param index="0" name="modv" type="Vector2" />
<description>
- Returns a vector composed of the [method @GlobalScope.fposmod] of this vector's components and [code]modv[/code]'s components.
+ Returns a vector composed of the [method @GlobalScope.fposmod] of this vector's components and [param modv]'s components.
</description>
</method>
<method name="project" qualifiers="const">
<return type="Vector2" />
- <argument index="0" name="b" type="Vector2" />
+ <param index="0" name="b" type="Vector2" />
<description>
Returns this vector projected onto the vector [code]b[/code].
</description>
</method>
<method name="reflect" qualifiers="const">
<return type="Vector2" />
- <argument index="0" name="n" type="Vector2" />
+ <param index="0" name="n" type="Vector2" />
<description>
- Returns the vector reflected (i.e. mirrored, or symmetric) over a line defined by the given direction vector [code]n[/code].
+ Returns the vector reflected (i.e. mirrored, or symmetric) over a line defined by the given direction vector [param n].
</description>
</method>
<method name="rotated" qualifiers="const">
<return type="Vector2" />
- <argument index="0" name="phi" type="float" />
+ <param index="0" name="angle" type="float" />
<description>
- Returns the vector rotated by [code]phi[/code] radians. See also [method @GlobalScope.deg2rad].
+ Returns the vector rotated by [param angle] (in radians). See also [method @GlobalScope.deg2rad].
</description>
</method>
<method name="round" qualifiers="const">
@@ -297,25 +321,25 @@
</method>
<method name="slerp" qualifiers="const">
<return type="Vector2" />
- <argument index="0" name="to" type="Vector2" />
- <argument index="1" name="weight" type="float" />
+ <param index="0" name="to" type="Vector2" />
+ <param index="1" name="weight" type="float" />
<description>
- Returns the result of spherical linear interpolation between this vector and [code]to[/code], by amount [code]weight[/code]. [code]weight[/code] is on the range of 0.0 to 1.0, representing the amount of interpolation.
+ Returns the result of spherical linear interpolation between this vector and [param to], by amount [param weight]. [param weight] is on the range of 0.0 to 1.0, representing the amount of interpolation.
This method also handles interpolating the lengths if the input vectors have different lengths. For the special case of one or both input vectors having zero length, this method behaves like [method lerp].
</description>
</method>
<method name="slide" qualifiers="const">
<return type="Vector2" />
- <argument index="0" name="n" type="Vector2" />
+ <param index="0" name="n" type="Vector2" />
<description>
Returns this vector slid along a plane defined by the given normal.
</description>
</method>
<method name="snapped" qualifiers="const">
<return type="Vector2" />
- <argument index="0" name="step" type="Vector2" />
+ <param index="0" name="step" type="Vector2" />
<description>
- Returns this vector with each component snapped to the nearest multiple of [code]step[/code]. This can also be used to round to an arbitrary number of decimals.
+ Returns this vector with each component snapped to the nearest multiple of [param step]. This can also be used to round to an arbitrary number of decimals.
</description>
</method>
</methods>
@@ -359,7 +383,7 @@
<operators>
<operator name="operator !=">
<return type="bool" />
- <argument index="0" name="right" type="Vector2" />
+ <param index="0" name="right" type="Vector2" />
<description>
Returns [code]true[/code] if the vectors are not equal.
[b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.
@@ -367,14 +391,14 @@
</operator>
<operator name="operator *">
<return type="Vector2" />
- <argument index="0" name="right" type="Transform2D" />
+ <param index="0" name="right" type="Transform2D" />
<description>
Inversely transforms (multiplies) the [Vector2] by the given [Transform2D] transformation matrix.
</description>
</operator>
<operator name="operator *">
<return type="Vector2" />
- <argument index="0" name="right" type="Vector2" />
+ <param index="0" name="right" type="Vector2" />
<description>
Multiplies each component of the [Vector2] by the components of the given [Vector2].
[codeblock]
@@ -384,21 +408,21 @@
</operator>
<operator name="operator *">
<return type="Vector2" />
- <argument index="0" name="right" type="float" />
+ <param index="0" name="right" type="float" />
<description>
Multiplies each component of the [Vector2] by the given [float].
</description>
</operator>
<operator name="operator *">
<return type="Vector2" />
- <argument index="0" name="right" type="int" />
+ <param index="0" name="right" type="int" />
<description>
Multiplies each component of the [Vector2] by the given [int].
</description>
</operator>
<operator name="operator +">
<return type="Vector2" />
- <argument index="0" name="right" type="Vector2" />
+ <param index="0" name="right" type="Vector2" />
<description>
Adds each component of the [Vector2] by the components of the given [Vector2].
[codeblock]
@@ -408,7 +432,7 @@
</operator>
<operator name="operator -">
<return type="Vector2" />
- <argument index="0" name="right" type="Vector2" />
+ <param index="0" name="right" type="Vector2" />
<description>
Subtracts each component of the [Vector2] by the components of the given [Vector2].
[codeblock]
@@ -418,7 +442,7 @@
</operator>
<operator name="operator /">
<return type="Vector2" />
- <argument index="0" name="right" type="Vector2" />
+ <param index="0" name="right" type="Vector2" />
<description>
Divides each component of the [Vector2] by the components of the given [Vector2].
[codeblock]
@@ -428,35 +452,35 @@
</operator>
<operator name="operator /">
<return type="Vector2" />
- <argument index="0" name="right" type="float" />
+ <param index="0" name="right" type="float" />
<description>
Divides each component of the [Vector2] by the given [float].
</description>
</operator>
<operator name="operator /">
<return type="Vector2" />
- <argument index="0" name="right" type="int" />
+ <param index="0" name="right" type="int" />
<description>
Divides each component of the [Vector2] by the given [int].
</description>
</operator>
<operator name="operator &lt;">
<return type="bool" />
- <argument index="0" name="right" type="Vector2" />
+ <param index="0" name="right" type="Vector2" />
<description>
- Compares two [Vector2] vectors by first checking if the X value of the left vector is less than the X value of the [code]right[/code] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors. This operator is useful for sorting vectors.
+ Compares two [Vector2] 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. This operator is useful for sorting vectors.
</description>
</operator>
<operator name="operator &lt;=">
<return type="bool" />
- <argument index="0" name="right" type="Vector2" />
+ <param index="0" name="right" type="Vector2" />
<description>
- Compares two [Vector2] vectors by first checking if the X value of the left vector is less than or equal to the X value of the [code]right[/code] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors. This operator is useful for sorting vectors.
+ Compares two [Vector2] 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. This operator is useful for sorting vectors.
</description>
</operator>
<operator name="operator ==">
<return type="bool" />
- <argument index="0" name="right" type="Vector2" />
+ <param index="0" name="right" type="Vector2" />
<description>
Returns [code]true[/code] if the vectors are exactly equal.
[b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.
@@ -464,23 +488,23 @@
</operator>
<operator name="operator &gt;">
<return type="bool" />
- <argument index="0" name="right" type="Vector2" />
+ <param index="0" name="right" type="Vector2" />
<description>
- Compares two [Vector2] vectors by first checking if the X value of the left vector is greater than the X value of the [code]right[/code] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors. This operator is useful for sorting vectors.
+ Compares two [Vector2] 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. This operator is useful for sorting vectors.
</description>
</operator>
<operator name="operator &gt;=">
<return type="bool" />
- <argument index="0" name="right" type="Vector2" />
+ <param index="0" name="right" type="Vector2" />
<description>
- Compares two [Vector2] vectors by first checking if the X value of the left vector is greater than or equal to the X value of the [code]right[/code] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors. This operator is useful for sorting vectors.
+ Compares two [Vector2] 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. This operator is useful for sorting vectors.
</description>
</operator>
<operator name="operator []">
<return type="float" />
- <argument index="0" name="index" type="int" />
+ <param index="0" name="index" type="int" />
<description>
- Access vector components using their index. [code]v[0][/code] is equivalent to [code]v.x[/code], and [code]v[1][/code] is equivalent to [code]v.y[/code].
+ Access vector components using their [param index]. [code]v[0][/code] is equivalent to [code]v.x[/code], and [code]v[1][/code] is equivalent to [code]v.y[/code].
</description>
</operator>
<operator name="operator unary+">
diff --git a/doc/classes/Vector2i.xml b/doc/classes/Vector2i.xml
index 28d68b6e44..eab880e57f 100644
--- a/doc/classes/Vector2i.xml
+++ b/doc/classes/Vector2i.xml
@@ -22,24 +22,24 @@
</constructor>
<constructor name="Vector2i">
<return type="Vector2i" />
- <argument index="0" name="from" type="Vector2i" />
+ <param index="0" name="from" type="Vector2i" />
<description>
Constructs a [Vector2i] as a copy of the given [Vector2i].
</description>
</constructor>
<constructor name="Vector2i">
<return type="Vector2i" />
- <argument index="0" name="from" type="Vector2" />
+ <param index="0" name="from" type="Vector2" />
<description>
Constructs a new [Vector2i] from [Vector2]. The floating point coordinates will be truncated.
</description>
</constructor>
<constructor name="Vector2i">
<return type="Vector2i" />
- <argument index="0" name="x" type="int" />
- <argument index="1" name="y" type="int" />
+ <param index="0" name="x" type="int" />
+ <param index="1" name="y" type="int" />
<description>
- Constructs a new [Vector2i] from the given [code]x[/code] and [code]y[/code].
+ Constructs a new [Vector2i] from the given [param x] and [param y].
</description>
</constructor>
</constructors>
@@ -58,10 +58,10 @@
</method>
<method name="clamp" qualifiers="const">
<return type="Vector2i" />
- <argument index="0" name="min" type="Vector2i" />
- <argument index="1" name="max" type="Vector2i" />
+ <param index="0" name="min" type="Vector2i" />
+ <param index="1" name="max" type="Vector2i" />
<description>
- Returns a new vector with all components clamped between the components of [code]min[/code] and [code]max[/code], by running [method @GlobalScope.clamp] on each component.
+ 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">
@@ -133,14 +133,14 @@
<operators>
<operator name="operator !=">
<return type="bool" />
- <argument index="0" name="right" type="Vector2i" />
+ <param index="0" name="right" type="Vector2i" />
<description>
Returns [code]true[/code] if the vectors are not equal.
</description>
</operator>
<operator name="operator %">
<return type="Vector2i" />
- <argument index="0" name="right" type="Vector2i" />
+ <param index="0" name="right" type="Vector2i" />
<description>
Gets the remainder of each component of the [Vector2i] with the components of the given [Vector2i]. 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]
@@ -150,7 +150,7 @@
</operator>
<operator name="operator %">
<return type="Vector2i" />
- <argument index="0" name="right" type="int" />
+ <param index="0" name="right" type="int" />
<description>
Gets the remainder of each component of the [Vector2i] 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]
@@ -160,7 +160,7 @@
</operator>
<operator name="operator *">
<return type="Vector2i" />
- <argument index="0" name="right" type="Vector2i" />
+ <param index="0" name="right" type="Vector2i" />
<description>
Multiplies each component of the [Vector2i] by the components of the given [Vector2i].
[codeblock]
@@ -170,7 +170,7 @@
</operator>
<operator name="operator *">
<return type="Vector2" />
- <argument index="0" name="right" type="float" />
+ <param index="0" name="right" type="float" />
<description>
Multiplies each component of the [Vector2i] by the given [float]. Returns a [Vector2].
[codeblock]
@@ -180,14 +180,14 @@
</operator>
<operator name="operator *">
<return type="Vector2i" />
- <argument index="0" name="right" type="int" />
+ <param index="0" name="right" type="int" />
<description>
Multiplies each component of the [Vector2i] by the given [int].
</description>
</operator>
<operator name="operator +">
<return type="Vector2i" />
- <argument index="0" name="right" type="Vector2i" />
+ <param index="0" name="right" type="Vector2i" />
<description>
Adds each component of the [Vector2i] by the components of the given [Vector2i].
[codeblock]
@@ -197,7 +197,7 @@
</operator>
<operator name="operator -">
<return type="Vector2i" />
- <argument index="0" name="right" type="Vector2i" />
+ <param index="0" name="right" type="Vector2i" />
<description>
Subtracts each component of the [Vector2i] by the components of the given [Vector2i].
[codeblock]
@@ -207,7 +207,7 @@
</operator>
<operator name="operator /">
<return type="Vector2i" />
- <argument index="0" name="right" type="Vector2i" />
+ <param index="0" name="right" type="Vector2i" />
<description>
Divides each component of the [Vector2i] by the components of the given [Vector2i].
[codeblock]
@@ -217,7 +217,7 @@
</operator>
<operator name="operator /">
<return type="Vector2" />
- <argument index="0" name="right" type="float" />
+ <param index="0" name="right" type="float" />
<description>
Divides each component of the [Vector2i] by the given [float]. Returns a [Vector2].
[codeblock]
@@ -227,51 +227,51 @@
</operator>
<operator name="operator /">
<return type="Vector2i" />
- <argument index="0" name="right" type="int" />
+ <param index="0" name="right" type="int" />
<description>
Divides each component of the [Vector2i] by the given [int].
</description>
</operator>
<operator name="operator &lt;">
<return type="bool" />
- <argument index="0" name="right" type="Vector2i" />
+ <param index="0" name="right" type="Vector2i" />
<description>
- Compares two [Vector2i] vectors by first checking if the X value of the left vector is less than the X value of the [code]right[/code] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors. This operator is useful for sorting vectors.
+ Compares two [Vector2i] 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. This operator is useful for sorting vectors.
</description>
</operator>
<operator name="operator &lt;=">
<return type="bool" />
- <argument index="0" name="right" type="Vector2i" />
+ <param index="0" name="right" type="Vector2i" />
<description>
- Compares two [Vector2i] vectors by first checking if the X value of the left vector is less than or equal to the X value of the [code]right[/code] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors. This operator is useful for sorting vectors.
+ Compares two [Vector2i] 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. This operator is useful for sorting vectors.
</description>
</operator>
<operator name="operator ==">
<return type="bool" />
- <argument index="0" name="right" type="Vector2i" />
+ <param index="0" name="right" type="Vector2i" />
<description>
Returns [code]true[/code] if the vectors are equal.
</description>
</operator>
<operator name="operator &gt;">
<return type="bool" />
- <argument index="0" name="right" type="Vector2i" />
+ <param index="0" name="right" type="Vector2i" />
<description>
- Compares two [Vector2i] vectors by first checking if the X value of the left vector is greater than the X value of the [code]right[/code] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors. This operator is useful for sorting vectors.
+ Compares two [Vector2i] 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. This operator is useful for sorting vectors.
</description>
</operator>
<operator name="operator &gt;=">
<return type="bool" />
- <argument index="0" name="right" type="Vector2i" />
+ <param index="0" name="right" type="Vector2i" />
<description>
- Compares two [Vector2i] vectors by first checking if the X value of the left vector is greater than or equal to the X value of the [code]right[/code] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors. This operator is useful for sorting vectors.
+ Compares two [Vector2i] 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. This operator is useful for sorting vectors.
</description>
</operator>
<operator name="operator []">
<return type="int" />
- <argument index="0" name="index" type="int" />
+ <param index="0" name="index" type="int" />
<description>
- Access vector components using their index. [code]v[0][/code] is equivalent to [code]v.x[/code], and [code]v[1][/code] is equivalent to [code]v.y[/code].
+ Access vector components using their [param index]. [code]v[0][/code] is equivalent to [code]v.x[/code], and [code]v[1][/code] is equivalent to [code]v.y[/code].
</description>
</operator>
<operator name="operator unary+">
diff --git a/doc/classes/Vector3.xml b/doc/classes/Vector3.xml
index 18204943fd..150d53845c 100644
--- a/doc/classes/Vector3.xml
+++ b/doc/classes/Vector3.xml
@@ -25,23 +25,23 @@
</constructor>
<constructor name="Vector3">
<return type="Vector3" />
- <argument index="0" name="from" type="Vector3" />
+ <param index="0" name="from" type="Vector3" />
<description>
Constructs a [Vector3] as a copy of the given [Vector3].
</description>
</constructor>
<constructor name="Vector3">
<return type="Vector3" />
- <argument index="0" name="from" type="Vector3i" />
+ <param index="0" name="from" type="Vector3i" />
<description>
Constructs a new [Vector3] from [Vector3i].
</description>
</constructor>
<constructor name="Vector3">
<return type="Vector3" />
- <argument index="0" name="x" type="float" />
- <argument index="1" name="y" type="float" />
- <argument index="2" name="z" type="float" />
+ <param index="0" name="x" type="float" />
+ <param index="1" name="y" type="float" />
+ <param index="2" name="z" type="float" />
<description>
Returns a [Vector3] with the given components.
</description>
@@ -56,14 +56,24 @@
</method>
<method name="angle_to" qualifiers="const">
<return type="float" />
- <argument index="0" name="to" type="Vector3" />
+ <param index="0" name="to" type="Vector3" />
<description>
Returns the unsigned minimum angle to the given vector, in radians.
</description>
</method>
+ <method name="bezier_interpolate" qualifiers="const">
+ <return type="Vector3" />
+ <param index="0" name="control_1" type="Vector3" />
+ <param index="1" name="control_2" type="Vector3" />
+ <param index="2" name="end" type="Vector3" />
+ <param index="3" name="t" type="float" />
+ <description>
+ Returns the point at the given [param t] on the [url=https://en.wikipedia.org/wiki/B%C3%A9zier_curve]Bezier curve[/url] defined by this vector and the given [param control_1], [param control_2], and [param end] points.
+ </description>
+ </method>
<method name="bounce" qualifiers="const">
<return type="Vector3" />
- <argument index="0" name="n" type="Vector3" />
+ <param index="0" name="n" type="Vector3" />
<description>
Returns the vector "bounced off" from a plane defined by the given normal.
</description>
@@ -76,56 +86,70 @@
</method>
<method name="clamp" qualifiers="const">
<return type="Vector3" />
- <argument index="0" name="min" type="Vector3" />
- <argument index="1" name="max" type="Vector3" />
+ <param index="0" name="min" type="Vector3" />
+ <param index="1" name="max" type="Vector3" />
<description>
- Returns a new vector with all components clamped between the components of [code]min[/code] and [code]max[/code], by running [method @GlobalScope.clamp] on each component.
+ 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="cross" qualifiers="const">
<return type="Vector3" />
- <argument index="0" name="with" type="Vector3" />
+ <param index="0" name="with" type="Vector3" />
<description>
- Returns the cross product of this vector and [code]with[/code].
+ Returns the cross product of this vector and [param with].
</description>
</method>
<method name="cubic_interpolate" qualifiers="const">
<return type="Vector3" />
- <argument index="0" name="b" type="Vector3" />
- <argument index="1" name="pre_a" type="Vector3" />
- <argument index="2" name="post_b" type="Vector3" />
- <argument index="3" name="weight" type="float" />
+ <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" />
+ <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.
+ </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 [code]b[/code] using [code]pre_a[/code] and [code]post_b[/code] as handles, and returns the result at position [code]weight[/code]. [code]weight[/code] is on the range of 0.0 to 1.0, representing the amount of interpolation.
+ 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" />
- <argument index="0" name="to" type="Vector3" />
+ <param index="0" name="to" type="Vector3" />
<description>
- Returns the normalized vector pointing from this vector to [code]to[/code]. This is equivalent to using [code](b - a).normalized()[/code].
+ Returns the normalized vector pointing from this vector to [param to]. This is equivalent to using [code](b - a).normalized()[/code].
</description>
</method>
<method name="distance_squared_to" qualifiers="const">
<return type="float" />
- <argument index="0" name="to" type="Vector3" />
+ <param index="0" name="to" type="Vector3" />
<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>
<method name="distance_to" qualifiers="const">
<return type="float" />
- <argument index="0" name="to" type="Vector3" />
+ <param index="0" name="to" type="Vector3" />
<description>
- Returns the distance between this vector and [code]to[/code].
+ Returns the distance between this vector and [param to].
</description>
</method>
<method name="dot" qualifiers="const">
<return type="float" />
- <argument index="0" name="with" type="Vector3" />
+ <param index="0" name="with" type="Vector3" />
<description>
- Returns the dot product of this vector and [code]with[/code]. This can be used to compare the angle between two vectors. For example, this can be used to determine whether an enemy is facing the player.
+ Returns the dot product of this vector and [param with]. This can be used to compare the angle between two vectors. For example, this can be used to determine whether an enemy is facing the player.
The dot product will be [code]0[/code] for a straight angle (90 degrees), greater than 0 for angles narrower than 90 degrees and lower than 0 for angles wider than 90 degrees.
When using unit (normalized) vectors, the result will always be between [code]-1.0[/code] (180 degree angle) when the vectors are facing opposite directions, and [code]1.0[/code] (0 degree angle) when the vectors are aligned.
[b]Note:[/b] [code]a.dot(b)[/code] is equivalent to [code]b.dot(a)[/code].
@@ -145,9 +169,9 @@
</method>
<method name="is_equal_approx" qualifiers="const">
<return type="bool" />
- <argument index="0" name="to" type="Vector3" />
+ <param index="0" name="to" type="Vector3" />
<description>
- Returns [code]true[/code] if this vector and [code]v[/code] are approximately equal, by running [method @GlobalScope.is_equal_approx] on each component.
+ 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_normalized" qualifiers="const">
@@ -171,17 +195,17 @@
</method>
<method name="lerp" qualifiers="const">
<return type="Vector3" />
- <argument index="0" name="to" type="Vector3" />
- <argument index="1" name="weight" type="float" />
+ <param index="0" name="to" type="Vector3" />
+ <param index="1" name="weight" type="float" />
<description>
- Returns the result of the linear interpolation between this vector and [code]to[/code] by amount [code]weight[/code]. [code]weight[/code] is on the range of 0.0 to 1.0, representing the amount of interpolation.
+ Returns the result of the linear interpolation between this vector and [param to] by amount [param weight]. [param weight] is on the range of 0.0 to 1.0, representing the amount of interpolation.
</description>
</method>
<method name="limit_length" qualifiers="const">
<return type="Vector3" />
- <argument index="0" name="length" type="float" default="1.0" />
+ <param index="0" name="length" type="float" default="1.0" />
<description>
- Returns the vector with a maximum length by limiting its length to [code]length[/code].
+ Returns the vector with a maximum length by limiting its length to [param length].
</description>
</method>
<method name="max_axis_index" qualifiers="const">
@@ -198,10 +222,10 @@
</method>
<method name="move_toward" qualifiers="const">
<return type="Vector3" />
- <argument index="0" name="to" type="Vector3" />
- <argument index="1" name="delta" type="float" />
+ <param index="0" name="to" type="Vector3" />
+ <param index="1" name="delta" type="float" />
<description>
- Returns a new vector moved toward [code]to[/code] by the fixed [code]delta[/code] amount. Will not go past the final value.
+ Returns a new vector moved toward [param to] by the fixed [param delta] amount. Will not go past the final value.
</description>
</method>
<method name="normalized" qualifiers="const">
@@ -212,7 +236,7 @@
</method>
<method name="octahedron_decode" qualifiers="static">
<return type="Vector3" />
- <argument index="0" name="uv" type="Vector2" />
+ <param index="0" name="uv" type="Vector2" />
<description>
</description>
</method>
@@ -223,45 +247,45 @@
</method>
<method name="outer" qualifiers="const">
<return type="Basis" />
- <argument index="0" name="with" type="Vector3" />
+ <param index="0" name="with" type="Vector3" />
<description>
- Returns the outer product with [code]with[/code].
+ Returns the outer product with [param with].
</description>
</method>
<method name="posmod" qualifiers="const">
<return type="Vector3" />
- <argument index="0" name="mod" type="float" />
+ <param index="0" name="mod" type="float" />
<description>
- Returns a vector composed of the [method @GlobalScope.fposmod] of this vector's components and [code]mod[/code].
+ Returns a vector composed of the [method @GlobalScope.fposmod] of this vector's components and [param mod].
</description>
</method>
<method name="posmodv" qualifiers="const">
<return type="Vector3" />
- <argument index="0" name="modv" type="Vector3" />
+ <param index="0" name="modv" type="Vector3" />
<description>
- Returns a vector composed of the [method @GlobalScope.fposmod] of this vector's components and [code]modv[/code]'s components.
+ Returns a vector composed of the [method @GlobalScope.fposmod] of this vector's components and [param modv]'s components.
</description>
</method>
<method name="project" qualifiers="const">
<return type="Vector3" />
- <argument index="0" name="b" type="Vector3" />
+ <param index="0" name="b" type="Vector3" />
<description>
- Returns this vector projected onto the vector [code]b[/code].
+ Returns this vector projected onto the vector [param b].
</description>
</method>
<method name="reflect" qualifiers="const">
<return type="Vector3" />
- <argument index="0" name="n" type="Vector3" />
+ <param index="0" name="n" type="Vector3" />
<description>
Returns this vector reflected from a plane defined by the given normal.
</description>
</method>
<method name="rotated" qualifiers="const">
<return type="Vector3" />
- <argument index="0" name="by_axis" type="Vector3" />
- <argument index="1" name="phi" type="float" />
+ <param index="0" name="axis" type="Vector3" />
+ <param index="1" name="angle" type="float" />
<description>
- Rotates this vector around a given axis by [code]phi[/code] radians. The axis must be a normalized vector.
+ Rotates this vector around a given axis by [param angle] (in radians). The axis must be a normalized vector.
</description>
</method>
<method name="round" qualifiers="const">
@@ -278,33 +302,33 @@
</method>
<method name="signed_angle_to" qualifiers="const">
<return type="float" />
- <argument index="0" name="to" type="Vector3" />
- <argument index="1" name="axis" type="Vector3" />
+ <param index="0" name="to" type="Vector3" />
+ <param index="1" name="axis" type="Vector3" />
<description>
- Returns the signed angle to the given vector, in radians. The sign of the angle is positive in a counter-clockwise direction and negative in a clockwise direction when viewed from the side specified by the [code]axis[/code].
+ Returns the signed angle to the given vector, in radians. The sign of the angle is positive in a counter-clockwise direction and negative in a clockwise direction when viewed from the side specified by the [param axis].
</description>
</method>
<method name="slerp" qualifiers="const">
<return type="Vector3" />
- <argument index="0" name="to" type="Vector3" />
- <argument index="1" name="weight" type="float" />
+ <param index="0" name="to" type="Vector3" />
+ <param index="1" name="weight" type="float" />
<description>
- Returns the result of spherical linear interpolation between this vector and [code]to[/code], by amount [code]weight[/code]. [code]weight[/code] is on the range of 0.0 to 1.0, representing the amount of interpolation.
+ Returns the result of spherical linear interpolation between this vector and [param to], by amount [param weight]. [param weight] is on the range of 0.0 to 1.0, representing the amount of interpolation.
This method also handles interpolating the lengths if the input vectors have different lengths. For the special case of one or both input vectors having zero length, this method behaves like [method lerp].
</description>
</method>
<method name="slide" qualifiers="const">
<return type="Vector3" />
- <argument index="0" name="n" type="Vector3" />
+ <param index="0" name="n" type="Vector3" />
<description>
Returns this vector slid along a plane defined by the given normal.
</description>
</method>
<method name="snapped" qualifiers="const">
<return type="Vector3" />
- <argument index="0" name="step" type="Vector3" />
+ <param index="0" name="step" type="Vector3" />
<description>
- Returns this vector with each component snapped to the nearest multiple of [code]step[/code]. This can also be used to round to an arbitrary number of decimals.
+ Returns this vector with each component snapped to the nearest multiple of [param step]. This can also be used to round to an arbitrary number of decimals.
</description>
</method>
</methods>
@@ -360,7 +384,7 @@
<operators>
<operator name="operator !=">
<return type="bool" />
- <argument index="0" name="right" type="Vector3" />
+ <param index="0" name="right" type="Vector3" />
<description>
Returns [code]true[/code] if the vectors are not equal.
[b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.
@@ -368,28 +392,28 @@
</operator>
<operator name="operator *">
<return type="Vector3" />
- <argument index="0" name="right" type="Basis" />
+ <param index="0" name="right" type="Basis" />
<description>
Inversely transforms (multiplies) the [Vector3] by the given [Basis] matrix.
</description>
</operator>
<operator name="operator *">
<return type="Vector3" />
- <argument index="0" name="right" type="Quaternion" />
+ <param index="0" name="right" type="Quaternion" />
<description>
Inversely transforms (multiplies) the [Vector3] by the given [Quaternion].
</description>
</operator>
<operator name="operator *">
<return type="Vector3" />
- <argument index="0" name="right" type="Transform3D" />
+ <param index="0" name="right" type="Transform3D" />
<description>
Inversely transforms (multiplies) the [Vector3] by the given [Transform3D] transformation matrix.
</description>
</operator>
<operator name="operator *">
<return type="Vector3" />
- <argument index="0" name="right" type="Vector3" />
+ <param index="0" name="right" type="Vector3" />
<description>
Multiplies each component of the [Vector3] by the components of the given [Vector3].
[codeblock]
@@ -399,21 +423,21 @@
</operator>
<operator name="operator *">
<return type="Vector3" />
- <argument index="0" name="right" type="float" />
+ <param index="0" name="right" type="float" />
<description>
Multiplies each component of the [Vector3] by the given [float].
</description>
</operator>
<operator name="operator *">
<return type="Vector3" />
- <argument index="0" name="right" type="int" />
+ <param index="0" name="right" type="int" />
<description>
Multiplies each component of the [Vector3] by the given [int].
</description>
</operator>
<operator name="operator +">
<return type="Vector3" />
- <argument index="0" name="right" type="Vector3" />
+ <param index="0" name="right" type="Vector3" />
<description>
Adds each component of the [Vector3] by the components of the given [Vector3].
[codeblock]
@@ -423,7 +447,7 @@
</operator>
<operator name="operator -">
<return type="Vector3" />
- <argument index="0" name="right" type="Vector3" />
+ <param index="0" name="right" type="Vector3" />
<description>
Subtracts each component of the [Vector3] by the components of the given [Vector3].
[codeblock]
@@ -433,7 +457,7 @@
</operator>
<operator name="operator /">
<return type="Vector3" />
- <argument index="0" name="right" type="Vector3" />
+ <param index="0" name="right" type="Vector3" />
<description>
Divides each component of the [Vector3] by the components of the given [Vector3].
[codeblock]
@@ -443,35 +467,35 @@
</operator>
<operator name="operator /">
<return type="Vector3" />
- <argument index="0" name="right" type="float" />
+ <param index="0" name="right" type="float" />
<description>
Divides each component of the [Vector3] by the given [float].
</description>
</operator>
<operator name="operator /">
<return type="Vector3" />
- <argument index="0" name="right" type="int" />
+ <param index="0" name="right" type="int" />
<description>
Divides each component of the [Vector3] by the given [int].
</description>
</operator>
<operator name="operator &lt;">
<return type="bool" />
- <argument index="0" name="right" type="Vector3" />
+ <param index="0" name="right" type="Vector3" />
<description>
- Compares two [Vector3] vectors by first checking if the X value of the left vector is less than the X value of the [code]right[/code] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors, and then with the Z values. This operator is useful for sorting vectors.
+ Compares two [Vector3] 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, and then with the Z values. This operator is useful for sorting vectors.
</description>
</operator>
<operator name="operator &lt;=">
<return type="bool" />
- <argument index="0" name="right" type="Vector3" />
+ <param index="0" name="right" type="Vector3" />
<description>
- Compares two [Vector3] vectors by first checking if the X value of the left vector is less than or equal to the X value of the [code]right[/code] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors, and then with the Z values. This operator is useful for sorting vectors.
+ Compares two [Vector3] 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, and then with the Z values. This operator is useful for sorting vectors.
</description>
</operator>
<operator name="operator ==">
<return type="bool" />
- <argument index="0" name="right" type="Vector3" />
+ <param index="0" name="right" type="Vector3" />
<description>
Returns [code]true[/code] if the vectors are exactly equal.
[b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.
@@ -479,23 +503,23 @@
</operator>
<operator name="operator &gt;">
<return type="bool" />
- <argument index="0" name="right" type="Vector3" />
+ <param index="0" name="right" type="Vector3" />
<description>
- Compares two [Vector3] vectors by first checking if the X value of the left vector is greater than the X value of the [code]right[/code] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors, and then with the Z values. This operator is useful for sorting vectors.
+ Compares two [Vector3] 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, and then with the Z values. This operator is useful for sorting vectors.
</description>
</operator>
<operator name="operator &gt;=">
<return type="bool" />
- <argument index="0" name="right" type="Vector3" />
+ <param index="0" name="right" type="Vector3" />
<description>
- Compares two [Vector3] vectors by first checking if the X value of the left vector is greater than or equal to the X value of the [code]right[/code] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors, and then with the Z values. This operator is useful for sorting vectors.
+ Compares two [Vector3] 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, and then with the Z values. This operator is useful for sorting vectors.
</description>
</operator>
<operator name="operator []">
<return type="float" />
- <argument index="0" name="index" type="int" />
+ <param index="0" name="index" type="int" />
<description>
- Access vector components using their index. [code]v[0][/code] is equivalent to [code]v.x[/code], [code]v[1][/code] is equivalent to [code]v.y[/code], and [code]v[2][/code] is equivalent to [code]v.z[/code].
+ 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], and [code]v[2][/code] is equivalent to [code]v.z[/code].
</description>
</operator>
<operator name="operator unary+">
diff --git a/doc/classes/Vector3i.xml b/doc/classes/Vector3i.xml
index ebb518792f..1c2a033f7a 100644
--- a/doc/classes/Vector3i.xml
+++ b/doc/classes/Vector3i.xml
@@ -22,23 +22,23 @@
</constructor>
<constructor name="Vector3i">
<return type="Vector3i" />
- <argument index="0" name="from" type="Vector3i" />
+ <param index="0" name="from" type="Vector3i" />
<description>
Constructs a [Vector3i] as a copy of the given [Vector3i].
</description>
</constructor>
<constructor name="Vector3i">
<return type="Vector3i" />
- <argument index="0" name="from" type="Vector3" />
+ <param index="0" name="from" type="Vector3" />
<description>
Constructs a new [Vector3i] from [Vector3]. The floating point coordinates will be truncated.
</description>
</constructor>
<constructor name="Vector3i">
<return type="Vector3i" />
- <argument index="0" name="x" type="int" />
- <argument index="1" name="y" type="int" />
- <argument index="2" name="z" type="int" />
+ <param index="0" name="x" type="int" />
+ <param index="1" name="y" type="int" />
+ <param index="2" name="z" type="int" />
<description>
Returns a [Vector3i] with the given components.
</description>
@@ -53,10 +53,10 @@
</method>
<method name="clamp" qualifiers="const">
<return type="Vector3i" />
- <argument index="0" name="min" type="Vector3i" />
- <argument index="1" name="max" type="Vector3i" />
+ <param index="0" name="min" type="Vector3i" />
+ <param index="1" name="max" type="Vector3i" />
<description>
- Returns a new vector with all components clamped between the components of [code]min[/code] and [code]max[/code], by running [method @GlobalScope.clamp] on each component.
+ 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">
@@ -140,14 +140,14 @@
<operators>
<operator name="operator !=">
<return type="bool" />
- <argument index="0" name="right" type="Vector3i" />
+ <param index="0" name="right" type="Vector3i" />
<description>
Returns [code]true[/code] if the vectors are not equal.
</description>
</operator>
<operator name="operator %">
<return type="Vector3i" />
- <argument index="0" name="right" type="Vector3i" />
+ <param index="0" name="right" type="Vector3i" />
<description>
Gets the remainder of each component of the [Vector3i] with the components of the given [Vector3i]. 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]
@@ -157,7 +157,7 @@
</operator>
<operator name="operator %">
<return type="Vector3i" />
- <argument index="0" name="right" type="int" />
+ <param index="0" name="right" type="int" />
<description>
Gets the remainder of each component of the [Vector3i] 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]
@@ -167,7 +167,7 @@
</operator>
<operator name="operator *">
<return type="Vector3i" />
- <argument index="0" name="right" type="Vector3i" />
+ <param index="0" name="right" type="Vector3i" />
<description>
Multiplies each component of the [Vector3i] by the components of the given [Vector3i].
[codeblock]
@@ -177,7 +177,7 @@
</operator>
<operator name="operator *">
<return type="Vector3" />
- <argument index="0" name="right" type="float" />
+ <param index="0" name="right" type="float" />
<description>
Multiplies each component of the [Vector3i] by the given [float]. Returns a [Vector3].
[codeblock]
@@ -187,14 +187,14 @@
</operator>
<operator name="operator *">
<return type="Vector3i" />
- <argument index="0" name="right" type="int" />
+ <param index="0" name="right" type="int" />
<description>
Multiplies each component of the [Vector3i] by the given [int].
</description>
</operator>
<operator name="operator +">
<return type="Vector3i" />
- <argument index="0" name="right" type="Vector3i" />
+ <param index="0" name="right" type="Vector3i" />
<description>
Adds each component of the [Vector3i] by the components of the given [Vector3i].
[codeblock]
@@ -204,7 +204,7 @@
</operator>
<operator name="operator -">
<return type="Vector3i" />
- <argument index="0" name="right" type="Vector3i" />
+ <param index="0" name="right" type="Vector3i" />
<description>
Subtracts each component of the [Vector3i] by the components of the given [Vector3i].
[codeblock]
@@ -214,7 +214,7 @@
</operator>
<operator name="operator /">
<return type="Vector3i" />
- <argument index="0" name="right" type="Vector3i" />
+ <param index="0" name="right" type="Vector3i" />
<description>
Divides each component of the [Vector3i] by the components of the given [Vector3i].
[codeblock]
@@ -224,7 +224,7 @@
</operator>
<operator name="operator /">
<return type="Vector3" />
- <argument index="0" name="right" type="float" />
+ <param index="0" name="right" type="float" />
<description>
Divides each component of the [Vector3i] by the given [float]. Returns a [Vector3].
[codeblock]
@@ -234,51 +234,51 @@
</operator>
<operator name="operator /">
<return type="Vector3i" />
- <argument index="0" name="right" type="int" />
+ <param index="0" name="right" type="int" />
<description>
Divides each component of the [Vector3i] by the given [int].
</description>
</operator>
<operator name="operator &lt;">
<return type="bool" />
- <argument index="0" name="right" type="Vector3i" />
+ <param index="0" name="right" type="Vector3i" />
<description>
- Compares two [Vector3i] vectors by first checking if the X value of the left vector is less than the X value of the [code]right[/code] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors, and then with the Z values. This operator is useful for sorting vectors.
+ Compares two [Vector3i] 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, and then with the Z values. This operator is useful for sorting vectors.
</description>
</operator>
<operator name="operator &lt;=">
<return type="bool" />
- <argument index="0" name="right" type="Vector3i" />
+ <param index="0" name="right" type="Vector3i" />
<description>
- Compares two [Vector3i] vectors by first checking if the X value of the left vector is less than or equal to the X value of the [code]right[/code] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors, and then with the Z values. This operator is useful for sorting vectors.
+ Compares two [Vector3i] 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, and then with the Z values. This operator is useful for sorting vectors.
</description>
</operator>
<operator name="operator ==">
<return type="bool" />
- <argument index="0" name="right" type="Vector3i" />
+ <param index="0" name="right" type="Vector3i" />
<description>
Returns [code]true[/code] if the vectors are equal.
</description>
</operator>
<operator name="operator &gt;">
<return type="bool" />
- <argument index="0" name="right" type="Vector3i" />
+ <param index="0" name="right" type="Vector3i" />
<description>
- Compares two [Vector3i] vectors by first checking if the X value of the left vector is greater than the X value of the [code]right[/code] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors, and then with the Z values. This operator is useful for sorting vectors.
+ Compares two [Vector3i] 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, and then with the Z values. This operator is useful for sorting vectors.
</description>
</operator>
<operator name="operator &gt;=">
<return type="bool" />
- <argument index="0" name="right" type="Vector3i" />
+ <param index="0" name="right" type="Vector3i" />
<description>
- Compares two [Vector3i] vectors by first checking if the X value of the left vector is greater than or equal to the X value of the [code]right[/code] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors, and then with the Z values. This operator is useful for sorting vectors.
+ Compares two [Vector3i] 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, and then with the Z values. This operator is useful for sorting vectors.
</description>
</operator>
<operator name="operator []">
<return type="int" />
- <argument index="0" name="index" type="int" />
+ <param index="0" name="index" type="int" />
<description>
- Access vector components using their index. [code]v[0][/code] is equivalent to [code]v.x[/code], [code]v[1][/code] is equivalent to [code]v.y[/code], and [code]v[2][/code] is equivalent to [code]v.z[/code].
+ 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], and [code]v[2][/code] is equivalent to [code]v.z[/code].
</description>
</operator>
<operator name="operator unary+">
diff --git a/doc/classes/Vector4.xml b/doc/classes/Vector4.xml
new file mode 100644
index 0000000000..b9f509cfe7
--- /dev/null
+++ b/doc/classes/Vector4.xml
@@ -0,0 +1,399 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="Vector4" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ Vector used for 4D math using floating point coordinates.
+ </brief_description>
+ <description>
+ 4-element structure that can be used to represent any quadruplet of numeric values.
+ It uses floating-point coordinates. See [Vector4i] for its integer counterpart.
+ [b]Note:[/b] In a boolean context, a Vector4 will evaluate to [code]false[/code] if it's equal to [code]Vector4(0, 0, 0, 0)[/code]. Otherwise, a Vector4 will always evaluate to [code]true[/code].
+ </description>
+ <tutorials>
+ </tutorials>
+ <constructors>
+ <constructor name="Vector4">
+ <return type="Vector4" />
+ <description>
+ Constructs a default-initialized [Vector4] with all components set to [code]0[/code].
+ </description>
+ </constructor>
+ <constructor name="Vector4">
+ <return type="Vector4" />
+ <param index="0" name="from" type="Vector4" />
+ <description>
+ Constructs a [Vector4] as a copy of the given [Vector4].
+ </description>
+ </constructor>
+ <constructor name="Vector4">
+ <return type="Vector4" />
+ <param index="0" name="from" type="Vector4i" />
+ <description>
+ Constructs a new [Vector4] from [Vector4i].
+ </description>
+ </constructor>
+ <constructor name="Vector4">
+ <return type="Vector4" />
+ <param index="0" name="x" type="float" />
+ <param index="1" name="y" type="float" />
+ <param index="2" name="z" type="float" />
+ <param index="3" name="w" type="float" />
+ <description>
+ Returns a [Vector4] with the given components.
+ </description>
+ </constructor>
+ </constructors>
+ <methods>
+ <method name="abs" qualifiers="const">
+ <return type="Vector4" />
+ <description>
+ Returns a new vector with all components in absolute values (i.e. positive).
+ </description>
+ </method>
+ <method name="ceil" qualifiers="const">
+ <return type="Vector4" />
+ <description>
+ Returns a new vector with all components rounded up (towards positive infinity).
+ </description>
+ </method>
+ <method name="clamp" qualifiers="const">
+ <return type="Vector4" />
+ <param index="0" name="min" type="Vector4" />
+ <param index="1" name="max" type="Vector4" />
+ <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="cubic_interpolate" 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" />
+ <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.
+ </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" />
+ <description>
+ Returns the normalized vector pointing from this vector to [param to]. This is equivalent to using [code](b - a).normalized()[/code].
+ </description>
+ </method>
+ <method name="distance_squared_to" qualifiers="const">
+ <return type="float" />
+ <param index="0" name="to" type="Vector4" />
+ <description>
+ 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>
+ <method name="distance_to" qualifiers="const">
+ <return type="float" />
+ <param index="0" name="to" type="Vector4" />
+ <description>
+ Returns the distance between this vector and [param to].
+ </description>
+ </method>
+ <method name="dot" qualifiers="const">
+ <return type="float" />
+ <param index="0" name="with" type="Vector4" />
+ <description>
+ Returns the dot product of this vector and [param with].
+ </description>
+ </method>
+ <method name="floor" qualifiers="const">
+ <return type="Vector4" />
+ <description>
+ Returns a new vector with all components rounded down (towards negative infinity).
+ </description>
+ </method>
+ <method name="inverse" qualifiers="const">
+ <return type="Vector4" />
+ <description>
+ Returns the inverse of the vector. This is the same as [code]Vector4(1.0 / v.x, 1.0 / v.y, 1.0 / v.z, 1.0 / v.w)[/code].
+ </description>
+ </method>
+ <method name="is_equal_approx" qualifiers="const">
+ <return type="bool" />
+ <param index="0" name="with" type="Vector4" />
+ <description>
+ 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_normalized" qualifiers="const">
+ <return type="bool" />
+ <description>
+ Returns [code]true[/code] if the vector is normalized, i.e. its length is equal to 1.
+ </description>
+ </method>
+ <method name="length" qualifiers="const">
+ <return type="float" />
+ <description>
+ Returns the length (magnitude) of this vector.
+ </description>
+ </method>
+ <method name="length_squared" qualifiers="const">
+ <return type="float" />
+ <description>
+ Returns the squared length (squared magnitude) of this vector. This method runs faster than [method length].
+ </description>
+ </method>
+ <method name="lerp" qualifiers="const">
+ <return type="Vector4" />
+ <param index="0" name="to" type="Vector4" />
+ <param index="1" name="weight" type="float" />
+ <description>
+ Returns the result of the linear interpolation between this vector and [param to] by amount [param weight]. [param weight] is on the range of [code]0.0[/code] to [code]1.0[/code], representing the amount of interpolation.
+ </description>
+ </method>
+ <method name="max_axis_index" qualifiers="const">
+ <return type="int" />
+ <description>
+ Returns the axis of the vector's highest value. See [code]AXIS_*[/code] constants. If all components are equal, this method returns [constant AXIS_X].
+ </description>
+ </method>
+ <method name="min_axis_index" qualifiers="const">
+ <return type="int" />
+ <description>
+ Returns the axis of the vector's lowest value. See [code]AXIS_*[/code] constants. If all components are equal, this method returns [constant AXIS_W].
+ </description>
+ </method>
+ <method name="normalized" qualifiers="const">
+ <return type="Vector4" />
+ <description>
+ Returns the vector scaled to unit length. Equivalent to [code]v / v.length()[/code].
+ </description>
+ </method>
+ <method name="posmod" qualifiers="const">
+ <return type="Vector4" />
+ <param index="0" name="mod" type="float" />
+ <description>
+ Returns a vector composed of the [method @GlobalScope.fposmod] of this vector's components and [param mod].
+ </description>
+ </method>
+ <method name="posmodv" qualifiers="const">
+ <return type="Vector4" />
+ <param index="0" name="modv" type="Vector4" />
+ <description>
+ Returns a vector composed of the [method @GlobalScope.fposmod] of this vector's components and [param modv]'s components.
+ </description>
+ </method>
+ <method name="round" qualifiers="const">
+ <return type="Vector4" />
+ <description>
+ Returns a new vector with all components rounded to the nearest integer, with halfway cases rounded away from zero.
+ </description>
+ </method>
+ <method name="sign" qualifiers="const">
+ <return type="Vector4" />
+ <description>
+ Returns a new vector with each component set to one or negative one, depending on the signs of the components, or zero if the component is zero, by calling [method @GlobalScope.sign] on each component.
+ </description>
+ </method>
+ <method name="snapped" qualifiers="const">
+ <return type="Vector4" />
+ <param index="0" name="step" type="Vector4" />
+ <description>
+ Returns this vector with each component snapped to the nearest multiple of [param step]. This can also be used to round to an arbitrary number of decimals.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="w" type="float" setter="" getter="" default="0.0">
+ The vector's W component. Also accessible by using the index position [code][3][/code].
+ </member>
+ <member name="x" type="float" setter="" getter="" default="0.0">
+ The vector's X component. Also accessible by using the index position [code][0][/code].
+ </member>
+ <member name="y" type="float" setter="" getter="" default="0.0">
+ The vector's Y component. Also accessible by using the index position [code][1][/code].
+ </member>
+ <member name="z" type="float" setter="" getter="" default="0.0">
+ The vector's Z component. Also accessible by using the index position [code][2][/code].
+ </member>
+ </members>
+ <constants>
+ <constant name="AXIS_X" value="0">
+ Enumerated value for the X axis. Returned by [method max_axis_index] and [method min_axis_index].
+ </constant>
+ <constant name="AXIS_Y" value="1">
+ Enumerated value for the Y axis. Returned by [method max_axis_index] and [method min_axis_index].
+ </constant>
+ <constant name="AXIS_Z" value="2">
+ Enumerated value for the Z axis. Returned by [method max_axis_index] and [method min_axis_index].
+ </constant>
+ <constant name="AXIS_W" value="3">
+ Enumerated value for the W axis. Returned by [method max_axis_index] and [method min_axis_index].
+ </constant>
+ <constant name="ZERO" value="Vector4(0, 0, 0, 0)">
+ Zero vector, a vector with all components set to [code]0[/code].
+ </constant>
+ <constant name="ONE" value="Vector4(1, 1, 1, 1)">
+ One vector, a vector with all components set to [code]1[/code].
+ </constant>
+ <constant name="INF" value="Vector4(inf, inf, inf, inf)">
+ Infinity vector, a vector with all components set to [constant @GDScript.INF].
+ </constant>
+ </constants>
+ <operators>
+ <operator name="operator !=">
+ <return type="bool" />
+ <param index="0" name="right" type="Vector4" />
+ <description>
+ Returns [code]true[/code] if the vectors are not equal.
+ [b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.
+ </description>
+ </operator>
+ <operator name="operator *">
+ <return type="Vector4" />
+ <param index="0" name="right" type="Projection" />
+ <description>
+ Inversely transforms (multiplies) the [Vector4] by the given [Projection] matrix.
+ </description>
+ </operator>
+ <operator name="operator *">
+ <return type="Vector4" />
+ <param index="0" name="right" type="Vector4" />
+ <description>
+ Multiplies each component of the [Vector4] by the components of the given [Vector4].
+ [codeblock]
+ print(Vector4(10, 20, 30, 40) * Vector4(3, 4, 5, 6)) # Prints "(30, 80, 150, 240)"
+ [/codeblock]
+ </description>
+ </operator>
+ <operator name="operator *">
+ <return type="Vector4" />
+ <param index="0" name="right" type="float" />
+ <description>
+ Multiplies each component of the [Vector4] by the given [float].
+ [codeblock]
+ print(Vector4(10, 20, 30, 40) * 2) # Prints "(20, 40, 60, 80)"
+ [/codeblock]
+ </description>
+ </operator>
+ <operator name="operator *">
+ <return type="Vector4" />
+ <param index="0" name="right" type="int" />
+ <description>
+ Multiplies each component of the [Vector4] by the given [int].
+ </description>
+ </operator>
+ <operator name="operator +">
+ <return type="Vector4" />
+ <param index="0" name="right" type="Vector4" />
+ <description>
+ Adds each component of the [Vector4] by the components of the given [Vector4].
+ [codeblock]
+ print(Vector4(10, 20, 30, 40) + Vector4(3, 4, 5, 6)) # Prints "(13, 24, 35, 46)"
+ [/codeblock]
+ </description>
+ </operator>
+ <operator name="operator -">
+ <return type="Vector4" />
+ <param index="0" name="right" type="Vector4" />
+ <description>
+ Subtracts each component of the [Vector4] by the components of the given [Vector4].
+ [codeblock]
+ print(Vector4(10, 20, 30, 40) - Vector4(3, 4, 5, 6)) # Prints "(7, 16, 25, 34)"
+ [/codeblock]
+ </description>
+ </operator>
+ <operator name="operator /">
+ <return type="Vector4" />
+ <param index="0" name="right" type="Vector4" />
+ <description>
+ Divides each component of the [Vector4] by the components of the given [Vector4].
+ [codeblock]
+ print(Vector4(10, 20, 30, 40) / Vector4(2, 5, 3, 4)) # Prints "(5, 4, 10, 10)"
+ [/codeblock]
+ </description>
+ </operator>
+ <operator name="operator /">
+ <return type="Vector4" />
+ <param index="0" name="right" type="float" />
+ <description>
+ Divides each component of the [Vector4] by the given [float].
+ [codeblock]
+ print(Vector4(10, 20, 30, 40) / 2 # Prints "(5, 10, 15, 20)"
+ [/codeblock]
+ </description>
+ </operator>
+ <operator name="operator /">
+ <return type="Vector4" />
+ <param index="0" name="right" type="int" />
+ <description>
+ Divides each component of the [Vector4] by the given [int].
+ </description>
+ </operator>
+ <operator name="operator &lt;">
+ <return type="bool" />
+ <param index="0" name="right" type="Vector4" />
+ <description>
+ Compares two [Vector4] vectors by first checking if the X value of the left vector is less than the X value of the [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="Vector4" />
+ <description>
+ Compares two [Vector4] vectors by first checking if the X value of the left vector is less than or equal to the X value of the [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="Vector4" />
+ <description>
+ Returns [code]true[/code] if the vectors are exactly equal.
+ [b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.
+ </description>
+ </operator>
+ <operator name="operator &gt;">
+ <return type="bool" />
+ <param index="0" name="right" type="Vector4" />
+ <description>
+ Compares two [Vector4] vectors by first checking if the X value of the left vector is greater than the X value of the [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="Vector4" />
+ <description>
+ Compares two [Vector4] 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="float" />
+ <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="Vector4" />
+ <description>
+ Returns the same value as if the [code]+[/code] was not there. Unary [code]+[/code] does nothing, but sometimes it can make your code more readable.
+ </description>
+ </operator>
+ <operator name="operator unary-">
+ <return type="Vector4" />
+ <description>
+ Returns the negative value of the [Vector4]. This is the same as writing [code]Vector4(-v.x, -v.y, -v.z, -v.w)[/code]. This operation flips the direction of the vector while keeping the same magnitude. With floats, the number zero can be either positive or negative.
+ </description>
+ </operator>
+ </operators>
+</class>
diff --git a/doc/classes/Vector4i.xml b/doc/classes/Vector4i.xml
new file mode 100644
index 0000000000..9a36c3c4fa
--- /dev/null
+++ b/doc/classes/Vector4i.xml
@@ -0,0 +1,214 @@
+<?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>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <constructors>
+ <constructor name="Vector4i">
+ <return type="Vector4i" />
+ <description>
+ </description>
+ </constructor>
+ <constructor name="Vector4i">
+ <return type="Vector4i" />
+ <param index="0" name="from" type="Vector4i" />
+ <description>
+ </description>
+ </constructor>
+ <constructor name="Vector4i">
+ <return type="Vector4i" />
+ <param index="0" name="from" type="Vector4" />
+ <description>
+ </description>
+ </constructor>
+ <constructor name="Vector4i">
+ <return type="Vector4i" />
+ <param index="0" name="x" type="int" />
+ <param index="1" name="y" type="int" />
+ <param index="2" name="z" type="int" />
+ <param index="3" name="w" type="int" />
+ <description>
+ </description>
+ </constructor>
+ </constructors>
+ <methods>
+ <method name="abs" qualifiers="const">
+ <return type="Vector4i" />
+ <description>
+ </description>
+ </method>
+ <method name="clamp" qualifiers="const">
+ <return type="Vector4i" />
+ <param index="0" name="min" type="Vector4i" />
+ <param index="1" name="max" type="Vector4i" />
+ <description>
+ </description>
+ </method>
+ <method name="length" qualifiers="const">
+ <return type="float" />
+ <description>
+ </description>
+ </method>
+ <method name="length_squared" qualifiers="const">
+ <return type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="max_axis_index" qualifiers="const">
+ <return type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="min_axis_index" qualifiers="const">
+ <return type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="sign" qualifiers="const">
+ <return type="Vector4i" />
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="w" type="int" setter="" getter="" default="0">
+ </member>
+ <member name="x" type="int" setter="" getter="" default="0">
+ </member>
+ <member name="y" type="int" setter="" getter="" default="0">
+ </member>
+ <member name="z" type="int" setter="" getter="" default="0">
+ </member>
+ </members>
+ <constants>
+ <constant name="AXIS_X" value="0">
+ </constant>
+ <constant name="AXIS_Y" value="1">
+ </constant>
+ <constant name="AXIS_Z" value="2">
+ </constant>
+ <constant name="AXIS_W" value="3">
+ </constant>
+ <constant name="ZERO" value="Vector4i(0, 0, 0, 0)">
+ </constant>
+ <constant name="ONE" value="Vector4i(1, 1, 1, 1)">
+ </constant>
+ </constants>
+ <operators>
+ <operator name="operator !=">
+ <return type="bool" />
+ <param index="0" name="right" type="Vector4i" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator %">
+ <return type="Vector4i" />
+ <param index="0" name="right" type="Vector4i" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator %">
+ <return type="Vector4i" />
+ <param index="0" name="right" type="int" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator *">
+ <return type="Vector4i" />
+ <param index="0" name="right" type="Vector4i" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator *">
+ <return type="Vector4" />
+ <param index="0" name="right" type="float" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator *">
+ <return type="Vector4i" />
+ <param index="0" name="right" type="int" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator +">
+ <return type="Vector4i" />
+ <param index="0" name="right" type="Vector4i" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator -">
+ <return type="Vector4i" />
+ <param index="0" name="right" type="Vector4i" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator /">
+ <return type="Vector4i" />
+ <param index="0" name="right" type="Vector4i" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator /">
+ <return type="Vector4" />
+ <param index="0" name="right" type="float" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator /">
+ <return type="Vector4i" />
+ <param index="0" name="right" type="int" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator &lt;">
+ <return type="bool" />
+ <param index="0" name="right" type="Vector4i" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator &lt;=">
+ <return type="bool" />
+ <param index="0" name="right" type="Vector4i" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator ==">
+ <return type="bool" />
+ <param index="0" name="right" type="Vector4i" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator &gt;">
+ <return type="bool" />
+ <param index="0" name="right" type="Vector4i" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator &gt;=">
+ <return type="bool" />
+ <param index="0" name="right" type="Vector4i" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator []">
+ <return type="int" />
+ <param index="0" name="index" type="int" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator unary+">
+ <return type="Vector4i" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator unary-">
+ <return type="Vector4i" />
+ <description>
+ </description>
+ </operator>
+ </operators>
+</class>
diff --git a/doc/classes/VehicleBody3D.xml b/doc/classes/VehicleBody3D.xml
index 1ba86c633d..08309a8ecc 100644
--- a/doc/classes/VehicleBody3D.xml
+++ b/doc/classes/VehicleBody3D.xml
@@ -16,13 +16,13 @@
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.
</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 speed 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 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.
[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="steering" type="float" setter="set_steering" getter="get_steering" default="0.0">
- The steering angle for the vehicle. 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.
+ 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>
</members>
</class>
diff --git a/doc/classes/VehicleWheel3D.xml b/doc/classes/VehicleWheel3D.xml
index 7fc59722e1..ac126f824e 100644
--- a/doc/classes/VehicleWheel3D.xml
+++ b/doc/classes/VehicleWheel3D.xml
@@ -48,12 +48,12 @@
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 speed 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 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.
[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>
<member name="steering" type="float" setter="set_steering" getter="get_steering" default="0.0">
- The steering angle for the wheel. Setting this to a non-zero value will result in the vehicle turning when it's moving.
+ 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.
diff --git a/doc/classes/VelocityTracker3D.xml b/doc/classes/VelocityTracker3D.xml
deleted file mode 100644
index 45ded446eb..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" />
- <argument index="0" name="position" type="Vector3" />
- <description>
- </description>
- </method>
- <method name="update_position">
- <return type="void" />
- <argument 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 092a754a39..f6594ff9e7 100644
--- a/doc/classes/VideoStreamPlayer.xml
+++ b/doc/classes/VideoStreamPlayer.xml
@@ -58,7 +58,7 @@
<member name="bus" type="StringName" setter="set_bus" getter="get_bus" default="&amp;&quot;Master&quot;">
Audio bus to use for sound playback.
</member>
- <member name="expand" type="bool" setter="set_expand" getter="has_expand" default="true">
+ <member name="expand" type="bool" setter="set_expand" getter="has_expand" default="false">
If [code]true[/code], the video scales to the control size. Otherwise, the control minimum size will be automatically adjusted to match the video stream's dimensions.
</member>
<member name="paused" type="bool" setter="set_paused" getter="is_paused" default="false">
diff --git a/doc/classes/Viewport.xml b/doc/classes/Viewport.xml
index ce466b2d0f..93e7e20f5a 100644
--- a/doc/classes/Viewport.xml
+++ b/doc/classes/Viewport.xml
@@ -57,35 +57,30 @@
Returns the mouse's position in this [Viewport] using the coordinate system of this [Viewport].
</description>
</method>
- <method name="get_render_info">
- <return type="int" />
- <argument index="0" name="type" type="int" enum="Viewport.RenderInfoType" />
- <argument index="1" name="info" type="int" enum="Viewport.RenderInfo" />
+ <method name="get_positional_shadow_atlas_quadrant_subdiv" qualifiers="const">
+ <return type="int" enum="Viewport.PositionalShadowAtlasQuadrantSubdiv" />
+ <param index="0" name="quadrant" type="int" />
<description>
+ Returns the [enum PositionalShadowAtlasQuadrantSubdiv] of the specified quadrant.
</description>
</method>
- <method name="get_shadow_atlas_quadrant_subdiv" qualifiers="const">
- <return type="int" enum="Viewport.ShadowAtlasQuadrantSubdiv" />
- <argument index="0" name="quadrant" type="int" />
+ <method name="get_render_info">
+ <return type="int" />
+ <param index="0" name="type" type="int" enum="Viewport.RenderInfoType" />
+ <param index="1" name="info" type="int" enum="Viewport.RenderInfo" />
<description>
- Returns the [enum ShadowAtlasQuadrantSubdiv] of the specified quadrant.
</description>
</method>
<method name="get_texture" qualifiers="const">
<return type="ViewportTexture" />
<description>
Returns the viewport's texture.
- [b]Note:[/b] Due to the way OpenGL works, the resulting [ViewportTexture] is flipped vertically. You can use [method Image.flip_y] on the result of [method Texture2D.get_image] to flip it back, for example:
- [codeblocks]
- [gdscript]
- var img = get_viewport().get_texture().get_image()
- img.flip_y()
- [/gdscript]
- [csharp]
- Image img = GetViewport().GetTexture().GetImage();
- img.FlipY();
- [/csharp]
- [/codeblocks]
+ [b]Note:[/b] When trying to store the current texture (e.g. in a file), it might be completely black or outdated if used too early, especially when used in e.g. [method Node._ready]. To make sure the texture you get is correct, you can await [signal RenderingServer.frame_post_draw] signal.
+ [codeblock]
+ func _ready():
+ await RenderingServer.frame_post_draw
+ $Viewport.get_texture().get_image().save_png("user://Screenshot.png")
+ [/codeblock]
</description>
</method>
<method name="get_viewport_rid" qualifiers="const">
@@ -138,22 +133,21 @@
</method>
<method name="push_input">
<return type="void" />
- <argument index="0" name="event" type="InputEvent" />
- <argument index="1" name="in_local_coords" type="bool" default="false" />
+ <param index="0" name="event" type="InputEvent" />
+ <param index="1" name="in_local_coords" type="bool" default="false" />
<description>
</description>
</method>
<method name="push_text_input">
<return type="void" />
- <argument index="0" name="text" type="String" />
+ <param index="0" name="text" type="String" />
<description>
- Returns [code]true[/code] if the viewport is currently embedding windows.
</description>
</method>
<method name="push_unhandled_input">
<return type="void" />
- <argument index="0" name="event" type="InputEvent" />
- <argument index="1" name="in_local_coords" type="bool" default="false" />
+ <param index="0" name="event" type="InputEvent" />
+ <param index="1" name="in_local_coords" type="bool" default="false" />
<description>
</description>
</method>
@@ -163,17 +157,17 @@
Stops the input from propagating further down the [SceneTree].
</description>
</method>
- <method name="set_shadow_atlas_quadrant_subdiv">
+ <method name="set_positional_shadow_atlas_quadrant_subdiv">
<return type="void" />
- <argument index="0" name="quadrant" type="int" />
- <argument index="1" name="subdiv" type="int" enum="Viewport.ShadowAtlasQuadrantSubdiv" />
+ <param index="0" name="quadrant" type="int" />
+ <param index="1" name="subdiv" type="int" enum="Viewport.PositionalShadowAtlasQuadrantSubdiv" />
<description>
Sets the number of subdivisions to use in the specified quadrant. A higher number of subdivisions allows you to have more shadows in the scene at once, but reduces the quality of the shadows. A good practice is to have quadrants with a varying number of subdivisions and to have as few subdivisions as possible.
</description>
</method>
<method name="warp_mouse">
<return type="void" />
- <argument index="0" name="position" type="Vector2" />
+ <param index="0" name="position" type="Vector2" />
<description>
Moves the mouse pointer to the specified position in this [Viewport] using the coordinate system of this [Viewport].
</description>
@@ -201,10 +195,6 @@
<member name="disable_3d" type="bool" setter="set_disable_3d" getter="is_3d_disabled" default="false">
Disable 3D rendering (but keep 2D rendering).
</member>
- <member name="fsr_mipmap_bias" type="float" setter="set_fsr_mipmap_bias" getter="get_fsr_mipmap_bias" default="0.0">
- Affects the final texture sharpness by reading from a lower or higher mipmap when using FSR. Mipmap bias does nothing when FSR is not being used. Negative values make textures sharper, while positive values make textures blurrier. This value is used to adjust the mipmap bias calculated internally which is based on the selected quality. The formula for this is [code]-log2(1.0 / scale) + mipmap_bias[/code]. This updates the rendering server's mipmap bias when called
- To control this property on the root viewport, set the [member ProjectSettings.rendering/scaling_3d/fsr_mipmap_bias] project setting.
- </member>
<member name="fsr_sharpness" type="float" setter="set_fsr_sharpness" getter="get_fsr_sharpness" default="0.2">
Determines how sharp the upscaled image will be when using the FSR upscaling mode. Sharpness halves with every whole number. Values go from 0.0 (sharpest) to 2.0. Values above 2.0 won't make a visible difference.
To control this property on the root viewport, set the [member ProjectSettings.rendering/scaling_3d/fsr_sharpness] project setting.
@@ -232,11 +222,29 @@
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>
<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 the [World3D] defined in [member world_3d].
+ If [code]true[/code], the viewport will use a unique copy of the [World3D] defined in [member world_3d].
</member>
<member name="physics_object_picking" type="bool" setter="set_physics_object_picking" getter="get_physics_object_picking" default="false">
If [code]true[/code], the objects rendered by viewport become subjects of mouse picking process.
</member>
+ <member name="positional_shadow_atlas_16_bits" type="bool" setter="set_positional_shadow_atlas_16_bits" getter="get_positional_shadow_atlas_16_bits" default="true">
+ </member>
+ <member name="positional_shadow_atlas_quad_0" type="int" setter="set_positional_shadow_atlas_quadrant_subdiv" getter="get_positional_shadow_atlas_quadrant_subdiv" enum="Viewport.PositionalShadowAtlasQuadrantSubdiv" default="2">
+ The subdivision amount of the first quadrant on the shadow atlas.
+ </member>
+ <member name="positional_shadow_atlas_quad_1" type="int" setter="set_positional_shadow_atlas_quadrant_subdiv" getter="get_positional_shadow_atlas_quadrant_subdiv" enum="Viewport.PositionalShadowAtlasQuadrantSubdiv" default="2">
+ The subdivision amount of the second quadrant on the shadow atlas.
+ </member>
+ <member name="positional_shadow_atlas_quad_2" type="int" setter="set_positional_shadow_atlas_quadrant_subdiv" getter="get_positional_shadow_atlas_quadrant_subdiv" enum="Viewport.PositionalShadowAtlasQuadrantSubdiv" default="3">
+ The subdivision amount of the third quadrant on the shadow atlas.
+ </member>
+ <member name="positional_shadow_atlas_quad_3" type="int" setter="set_positional_shadow_atlas_quadrant_subdiv" getter="get_positional_shadow_atlas_quadrant_subdiv" enum="Viewport.PositionalShadowAtlasQuadrantSubdiv" default="4">
+ The subdivision amount of the fourth quadrant on the shadow atlas.
+ </member>
+ <member name="positional_shadow_atlas_size" type="int" setter="set_positional_shadow_atlas_size" getter="get_positional_shadow_atlas_size" default="2048">
+ The shadow atlas' resolution (used for omni and spot lights). The value will be rounded up to the nearest power of 2.
+ [b]Note:[/b] If this is set to [code]0[/code], no shadows will be visible at all (including directional shadows).
+ </member>
<member name="scaling_3d_mode" type="int" setter="set_scaling_3d_mode" getter="get_scaling_3d_mode" enum="Viewport.Scaling3DMode" default="0">
Sets 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.
To control this property on the root viewport, set the [member ProjectSettings.rendering/scaling_3d/mode] project setting.
@@ -253,28 +261,15 @@
</member>
<member name="sdf_scale" type="int" setter="set_sdf_scale" getter="get_sdf_scale" enum="Viewport.SDFScale" default="1">
</member>
- <member name="shadow_atlas_16_bits" type="bool" setter="set_shadow_atlas_16_bits" getter="get_shadow_atlas_16_bits" default="true">
- </member>
- <member name="shadow_atlas_quad_0" type="int" setter="set_shadow_atlas_quadrant_subdiv" getter="get_shadow_atlas_quadrant_subdiv" enum="Viewport.ShadowAtlasQuadrantSubdiv" default="2">
- The subdivision amount of the first quadrant on the shadow atlas.
- </member>
- <member name="shadow_atlas_quad_1" type="int" setter="set_shadow_atlas_quadrant_subdiv" getter="get_shadow_atlas_quadrant_subdiv" enum="Viewport.ShadowAtlasQuadrantSubdiv" default="2">
- The subdivision amount of the second quadrant on the shadow atlas.
- </member>
- <member name="shadow_atlas_quad_2" type="int" setter="set_shadow_atlas_quadrant_subdiv" getter="get_shadow_atlas_quadrant_subdiv" enum="Viewport.ShadowAtlasQuadrantSubdiv" default="3">
- The subdivision amount of the third quadrant on the shadow atlas.
- </member>
- <member name="shadow_atlas_quad_3" type="int" setter="set_shadow_atlas_quadrant_subdiv" getter="get_shadow_atlas_quadrant_subdiv" enum="Viewport.ShadowAtlasQuadrantSubdiv" default="4">
- The subdivision amount of the fourth quadrant on the shadow atlas.
- </member>
- <member name="shadow_atlas_size" type="int" setter="set_shadow_atlas_size" getter="get_shadow_atlas_size" default="2048">
- The shadow atlas' resolution (used for omni and spot lights). The value will be rounded up to the nearest power of 2.
- [b]Note:[/b] If this is set to 0, shadows won't be visible.
- </member>
<member name="snap_2d_transforms_to_pixel" type="bool" setter="set_snap_2d_transforms_to_pixel" getter="is_snap_2d_transforms_to_pixel_enabled" default="false">
</member>
<member name="snap_2d_vertices_to_pixel" type="bool" setter="set_snap_2d_vertices_to_pixel" getter="is_snap_2d_vertices_to_pixel_enabled" default="false">
</member>
+ <member name="texture_mipmap_bias" type="float" setter="set_texture_mipmap_bias" getter="get_texture_mipmap_bias" default="0.0">
+ Affects the final texture sharpness by reading from a lower or higher mipmap (also called "texture LOD bias"). Negative values make mipmapped textures sharper but grainier when viewed at a distance, while positive values make mipmapped textures blurrier (even when up close). To get sharper textures at a distance without introducing too much graininess, set this between [code]-0.75[/code] and [code]0.0[/code]. Enabling temporal antialiasing ([member ProjectSettings.rendering/anti_aliasing/quality/use_taa]) can help reduce the graininess visible when using negative mipmap bias.
+ [b]Note:[/b] 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>
@@ -284,9 +279,19 @@
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.
[b]Note:[/b] Enabling occlusion culling has a cost on the CPU. Only enable occlusion culling if you actually plan to use it, and think whether your scene can actually benefit from occlusion culling. Large, open scenes with few or no objects blocking the view will generally not benefit much from occlusion culling. Large open scenes generally benefit more from mesh LOD and visibility ranges ([member GeometryInstance3D.visibility_range_begin] and [member GeometryInstance3D.visibility_range_end]) compared to occlusion culling.
</member>
+ <member name="use_taa" type="bool" setter="set_use_taa" getter="is_using_taa" default="false">
+ Enables Temporal Anti-Aliasing for this 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.
+ [b]Note:[/b] The implementation is not complete yet, some visual instances such as particles and skinned meshes may show artifacts.
+ </member>
<member name="use_xr" type="bool" setter="set_use_xr" getter="is_using_xr" default="false">
If [code]true[/code], the viewport will use the primary XR interface to render XR output. When applicable this can result in a stereoscopic image and the resulting render being output to a headset.
</member>
+ <member name="vrs_mode" type="int" setter="set_vrs_mode" getter="get_vrs_mode" enum="Viewport.VRSMode" default="0">
+ The Variable Rate Shading (VRS) mode that is used for this viewport. Note, if hardware does not support VRS this property is ignored.
+ </member>
+ <member name="vrs_texture" type="Texture2D" setter="set_vrs_texture" getter="get_vrs_texture">
+ Texture to use when [member vrs_mode] is set to [constant Viewport.VRS_TEXTURE].
+ </member>
<member name="world_2d" type="World2D" setter="set_world_2d" getter="get_world_2d">
The custom [World2D] which can be used as 2D environment source.
</member>
@@ -296,7 +301,7 @@
</members>
<signals>
<signal name="gui_focus_changed">
- <argument index="0" name="node" type="Control" />
+ <param index="0" name="node" type="Control" />
<description>
Emitted when a Control node grabs keyboard focus.
</description>
@@ -308,29 +313,29 @@
</signal>
</signals>
<constants>
- <constant name="SHADOW_ATLAS_QUADRANT_SUBDIV_DISABLED" value="0" enum="ShadowAtlasQuadrantSubdiv">
+ <constant name="SHADOW_ATLAS_QUADRANT_SUBDIV_DISABLED" value="0" enum="PositionalShadowAtlasQuadrantSubdiv">
This quadrant will not be used.
</constant>
- <constant name="SHADOW_ATLAS_QUADRANT_SUBDIV_1" value="1" enum="ShadowAtlasQuadrantSubdiv">
+ <constant name="SHADOW_ATLAS_QUADRANT_SUBDIV_1" value="1" enum="PositionalShadowAtlasQuadrantSubdiv">
This quadrant will only be used by one shadow map.
</constant>
- <constant name="SHADOW_ATLAS_QUADRANT_SUBDIV_4" value="2" enum="ShadowAtlasQuadrantSubdiv">
+ <constant name="SHADOW_ATLAS_QUADRANT_SUBDIV_4" value="2" enum="PositionalShadowAtlasQuadrantSubdiv">
This quadrant will be split in 4 and used by up to 4 shadow maps.
</constant>
- <constant name="SHADOW_ATLAS_QUADRANT_SUBDIV_16" value="3" enum="ShadowAtlasQuadrantSubdiv">
+ <constant name="SHADOW_ATLAS_QUADRANT_SUBDIV_16" value="3" enum="PositionalShadowAtlasQuadrantSubdiv">
This quadrant will be split 16 ways and used by up to 16 shadow maps.
</constant>
- <constant name="SHADOW_ATLAS_QUADRANT_SUBDIV_64" value="4" enum="ShadowAtlasQuadrantSubdiv">
+ <constant name="SHADOW_ATLAS_QUADRANT_SUBDIV_64" value="4" enum="PositionalShadowAtlasQuadrantSubdiv">
This quadrant will be split 64 ways and used by up to 64 shadow maps.
</constant>
- <constant name="SHADOW_ATLAS_QUADRANT_SUBDIV_256" value="5" enum="ShadowAtlasQuadrantSubdiv">
- This quadrant will be split 256 ways and used by up to 256 shadow maps. Unless the [member shadow_atlas_size] is very high, the shadows in this quadrant will be very low resolution.
+ <constant name="SHADOW_ATLAS_QUADRANT_SUBDIV_256" value="5" enum="PositionalShadowAtlasQuadrantSubdiv">
+ This quadrant will be split 256 ways and used by up to 256 shadow maps. Unless the [member positional_shadow_atlas_size] is very high, the shadows in this quadrant will be very low resolution.
</constant>
- <constant name="SHADOW_ATLAS_QUADRANT_SUBDIV_1024" value="6" enum="ShadowAtlasQuadrantSubdiv">
- This quadrant will be split 1024 ways and used by up to 1024 shadow maps. Unless the [member shadow_atlas_size] is very high, the shadows in this quadrant will be very low resolution.
+ <constant name="SHADOW_ATLAS_QUADRANT_SUBDIV_1024" value="6" enum="PositionalShadowAtlasQuadrantSubdiv">
+ This quadrant will be split 1024 ways and used by up to 1024 shadow maps. Unless the [member positional_shadow_atlas_size] is very high, the shadows in this quadrant will be very low resolution.
</constant>
- <constant name="SHADOW_ATLAS_QUADRANT_SUBDIV_MAX" value="7" enum="ShadowAtlasQuadrantSubdiv">
- Represents the size of the [enum ShadowAtlasQuadrantSubdiv] enum.
+ <constant name="SHADOW_ATLAS_QUADRANT_SUBDIV_MAX" value="7" enum="PositionalShadowAtlasQuadrantSubdiv">
+ Represents the size of the [enum PositionalShadowAtlasQuadrantSubdiv] enum.
</constant>
<constant name="SCALING_3D_MODE_BILINEAR" value="0" enum="Scaling3DMode">
Use bilinear scaling for the viewport's 3D buffer. The amount of scaling can be set using [member scaling_3d_scale]. Values less then [code]1.0[/code] will result in undersampling while values greater than [code]1.0[/code] will result in supersampling. A value of [code]1.0[/code] disables scaling.
@@ -446,6 +451,8 @@
</constant>
<constant name="DEBUG_DRAW_OCCLUDERS" value="24" enum="DebugDraw">
</constant>
+ <constant name="DEBUG_DRAW_MOTION_VECTORS" value="25" enum="DebugDraw">
+ </constant>
<constant name="DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_NEAREST" value="0" enum="DefaultCanvasItemTextureFilter">
The texture filter reads from the nearest pixel only. The simplest and fastest method of filtering, but the texture will look pixelized.
</constant>
@@ -491,5 +498,17 @@
</constant>
<constant name="SDF_SCALE_MAX" value="3" enum="SDFScale">
</constant>
+ <constant name="VRS_DISABLED" value="0" enum="VRSMode">
+ VRS is disabled.
+ </constant>
+ <constant name="VRS_TEXTURE" value="1" enum="VRSMode">
+ VRS uses a texture. Note, for stereoscopic use a texture atlas with a texture for each view.
+ </constant>
+ <constant name="VRS_XR" value="2" enum="VRSMode">
+ VRS texture is supplied by the primary [XRInterface].
+ </constant>
+ <constant name="VRS_MAX" value="3" enum="VRSMode">
+ Represents the size of the [enum VRSMode] enum.
+ </constant>
</constants>
</class>
diff --git a/doc/classes/VisualInstance3D.xml b/doc/classes/VisualInstance3D.xml
index 78a681d92a..9574686506 100644
--- a/doc/classes/VisualInstance3D.xml
+++ b/doc/classes/VisualInstance3D.xml
@@ -34,7 +34,7 @@
</method>
<method name="get_layer_mask_value" qualifiers="const">
<return type="bool" />
- <argument index="0" name="layer_number" type="int" />
+ <param index="0" name="layer_number" type="int" />
<description>
Returns whether or not the specified layer of the [member layers] is enabled, given a [code]layer_number[/code] between 1 and 20.
</description>
@@ -48,17 +48,17 @@
</method>
<method name="set_base">
<return type="void" />
- <argument index="0" name="base" type="RID" />
+ <param index="0" name="base" type="RID" />
<description>
Sets the resource that is instantiated by this [VisualInstance3D], which changes how the engine handles the [VisualInstance3D] under the hood. Equivalent to [method RenderingServer.instance_set_base].
</description>
</method>
<method name="set_layer_mask_value">
<return type="void" />
- <argument index="0" name="layer_number" type="int" />
- <argument index="1" name="value" type="bool" />
+ <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 layers], given a [code]layer_number[/code] between 1 and 20.
+ Based on [param value], enables or disables the specified layer in the [member layers], given a [param layer_number] between 1 and 20.
</description>
</method>
</methods>
@@ -66,6 +66,7 @@
<member name="layers" type="int" setter="set_layer_mask" getter="get_layer_mask">
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.
</member>
</members>
</class>
diff --git a/doc/classes/VisualShader.xml b/doc/classes/VisualShader.xml
index 5f13e4e7bc..a2089ae2b8 100644
--- a/doc/classes/VisualShader.xml
+++ b/doc/classes/VisualShader.xml
@@ -12,164 +12,160 @@
<methods>
<method name="add_node">
<return type="void" />
- <argument index="0" name="type" type="int" enum="VisualShader.Type" />
- <argument index="1" name="node" type="VisualShaderNode" />
- <argument index="2" name="position" type="Vector2" />
- <argument index="3" name="id" type="int" />
+ <param index="0" name="type" type="int" enum="VisualShader.Type" />
+ <param index="1" name="node" type="VisualShaderNode" />
+ <param index="2" name="position" type="Vector2" />
+ <param index="3" name="id" type="int" />
<description>
- Adds the specified node to the shader.
+ Adds the specified [param node] to the shader.
</description>
</method>
<method name="add_varying">
<return type="void" />
- <argument index="0" name="name" type="String" />
- <argument index="1" name="mode" type="int" enum="VisualShader.VaryingMode" />
- <argument index="2" name="type" type="int" enum="VisualShader.VaryingType" />
+ <param index="0" name="name" type="String" />
+ <param index="1" name="mode" type="int" enum="VisualShader.VaryingMode" />
+ <param index="2" name="type" type="int" enum="VisualShader.VaryingType" />
<description>
</description>
</method>
<method name="can_connect_nodes" qualifiers="const">
<return type="bool" />
- <argument index="0" name="type" type="int" enum="VisualShader.Type" />
- <argument index="1" name="from_node" type="int" />
- <argument index="2" name="from_port" type="int" />
- <argument index="3" name="to_node" type="int" />
- <argument index="4" name="to_port" type="int" />
+ <param index="0" name="type" type="int" enum="VisualShader.Type" />
+ <param index="1" name="from_node" type="int" />
+ <param index="2" name="from_port" type="int" />
+ <param index="3" name="to_node" type="int" />
+ <param index="4" name="to_port" type="int" />
<description>
Returns [code]true[/code] if the specified nodes and ports can be connected together.
</description>
</method>
<method name="connect_nodes">
<return type="int" enum="Error" />
- <argument index="0" name="type" type="int" enum="VisualShader.Type" />
- <argument index="1" name="from_node" type="int" />
- <argument index="2" name="from_port" type="int" />
- <argument index="3" name="to_node" type="int" />
- <argument index="4" name="to_port" type="int" />
+ <param index="0" name="type" type="int" enum="VisualShader.Type" />
+ <param index="1" name="from_node" type="int" />
+ <param index="2" name="from_port" type="int" />
+ <param index="3" name="to_node" type="int" />
+ <param index="4" name="to_port" type="int" />
<description>
Connects the specified nodes and ports.
</description>
</method>
<method name="connect_nodes_forced">
<return type="void" />
- <argument index="0" name="type" type="int" enum="VisualShader.Type" />
- <argument index="1" name="from_node" type="int" />
- <argument index="2" name="from_port" type="int" />
- <argument index="3" name="to_node" type="int" />
- <argument index="4" name="to_port" type="int" />
+ <param index="0" name="type" type="int" enum="VisualShader.Type" />
+ <param index="1" name="from_node" type="int" />
+ <param index="2" name="from_port" type="int" />
+ <param index="3" name="to_node" type="int" />
+ <param index="4" name="to_port" type="int" />
<description>
Connects the specified nodes and ports, even if they can't be connected. Such connection is invalid and will not function properly.
</description>
</method>
<method name="disconnect_nodes">
<return type="void" />
- <argument index="0" name="type" type="int" enum="VisualShader.Type" />
- <argument index="1" name="from_node" type="int" />
- <argument index="2" name="from_port" type="int" />
- <argument index="3" name="to_node" type="int" />
- <argument index="4" name="to_port" type="int" />
+ <param index="0" name="type" type="int" enum="VisualShader.Type" />
+ <param index="1" name="from_node" type="int" />
+ <param index="2" name="from_port" type="int" />
+ <param index="3" name="to_node" type="int" />
+ <param index="4" name="to_port" type="int" />
<description>
Connects the specified nodes and ports.
</description>
</method>
<method name="get_node" qualifiers="const">
<return type="VisualShaderNode" />
- <argument index="0" name="type" type="int" enum="VisualShader.Type" />
- <argument index="1" name="id" type="int" />
+ <param index="0" name="type" type="int" enum="VisualShader.Type" />
+ <param index="1" name="id" type="int" />
<description>
- Returns the shader node instance with specified [code]type[/code] and [code]id[/code].
+ Returns the shader node instance with specified [param type] and [param id].
</description>
</method>
<method name="get_node_connections" qualifiers="const">
- <return type="Array" />
- <argument index="0" name="type" type="int" enum="VisualShader.Type" />
+ <return type="Dictionary[]" />
+ <param index="0" name="type" type="int" enum="VisualShader.Type" />
<description>
Returns the list of connected nodes with the specified type.
</description>
</method>
<method name="get_node_list" qualifiers="const">
<return type="PackedInt32Array" />
- <argument index="0" name="type" type="int" enum="VisualShader.Type" />
+ <param index="0" name="type" type="int" enum="VisualShader.Type" />
<description>
Returns the list of all nodes in the shader with the specified type.
</description>
</method>
<method name="get_node_position" qualifiers="const">
<return type="Vector2" />
- <argument index="0" name="type" type="int" enum="VisualShader.Type" />
- <argument index="1" name="id" type="int" />
+ <param index="0" name="type" type="int" enum="VisualShader.Type" />
+ <param index="1" name="id" type="int" />
<description>
Returns the position of the specified node within the shader graph.
</description>
</method>
<method name="get_valid_node_id" qualifiers="const">
<return type="int" />
- <argument index="0" name="type" type="int" enum="VisualShader.Type" />
+ <param index="0" name="type" type="int" enum="VisualShader.Type" />
<description>
</description>
</method>
<method name="has_varying" qualifiers="const">
<return type="bool" />
- <argument index="0" name="name" type="String" />
+ <param index="0" name="name" type="String" />
<description>
</description>
</method>
<method name="is_node_connection" qualifiers="const">
<return type="bool" />
- <argument index="0" name="type" type="int" enum="VisualShader.Type" />
- <argument index="1" name="from_node" type="int" />
- <argument index="2" name="from_port" type="int" />
- <argument index="3" name="to_node" type="int" />
- <argument index="4" name="to_port" type="int" />
+ <param index="0" name="type" type="int" enum="VisualShader.Type" />
+ <param index="1" name="from_node" type="int" />
+ <param index="2" name="from_port" type="int" />
+ <param index="3" name="to_node" type="int" />
+ <param index="4" name="to_port" type="int" />
<description>
Returns [code]true[/code] if the specified node and port connection exist.
</description>
</method>
<method name="remove_node">
<return type="void" />
- <argument index="0" name="type" type="int" enum="VisualShader.Type" />
- <argument index="1" name="id" type="int" />
+ <param index="0" name="type" type="int" enum="VisualShader.Type" />
+ <param index="1" name="id" type="int" />
<description>
Removes the specified node from the shader.
</description>
</method>
<method name="remove_varying">
<return type="void" />
- <argument index="0" name="name" type="String" />
+ <param index="0" name="name" type="String" />
<description>
</description>
</method>
<method name="replace_node">
<return type="void" />
- <argument index="0" name="type" type="int" enum="VisualShader.Type" />
- <argument index="1" name="id" type="int" />
- <argument index="2" name="new_class" type="StringName" />
+ <param index="0" name="type" type="int" enum="VisualShader.Type" />
+ <param index="1" name="id" type="int" />
+ <param index="2" name="new_class" type="StringName" />
<description>
Replaces the specified node with a node of new class type.
</description>
</method>
<method name="set_mode">
<return type="void" />
- <argument index="0" name="mode" type="int" enum="Shader.Mode" />
+ <param index="0" name="mode" type="int" enum="Shader.Mode" />
<description>
Sets the mode of this shader.
</description>
</method>
<method name="set_node_position">
<return type="void" />
- <argument index="0" name="type" type="int" enum="VisualShader.Type" />
- <argument index="1" name="id" type="int" />
- <argument index="2" name="position" type="Vector2" />
+ <param index="0" name="type" type="int" enum="VisualShader.Type" />
+ <param index="1" name="id" type="int" />
+ <param index="2" name="position" type="Vector2" />
<description>
Sets the position of the specified node.
</description>
</method>
</methods>
<members>
- <member name="engine_version" type="Dictionary" setter="set_engine_version" getter="get_engine_version" default="{}">
- The Godot version this [VisualShader] was designed for, in the form of a [Dictionary] with [code]major[/code] and [code]minor[/code] keys with integer values. Example: [code]{"major": 4, "minor": 0}[/code]
- This is used by the editor to convert visual shaders from older Godot versions.
- </member>
<member name="graph_offset" type="Vector2" setter="set_graph_offset" getter="get_graph_offset" default="Vector2(0, 0)">
The offset vector of the whole graph.
</member>
@@ -210,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_2D" value="2" enum="VaryingType">
</constant>
- <constant name="VARYING_TYPE_VECTOR_3D" value="2" enum="VaryingType">
+ <constant name="VARYING_TYPE_VECTOR_3D" value="3" enum="VaryingType">
</constant>
- <constant name="VARYING_TYPE_VECTOR_4D" value="3" enum="VaryingType">
+ <constant name="VARYING_TYPE_VECTOR_4D" value="4" enum="VaryingType">
</constant>
- <constant name="VARYING_TYPE_COLOR" value="4" enum="VaryingType">
+ <constant name="VARYING_TYPE_BOOLEAN" value="5" enum="VaryingType">
</constant>
- <constant name="VARYING_TYPE_TRANSFORM" value="5" enum="VaryingType">
+ <constant name="VARYING_TYPE_TRANSFORM" value="6" enum="VaryingType">
</constant>
- <constant name="VARYING_TYPE_MAX" value="6" enum="VaryingType">
+ <constant name="VARYING_TYPE_MAX" value="7" enum="VaryingType">
</constant>
<constant name="NODE_ID_INVALID" value="-1">
</constant>
diff --git a/doc/classes/VisualShaderNode.xml b/doc/classes/VisualShaderNode.xml
index 7220731a8a..1f3397f39c 100644
--- a/doc/classes/VisualShaderNode.xml
+++ b/doc/classes/VisualShaderNode.xml
@@ -24,32 +24,32 @@
</method>
<method name="get_input_port_default_value" qualifiers="const">
<return type="Variant" />
- <argument index="0" name="port" type="int" />
+ <param index="0" name="port" type="int" />
<description>
- Returns the default value of the input [code]port[/code].
+ Returns the default value of the input [param port].
</description>
</method>
<method name="remove_input_port_default_value">
<return type="void" />
- <argument index="0" name="port" type="int" />
+ <param index="0" name="port" type="int" />
<description>
- Removes the default value of the input [code]port[/code].
+ Removes the default value of the input [param port].
</description>
</method>
<method name="set_default_input_values">
<return type="void" />
- <argument index="0" name="values" type="Array" />
+ <param index="0" name="values" type="Array" />
<description>
Sets the default input ports values using an [Array] of the form [code][index0, value0, index1, value1, ...][/code]. For example: [code][0, Vector3(0, 0, 0), 1, Vector3(0, 0, 0)][/code].
</description>
</method>
<method name="set_input_port_default_value">
<return type="void" />
- <argument index="0" name="port" type="int" />
- <argument index="1" name="value" type="Variant" />
- <argument index="2" name="prev_value" type="Variant" default="null" />
+ <param index="0" name="port" type="int" />
+ <param index="1" name="value" type="Variant" />
+ <param index="2" name="prev_value" type="Variant" default="null" />
<description>
- Sets the default value for the selected input [code]port[/code].
+ Sets the default [param value] for the selected input [param port].
</description>
</method>
</methods>
diff --git a/doc/classes/VisualShaderNodeColorFunc.xml b/doc/classes/VisualShaderNodeColorFunc.xml
index 4a73b1662e..6116e0df68 100644
--- a/doc/classes/VisualShaderNodeColorFunc.xml
+++ b/doc/classes/VisualShaderNodeColorFunc.xml
@@ -24,7 +24,13 @@
return vec3(max3, max3, max3);
[/codeblock]
</constant>
- <constant name="FUNC_SEPIA" value="1" enum="Function">
+ <constant name="FUNC_HSV2RGB" value="1" enum="Function">
+ Converts HSV vector to RGB equivalent.
+ </constant>
+ <constant name="FUNC_RGB2HSV" value="2" enum="Function">
+ Converts RGB vector to HSV equivalent.
+ </constant>
+ <constant name="FUNC_SEPIA" value="3" enum="Function">
Applies sepia tone effect using the following formula:
[codeblock]
vec3 c = input;
@@ -34,7 +40,7 @@
return vec3(r, g, b);
[/codeblock]
</constant>
- <constant name="FUNC_MAX" value="2" enum="Function">
+ <constant name="FUNC_MAX" value="4" enum="Function">
Represents the size of the [enum Function] enum.
</constant>
</constants>
diff --git a/doc/classes/VisualShaderNodeCustom.xml b/doc/classes/VisualShaderNodeCustom.xml
index 0a962a4aa4..d96969b383 100644
--- a/doc/classes/VisualShaderNodeCustom.xml
+++ b/doc/classes/VisualShaderNodeCustom.xml
@@ -25,15 +25,15 @@
</method>
<method name="_get_code" qualifiers="virtual const">
<return type="String" />
- <argument index="0" name="input_vars" type="String[]" />
- <argument index="1" name="output_vars" type="String[]" />
- <argument index="2" name="mode" type="int" enum="Shader.Mode" />
- <argument index="3" name="type" type="int" enum="VisualShader.Type" />
+ <param index="0" name="input_vars" type="String[]" />
+ <param index="1" name="output_vars" type="String[]" />
+ <param index="2" name="mode" type="int" enum="Shader.Mode" />
+ <param index="3" name="type" type="int" enum="VisualShader.Type" />
<description>
Override this method to define the actual shader code of the associated custom node. The shader code should be returned as a string, which can have multiple lines (the [code]"""[/code] multiline string construct can be used for convenience).
- The [code]input_vars[/code] and [code]output_vars[/code] arrays contain the string names of the various input and output variables, as defined by [code]_get_input_*[/code] and [code]_get_output_*[/code] virtual methods in this class.
+ The [param input_vars] and [param output_vars] arrays contain the string names of the various input and output variables, as defined by [code]_get_input_*[/code] and [code]_get_output_*[/code] virtual methods in this class.
The output ports can be assigned values in the shader code. For example, [code]return output_vars[0] + " = " + input_vars[0] + ";"[/code].
- You can customize the generated code based on the shader [code]mode[/code] (see [enum Shader.Mode]) and/or [code]type[/code] (see [enum VisualShader.Type]).
+ You can customize the generated code based on the shader [param mode] (see [enum Shader.Mode]) and/or [param type] (see [enum VisualShader.Type]).
Defining this method is [b]required[/b].
</description>
</method>
@@ -46,35 +46,35 @@
</method>
<method name="_get_func_code" qualifiers="virtual const">
<return type="String" />
- <argument index="0" name="mode" type="int" enum="Shader.Mode" />
- <argument index="1" name="type" type="int" enum="VisualShader.Type" />
+ <param index="0" name="mode" type="int" enum="Shader.Mode" />
+ <param index="1" name="type" type="int" enum="VisualShader.Type" />
<description>
Override this method to add a shader code to the beginning of each shader function (once). The shader code should be returned as a string, which can have multiple lines (the [code]"""[/code] multiline string construct can be used for convenience).
If there are multiple custom nodes of different types which use this feature the order of each insertion is undefined.
- You can customize the generated code based on the shader [code]mode[/code] (see [enum Shader.Mode]) and/or [code]type[/code] (see [enum VisualShader.Type]).
+ You can customize the generated code based on the shader [param mode] (see [enum Shader.Mode]) and/or [param type] (see [enum VisualShader.Type]).
Defining this method is [b]optional[/b].
</description>
</method>
<method name="_get_global_code" qualifiers="virtual const">
<return type="String" />
- <argument index="0" name="mode" type="int" enum="Shader.Mode" />
+ <param index="0" name="mode" type="int" enum="Shader.Mode" />
<description>
Override this method to add shader code on top of the global shader, to define your own standard library of reusable methods, varyings, constants, uniforms, etc. The shader code should be returned as a string, which can have multiple lines (the [code]"""[/code] multiline string construct can be used for convenience).
Be careful with this functionality as it can cause name conflicts with other custom nodes, so be sure to give the defined entities unique names.
- You can customize the generated code based on the shader [code]mode[/code] (see [enum Shader.Mode]).
+ You can customize the generated code based on the shader [param mode] (see [enum Shader.Mode]).
Defining this method is [b]optional[/b].
</description>
</method>
<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>
<method name="_get_input_port_name" qualifiers="virtual const">
<return type="String" />
- <argument index="0" name="port" type="int" />
+ <param index="0" name="port" type="int" />
<description>
Override this method to define the names of input ports of the associated custom node. The names are used both for the input slots in the editor and as identifiers in the shader code, and are passed in the [code]input_vars[/code] array in [method _get_code].
Defining this method is [b]optional[/b], but recommended. If not overridden, input ports are named as [code]"in" + str(port)[/code].
@@ -82,7 +82,7 @@
</method>
<method name="_get_input_port_type" qualifiers="virtual const">
<return type="int" />
- <argument index="0" name="port" type="int" />
+ <param index="0" name="port" type="int" />
<description>
Override this method to define the returned type of each input port of the associated custom node (see [enum VisualShaderNode.PortType] for possible types).
Defining this method is [b]optional[/b], but recommended. If not overridden, input ports will return the [constant VisualShaderNode.PORT_TYPE_SCALAR] type.
@@ -98,13 +98,13 @@
<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>
<method name="_get_output_port_name" qualifiers="virtual const">
<return type="String" />
- <argument index="0" name="port" type="int" />
+ <param index="0" name="port" type="int" />
<description>
Override this method to define the names of output ports of the associated custom node. The names are used both for the output slots in the editor and as identifiers in the shader code, and are passed in the [code]output_vars[/code] array in [method _get_code].
Defining this method is [b]optional[/b], but recommended. If not overridden, output ports are named as [code]"out" + str(port)[/code].
@@ -112,7 +112,7 @@
</method>
<method name="_get_output_port_type" qualifiers="virtual const">
<return type="int" />
- <argument index="0" name="port" type="int" />
+ <param index="0" name="port" type="int" />
<description>
Override this method to define the returned type of each output port of the associated custom node (see [enum VisualShaderNode.PortType] for possible types).
Defining this method is [b]optional[/b], but recommended. If not overridden, output ports will return the [constant VisualShaderNode.PORT_TYPE_SCALAR] type.
@@ -127,10 +127,10 @@
</method>
<method name="_is_available" qualifiers="virtual const">
<return type="bool" />
- <argument index="0" name="mode" type="int" enum="Shader.Mode" />
- <argument index="1" name="type" type="int" enum="VisualShader.Type" />
+ <param index="0" name="mode" type="int" enum="Shader.Mode" />
+ <param index="1" name="type" type="int" enum="VisualShader.Type" />
<description>
- Override this method to prevent the node to be visible in the member dialog for the certain [code]mode[/code] (see [enum Shader.Mode]) and/or [code]type[/code] (see [enum VisualShader.Type]).
+ Override this method to prevent the node to be visible in the member dialog for the certain [param mode] (see [enum Shader.Mode]) and/or [param type] (see [enum VisualShader.Type]).
Defining this method is [b]optional[/b]. If not overridden, it's [code]true[/code].
</description>
</method>
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/VisualShaderNodeFloatFunc.xml b/doc/classes/VisualShaderNodeFloatFunc.xml
index 0f057b2e6d..1226013c67 100644
--- a/doc/classes/VisualShaderNodeFloatFunc.xml
+++ b/doc/classes/VisualShaderNodeFloatFunc.xml
@@ -65,7 +65,7 @@
<constant name="FUNC_CEIL" value="16" enum="Function">
Finds the nearest integer that is greater than or equal to the parameter. Translates to [code]ceil(x)[/code] in the Godot Shader Language.
</constant>
- <constant name="FUNC_FRAC" value="17" enum="Function">
+ <constant name="FUNC_FRACT" value="17" enum="Function">
Computes the fractional part of the argument. Translates to [code]fract(x)[/code] in the Godot Shader Language.
</constant>
<constant name="FUNC_SATURATE" value="18" enum="Function">
diff --git a/doc/classes/VisualShaderNodeGroupBase.xml b/doc/classes/VisualShaderNodeGroupBase.xml
index 1b724b00d6..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.
@@ -11,20 +11,20 @@
<methods>
<method name="add_input_port">
<return type="void" />
- <argument index="0" name="id" type="int" />
- <argument index="1" name="type" type="int" />
- <argument index="2" name="name" type="String" />
+ <param index="0" name="id" type="int" />
+ <param index="1" name="type" type="int" />
+ <param index="2" name="name" type="String" />
<description>
- Adds an input port with the specified [code]type[/code] (see [enum VisualShaderNode.PortType]) and [code]name[/code].
+ Adds an input port with the specified [param type] (see [enum VisualShaderNode.PortType]) and [param name].
</description>
</method>
<method name="add_output_port">
<return type="void" />
- <argument index="0" name="id" type="int" />
- <argument index="1" name="type" type="int" />
- <argument index="2" name="name" type="String" />
+ <param index="0" name="id" type="int" />
+ <param index="1" name="type" type="int" />
+ <param index="2" name="name" type="String" />
<description>
- Adds an output port with the specified [code]type[/code] (see [enum VisualShaderNode.PortType]) and [code]name[/code].
+ Adds an output port with the specified [param type] (see [enum VisualShaderNode.PortType]) and [param name].
</description>
</method>
<method name="clear_input_ports">
@@ -77,81 +77,81 @@
</method>
<method name="has_input_port" qualifiers="const">
<return type="bool" />
- <argument index="0" name="id" type="int" />
+ <param index="0" name="id" type="int" />
<description>
Returns [code]true[/code] if the specified input port exists.
</description>
</method>
<method name="has_output_port" qualifiers="const">
<return type="bool" />
- <argument index="0" name="id" type="int" />
+ <param index="0" name="id" type="int" />
<description>
Returns [code]true[/code] if the specified output port exists.
</description>
</method>
<method name="is_valid_port_name" qualifiers="const">
<return type="bool" />
- <argument index="0" name="name" type="String" />
+ <param index="0" name="name" type="String" />
<description>
Returns [code]true[/code] if the specified port name does not override an existed port name and is valid within the shader.
</description>
</method>
<method name="remove_input_port">
<return type="void" />
- <argument index="0" name="id" type="int" />
+ <param index="0" name="id" type="int" />
<description>
Removes the specified input port.
</description>
</method>
<method name="remove_output_port">
<return type="void" />
- <argument index="0" name="id" type="int" />
+ <param index="0" name="id" type="int" />
<description>
Removes the specified output port.
</description>
</method>
<method name="set_input_port_name">
<return type="void" />
- <argument index="0" name="id" type="int" />
- <argument index="1" name="name" type="String" />
+ <param index="0" name="id" type="int" />
+ <param index="1" name="name" type="String" />
<description>
Renames the specified input port.
</description>
</method>
<method name="set_input_port_type">
<return type="void" />
- <argument index="0" name="id" type="int" />
- <argument index="1" name="type" type="int" />
+ <param index="0" name="id" type="int" />
+ <param index="1" name="type" type="int" />
<description>
Sets the specified input port's type (see [enum VisualShaderNode.PortType]).
</description>
</method>
<method name="set_inputs">
<return type="void" />
- <argument index="0" name="inputs" type="String" />
+ <param index="0" name="inputs" type="String" />
<description>
Defines all input ports using a [String] formatted as a colon-separated list: [code]id,type,name;[/code] (see [method add_input_port]).
</description>
</method>
<method name="set_output_port_name">
<return type="void" />
- <argument index="0" name="id" type="int" />
- <argument index="1" name="name" type="String" />
+ <param index="0" name="id" type="int" />
+ <param index="1" name="name" type="String" />
<description>
Renames the specified output port.
</description>
</method>
<method name="set_output_port_type">
<return type="void" />
- <argument index="0" name="id" type="int" />
- <argument index="1" name="type" type="int" />
+ <param index="0" name="id" type="int" />
+ <param index="1" name="type" type="int" />
<description>
Sets the specified output port's type (see [enum VisualShaderNode.PortType]).
</description>
</method>
<method name="set_outputs">
<return type="void" />
- <argument index="0" name="outputs" type="String" />
+ <param index="0" name="outputs" type="String" />
<description>
Defines all output ports using a [String] formatted as a colon-separated list: [code]id,type,name;[/code] (see [method add_output_port]).
</description>
diff --git a/doc/classes/VisualShaderNodeTextureUniform.xml b/doc/classes/VisualShaderNodeTextureUniform.xml
index b104634da0..9014f79f54 100644
--- a/doc/classes/VisualShaderNodeTextureUniform.xml
+++ b/doc/classes/VisualShaderNodeTextureUniform.xml
@@ -27,7 +27,7 @@
No hints are added to the uniform declaration.
</constant>
<constant name="TYPE_COLOR" value="1" enum="TextureType">
- Adds [code]hint_albedo[/code] as hint to the uniform declaration for proper sRGB to linear conversion.
+ Adds [code]source_color[/code] as hint to the uniform declaration for proper sRGB to linear conversion.
</constant>
<constant name="TYPE_NORMAL_MAP" value="2" enum="TextureType">
Adds [code]hint_normal[/code] as hint to the uniform declaration, which internally converts the texture for proper usage as normal map.
@@ -39,12 +39,15 @@
Represents the size of the [enum TextureType] enum.
</constant>
<constant name="COLOR_DEFAULT_WHITE" value="0" enum="ColorDefault">
- Defaults to white color.
+ Defaults to fully opaque white color.
</constant>
<constant name="COLOR_DEFAULT_BLACK" value="1" enum="ColorDefault">
- Defaults to black color.
+ Defaults to fully opaque black color.
</constant>
- <constant name="COLOR_DEFAULT_MAX" value="2" enum="ColorDefault">
+ <constant name="COLOR_DEFAULT_TRANSPARENT" value="2" enum="ColorDefault">
+ Defaults to fully transparent black color.
+ </constant>
+ <constant name="COLOR_DEFAULT_MAX" value="3" enum="ColorDefault">
Represents the size of the [enum ColorDefault] enum.
</constant>
<constant name="FILTER_DEFAULT" value="0" enum="TextureFilter">
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/VisualShaderNodeVectorFunc.xml b/doc/classes/VisualShaderNodeVectorFunc.xml
index dc6628a9af..7524025f21 100644
--- a/doc/classes/VisualShaderNodeVectorFunc.xml
+++ b/doc/classes/VisualShaderNodeVectorFunc.xml
@@ -26,100 +26,94 @@
<constant name="FUNC_RECIPROCAL" value="3" enum="Function">
Returns [code]1/vector[/code].
</constant>
- <constant name="FUNC_RGB2HSV" value="4" enum="Function">
- Converts RGB vector to HSV equivalent.
- </constant>
- <constant name="FUNC_HSV2RGB" value="5" enum="Function">
- Converts HSV vector to RGB equivalent.
- </constant>
- <constant name="FUNC_ABS" value="6" enum="Function">
+ <constant name="FUNC_ABS" value="4" enum="Function">
Returns the absolute value of the parameter.
</constant>
- <constant name="FUNC_ACOS" value="7" enum="Function">
+ <constant name="FUNC_ACOS" value="5" enum="Function">
Returns the arc-cosine of the parameter.
</constant>
- <constant name="FUNC_ACOSH" value="8" enum="Function">
+ <constant name="FUNC_ACOSH" value="6" enum="Function">
Returns the inverse hyperbolic cosine of the parameter.
</constant>
- <constant name="FUNC_ASIN" value="9" enum="Function">
+ <constant name="FUNC_ASIN" value="7" enum="Function">
Returns the arc-sine of the parameter.
</constant>
- <constant name="FUNC_ASINH" value="10" enum="Function">
+ <constant name="FUNC_ASINH" value="8" enum="Function">
Returns the inverse hyperbolic sine of the parameter.
</constant>
- <constant name="FUNC_ATAN" value="11" enum="Function">
+ <constant name="FUNC_ATAN" value="9" enum="Function">
Returns the arc-tangent of the parameter.
</constant>
- <constant name="FUNC_ATANH" value="12" enum="Function">
+ <constant name="FUNC_ATANH" value="10" enum="Function">
Returns the inverse hyperbolic tangent of the parameter.
</constant>
- <constant name="FUNC_CEIL" value="13" enum="Function">
+ <constant name="FUNC_CEIL" value="11" enum="Function">
Finds the nearest integer that is greater than or equal to the parameter.
</constant>
- <constant name="FUNC_COS" value="14" enum="Function">
+ <constant name="FUNC_COS" value="12" enum="Function">
Returns the cosine of the parameter.
</constant>
- <constant name="FUNC_COSH" value="15" enum="Function">
+ <constant name="FUNC_COSH" value="13" enum="Function">
Returns the hyperbolic cosine of the parameter.
</constant>
- <constant name="FUNC_DEGREES" value="16" enum="Function">
+ <constant name="FUNC_DEGREES" value="14" enum="Function">
Converts a quantity in radians to degrees.
</constant>
- <constant name="FUNC_EXP" value="17" enum="Function">
+ <constant name="FUNC_EXP" value="15" enum="Function">
Base-e Exponential.
</constant>
- <constant name="FUNC_EXP2" value="18" enum="Function">
+ <constant name="FUNC_EXP2" value="16" enum="Function">
Base-2 Exponential.
</constant>
- <constant name="FUNC_FLOOR" value="19" enum="Function">
+ <constant name="FUNC_FLOOR" value="17" enum="Function">
Finds the nearest integer less than or equal to the parameter.
</constant>
- <constant name="FUNC_FRAC" value="20" enum="Function">
+ <constant name="FUNC_FRACT" value="18" enum="Function">
Computes the fractional part of the argument.
</constant>
- <constant name="FUNC_INVERSE_SQRT" value="21" enum="Function">
+ <constant name="FUNC_INVERSE_SQRT" value="19" enum="Function">
Returns the inverse of the square root of the parameter.
</constant>
- <constant name="FUNC_LOG" value="22" enum="Function">
+ <constant name="FUNC_LOG" value="20" enum="Function">
Natural logarithm.
</constant>
- <constant name="FUNC_LOG2" value="23" enum="Function">
+ <constant name="FUNC_LOG2" value="21" enum="Function">
Base-2 logarithm.
</constant>
- <constant name="FUNC_RADIANS" value="24" enum="Function">
+ <constant name="FUNC_RADIANS" value="22" enum="Function">
Converts a quantity in degrees to radians.
</constant>
- <constant name="FUNC_ROUND" value="25" enum="Function">
+ <constant name="FUNC_ROUND" value="23" enum="Function">
Finds the nearest integer to the parameter.
</constant>
- <constant name="FUNC_ROUNDEVEN" value="26" enum="Function">
+ <constant name="FUNC_ROUNDEVEN" value="24" enum="Function">
Finds the nearest even integer to the parameter.
</constant>
- <constant name="FUNC_SIGN" value="27" enum="Function">
+ <constant name="FUNC_SIGN" value="25" enum="Function">
Extracts the sign of the parameter, i.e. returns [code]-1[/code] if the parameter is negative, [code]1[/code] if it's positive and [code]0[/code] otherwise.
</constant>
- <constant name="FUNC_SIN" value="28" enum="Function">
+ <constant name="FUNC_SIN" value="26" enum="Function">
Returns the sine of the parameter.
</constant>
- <constant name="FUNC_SINH" value="29" enum="Function">
+ <constant name="FUNC_SINH" value="27" enum="Function">
Returns the hyperbolic sine of the parameter.
</constant>
- <constant name="FUNC_SQRT" value="30" enum="Function">
+ <constant name="FUNC_SQRT" value="28" enum="Function">
Returns the square root of the parameter.
</constant>
- <constant name="FUNC_TAN" value="31" enum="Function">
+ <constant name="FUNC_TAN" value="29" enum="Function">
Returns the tangent of the parameter.
</constant>
- <constant name="FUNC_TANH" value="32" enum="Function">
+ <constant name="FUNC_TANH" value="30" enum="Function">
Returns the hyperbolic tangent of the parameter.
</constant>
- <constant name="FUNC_TRUNC" value="33" enum="Function">
+ <constant name="FUNC_TRUNC" value="31" enum="Function">
Returns a value equal to the nearest integer to the parameter whose absolute value is not larger than the absolute value of the parameter.
</constant>
- <constant name="FUNC_ONEMINUS" value="34" enum="Function">
+ <constant name="FUNC_ONEMINUS" value="32" enum="Function">
Returns [code]1.0 - vector[/code].
</constant>
- <constant name="FUNC_MAX" value="35" enum="Function">
+ <constant name="FUNC_MAX" value="33" enum="Function">
Represents the size of the [enum Function] enum.
</constant>
</constants>
diff --git a/doc/classes/VisualShaderNodeVectorRefract.xml b/doc/classes/VisualShaderNodeVectorRefract.xml
index d12188ea55..003b505671 100644
--- a/doc/classes/VisualShaderNodeVectorRefract.xml
+++ b/doc/classes/VisualShaderNodeVectorRefract.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeVectorRefract" inherits="VisualShaderNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+<class name="VisualShaderNodeVectorRefract" inherits="VisualShaderNodeVectorBase" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
- Returns the [Vector3] that points in the direction of refraction. For use within the visual shader graph.
+ Returns the vector that points in the direction of refraction. For use within the visual shader graph.
</brief_description>
<description>
Translated to [code]refract(I, N, eta)[/code] in the shader language, where [code]I[/code] is the incident vector, [code]N[/code] is the normal vector and [code]eta[/code] is the ratio of the indices of the refraction.
diff --git a/doc/classes/VoxelGI.xml b/doc/classes/VoxelGI.xml
index 55ba1c4934..ba4995a5fb 100644
--- a/doc/classes/VoxelGI.xml
+++ b/doc/classes/VoxelGI.xml
@@ -16,8 +16,8 @@
<methods>
<method name="bake">
<return type="void" />
- <argument index="0" name="from_node" type="Node" default="null" />
- <argument index="1" name="create_visual_debug" type="bool" default="false" />
+ <param index="0" name="from_node" type="Node" default="null" />
+ <param index="1" name="create_visual_debug" type="bool" default="false" />
<description>
Bakes the effect from all [GeometryInstance3D]s marked with [constant GeometryInstance3D.GI_MODE_STATIC] and [Light3D]s marked with either [constant Light3D.BAKE_STATIC] or [constant Light3D.BAKE_DYNAMIC]. If [code]create_visual_debug[/code] is [code]true[/code], after baking the light, this will generate a [MultiMesh] that has a cube representing each solid cell with each cube colored to the cell's albedo color. This can be used to visualize the [VoxelGI]'s data and debug any issues that may be occurring.
[b]Note:[/b] [method bake] works from the editor and in exported projects. This makes it suitable for procedurally generated or user-built levels. Baking a [VoxelGI] node generally takes from 5 to 20 seconds in most scenes. Reducing [member subdiv] can speed up baking.
@@ -37,6 +37,7 @@
</member>
<member name="extents" type="Vector3" setter="set_extents" getter="get_extents" default="Vector3(10, 10, 10)">
The size of the area covered by the [VoxelGI]. If you make the extents larger without increasing the subdivisions with [member subdiv], the size of each cell will increase and result in lower detailed lighting.
+ [b]Note:[/b] Extents are clamped to 1.0 unit or more on each axis.
</member>
<member name="subdiv" type="int" setter="set_subdiv" getter="get_subdiv" enum="VoxelGI.Subdiv" default="1">
Number of times to subdivide the grid that the [VoxelGI] operates on. A higher number results in finer detail and thus higher visual quality, while lower numbers result in better performance.
diff --git a/doc/classes/VoxelGIData.xml b/doc/classes/VoxelGIData.xml
index b8d424b5fe..92b2e66e5a 100644
--- a/doc/classes/VoxelGIData.xml
+++ b/doc/classes/VoxelGIData.xml
@@ -13,13 +13,13 @@
<methods>
<method name="allocate">
<return type="void" />
- <argument index="0" name="to_cell_xform" type="Transform3D" />
- <argument index="1" name="aabb" type="AABB" />
- <argument index="2" name="octree_size" type="Vector3" />
- <argument index="3" name="octree_cells" type="PackedByteArray" />
- <argument index="4" name="data_cells" type="PackedByteArray" />
- <argument index="5" name="distance_field" type="PackedByteArray" />
- <argument index="6" name="level_counts" type="PackedInt32Array" />
+ <param index="0" name="to_cell_xform" type="Transform3D" />
+ <param index="1" name="aabb" type="AABB" />
+ <param index="2" name="octree_size" type="Vector3" />
+ <param index="3" name="octree_cells" type="PackedByteArray" />
+ <param index="4" name="data_cells" type="PackedByteArray" />
+ <param index="5" name="distance_field" type="PackedByteArray" />
+ <param index="6" name="level_counts" type="PackedInt32Array" />
<description>
</description>
</method>
@@ -72,10 +72,10 @@
<member name="normal_bias" type="float" setter="set_normal_bias" getter="get_normal_bias" default="0.0">
The normal bias to use for indirect lighting and reflections. Higher values reduce self-reflections visible in non-rough materials, at the cost of more visible light leaking and flatter-looking indirect lighting. See also [member bias]. To prioritize hiding self-reflections over lighting quality, set [member bias] to [code]0.0[/code] and [member normal_bias] to a value between [code]1.0[/code] and [code]2.0[/code].
</member>
- <member name="propagation" type="float" setter="set_propagation" getter="get_propagation" default="0.7">
- If indirect lighting looks too flat, try decreasing [member propagation] while increasing [member energy] at the same time. See also [member use_two_bounces] which influences the indirect lighting's effective brightness.
+ <member name="propagation" type="float" setter="set_propagation" getter="get_propagation" default="0.5">
+ The multiplier to use when light bounces off a surface. Higher values result in brighter indirect lighting. If indirect lighting looks too flat, try decreasing [member propagation] while increasing [member energy] at the same time. See also [member use_two_bounces] which influences the indirect lighting's effective brightness.
</member>
- <member name="use_two_bounces" type="bool" setter="set_use_two_bounces" getter="is_using_two_bounces" default="false">
+ <member name="use_two_bounces" type="bool" setter="set_use_two_bounces" getter="is_using_two_bounces" default="true">
If [code]true[/code], performs two bounces of indirect lighting instead of one. This makes indirect lighting look more natural and brighter at a small performance cost. The second bounce is also visible in reflections. If the scene appears too bright after enabling [member use_two_bounces], adjust [member propagation] and [member energy].
</member>
</members>
diff --git a/doc/classes/WeakRef.xml b/doc/classes/WeakRef.xml
index f80381acda..ea520178c7 100644
--- a/doc/classes/WeakRef.xml
+++ b/doc/classes/WeakRef.xml
@@ -12,7 +12,7 @@
<method name="get_ref" qualifiers="const">
<return type="Variant" />
<description>
- Returns the [Object] this weakref is referring to.
+ Returns the [Object] this weakref is referring to. Returns [code]null[/code] if that object no longer exists.
</description>
</method>
</methods>
diff --git a/doc/classes/Window.xml b/doc/classes/Window.xml
index 5ce870a899..ce7ad1e64e 100644
--- a/doc/classes/Window.xml
+++ b/doc/classes/Window.xml
@@ -4,7 +4,8 @@
Base class for all windows.
</brief_description>
<description>
- A node that creates a window.
+ A node that creates a window. The window can either be a native system window or embedded inside another [Window] (see [member Viewport.gui_embed_subwindows]).
+ At runtime, [Window]s will not close automatically when requested. You need to handle it manually using [signal close_requested] (this applies both to clicking close button and clicking outside popup).
</description>
<tutorials>
</tutorials>
@@ -18,19 +19,20 @@
<method name="child_controls_changed">
<return type="void" />
<description>
+ Requests an update of the [Window] size to fit underlying [Control] nodes.
</description>
</method>
<method name="get_contents_minimum_size" qualifiers="const">
<return type="Vector2" />
<description>
- Returns the combined minimum size from the child [Control] nodes of the window.
+ Returns the combined minimum size from the child [Control] nodes of the window. Use [method child_controls_changed] to update it when children nodes have changed.
</description>
</method>
<method name="get_flag" qualifiers="const">
<return type="bool" />
- <argument index="0" name="flag" type="int" enum="Window.Flags" />
+ <param index="0" name="flag" type="int" enum="Window.Flags" />
<description>
- Returns [code]true[/code] if the flag is set.
+ Returns [code]true[/code] if the [param flag] is set.
</description>
</method>
<method name="get_layout_direction" qualifiers="const">
@@ -47,61 +49,77 @@
</method>
<method name="get_theme_color" qualifiers="const">
<return type="Color" />
- <argument index="0" name="name" type="StringName" />
- <argument index="1" name="theme_type" type="StringName" default="&quot;&quot;" />
+ <param index="0" name="name" type="StringName" />
+ <param index="1" name="theme_type" type="StringName" default="&quot;&quot;" />
<description>
+ Returns the [Color] at [param name] if the theme has [param theme_type].
+ See [method Control.get_theme_color] for more details.
</description>
</method>
<method name="get_theme_constant" qualifiers="const">
<return type="int" />
- <argument index="0" name="name" type="StringName" />
- <argument index="1" name="theme_type" type="StringName" default="&quot;&quot;" />
+ <param index="0" name="name" type="StringName" />
+ <param index="1" name="theme_type" type="StringName" default="&quot;&quot;" />
<description>
+ Returns the constant at [param name] if the theme has [param theme_type].
+ See [method Control.get_theme_color] for more details.
</description>
</method>
<method name="get_theme_default_base_scale" qualifiers="const">
<return type="float" />
<description>
+ Returns the default base scale defined in the attached [Theme].
+ See [member Theme.default_base_scale] for more details.
</description>
</method>
<method name="get_theme_default_font" qualifiers="const">
<return type="Font" />
<description>
+ Returns the default [Font] defined in the attached [Theme].
+ See [member Theme.default_font] for more details.
</description>
</method>
<method name="get_theme_default_font_size" qualifiers="const">
<return type="int" />
<description>
+ Returns the default font size defined in the attached [Theme].
+ See [member Theme.default_font_size] for more details.
</description>
</method>
<method name="get_theme_font" qualifiers="const">
<return type="Font" />
- <argument index="0" name="name" type="StringName" />
- <argument index="1" name="theme_type" type="StringName" default="&quot;&quot;" />
+ <param index="0" name="name" type="StringName" />
+ <param index="1" name="theme_type" type="StringName" default="&quot;&quot;" />
<description>
- Returns the [Font] at [code]name[/code] if the theme has [code]theme_type[/code].
+ Returns the [Font] at [param name] if the theme has [param theme_type].
+ See [method Control.get_theme_color] for more details.
</description>
</method>
<method name="get_theme_font_size" qualifiers="const">
<return type="int" />
- <argument index="0" name="name" type="StringName" />
- <argument index="1" name="theme_type" type="StringName" default="&quot;&quot;" />
+ <param index="0" name="name" type="StringName" />
+ <param index="1" name="theme_type" type="StringName" default="&quot;&quot;" />
<description>
- Returns the font size at [code]name[/code] if the theme has [code]theme_type[/code].
+ Returns the font size at [param name] if the theme has [param theme_type].
+ See [method Control.get_theme_color] for more details.
</description>
</method>
<method name="get_theme_icon" qualifiers="const">
<return type="Texture2D" />
- <argument index="0" name="name" type="StringName" />
- <argument index="1" name="theme_type" type="StringName" default="&quot;&quot;" />
+ <param index="0" name="name" type="StringName" />
+ <param index="1" name="theme_type" type="StringName" default="&quot;&quot;" />
<description>
+ Returns the icon at [param name] if the theme has [param theme_type].
+ See [method Control.get_theme_color] for more details.
</description>
</method>
<method name="get_theme_stylebox" qualifiers="const">
<return type="StyleBox" />
- <argument index="0" name="name" type="StringName" />
- <argument index="1" name="theme_type" type="StringName" default="&quot;&quot;" />
+ <param index="0" name="name" type="StringName" />
+ <param index="1" name="theme_type" type="StringName" default="&quot;&quot;" />
<description>
+ Returns the [StyleBox] at [param name] if the theme has [param theme_type].
+ See [method Control.get_theme_color] for more details.
</description>
</method>
<method name="grab_focus">
@@ -118,53 +136,56 @@
</method>
<method name="has_theme_color" qualifiers="const">
<return type="bool" />
- <argument index="0" name="name" type="StringName" />
- <argument index="1" name="theme_type" type="StringName" default="&quot;&quot;" />
+ <param index="0" name="name" type="StringName" />
+ <param index="1" name="theme_type" type="StringName" default="&quot;&quot;" />
<description>
+ Returns [code]true[/code] if [Color] with [param name] is in [param theme_type].
</description>
</method>
<method name="has_theme_constant" qualifiers="const">
<return type="bool" />
- <argument index="0" name="name" type="StringName" />
- <argument index="1" name="theme_type" type="StringName" default="&quot;&quot;" />
+ <param index="0" name="name" type="StringName" />
+ <param index="1" name="theme_type" type="StringName" default="&quot;&quot;" />
<description>
+ Returns [code]true[/code] if constant with [param name] is in [param theme_type].
</description>
</method>
<method name="has_theme_font" qualifiers="const">
<return type="bool" />
- <argument index="0" name="name" type="StringName" />
- <argument index="1" name="theme_type" type="StringName" default="&quot;&quot;" />
+ <param index="0" name="name" type="StringName" />
+ <param index="1" name="theme_type" type="StringName" default="&quot;&quot;" />
<description>
- Returns [code]true[/code] if [Font] with [code]name[/code] is in [code]theme_type[/code].
- Returns [code]false[/code] if the theme does not have [code]theme_type[/code].
+ Returns [code]true[/code] if [Font] with [param name] is in [param theme_type].
</description>
</method>
<method name="has_theme_font_size" qualifiers="const">
<return type="bool" />
- <argument index="0" name="name" type="StringName" />
- <argument index="1" name="theme_type" type="StringName" default="&quot;&quot;" />
+ <param index="0" name="name" type="StringName" />
+ <param index="1" name="theme_type" type="StringName" default="&quot;&quot;" />
<description>
- Returns [code]true[/code] if font size with [code]name[/code] is in [code]theme_type[/code].
- Returns [code]false[/code] if the theme does not have [code]theme_type[/code].
+ Returns [code]true[/code] if font size with [param name] is in [param theme_type].
</description>
</method>
<method name="has_theme_icon" qualifiers="const">
<return type="bool" />
- <argument index="0" name="name" type="StringName" />
- <argument index="1" name="theme_type" type="StringName" default="&quot;&quot;" />
+ <param index="0" name="name" type="StringName" />
+ <param index="1" name="theme_type" type="StringName" default="&quot;&quot;" />
<description>
+ Returns [code]true[/code] if icon with [param name] is in [param theme_type].
</description>
</method>
<method name="has_theme_stylebox" qualifiers="const">
<return type="bool" />
- <argument index="0" name="name" type="StringName" />
- <argument index="1" name="theme_type" type="StringName" default="&quot;&quot;" />
+ <param index="0" name="name" type="StringName" />
+ <param index="1" name="theme_type" type="StringName" default="&quot;&quot;" />
<description>
+ Returns [code]true[/code] if [StyleBox] with [param name] is in [param theme_type].
</description>
</method>
<method name="hide">
<return type="void" />
<description>
+ Hides the window. This is not the same as minimized state. Hidden window can't be interacted with and needs to be made visible with [method show].
</description>
</method>
<method name="is_embedded" qualifiers="const">
@@ -182,52 +203,65 @@
<method name="is_maximize_allowed" qualifiers="const">
<return type="bool" />
<description>
+ Returns [code]true[/code] if the window can be maximized (the maximize button is enabled).
</description>
</method>
<method name="is_using_font_oversampling" qualifiers="const">
<return type="bool" />
<description>
+ Returns [code]true[/code] if font oversampling is enabled. See [method set_use_font_oversampling].
</description>
</method>
<method name="move_to_foreground">
<return type="void" />
<description>
+ Moves the [Window] on top of other windows and focuses it.
</description>
</method>
<method name="popup">
<return type="void" />
- <argument index="0" name="rect" type="Rect2i" default="Rect2i(0, 0, 0, 0)" />
+ <param index="0" name="rect" type="Rect2i" default="Rect2i(0, 0, 0, 0)" />
<description>
+ Shows the [Window] and makes it transient (see [member transient]). If [param rect] is provided, it will be set as the [Window]'s size.
+ Fails if called on the main window.
</description>
</method>
<method name="popup_centered">
<return type="void" />
- <argument index="0" name="minsize" type="Vector2i" default="Vector2i(0, 0)" />
+ <param index="0" name="minsize" type="Vector2i" default="Vector2i(0, 0)" />
<description>
+ Popups the [Window] at the center of the current screen, with optionally given minimum size.
+ If the [Window] is embedded, it will be centered in the parent [Viewport] instead.
</description>
</method>
<method name="popup_centered_clamped">
<return type="void" />
- <argument index="0" name="minsize" type="Vector2i" default="Vector2i(0, 0)" />
- <argument index="1" name="fallback_ratio" type="float" default="0.75" />
+ <param index="0" name="minsize" type="Vector2i" default="Vector2i(0, 0)" />
+ <param index="1" name="fallback_ratio" type="float" default="0.75" />
<description>
+ Popups the [Window] centered inside its parent [Window].
+ [code]fallback_ratio[/code] determines the maximum size of the [Window], in relation to its parent.
</description>
</method>
<method name="popup_centered_ratio">
<return type="void" />
- <argument index="0" name="ratio" type="float" default="0.8" />
+ <param index="0" name="ratio" type="float" default="0.8" />
<description>
+ Popups the [Window] centered inside its parent [Window] and sets its size as a [param ratio] of parent's size.
</description>
</method>
<method name="popup_on_parent">
<return type="void" />
- <argument index="0" name="parent_rect" type="Rect2i" />
+ <param index="0" name="parent_rect" type="Rect2i" />
<description>
+ Popups the [Window] with a position shifted by parent [Window]'s position.
+ If the [Window] is embedded, has the same effect as [method popup].
</description>
</method>
<method name="request_attention">
<return type="void" />
<description>
+ Tells the OS that the [Window] needs an attention. This makes the window stand out in some way depending on the system, e.g. it might blink on the task bar.
</description>
</method>
<method name="reset_size">
@@ -238,46 +272,50 @@
</method>
<method name="set_flag">
<return type="void" />
- <argument index="0" name="flag" type="int" enum="Window.Flags" />
- <argument index="1" name="enabled" type="bool" />
+ <param index="0" name="flag" type="int" enum="Window.Flags" />
+ <param index="1" name="enabled" type="bool" />
<description>
Sets a specified window flag.
</description>
</method>
<method name="set_ime_active">
<return type="void" />
- <argument index="0" name="active" type="bool" />
+ <param index="0" name="active" type="bool" />
<description>
+ If [param active] is [code]true[/code], enables system's native IME (Input Method Editor).
</description>
</method>
<method name="set_ime_position">
<return type="void" />
- <argument index="0" name="position" type="Vector2i" />
+ <param index="0" name="position" type="Vector2i" />
<description>
+ Moves IME to the given position.
</description>
</method>
<method name="set_layout_direction">
<return type="void" />
- <argument index="0" name="direction" type="int" enum="Window.LayoutDirection" />
+ <param index="0" name="direction" type="int" enum="Window.LayoutDirection" />
<description>
Sets layout direction and text writing direction. Right-to-left layouts are necessary for certain languages (e.g. Arabic and Hebrew).
</description>
</method>
<method name="set_use_font_oversampling">
<return type="void" />
- <argument index="0" name="enable" type="bool" />
+ <param index="0" name="enable" type="bool" />
<description>
+ Enables font oversampling. This makes fonts look better when they are scaled up.
</description>
</method>
<method name="show">
<return type="void" />
<description>
+ Makes the [Window] appear. This enables interactions with the [Window] and doesn't change any of its property other than visibility (unlike e.g. [method popup]).
</description>
</method>
</methods>
<members>
<member name="always_on_top" type="bool" setter="set_flag" getter="get_flag" default="false">
- If [code]true[/code], the window will be on top of all other windows.
+ If [code]true[/code], the window will be on top of all other windows. Does not work if [member transient] is enabled.
</member>
<member name="auto_translate" type="bool" setter="set_auto_translate" getter="is_auto_translating" default="true">
Toggles if any text should automatically change to its translated version depending on the current locale.
@@ -286,27 +324,38 @@
If [code]true[/code], the window will have no borders.
</member>
<member name="content_scale_aspect" type="int" setter="set_content_scale_aspect" getter="get_content_scale_aspect" enum="Window.ContentScaleAspect" default="0">
+ Specifies how the content's aspect behaves when the [Window] is resized. The base aspect is determined by [member content_scale_size].
</member>
<member name="content_scale_factor" type="float" setter="set_content_scale_factor" getter="get_content_scale_factor" default="1.0">
+ Specifies the base scale of [Window]'s content when its [member size] is equal to [member content_scale_size].
</member>
<member name="content_scale_mode" type="int" setter="set_content_scale_mode" getter="get_content_scale_mode" enum="Window.ContentScaleMode" default="0">
+ Specifies how the content is scaled when the [Window] is resized.
</member>
<member name="content_scale_size" type="Vector2i" setter="set_content_scale_size" getter="get_content_scale_size" default="Vector2i(0, 0)">
+ Base size of the content (i.e. nodes that are drawn inside the window). If non-zero, [Window]'s content will be scaled when the window is resized to a different size.
</member>
<member name="current_screen" type="int" setter="set_current_screen" getter="get_current_screen" default="0">
The screen the window is currently on.
</member>
<member name="exclusive" type="bool" setter="set_exclusive" getter="is_exclusive" default="false">
+ 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="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].
</member>
<member name="min_size" type="Vector2i" setter="set_min_size" getter="get_min_size" default="Vector2i(0, 0)">
+ If non-zero, the [Window] can't be resized to be smaller than this size.
+ [b]Note:[/b] This property will be ignored in favor of [method get_contents_minimum_size] if [member wrap_controls] is enabled and if its size is bigger.
</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.
</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).
</member>
<member name="position" type="Vector2i" setter="set_position" getter="get_position" default="Vector2i(0, 0)">
The window's position in pixels.
@@ -315,38 +364,50 @@
The window's size in pixels.
</member>
<member name="theme" type="Theme" setter="set_theme" getter="get_theme">
+ The [Theme] resource that determines the style of the underlying [Control] nodes.
+ [Window] styles will have no effect unless the window is embedded.
</member>
<member name="theme_type_variation" type="StringName" setter="set_theme_type_variation" getter="get_theme_type_variation" default="&amp;&quot;&quot;">
+ The name of a theme type variation used by this [Window] to look up its own theme items. See [member Control.theme_type_variation] for more details.
</member>
<member name="title" type="String" setter="set_title" getter="get_title" default="&quot;&quot;">
- The window's title.
+ 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.
+ 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.
</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.
</member>
<member name="unresizable" type="bool" setter="set_flag" getter="get_flag" default="false">
- If [code]true[/code], the window can't be resized.
+ If [code]true[/code], the window can't be resized. Minimize and maximize buttons are disabled.
</member>
<member name="visible" type="bool" setter="set_visible" getter="is_visible" default="true">
If [code]true[/code], the window is visible.
</member>
<member name="wrap_controls" type="bool" setter="set_wrap_controls" getter="is_wrapping_controls" default="false">
+ If [code]true[/code], the window's size will automatically update when a child node is added or removed, ignoring [member min_size] if the new size is bigger.
+ If [code]false[/code], you need to call [method child_controls_changed] manually.
</member>
</members>
<signals>
<signal name="about_to_popup">
<description>
+ Emitted right after [method popup] call, before the [Window] appears or does anything.
</description>
</signal>
<signal name="close_requested">
<description>
+ Emitted when the [Window]'s close button is pressed or when [member popup_window] is enabled and user clicks outside the window.
+ This signal can be used to handle window closing, e.g. by connecting it to [method hide].
</description>
</signal>
<signal name="files_dropped">
- <argument index="0" name="files" type="PackedStringArray" />
+ <param index="0" name="files" type="PackedStringArray" />
<description>
Emitted when files are dragged from the OS file manager and dropped in the game window. The argument is a list of file paths.
Note that this method only works with non-embedded windows, i.e. the main window and [Window]-derived nodes when [member Viewport.gui_embed_subwindows] is disabled in the main viewport.
@@ -362,49 +423,58 @@
</signal>
<signal name="focus_entered">
<description>
+ Emitted when the [Window] gains focus.
</description>
</signal>
<signal name="focus_exited">
<description>
+ Emitted when the [Window] loses its focus.
</description>
</signal>
<signal name="go_back_requested">
<description>
+ Emitted when a go back request is sent (e.g. pressing the "Back" button on Android), right after [constant Node.NOTIFICATION_WM_GO_BACK_REQUEST].
</description>
</signal>
<signal name="mouse_entered">
<description>
+ Emitted when the mouse cursor enters the [Window]'s area, regardless if it's currently focused or not.
</description>
</signal>
<signal name="mouse_exited">
<description>
+ Emitted when the mouse cursor exits the [Window]'s area (including when it's hovered over another window on top of this one).
</description>
</signal>
<signal name="theme_changed">
<description>
+ Emitted when the [member theme] is modified or changed to another [Theme].
</description>
</signal>
<signal name="visibility_changed">
<description>
+ Emitted when [Window] is made visible or disappears.
</description>
</signal>
<signal name="window_input">
- <argument index="0" name="event" type="InputEvent" />
+ <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.
</description>
</signal>
</signals>
<constants>
<constant name="NOTIFICATION_VISIBILITY_CHANGED" value="30">
+ Emitted when [Window]'s visibility changes, right before [signal visibility_changed].
</constant>
<constant name="MODE_WINDOWED" value="0" enum="Mode">
- Windowed mode.
+ Windowed mode, i.e. [Window] doesn't occupy whole screen (unless set to the size of the screen).
</constant>
<constant name="MODE_MINIMIZED" value="1" enum="Mode">
- Minimized window 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.
</constant>
<constant name="MODE_MAXIMIZED" value="2" enum="Mode">
- Maximized window 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.
</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.
@@ -416,37 +486,49 @@
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.
</constant>
<constant name="FLAG_RESIZE_DISABLED" value="0" enum="Flags">
- The window's ability to be resized.
+ The window's ability to be resized. Set with [member unresizable].
</constant>
<constant name="FLAG_BORDERLESS" value="1" enum="Flags">
- Borderless window.
+ Borderless window. 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.
+ Flag for making the window always on top of all other 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].
</constant>
<constant name="FLAG_NO_FOCUS" value="4" enum="Flags">
+ The window's ability to gain focus. 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].
</constant>
<constant name="FLAG_MAX" value="6" enum="Flags">
+ Max value of the [enum Flags].
</constant>
<constant name="CONTENT_SCALE_MODE_DISABLED" value="0" enum="ContentScaleMode">
+ The content will not be scaled to match the [Window]'s size.
</constant>
<constant name="CONTENT_SCALE_MODE_CANVAS_ITEMS" value="1" enum="ContentScaleMode">
+ The content will be rendered at the target size. This is more performance-expensive than [constant CONTENT_SCALE_MODE_VIEWPORT], but provides better results.
</constant>
<constant name="CONTENT_SCALE_MODE_VIEWPORT" value="2" enum="ContentScaleMode">
+ The content will be rendered at the base size and then scaled to the target size. More performant than [constant CONTENT_SCALE_MODE_CANVAS_ITEMS], but results in pixelated image.
</constant>
<constant name="CONTENT_SCALE_ASPECT_IGNORE" value="0" enum="ContentScaleAspect">
+ The aspect will be ignored. Scaling will simply stretch the content to fit the target size.
</constant>
<constant name="CONTENT_SCALE_ASPECT_KEEP" value="1" enum="ContentScaleAspect">
+ The content's aspect will be preserved. If the target size has different aspect from the base one, the image will be centered and black bars will appear on left and right sides.
</constant>
<constant name="CONTENT_SCALE_ASPECT_KEEP_WIDTH" value="2" enum="ContentScaleAspect">
+ The content can be expanded vertically. Scaling horizontally will result in keeping the width ratio and then black bars on left and right sides.
</constant>
<constant name="CONTENT_SCALE_ASPECT_KEEP_HEIGHT" value="3" enum="ContentScaleAspect">
+ The content can be expanded horizontally. Scaling vertically will result in keeping the height ratio and then black bars on top and bottom sides.
</constant>
<constant name="CONTENT_SCALE_ASPECT_EXPAND" value="4" enum="ContentScaleAspect">
+ The content's aspect will be preserved. If the target size has different aspect from the base one, the content will stay in the to-left corner and add an extra visible area in the stretched space.
</constant>
<constant name="LAYOUT_DIRECTION_INHERITED" value="0" enum="LayoutDirection">
Automatic layout direction, determined from the parent window layout direction.
@@ -463,33 +545,41 @@
</constants>
<theme_items>
<theme_item name="title_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 1)">
+ The color of the title's text.
</theme_item>
<theme_item name="title_outline_modulate" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
- The color of the title outline.
+ The color of the title's text outline.
</theme_item>
<theme_item name="close_h_offset" data_type="constant" type="int" default="18">
+ Horizontal position offset of the close button.
</theme_item>
<theme_item name="close_v_offset" data_type="constant" type="int" default="24">
+ Vertical position offset of the close button.
</theme_item>
<theme_item name="resize_margin" data_type="constant" type="int" default="4">
- </theme_item>
- <theme_item name="scaleborder_size" data_type="constant" type="int" default="4">
+ Defines the outside margin at which the window border can be grabbed with mouse and resized.
</theme_item>
<theme_item name="title_height" data_type="constant" type="int" default="36">
+ Height of the title bar.
</theme_item>
<theme_item name="title_outline_size" data_type="constant" type="int" default="0">
The size of the title outline.
</theme_item>
<theme_item name="title_font" data_type="font" type="Font">
+ The font used to draw the title.
</theme_item>
<theme_item name="title_font_size" data_type="font_size" type="int">
The size of the title font.
</theme_item>
<theme_item name="close" data_type="icon" type="Texture2D">
+ The icon for the close button.
</theme_item>
<theme_item name="close_pressed" data_type="icon" type="Texture2D">
+ The icon for the close button when it's being pressed.
</theme_item>
<theme_item name="embedded_border" data_type="style" type="StyleBox">
+ The background style used when the [Window] is embedded. Note that this is drawn only under the window's content, excluding the title. For proper borders and title bar style, you can use [code]expand_margin_*[/code] properties of [StyleBoxFlat].
+ [b]Note:[/b] The content background will not be visible unless [member transparent] is enabled.
</theme_item>
</theme_items>
</class>
diff --git a/doc/classes/WorkerThreadPool.xml b/doc/classes/WorkerThreadPool.xml
new file mode 100644
index 0000000000..fced54ae7f
--- /dev/null
+++ b/doc/classes/WorkerThreadPool.xml
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="WorkerThreadPool" inherits="Object" 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_group_task">
+ <return type="int" />
+ <param index="0" name="action" type="Callable" />
+ <param index="1" name="elements" type="int" />
+ <param index="2" name="tasks_needed" type="int" default="-1" />
+ <param index="3" name="high_priority" type="bool" default="false" />
+ <param index="4" name="description" type="String" default="&quot;&quot;" />
+ <description>
+ </description>
+ </method>
+ <method name="add_task">
+ <return type="int" />
+ <param index="0" name="action" type="Callable" />
+ <param index="1" name="high_priority" type="bool" default="false" />
+ <param index="2" name="description" type="String" default="&quot;&quot;" />
+ <description>
+ </description>
+ </method>
+ <method name="get_group_processed_element_count" qualifiers="const">
+ <return type="int" />
+ <param index="0" name="group_id" type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="is_group_task_completed" qualifiers="const">
+ <return type="bool" />
+ <param index="0" name="group_id" type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="is_task_completed" qualifiers="const">
+ <return type="bool" />
+ <param index="0" name="task_id" type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="wait_for_group_task_completion">
+ <return type="void" />
+ <param index="0" name="group_id" type="int" />
+ <description>
+ </description>
+ </method>
+ <method name="wait_for_task_completion">
+ <return type="void" />
+ <param index="0" name="task_id" type="int" />
+ <description>
+ </description>
+ </method>
+ </methods>
+</class>
diff --git a/doc/classes/World3D.xml b/doc/classes/World3D.xml
index c57029a180..56a662d062 100644
--- a/doc/classes/World3D.xml
+++ b/doc/classes/World3D.xml
@@ -19,7 +19,7 @@
The World3D's [Environment].
</member>
<member name="fallback_environment" type="Environment" setter="set_fallback_environment" getter="get_fallback_environment">
- The World3D's fallback_environment will be used if the World3D's [Environment] fails or is missing.
+ The World3D's fallback environment will be used if [member environment] fails or is missing.
</member>
<member name="navigation_map" type="RID" setter="" getter="get_navigation_map">
The [RID] of this world's navigation map. Used by the [NavigationServer3D].
diff --git a/doc/classes/WorldEnvironment.xml b/doc/classes/WorldEnvironment.xml
index 8afe169874..ed8f0b9a04 100644
--- a/doc/classes/WorldEnvironment.xml
+++ b/doc/classes/WorldEnvironment.xml
@@ -16,6 +16,7 @@
</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>
<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 e5d8b45db6..d8f54d0ec5 100644
--- a/doc/classes/X509Certificate.xml
+++ b/doc/classes/X509Certificate.xml
@@ -6,23 +6,22 @@
<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].
- [b]Note:[/b] Not available in HTML5 exports.
</description>
<tutorials>
</tutorials>
<methods>
<method name="load">
<return type="int" enum="Error" />
- <argument index="0" name="path" type="String" />
+ <param index="0" name="path" type="String" />
<description>
- Loads a certificate from [code]path[/code] ("*.crt" file).
+ Loads a certificate from [param path] ("*.crt" file).
</description>
</method>
<method name="save">
<return type="int" enum="Error" />
- <argument index="0" name="path" type="String" />
+ <param index="0" name="path" type="String" />
<description>
- Saves a certificate to the given [code]path[/code] (should be a "*.crt" file).
+ Saves a certificate to the given [param path] (should be a "*.crt" file).
</description>
</method>
</methods>
diff --git a/doc/classes/XMLParser.xml b/doc/classes/XMLParser.xml
index c40a07c40a..26480f0c18 100644
--- a/doc/classes/XMLParser.xml
+++ b/doc/classes/XMLParser.xml
@@ -12,41 +12,41 @@
<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">
<return type="String" />
- <argument index="0" name="idx" type="int" />
+ <param index="0" name="idx" type="int" />
<description>
- Gets the name of the attribute specified by the index in [code]idx[/code] argument.
+ Gets the name of the attribute specified by the [param idx] index.
</description>
</method>
<method name="get_attribute_value" qualifiers="const">
<return type="String" />
- <argument index="0" name="idx" type="int" />
+ <param index="0" name="idx" type="int" />
<description>
- Gets the value of the attribute specified by the index in [code]idx[/code] argument.
+ Gets the value of the attribute specified by the [param idx] index.
</description>
</method>
<method name="get_current_line" qualifiers="const">
<return type="int" />
<description>
- Gets the current line in the parsed file (currently not implemented).
+ Gets the current line in the parsed file, counting from 0.
</description>
</method>
<method name="get_named_attribute_value" qualifiers="const">
<return type="String" />
- <argument index="0" name="name" type="String" />
+ <param index="0" name="name" type="String" />
<description>
- Gets the value of a certain attribute of the current element by name. This will raise an error if the element has no such attribute.
+ Gets the value of a certain attribute of the current element by [param name]. This will raise an error if the element has no such attribute.
</description>
</method>
<method name="get_named_attribute_value_safe" qualifiers="const">
<return type="String" />
- <argument index="0" name="name" type="String" />
+ <param index="0" name="name" type="String" />
<description>
- Gets the value of a certain attribute of the current element by name. This will return an empty [String] if the attribute is not found.
+ Gets the value of a certain attribute of the current element by [param name]. This will return an empty [String] if the attribute is not found.
</description>
</method>
<method name="get_node_data" qualifiers="const">
@@ -75,7 +75,7 @@
</method>
<method name="has_attribute" qualifiers="const">
<return type="bool" />
- <argument index="0" name="name" type="String" />
+ <param index="0" name="name" type="String" />
<description>
Check whether the current element has a certain attribute.
</description>
@@ -88,16 +88,16 @@
</method>
<method name="open">
<return type="int" enum="Error" />
- <argument index="0" name="file" type="String" />
+ <param index="0" name="file" type="String" />
<description>
- Opens an XML file for parsing. This returns an error code.
+ Opens an XML [param file] for parsing. This returns an error code.
</description>
</method>
<method name="open_buffer">
<return type="int" enum="Error" />
- <argument index="0" name="buffer" type="PackedByteArray" />
+ <param index="0" name="buffer" type="PackedByteArray" />
<description>
- Opens an XML raw buffer for parsing. This returns an error code.
+ Opens an XML raw [param buffer] for parsing. This returns an error code.
</description>
</method>
<method name="read">
@@ -108,7 +108,7 @@
</method>
<method name="seek">
<return type="int" enum="Error" />
- <argument index="0" name="position" type="int" />
+ <param index="0" name="position" type="int" />
<description>
Moves the buffer cursor to a certain offset (since the beginning) and read the next node there. This returns an error code.
</description>
diff --git a/doc/classes/XRCamera3D.xml b/doc/classes/XRCamera3D.xml
index e0fc016a7d..4d6baa327b 100644
--- a/doc/classes/XRCamera3D.xml
+++ b/doc/classes/XRCamera3D.xml
@@ -8,6 +8,6 @@
The position and orientation of this node is automatically updated by the XR Server to represent the location of the HMD if such tracking is available and can thus be used by game logic. Note that, in contrast to the XR Controller, the render thread has access to the most up-to-date tracking data of the HMD and the location of the XRCamera3D can lag a few milliseconds behind what is used for rendering as a result.
</description>
<tutorials>
- <link title="VR documentation index">$DOCS_URL/tutorials/vr/index.html</link>
+ <link title="XR documentation index">$DOCS_URL/tutorials/xr/index.html</link>
</tutorials>
</class>
diff --git a/doc/classes/XRController3D.xml b/doc/classes/XRController3D.xml
index deea888b8f..9e192177e5 100644
--- a/doc/classes/XRController3D.xml
+++ b/doc/classes/XRController3D.xml
@@ -10,14 +10,14 @@
As many XR runtimes now use a configurable action map all inputs are named.
</description>
<tutorials>
- <link title="VR documentation index">$DOCS_URL/tutorials/vr/index.html</link>
+ <link title="XR documentation index">$DOCS_URL/tutorials/xr/index.html</link>
</tutorials>
<methods>
<method name="get_axis" qualifiers="const">
<return type="Vector2" />
- <argument index="0" name="name" type="StringName" />
+ <param index="0" name="name" type="StringName" />
<description>
- Returns a [Vector2] for the input with the given [code]name[/code]. This is used for thumbsticks and thumbpads found on many controllers.
+ Returns a [Vector2] for the input with the given [param name]. This is used for thumbsticks and thumbpads found on many controllers.
</description>
</method>
<method name="get_tracker_hand" qualifiers="const">
@@ -28,42 +28,42 @@
</method>
<method name="get_value" qualifiers="const">
<return type="float" />
- <argument index="0" name="name" type="StringName" />
+ <param index="0" name="name" type="StringName" />
<description>
- Returns a numeric value for the input with the given [code]name[/code]. This is used for triggers and grip sensors.
+ Returns a numeric value for the input with the given [param name]. This is used for triggers and grip sensors.
</description>
</method>
<method name="is_button_pressed" qualifiers="const">
<return type="bool" />
- <argument index="0" name="name" type="StringName" />
+ <param index="0" name="name" type="StringName" />
<description>
- Returns [code]true[/code] if the button with the given [code]name[/code] is pressed.
+ Returns [code]true[/code] if the button with the given [param name] is pressed.
</description>
</method>
</methods>
<signals>
<signal name="button_pressed">
- <argument index="0" name="name" type="String" />
+ <param index="0" name="name" type="String" />
<description>
Emitted when a button on this controller is pressed.
</description>
</signal>
<signal name="button_released">
- <argument index="0" name="name" type="String" />
+ <param index="0" name="name" type="String" />
<description>
Emitted when a button on this controller is released.
</description>
</signal>
<signal name="input_axis_changed">
- <argument index="0" name="name" type="String" />
- <argument index="1" name="value" type="Vector2" />
+ <param index="0" name="name" type="String" />
+ <param index="1" name="value" type="Vector2" />
<description>
Emitted when a thumbstick or thumbpad on this controller is moved.
</description>
</signal>
<signal name="input_value_changed">
- <argument index="0" name="name" type="String" />
- <argument index="1" name="value" type="float" />
+ <param index="0" name="name" type="String" />
+ <param index="1" name="value" type="float" />
<description>
Emitted when a trigger or similar input on this controller changes value.
</description>
diff --git a/doc/classes/XRInterface.xml b/doc/classes/XRInterface.xml
index 0f4159cbbf..6296b95e6c 100644
--- a/doc/classes/XRInterface.xml
+++ b/doc/classes/XRInterface.xml
@@ -8,7 +8,7 @@
Interfaces should be written in such a way that simply enabling them will give us a working setup. You can query the available interfaces through [XRServer].
</description>
<tutorials>
- <link title="VR documentation index">$DOCS_URL/tutorials/vr/index.html</link>
+ <link title="XR documentation index">$DOCS_URL/tutorials/xr/index.html</link>
</tutorials>
<methods>
<method name="get_camera_feed_id">
@@ -71,30 +71,30 @@
</method>
<method name="set_play_area_mode">
<return type="bool" />
- <argument index="0" name="mode" type="int" enum="XRInterface.PlayAreaMode" />
+ <param index="0" name="mode" type="int" enum="XRInterface.PlayAreaMode" />
<description>
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="supports_play_area_mode">
<return type="bool" />
- <argument index="0" name="mode" type="int" enum="XRInterface.PlayAreaMode" />
+ <param index="0" name="mode" type="int" enum="XRInterface.PlayAreaMode" />
<description>
Call this to find out if a given play area mode is supported by this interface.
</description>
</method>
<method name="trigger_haptic_pulse">
<return type="void" />
- <argument index="0" name="action_name" type="String" />
- <argument index="1" name="tracker_name" type="StringName" />
- <argument index="2" name="frequency" type="float" />
- <argument index="3" name="amplitude" type="float" />
- <argument index="4" name="duration_sec" type="float" />
- <argument index="5" name="delay_sec" type="float" />
+ <param index="0" name="action_name" type="String" />
+ <param index="1" name="tracker_name" type="StringName" />
+ <param index="2" name="frequency" type="float" />
+ <param index="3" name="amplitude" type="float" />
+ <param index="4" name="duration_sec" type="float" />
+ <param index="5" name="delay_sec" type="float" />
<description>
Triggers a haptic pulse on a device associated with this interface.
- [code]action_name[/code] is the name of the action for this pulse.
- [code]tracker_name[/code] is optional and can be used to direct the pulse to a specific device provided that device is bound to this haptic.
+ [param action_name] is the name of the action for this pulse.
+ [param tracker_name] is optional and can be used to direct the pulse to a specific device provided that device is bound to this haptic.
</description>
</method>
<method name="uninitialize">
@@ -117,7 +117,7 @@
</members>
<signals>
<signal name="play_area_changed">
- <argument index="0" name="mode" type="int" />
+ <param index="0" name="mode" type="int" />
<description>
Emitted when the play area is changed. This can be a result of the player resetting the boundary or entering a new play area, the player changing the play area mode, the world scale changing or the player resetting their headset orientation.
</description>
diff --git a/doc/classes/XRInterfaceExtension.xml b/doc/classes/XRInterfaceExtension.xml
index 71f6a44724..06ef18b534 100644
--- a/doc/classes/XRInterfaceExtension.xml
+++ b/doc/classes/XRInterfaceExtension.xml
@@ -59,10 +59,10 @@
</method>
<method name="_get_projection_for_view" qualifiers="virtual">
<return type="PackedFloat64Array" />
- <argument index="0" name="view" type="int" />
- <argument index="1" name="aspect" type="float" />
- <argument index="2" name="z_near" type="float" />
- <argument index="3" name="z_far" type="float" />
+ <param index="0" name="view" type="int" />
+ <param index="1" name="aspect" type="float" />
+ <param index="2" name="z_near" type="float" />
+ <param index="3" name="z_far" type="float" />
<description>
Returns the projection matrix for the given view as a [PackedFloat64Array].
</description>
@@ -75,7 +75,7 @@
</method>
<method name="_get_suggested_pose_names" qualifiers="virtual const">
<return type="PackedStringArray" />
- <argument index="0" name="tracker_name" type="StringName" />
+ <param index="0" name="tracker_name" type="StringName" />
<description>
Returns a [PackedStringArray] with pose names configured by this interface. Note that user configuration can override this list.
</description>
@@ -94,8 +94,8 @@
</method>
<method name="_get_transform_for_view" qualifiers="virtual">
<return type="Transform3D" />
- <argument index="0" name="view" type="int" />
- <argument index="1" name="cam_transform" type="Transform3D" />
+ <param index="0" name="view" type="int" />
+ <param index="1" name="cam_transform" type="Transform3D" />
<description>
Returns a [Transform3D] for a given view.
</description>
@@ -106,6 +106,11 @@
Returns the number of views this interface requires, 1 for mono, 2 for stereoscopic.
</description>
</method>
+ <method name="_get_vrs_texture" qualifiers="virtual">
+ <return type="RID" />
+ <description>
+ </description>
+ </method>
<method name="_initialize" qualifiers="virtual">
<return type="bool" />
<description>
@@ -120,22 +125,22 @@
</method>
<method name="_notification" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="what" type="int" />
+ <param index="0" name="what" type="int" />
<description>
Informs the interface of an applicable system notification.
</description>
</method>
<method name="_post_draw_viewport" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="render_target" type="RID" />
- <argument index="1" name="screen_rect" type="Rect2" />
+ <param index="0" name="render_target" type="RID" />
+ <param index="1" name="screen_rect" type="Rect2" />
<description>
Called after the XR [Viewport] draw logic has completed.
</description>
</method>
<method name="_pre_draw_viewport" qualifiers="virtual">
<return type="bool" />
- <argument index="0" name="render_target" type="RID" />
+ <param index="0" name="render_target" type="RID" />
<description>
Called if this is our primary [XRInterfaceExtension] before we start processing a [Viewport] for every active XR [Viewport], returns [code]true[/code] if that viewport should be rendered. An XR interface may return [code]false[/code] if the user has taken off their headset and we can pause rendering.
</description>
@@ -154,33 +159,33 @@
</method>
<method name="_set_anchor_detection_is_enabled" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="enabled" type="bool" />
+ <param index="0" name="enabled" type="bool" />
<description>
Enables anchor detection on this interface if supported.
</description>
</method>
<method name="_set_play_area_mode" qualifiers="virtual const">
<return type="bool" />
- <argument index="0" name="mode" type="int" />
+ <param index="0" name="mode" type="int" />
<description>
Set the play area mode for this interface.
</description>
</method>
<method name="_supports_play_area_mode" qualifiers="virtual const">
<return type="bool" />
- <argument index="0" name="mode" type="int" enum="XRInterface.PlayAreaMode" />
+ <param index="0" name="mode" type="int" enum="XRInterface.PlayAreaMode" />
<description>
Returns [code]true[/code] if this interface supports this play area mode.
</description>
</method>
<method name="_trigger_haptic_pulse" qualifiers="virtual">
<return type="void" />
- <argument index="0" name="action_name" type="String" />
- <argument index="1" name="tracker_name" type="StringName" />
- <argument index="2" name="frequency" type="float" />
- <argument index="3" name="amplitude" type="float" />
- <argument index="4" name="duration_sec" type="float" />
- <argument index="5" name="delay_sec" type="float" />
+ <param index="0" name="action_name" type="String" />
+ <param index="1" name="tracker_name" type="StringName" />
+ <param index="2" name="frequency" type="float" />
+ <param index="3" name="amplitude" type="float" />
+ <param index="4" name="duration_sec" type="float" />
+ <param index="5" name="delay_sec" type="float" />
<description>
Triggers a haptic pulse to be emitted on the specified tracker.
</description>
@@ -193,24 +198,24 @@
</method>
<method name="add_blit">
<return type="void" />
- <argument index="0" name="render_target" type="RID" />
- <argument index="1" name="src_rect" type="Rect2" />
- <argument index="2" name="dst_rect" type="Rect2i" />
- <argument index="3" name="use_layer" type="bool" />
- <argument index="4" name="layer" type="int" />
- <argument index="5" name="apply_lens_distortion" type="bool" />
- <argument index="6" name="eye_center" type="Vector2" />
- <argument index="7" name="k1" type="float" />
- <argument index="8" name="k2" type="float" />
- <argument index="9" name="upscale" type="float" />
- <argument index="10" name="aspect_ratio" type="float" />
+ <param index="0" name="render_target" type="RID" />
+ <param index="1" name="src_rect" type="Rect2" />
+ <param index="2" name="dst_rect" type="Rect2i" />
+ <param index="3" name="use_layer" type="bool" />
+ <param index="4" name="layer" type="int" />
+ <param index="5" name="apply_lens_distortion" type="bool" />
+ <param index="6" name="eye_center" type="Vector2" />
+ <param index="7" name="k1" type="float" />
+ <param index="8" name="k2" type="float" />
+ <param index="9" name="upscale" type="float" />
+ <param index="10" name="aspect_ratio" type="float" />
<description>
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_render_target_texture">
<return type="RID" />
- <argument index="0" name="render_target" type="RID" />
+ <param index="0" name="render_target" type="RID" />
<description>
Returns a valid [RID] for a texture to which we should render the current frame if supported by the interface.
</description>
diff --git a/doc/classes/XRNode3D.xml b/doc/classes/XRNode3D.xml
index bb9dccc2e0..1507a3fe45 100644
--- a/doc/classes/XRNode3D.xml
+++ b/doc/classes/XRNode3D.xml
@@ -29,14 +29,14 @@
</method>
<method name="trigger_haptic_pulse">
<return type="void" />
- <argument index="0" name="action_name" type="String" />
- <argument index="1" name="frequency" type="float" />
- <argument index="2" name="amplitude" type="float" />
- <argument index="3" name="duration_sec" type="float" />
- <argument index="4" name="delay_sec" type="float" />
+ <param index="0" name="action_name" type="String" />
+ <param index="1" name="frequency" type="float" />
+ <param index="2" name="amplitude" type="float" />
+ <param index="3" name="duration_sec" type="float" />
+ <param index="4" name="delay_sec" type="float" />
<description>
Triggers a haptic pulse on a device associated with this interface.
- [code]action_name[/code] is the name of the action for this pulse.
+ [param action_name] is the name of the action for this pulse.
</description>
</method>
</methods>
diff --git a/doc/classes/XROrigin3D.xml b/doc/classes/XROrigin3D.xml
index b7811f4d53..7acee097e7 100644
--- a/doc/classes/XROrigin3D.xml
+++ b/doc/classes/XROrigin3D.xml
@@ -10,7 +10,7 @@
For example, if your character is driving a car, the XROrigin3D node should be a child node of this car. Or, if you're implementing a teleport system to move your character, you should change the position of this node.
</description>
<tutorials>
- <link title="VR documentation index">$DOCS_URL/tutorials/vr/index.html</link>
+ <link title="XR documentation index">$DOCS_URL/tutorials/xr/index.html</link>
</tutorials>
<members>
<member name="world_scale" type="float" setter="set_world_scale" getter="get_world_scale" default="1.0">
diff --git a/doc/classes/XRPositionalTracker.xml b/doc/classes/XRPositionalTracker.xml
index d15558c9e8..db2910f25e 100644
--- a/doc/classes/XRPositionalTracker.xml
+++ b/doc/classes/XRPositionalTracker.xml
@@ -9,52 +9,52 @@
The [XRController3D] and [XRAnchor3D] both consume objects of this type and should be used in your project. The positional trackers are just under-the-hood objects that make this all work. These are mostly exposed so that GDExtension-based interfaces can interact with them.
</description>
<tutorials>
- <link title="VR documentation index">$DOCS_URL/tutorials/vr/index.html</link>
+ <link title="XR documentation index">$DOCS_URL/tutorials/xr/index.html</link>
</tutorials>
<methods>
<method name="get_input" qualifiers="const">
<return type="Variant" />
- <argument index="0" name="name" type="StringName" />
+ <param index="0" name="name" type="StringName" />
<description>
Returns an input for this tracker. It can return a boolean, float or [Vector2] value depending on whether the input is a button, trigger or thumbstick/thumbpad.
</description>
</method>
<method name="get_pose" qualifiers="const">
<return type="XRPose" />
- <argument index="0" name="name" type="StringName" />
+ <param index="0" name="name" type="StringName" />
<description>
- Returns the current [XRPose] state object for the bound [code]pose[/code].
+ Returns the current [XRPose] state object for the bound [param name] pose.
</description>
</method>
<method name="has_pose" qualifiers="const">
<return type="bool" />
- <argument index="0" name="name" type="StringName" />
+ <param index="0" name="name" type="StringName" />
<description>
- Returns [code]true[/code] if the bound [code]tracker[/code] is available and is currently tracking the bound [code]pose[/code].
+ Returns [code]true[/code] if the tracker is available and is currently tracking the bound [param name] pose.
</description>
</method>
<method name="invalidate_pose">
<return type="void" />
- <argument index="0" name="name" type="StringName" />
+ <param index="0" name="name" type="StringName" />
<description>
Marks this pose as invalid, we don't clear the last reported state but it allows users to decide if trackers need to be hidden if we loose tracking or just remain at their last known position.
</description>
</method>
<method name="set_input">
<return type="void" />
- <argument index="0" name="name" type="StringName" />
- <argument index="1" name="value" type="Variant" />
+ <param index="0" name="name" type="StringName" />
+ <param index="1" name="value" type="Variant" />
<description>
Changes the value for the given input. This method is called by a [XRInterface] implementation and should not be used directly.
</description>
</method>
<method name="set_pose">
<return type="void" />
- <argument index="0" name="name" type="StringName" />
- <argument index="1" name="transform" type="Transform3D" />
- <argument index="2" name="linear_velocity" type="Vector3" />
- <argument index="3" name="angular_velocity" type="Vector3" />
- <argument index="4" name="tracking_confidence" type="int" enum="XRPose.TrackingConfidence" />
+ <param index="0" name="name" type="StringName" />
+ <param index="1" name="transform" type="Transform3D" />
+ <param index="2" name="linear_velocity" type="Vector3" />
+ <param index="3" name="angular_velocity" type="Vector3" />
+ <param index="4" name="tracking_confidence" type="int" enum="XRPose.TrackingConfidence" />
<description>
Sets the transform, linear velocity, angular velocity and tracking confidence for the given pose. This method is called by a [XRInterface] implementation and should not be used directly.
</description>
@@ -81,39 +81,39 @@
</members>
<signals>
<signal name="button_pressed">
- <argument index="0" name="name" type="String" />
+ <param index="0" name="name" type="String" />
<description>
Emitted when a button on this tracker is pressed. Note that many XR runtimes allow other inputs to be mapped to buttons.
</description>
</signal>
<signal name="button_released">
- <argument index="0" name="name" type="String" />
+ <param index="0" name="name" type="String" />
<description>
Emitted when a button on this tracker is released.
</description>
</signal>
<signal name="input_axis_changed">
- <argument index="0" name="name" type="String" />
- <argument index="1" name="vector" type="Vector2" />
+ <param index="0" name="name" type="String" />
+ <param index="1" name="vector" type="Vector2" />
<description>
Emitted when a thumbstick or thumbpad on this tracker moves.
</description>
</signal>
<signal name="input_value_changed">
- <argument index="0" name="name" type="String" />
- <argument index="1" name="value" type="float" />
+ <param index="0" name="name" type="String" />
+ <param index="1" name="value" type="float" />
<description>
Emitted when a trigger or similar input on this tracker changes value.
</description>
</signal>
<signal name="pose_changed">
- <argument index="0" name="pose" type="XRPose" />
+ <param index="0" name="pose" type="XRPose" />
<description>
Emitted when the state of a pose tracked by this tracker changes.
</description>
</signal>
<signal name="profile_changed">
- <argument index="0" name="role" type="String" />
+ <param index="0" name="role" type="String" />
<description>
Emitted when the profile of our tracker changes.
</description>
diff --git a/doc/classes/XRServer.xml b/doc/classes/XRServer.xml
index a322a3c5c9..48b00323d3 100644
--- a/doc/classes/XRServer.xml
+++ b/doc/classes/XRServer.xml
@@ -7,27 +7,27 @@
The AR/VR server is the heart of our Advanced and Virtual Reality solution and handles all the processing.
</description>
<tutorials>
- <link title="VR documentation index">$DOCS_URL/tutorials/vr/index.html</link>
+ <link title="XR documentation index">$DOCS_URL/tutorials/xr/index.html</link>
</tutorials>
<methods>
<method name="add_interface">
<return type="void" />
- <argument index="0" name="interface" type="XRInterface" />
+ <param index="0" name="interface" type="XRInterface" />
<description>
Registers an [XRInterface] object.
</description>
</method>
<method name="add_tracker">
<return type="void" />
- <argument index="0" name="tracker" type="XRPositionalTracker" />
+ <param index="0" name="tracker" type="XRPositionalTracker" />
<description>
Registers a new [XRPositionalTracker] that tracks a spatial location in real space.
</description>
</method>
<method name="center_on_hmd">
<return type="void" />
- <argument index="0" name="rotation_mode" type="int" enum="XRServer.RotationMode" />
- <argument index="1" name="keep_height" type="bool" />
+ <param index="0" name="rotation_mode" type="int" enum="XRServer.RotationMode" />
+ <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.
@@ -39,9 +39,9 @@
</method>
<method name="find_interface" qualifiers="const">
<return type="XRInterface" />
- <argument index="0" name="name" type="String" />
+ <param index="0" name="name" type="String" />
<description>
- Finds an interface by its 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 instance, 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">
@@ -52,9 +52,9 @@
</method>
<method name="get_interface" qualifiers="const">
<return type="XRInterface" />
- <argument index="0" name="idx" type="int" />
+ <param index="0" name="idx" type="int" />
<description>
- Returns the interface registered at a given index in our list of interfaces.
+ Returns the interface registered at the given [param idx] index in the list of interfaces.
</description>
</method>
<method name="get_interface_count" qualifiers="const">
@@ -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>
@@ -77,30 +77,30 @@
</method>
<method name="get_tracker" qualifiers="const">
<return type="XRPositionalTracker" />
- <argument index="0" name="tracker_name" type="StringName" />
+ <param index="0" name="tracker_name" type="StringName" />
<description>
- Returns the positional tracker with this name.
+ Returns the positional tracker with the given [param tracker_name].
</description>
</method>
<method name="get_trackers">
<return type="Dictionary" />
- <argument index="0" name="tracker_types" type="int" />
+ <param index="0" name="tracker_types" type="int" />
<description>
- Returns a dictionary of trackers for this type.
+ Returns a dictionary of trackers for [param tracker_types].
</description>
</method>
<method name="remove_interface">
<return type="void" />
- <argument index="0" name="interface" type="XRInterface" />
+ <param index="0" name="interface" type="XRInterface" />
<description>
- Removes this interface.
+ Removes this [param interface].
</description>
</method>
<method name="remove_tracker">
<return type="void" />
- <argument index="0" name="tracker" type="XRPositionalTracker" />
+ <param index="0" name="tracker" type="XRPositionalTracker" />
<description>
- Removes this positional tracker.
+ Removes this positional [param tracker].
</description>
</method>
</methods>
@@ -114,34 +114,34 @@
</members>
<signals>
<signal name="interface_added">
- <argument index="0" name="interface_name" type="StringName" />
+ <param index="0" name="interface_name" type="StringName" />
<description>
Emitted when a new interface has been added.
</description>
</signal>
<signal name="interface_removed">
- <argument index="0" name="interface_name" type="StringName" />
+ <param index="0" name="interface_name" type="StringName" />
<description>
Emitted when an interface is removed.
</description>
</signal>
<signal name="tracker_added">
- <argument index="0" name="tracker_name" type="StringName" />
- <argument index="1" name="type" type="int" />
+ <param index="0" name="tracker_name" type="StringName" />
+ <param index="1" name="type" type="int" />
<description>
Emitted when a new tracker has been added. If you don't use a fixed number of controllers or if you're using [XRAnchor3D]s for an AR solution, it is important to react to this signal to add the appropriate [XRController3D] or [XRAnchor3D] nodes related to this new tracker.
</description>
</signal>
<signal name="tracker_removed">
- <argument index="0" name="tracker_name" type="StringName" />
- <argument index="1" name="type" type="int" />
+ <param index="0" name="tracker_name" type="StringName" />
+ <param index="1" name="type" type="int" />
<description>
Emitted when a tracker is removed. You should remove any [XRController3D] or [XRAnchor3D] points if applicable. This is not mandatory, the nodes simply become inactive and will be made active again when a new tracker becomes available (i.e. a new controller is switched on that takes the place of the previous one).
</description>
</signal>
<signal name="tracker_updated">
- <argument index="0" name="tracker_name" type="StringName" />
- <argument index="1" name="type" type="int" />
+ <param index="0" name="tracker_name" type="StringName" />
+ <param index="1" name="type" type="int" />
<description>
Emitted when an existing tracker has been updated. This can happen if the user switches controllers.
</description>
diff --git a/doc/classes/bool.xml b/doc/classes/bool.xml
index 374b703636..d0ef664281 100644
--- a/doc/classes/bool.xml
+++ b/doc/classes/bool.xml
@@ -100,21 +100,21 @@
</constructor>
<constructor name="bool">
<return type="bool" />
- <argument index="0" name="from" type="bool" />
+ <param index="0" name="from" type="bool" />
<description>
Constructs a [bool] as a copy of the given [bool].
</description>
</constructor>
<constructor name="bool">
<return type="bool" />
- <argument index="0" name="from" type="float" />
+ <param index="0" name="from" type="float" />
<description>
Cast a [float] value to a boolean value, this method will return [code]false[/code] if [code]0.0[/code] is passed in, and [code]true[/code] for all other floats.
</description>
</constructor>
<constructor name="bool">
<return type="bool" />
- <argument index="0" name="from" type="int" />
+ <param index="0" name="from" type="int" />
<description>
Cast an [int] value to a boolean value, this method will return [code]false[/code] if [code]0[/code] is passed in, and [code]true[/code] for all other ints.
</description>
@@ -123,28 +123,28 @@
<operators>
<operator name="operator !=">
<return type="bool" />
- <argument index="0" name="right" type="bool" />
+ <param index="0" name="right" type="bool" />
<description>
Returns [code]true[/code] if two bools are different, i.e. one is [code]true[/code] and the other is [code]false[/code].
</description>
</operator>
<operator name="operator &lt;">
<return type="bool" />
- <argument index="0" name="right" type="bool" />
+ <param index="0" name="right" type="bool" />
<description>
Returns [code]true[/code] if the left operand is [code]false[/code] and the right operand is [code]true[/code].
</description>
</operator>
<operator name="operator ==">
<return type="bool" />
- <argument index="0" name="right" type="bool" />
+ <param index="0" name="right" type="bool" />
<description>
Returns [code]true[/code] if two bools are equal, i.e. both are [code]true[/code] or both are [code]false[/code].
</description>
</operator>
<operator name="operator &gt;">
<return type="bool" />
- <argument index="0" name="right" type="bool" />
+ <param index="0" name="right" type="bool" />
<description>
Returns [code]true[/code] if the left operand is [code]true[/code] and the right operand is [code]false[/code].
</description>
diff --git a/doc/classes/float.xml b/doc/classes/float.xml
index 50961f9c7f..9d685b9cd0 100644
--- a/doc/classes/float.xml
+++ b/doc/classes/float.xml
@@ -21,21 +21,21 @@
</constructor>
<constructor name="float">
<return type="float" />
- <argument index="0" name="from" type="float" />
+ <param index="0" name="from" type="float" />
<description>
Constructs a [float] as a copy of the given [float].
</description>
</constructor>
<constructor name="float">
<return type="float" />
- <argument index="0" name="from" type="bool" />
+ <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.
</description>
</constructor>
<constructor name="float">
<return type="float" />
- <argument index="0" name="from" type="int" />
+ <param index="0" name="from" type="int" />
<description>
Cast an [int] value to a floating-point value, [code]float(1)[/code] will be equal to [code]1.0[/code].
</description>
@@ -44,21 +44,21 @@
<operators>
<operator name="operator !=">
<return type="bool" />
- <argument index="0" name="right" type="float" />
+ <param index="0" name="right" type="float" />
<description>
Returns [code]true[/code] if two floats are different from each other.
</description>
</operator>
<operator name="operator !=">
<return type="bool" />
- <argument index="0" name="right" type="int" />
+ <param index="0" name="right" type="int" />
<description>
Returns [code]true[/code] if the integer has different value than the float.
</description>
</operator>
<operator name="operator *">
<return type="Color" />
- <argument index="0" name="right" type="Color" />
+ <param index="0" name="right" type="Color" />
<description>
Multiplies each component of the [Color] by the given [float].
[codeblock]
@@ -68,14 +68,14 @@
</operator>
<operator name="operator *">
<return type="Quaternion" />
- <argument index="0" name="right" type="Quaternion" />
+ <param index="0" name="right" type="Quaternion" />
<description>
Multiplies each component of the [Quaternion] by the given [float]. This operation is not meaningful on its own, but it can be used as a part of a larger expression.
</description>
</operator>
<operator name="operator *">
<return type="Vector2" />
- <argument index="0" name="right" type="Vector2" />
+ <param index="0" name="right" type="Vector2" />
<description>
Multiplies each component of the [Vector2] by the given [float].
[codeblock]
@@ -85,7 +85,7 @@
</operator>
<operator name="operator *">
<return type="Vector2" />
- <argument index="0" name="right" type="Vector2i" />
+ <param index="0" name="right" type="Vector2i" />
<description>
Multiplies each component of the [Vector2i] by the given [float]. Returns a [Vector2].
[codeblock]
@@ -95,14 +95,14 @@
</operator>
<operator name="operator *">
<return type="Vector3" />
- <argument index="0" name="right" type="Vector3" />
+ <param index="0" name="right" type="Vector3" />
<description>
Multiplies each component of the [Vector3] by the given [float].
</description>
</operator>
<operator name="operator *">
<return type="Vector3" />
- <argument index="0" name="right" type="Vector3i" />
+ <param index="0" name="right" type="Vector3i" />
<description>
Multiplies each component of the [Vector3i] by the given [float]. Returns a [Vector3].
[codeblock]
@@ -111,92 +111,116 @@
</description>
</operator>
<operator name="operator *">
+ <return type="Vector4" />
+ <param index="0" name="right" type="Vector4" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator *">
+ <return type="Vector4" />
+ <param index="0" name="right" type="Vector4i" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator *">
<return type="float" />
- <argument index="0" name="right" type="float" />
+ <param index="0" name="right" type="float" />
<description>
Multiplies two [float]s.
</description>
</operator>
<operator name="operator *">
<return type="float" />
- <argument index="0" name="right" type="int" />
+ <param index="0" name="right" type="int" />
<description>
Multiplies a [float] and an [int]. The result is a [float].
</description>
</operator>
+ <operator name="operator **">
+ <return type="float" />
+ <param index="0" name="right" type="float" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator **">
+ <return type="float" />
+ <param index="0" name="right" type="int" />
+ <description>
+ </description>
+ </operator>
<operator name="operator +">
<return type="float" />
- <argument index="0" name="right" type="float" />
+ <param index="0" name="right" type="float" />
<description>
Adds two floats.
</description>
</operator>
<operator name="operator +">
<return type="float" />
- <argument index="0" name="right" type="int" />
+ <param index="0" name="right" type="int" />
<description>
Adds a [float] and an [int]. The result is a [float].
</description>
</operator>
<operator name="operator -">
<return type="float" />
- <argument index="0" name="right" type="float" />
+ <param index="0" name="right" type="float" />
<description>
Subtracts a float from a float.
</description>
</operator>
<operator name="operator -">
<return type="float" />
- <argument index="0" name="right" type="int" />
+ <param index="0" name="right" type="int" />
<description>
Subtracts an [int] from a [float]. The result is a [float].
</description>
</operator>
<operator name="operator /">
<return type="float" />
- <argument index="0" name="right" type="float" />
+ <param index="0" name="right" type="float" />
<description>
Divides two floats.
</description>
</operator>
<operator name="operator /">
<return type="float" />
- <argument index="0" name="right" type="int" />
+ <param index="0" name="right" type="int" />
<description>
Divides a [float] by an [int]. The result is a [float].
</description>
</operator>
<operator name="operator &lt;">
<return type="bool" />
- <argument index="0" name="right" type="float" />
+ <param index="0" name="right" type="float" />
<description>
Returns [code]true[/code] the left float is less than the right one.
</description>
</operator>
<operator name="operator &lt;">
<return type="bool" />
- <argument index="0" name="right" type="int" />
+ <param index="0" name="right" type="int" />
<description>
Returns [code]true[/code] if this [float] is less than the given [int].
</description>
</operator>
<operator name="operator &lt;=">
<return type="bool" />
- <argument index="0" name="right" type="float" />
+ <param index="0" name="right" type="float" />
<description>
Returns [code]true[/code] the left integer is less than or equal to the right one.
</description>
</operator>
<operator name="operator &lt;=">
<return type="bool" />
- <argument index="0" name="right" type="int" />
+ <param index="0" name="right" type="int" />
<description>
Returns [code]true[/code] if this [float] is less than or equal to the given [int].
</description>
</operator>
<operator name="operator ==">
<return type="bool" />
- <argument index="0" name="right" type="float" />
+ <param index="0" name="right" type="float" />
<description>
Returns [code]true[/code] if both floats are exactly equal.
[b]Note:[/b] Due to floating-point precision errors, consider using [method @GlobalScope.is_equal_approx] or [method @GlobalScope.is_zero_approx] instead, which are more reliable.
@@ -204,35 +228,35 @@
</operator>
<operator name="operator ==">
<return type="bool" />
- <argument index="0" name="right" type="int" />
+ <param index="0" name="right" type="int" />
<description>
Returns [code]true[/code] if the [float] and the given [int] are equal.
</description>
</operator>
<operator name="operator &gt;">
<return type="bool" />
- <argument index="0" name="right" type="float" />
+ <param index="0" name="right" type="float" />
<description>
Returns [code]true[/code] the left float is greater than the right one.
</description>
</operator>
<operator name="operator &gt;">
<return type="bool" />
- <argument index="0" name="right" type="int" />
+ <param index="0" name="right" type="int" />
<description>
Returns [code]true[/code] if this [float] is greater than the given [int].
</description>
</operator>
<operator name="operator &gt;=">
<return type="bool" />
- <argument index="0" name="right" type="float" />
+ <param index="0" name="right" type="float" />
<description>
Returns [code]true[/code] the left float is greater than or equal to the right one.
</description>
</operator>
<operator name="operator &gt;=">
<return type="bool" />
- <argument index="0" name="right" type="int" />
+ <param index="0" name="right" type="int" />
<description>
Returns [code]true[/code] if this [float] is greater than or equal to the given [int].
</description>
diff --git a/doc/classes/int.xml b/doc/classes/int.xml
index 609291b69c..78e2e7d18f 100644
--- a/doc/classes/int.xml
+++ b/doc/classes/int.xml
@@ -47,44 +47,44 @@
</constructor>
<constructor name="int">
<return type="int" />
- <argument index="0" name="from" type="int" />
+ <param index="0" name="from" type="int" />
<description>
Constructs an [int] as a copy of the given [int].
</description>
</constructor>
<constructor name="int">
<return type="int" />
- <argument index="0" name="from" type="bool" />
+ <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.
</description>
</constructor>
<constructor name="int">
<return type="int" />
- <argument index="0" name="from" type="float" />
+ <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>
<operators>
<operator name="operator !=">
<return type="bool" />
- <argument index="0" name="right" type="float" />
+ <param index="0" name="right" type="float" />
<description>
Returns [code]true[/code] if operands are different from each other.
</description>
</operator>
<operator name="operator !=">
<return type="bool" />
- <argument index="0" name="right" type="int" />
+ <param index="0" name="right" type="int" />
<description>
Returns [code]true[/code] if operands are different from each other.
</description>
</operator>
<operator name="operator %">
<return type="int" />
- <argument index="0" name="right" type="int" />
+ <param index="0" name="right" type="int" />
<description>
Returns the remainder after dividing two integers. 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]
@@ -96,7 +96,7 @@
</operator>
<operator name="operator &amp;">
<return type="int" />
- <argument index="0" name="right" type="int" />
+ <param index="0" name="right" type="int" />
<description>
Returns the result of bitwise [code]AND[/code] operation for two integers.
[codeblock]
@@ -114,21 +114,21 @@
</operator>
<operator name="operator *">
<return type="Color" />
- <argument index="0" name="right" type="Color" />
+ <param index="0" name="right" type="Color" />
<description>
Multiplies each component of the [Color] by the given [int].
</description>
</operator>
<operator name="operator *">
<return type="Quaternion" />
- <argument index="0" name="right" type="Quaternion" />
+ <param index="0" name="right" type="Quaternion" />
<description>
Multiplies each component of the [Quaternion] by the given [int]. This operation is not meaningful on its own, but it can be used as a part of a larger expression.
</description>
</operator>
<operator name="operator *">
<return type="Vector2" />
- <argument index="0" name="right" type="Vector2" />
+ <param index="0" name="right" type="Vector2" />
<description>
Multiplies each component of the [Vector2] by the given [int].
[codeblock]
@@ -138,77 +138,101 @@
</operator>
<operator name="operator *">
<return type="Vector2i" />
- <argument index="0" name="right" type="Vector2i" />
+ <param index="0" name="right" type="Vector2i" />
<description>
Multiplies each component of the [Vector2i] by the given [int].
</description>
</operator>
<operator name="operator *">
<return type="Vector3" />
- <argument index="0" name="right" type="Vector3" />
+ <param index="0" name="right" type="Vector3" />
<description>
Multiplies each component of the [Vector3] by the given [int].
</description>
</operator>
<operator name="operator *">
<return type="Vector3i" />
- <argument index="0" name="right" type="Vector3i" />
+ <param index="0" name="right" type="Vector3i" />
<description>
Multiplies each component of the [Vector3i] by the given [int].
</description>
</operator>
<operator name="operator *">
+ <return type="Vector4" />
+ <param index="0" name="right" type="Vector4" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator *">
+ <return type="Vector4i" />
+ <param index="0" name="right" type="Vector4i" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator *">
<return type="float" />
- <argument index="0" name="right" type="float" />
+ <param index="0" name="right" type="float" />
<description>
Multiplies an [int] and a [float]. The result is a [float].
</description>
</operator>
<operator name="operator *">
<return type="int" />
- <argument index="0" name="right" type="int" />
+ <param index="0" name="right" type="int" />
<description>
Multiplies two [int]s.
</description>
</operator>
+ <operator name="operator **">
+ <return type="float" />
+ <param index="0" name="right" type="float" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator **">
+ <return type="int" />
+ <param index="0" name="right" type="int" />
+ <description>
+ </description>
+ </operator>
<operator name="operator +">
<return type="String" />
- <argument index="0" name="right" type="String" />
+ <param index="0" name="right" type="String" />
<description>
Adds Unicode character with code [int] to the [String].
</description>
</operator>
<operator name="operator +">
<return type="float" />
- <argument index="0" name="right" type="float" />
+ <param index="0" name="right" type="float" />
<description>
Adds an [int] and a [float]. The result is a [float].
</description>
</operator>
<operator name="operator +">
<return type="int" />
- <argument index="0" name="right" type="int" />
+ <param index="0" name="right" type="int" />
<description>
Adds two integers.
</description>
</operator>
<operator name="operator -">
<return type="float" />
- <argument index="0" name="right" type="float" />
+ <param index="0" name="right" type="float" />
<description>
Subtracts a [float] from an [int]. The result is a [float].
</description>
</operator>
<operator name="operator -">
<return type="int" />
- <argument index="0" name="right" type="int" />
+ <param index="0" name="right" type="int" />
<description>
Subtracts two integers.
</description>
</operator>
<operator name="operator /">
<return type="float" />
- <argument index="0" name="right" type="float" />
+ <param index="0" name="right" type="float" />
<description>
Divides an [int] by a [float]. The result is a [float].
[codeblock]
@@ -218,7 +242,7 @@
</operator>
<operator name="operator /">
<return type="int" />
- <argument index="0" name="right" type="int" />
+ <param index="0" name="right" type="int" />
<description>
Divides two integers. The decimal part of the result is discarded (truncated).
[codeblock]
@@ -229,21 +253,21 @@
</operator>
<operator name="operator &lt;">
<return type="bool" />
- <argument index="0" name="right" type="float" />
+ <param index="0" name="right" type="float" />
<description>
Returns [code]true[/code] if this [int] is less than the given [float].
</description>
</operator>
<operator name="operator &lt;">
<return type="bool" />
- <argument index="0" name="right" type="int" />
+ <param index="0" name="right" type="int" />
<description>
Returns [code]true[/code] the left integer is less than the right one.
</description>
</operator>
<operator name="operator &lt;&lt;">
<return type="int" />
- <argument index="0" name="right" type="int" />
+ <param index="0" name="right" type="int" />
<description>
Performs bitwise shift left operation on the integer. Effectively the same as multiplying by a power of 2.
[codeblock]
@@ -254,63 +278,63 @@
</operator>
<operator name="operator &lt;=">
<return type="bool" />
- <argument index="0" name="right" type="float" />
+ <param index="0" name="right" type="float" />
<description>
Returns [code]true[/code] if this [int] is less than or equal to the given [float].
</description>
</operator>
<operator name="operator &lt;=">
<return type="bool" />
- <argument index="0" name="right" type="int" />
+ <param index="0" name="right" type="int" />
<description>
Returns [code]true[/code] the left integer is less than or equal to the right one.
</description>
</operator>
<operator name="operator ==">
<return type="bool" />
- <argument index="0" name="right" type="float" />
+ <param index="0" name="right" type="float" />
<description>
Returns [code]true[/code] if the integer is equal to the given [float].
</description>
</operator>
<operator name="operator ==">
<return type="bool" />
- <argument index="0" name="right" type="int" />
+ <param index="0" name="right" type="int" />
<description>
Returns [code]true[/code] if both integers are equal.
</description>
</operator>
<operator name="operator &gt;">
<return type="bool" />
- <argument index="0" name="right" type="float" />
+ <param index="0" name="right" type="float" />
<description>
Returns [code]true[/code] if this [int] is greater than the given [float].
</description>
</operator>
<operator name="operator &gt;">
<return type="bool" />
- <argument index="0" name="right" type="int" />
+ <param index="0" name="right" type="int" />
<description>
Returns [code]true[/code] the left integer is greater than the right one.
</description>
</operator>
<operator name="operator &gt;=">
<return type="bool" />
- <argument index="0" name="right" type="float" />
+ <param index="0" name="right" type="float" />
<description>
Returns [code]true[/code] if this [int] is greater than or equal to the given [float].
</description>
</operator>
<operator name="operator &gt;=">
<return type="bool" />
- <argument index="0" name="right" type="int" />
+ <param index="0" name="right" type="int" />
<description>
Returns [code]true[/code] the left integer is greater than or equal to the right one.
</description>
</operator>
<operator name="operator &gt;&gt;">
<return type="int" />
- <argument index="0" name="right" type="int" />
+ <param index="0" name="right" type="int" />
<description>
Performs bitwise shift right operation on the integer. Effectively the same as dividing by a power of 2.
[codeblock]
@@ -321,7 +345,7 @@
</operator>
<operator name="operator ^">
<return type="int" />
- <argument index="0" name="right" type="int" />
+ <param index="0" name="right" type="int" />
<description>
Returns the result of bitwise [code]XOR[/code] operation for two integers.
[codeblock]
@@ -344,7 +368,7 @@
</operator>
<operator name="operator |">
<return type="int" />
- <argument index="0" name="right" type="int" />
+ <param index="0" name="right" type="int" />
<description>
Returns the result of bitwise [code]OR[/code] operation for two integers.
[codeblock]